@backstage/cli 0.36.7-next.0 → 0.36.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @backstage/cli
2
2
 
3
+ ## 0.36.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 933e50e: The ESLint configuration for packages with the `common-library` role now reports named imports from `lodash`, such as `import { trimEnd } from 'lodash'`. Common libraries are published with an ESM build, and these imports cause that build to fail when imported from ESM projects in Node.js. Use `import lodash from 'lodash'` instead.
8
+ - 36e3f24: Updated the test runner to use the latest Jest 30 releases.
9
+ - Updated dependencies
10
+ - @backstage/cli-node@0.3.5
11
+ - @backstage/cli-module-test-jest@0.1.7
12
+ - @backstage/eslint-plugin@0.3.3
13
+ - @backstage/cli-module-build@0.1.9
14
+ - @backstage/cli-common@0.3.2
15
+ - @backstage/cli-defaults@0.1.7
16
+
3
17
  ## 0.36.7-next.0
4
18
 
5
19
  ### Patch Changes
@@ -208,7 +208,28 @@ function createConfig(dir, extraConfig = {}) {
208
208
  function createConfigForRole(dir, role, extraConfig = {}) {
209
209
  switch (role) {
210
210
  case 'common-library':
211
- return createConfig(dir, extraConfig);
211
+ return createConfig(dir, {
212
+ ...extraConfig,
213
+ restrictedSrcSyntax: [
214
+ {
215
+ // Common libraries are published with an ESM build that Node.js
216
+ // loads natively, and Node.js can't resolve named imports from
217
+ // CommonJS modules such as lodash. Type-only imports are erased
218
+ // during compilation and are therefore fine.
219
+ message:
220
+ "Named imports from 'lodash' break ESM consumers of common libraries, use `import lodash from 'lodash'` instead.",
221
+ selector:
222
+ "ImportDeclaration[source.value='lodash'][importKind!='type'] > ImportSpecifier[importKind!='type']",
223
+ },
224
+ {
225
+ message:
226
+ "Named re-exports from 'lodash' break ESM consumers of common libraries, use `import lodash from 'lodash'` instead.",
227
+ selector:
228
+ "ExportNamedDeclaration[source.value='lodash'][exportKind!='type'] > ExportSpecifier[exportKind!='type']",
229
+ },
230
+ ...(extraConfig.restrictedSrcSyntax ?? []),
231
+ ],
232
+ });
212
233
 
213
234
  case 'web-library':
214
235
  case 'frontend':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.36.7-next.0",
3
+ "version": "0.36.7",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -42,12 +42,12 @@
42
42
  "watch": "./src"
43
43
  },
44
44
  "dependencies": {
45
- "@backstage/cli-common": "0.3.2-next.0",
46
- "@backstage/cli-defaults": "0.1.7-next.0",
47
- "@backstage/cli-module-build": "0.1.9-next.0",
48
- "@backstage/cli-module-test-jest": "0.1.7-next.0",
49
- "@backstage/cli-node": "0.3.5-next.0",
50
- "@backstage/eslint-plugin": "0.3.2",
45
+ "@backstage/cli-common": "^0.3.2",
46
+ "@backstage/cli-defaults": "^0.1.7",
47
+ "@backstage/cli-module-build": "^0.1.9",
48
+ "@backstage/cli-module-test-jest": "^0.1.7",
49
+ "@backstage/cli-node": "^0.3.5",
50
+ "@backstage/eslint-plugin": "^0.3.3",
51
51
  "@manypkg/get-packages": "^1.1.3",
52
52
  "@spotify/eslint-config-base": "^15.0.0",
53
53
  "@spotify/eslint-config-react": "^15.0.0",
@@ -76,21 +76,21 @@
76
76
  "yaml": "^2.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@backstage/backend-plugin-api": "1.10.2-next.0",
80
- "@backstage/backend-test-utils": "1.11.8-next.0",
81
- "@backstage/catalog-client": "1.16.3-next.0",
82
- "@backstage/config": "1.3.10-next.0",
83
- "@backstage/core-app-api": "1.20.6-next.0",
84
- "@backstage/core-components": "0.18.15-next.0",
85
- "@backstage/core-plugin-api": "1.12.11-next.0",
86
- "@backstage/dev-utils": "1.1.28-next.0",
87
- "@backstage/plugin-auth-backend": "0.30.2-next.0",
88
- "@backstage/plugin-auth-backend-module-guest-provider": "0.2.24-next.0",
89
- "@backstage/plugin-catalog-node": "2.2.6-next.0",
90
- "@backstage/plugin-scaffolder-node": "0.13.8-next.0",
91
- "@backstage/plugin-scaffolder-node-test-utils": "0.3.16-next.0",
92
- "@backstage/test-utils": "1.7.23-next.0",
93
- "@backstage/theme": "0.7.3",
79
+ "@backstage/backend-plugin-api": "^1.11.0",
80
+ "@backstage/backend-test-utils": "^1.11.8",
81
+ "@backstage/catalog-client": "^1.16.3",
82
+ "@backstage/config": "^1.3.10",
83
+ "@backstage/core-app-api": "^1.20.6",
84
+ "@backstage/core-components": "^0.18.15",
85
+ "@backstage/core-plugin-api": "^1.12.11",
86
+ "@backstage/dev-utils": "^1.1.28",
87
+ "@backstage/plugin-auth-backend": "^0.30.2",
88
+ "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.24",
89
+ "@backstage/plugin-catalog-node": "^2.2.6",
90
+ "@backstage/plugin-scaffolder-node": "^0.13.8",
91
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.3.16",
92
+ "@backstage/test-utils": "^1.7.23",
93
+ "@backstage/theme": "^0.7.3",
94
94
  "@jest/environment-jsdom-abstract": "^30.5.0",
95
95
  "@types/fs-extra": "^11.0.0",
96
96
  "@types/jest": "^30.0.0",