Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-adoption-insights': patch
---

Export translations module as default for NFS auto-discovery
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.tsx",
"./adoption-insights-translations-module": "./src/adoptionInsightsTranslationsModuleExport.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha.tsx"
],
"adoption-insights-translations-module": [
"src/adoptionInsightsTranslationsModuleExport.ts"
],
"package.json": [
"package.json"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-adoption-insights"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @alpha
const adoptionInsightsTranslationsModule: FrontendModule;
export default adoptionInsightsTranslationsModule;

// (No @packageDocumentation comment for this package)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { adoptionInsightsTranslationsModule as default } from './alpha';
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import plugin from './alpha';
import plugin, { adoptionInsightsTranslationsModule } from './alpha';
import translationsModuleDefault from './adoptionInsightsTranslationsModuleExport';

describe('adoption-insights alpha', () => {
it('should export a valid frontend plugin', () => {
Expand All @@ -29,4 +30,15 @@ describe('adoption-insights alpha', () => {
expect(plugin.routes).toBeDefined();
expect(plugin.routes).toHaveProperty('root');
});

it('should export a translations module targeting the app plugin', () => {
expect(adoptionInsightsTranslationsModule).toBeDefined();
expect(adoptionInsightsTranslationsModule.$$type).toBe(
'@backstage/FrontendModule',
);
});

it('should export the translations module as default for NFS discovery', () => {
expect(translationsModuleDefault).toBe(adoptionInsightsTranslationsModule);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const adoptionInsightsApi = ApiBlueprint.make({
});

const adoptionInsightsTranslation = TranslationBlueprint.make({
name: 'adoption-insights-translations',
params: {
resource: adoptionInsightsTranslations,
},
Expand Down
5 changes: 5 additions & 0 deletions workspaces/bulk-import/.changeset/quiet-wolves-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-bulk-import': patch
---

Export translations module as default for NFS auto-discovery
4 changes: 4 additions & 0 deletions workspaces/bulk-import/plugins/bulk-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
".": "./src/index.tsx",
"./alpha": "./src/alpha.ts",
"./legacy": "./src/legacyExports.ts",
"./bulk-import-translations-module": "./src/bulkImportTranslationsModuleExport.ts",
"./package.json": "./package.json"
},
"typesVersions": {
Expand All @@ -18,6 +19,9 @@
"legacy": [
"src/legacyExports.ts"
],
"bulk-import-translations-module": [
"src/bulkImportTranslationsModuleExport.ts"
],
"package.json": [
"package.json"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-bulk-import"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @public
const bulkImportTranslationsModule: FrontendModule;
export default bulkImportTranslationsModule;

// (No @packageDocumentation comment for this package)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { bulkImportTranslationsModule as default } from './index';
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import translationsModuleDefault from './bulkImportTranslationsModuleExport';
import { bulkImportTranslationsModule } from './index';

describe('bulk-import NFS exports', () => {
it('should export a translations module as a FrontendModule', () => {
expect(bulkImportTranslationsModule).toBeDefined();
expect(bulkImportTranslationsModule.$$type).toBe(
'@backstage/FrontendModule',
);
});

it('should export the translations module as default for NFS discovery', () => {
expect(translationsModuleDefault).toBe(bulkImportTranslationsModule);
});
});
5 changes: 5 additions & 0 deletions workspaces/extensions/.changeset/brave-eagles-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-extensions': patch
---

Export translations module as default for NFS auto-discovery
4 changes: 4 additions & 0 deletions workspaces/extensions/plugins/extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha/index.tsx",
"./extensions-translations-module": "./src/extensionsTranslationsModuleExport.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha/index.tsx"
],
"extensions-translations-module": [
"src/extensionsTranslationsModuleExport.ts"
],
"package.json": [
"package.json"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-extensions"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @alpha
const extensionsTranslationsModule: FrontendModule;
export default extensionsTranslationsModule;

// (No @packageDocumentation comment for this package)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { extensionsTranslationsModule as default } from './alpha';
30 changes: 30 additions & 0 deletions workspaces/extensions/plugins/extensions/src/nfsExports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { extensionsTranslationsModule } from './alpha';
import translationsModuleDefault from './extensionsTranslationsModuleExport';

describe('extensions NFS exports', () => {
it('should export a translations module as a FrontendModule', () => {
expect(extensionsTranslationsModule).toBeDefined();
expect(extensionsTranslationsModule.$$type).toBe(
'@backstage/FrontendModule',
);
});

it('should export the translations module as default for NFS discovery', () => {
expect(translationsModuleDefault).toBe(extensionsTranslationsModule);
});
});
5 changes: 5 additions & 0 deletions workspaces/global-header/.changeset/smooth-foxes-leap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-global-header': patch
---

Export translations module as default for NFS auto-discovery
4 changes: 4 additions & 0 deletions workspaces/global-header/plugins/global-header/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha/index.ts",
"./global-header-translations-module": "./src/globalHeaderTranslationsModuleExport.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha/index.ts"
],
"global-header-translations-module": [
"src/globalHeaderTranslationsModuleExport.ts"
],
"package.json": [
"package.json"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-global-header"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @alpha
const globalHeaderTranslationsModule: FrontendModule;
export default globalHeaderTranslationsModule;

// (No @packageDocumentation comment for this package)
```
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export { globalHeaderTranslationRef } from '../translations/ref';
export { globalHeaderTranslations } from '../translations';

const globalHeaderTranslation = TranslationBlueprint.make({
name: 'global-header-translations',
params: {
resource: globalHeaderTranslations,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { globalHeaderTranslationsModule as default } from './alpha';
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { globalHeaderTranslationsModule } from './alpha';
import translationsModuleDefault from './globalHeaderTranslationsModuleExport';

describe('global-header NFS exports', () => {
it('should export a translations module as a FrontendModule', () => {
expect(globalHeaderTranslationsModule).toBeDefined();
expect(globalHeaderTranslationsModule.$$type).toBe(
'@backstage/FrontendModule',
);
});

it('should export the translations module as default for NFS discovery', () => {
expect(translationsModuleDefault).toBe(globalHeaderTranslationsModule);
});
});
5 changes: 5 additions & 0 deletions workspaces/homepage/.changeset/clever-hawks-soar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-homepage': patch
---

Export translations module as default for NFS auto-discovery
4 changes: 4 additions & 0 deletions workspaces/homepage/plugins/homepage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha/index.ts",
"./homepage-translations-module": "./src/homepageTranslationsModuleExport.ts",
"./package.json": "./package.json"
},
"sideEffects": false,
Expand All @@ -32,6 +33,9 @@
"alpha": [
"src/alpha/index.ts"
],
"homepage-translations-module": [
"src/homepageTranslationsModuleExport.ts"
],
"package.json": [
"package.json"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-homepage"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { FrontendModule } from '@backstage/frontend-plugin-api';

// @alpha
const homepageTranslationsModule: FrontendModule;
export default homepageTranslationsModule;

// (No @packageDocumentation comment for this package)
```
Loading
Loading