@backstage/cli 0.34.2-next.2 → 0.34.3

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,33 @@
1
1
  # @backstage/cli
2
2
 
3
+ ## 0.34.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 10df043: Fixed module federation config by only setting `import: false` on shared libraries for remote.
8
+
9
+ ## 0.34.2
10
+
11
+ ### Patch Changes
12
+
13
+ - e6f45dc: Updated the WebPack configuration to use `contenthash`. This fixes an issue were builds would sometimes generate output files with the same name but different content across builds, leading to breakages when loading the frontend app.
14
+ - fffd434: Disallow import fallback of critical shared dependencies in module federation.
15
+ - 080f252: Fixed the `new-frontend-plugin` template that was incorrectly passing `id` instead of `pluginId` to `createFrontendPlugin` and unnecessarily importing `React`.
16
+ - e0db9b8: Modify the `backstage.json` also for custom patterns if it extends the default pattern.
17
+
18
+ Examples:
19
+
20
+ - `@backstage/*` (default pattern)
21
+ - `@{backstage,backstage-community}/*`
22
+ - `@{extra1,backstage,extra2}/*`
23
+
24
+ - 275bda8: Fixed an issue that could cause conflicts of detected modules in workspaces with multiple apps.
25
+ - e1adce4: Updated the backend plugin template to use a new pattern for the `TodoListService` that reduces boilerplate.
26
+ - Updated dependencies
27
+ - @backstage/config-loader@1.10.3
28
+ - @backstage/integration@1.18.0
29
+ - @backstage/types@1.2.2
30
+
3
31
  ## 0.34.2-next.2
4
32
 
5
33
  ### Patch Changes
@@ -188,25 +188,31 @@ async function createConfig(paths, options) {
188
188
  react: {
189
189
  singleton: true,
190
190
  requiredVersion: "*",
191
- eager: !isRemote
191
+ eager: !isRemote,
192
+ ...isRemote && { import: false }
192
193
  },
193
194
  "react-dom": {
194
195
  singleton: true,
195
196
  requiredVersion: "*",
196
- eager: !isRemote
197
+ eager: !isRemote,
198
+ ...isRemote && { import: false }
197
199
  },
198
200
  // React Router
199
201
  "react-router": {
200
202
  singleton: true,
201
203
  requiredVersion: "*",
202
- eager: !isRemote
204
+ eager: !isRemote,
205
+ ...isRemote && { import: false }
203
206
  },
204
207
  "react-router-dom": {
205
208
  singleton: true,
206
209
  requiredVersion: "*",
207
- eager: !isRemote
210
+ eager: !isRemote,
211
+ ...isRemote && { import: false }
208
212
  },
209
213
  // MUI v4
214
+ // not setting import: false for MUI packages as this
215
+ // will break once Backstage moves to BUI
210
216
  "@material-ui/core/styles": {
211
217
  singleton: true,
212
218
  requiredVersion: "*",
@@ -218,6 +224,8 @@ async function createConfig(paths, options) {
218
224
  eager: !isRemote
219
225
  },
220
226
  // MUI v5
227
+ // not setting import: false for MUI packages as this
228
+ // will break once Backstage moves to BUI
221
229
  "@mui/material/styles/": {
222
230
  singleton: true,
223
231
  requiredVersion: "*",
@@ -332,8 +340,8 @@ async function createConfig(paths, options) {
332
340
  uniqueName: options.moduleFederation?.name,
333
341
  path: paths.targetDist,
334
342
  publicPath: options.moduleFederation?.mode === "remote" ? "auto" : `${publicPath}/`,
335
- filename: isDev ? "[name].js" : "static/[name].[fullhash:8].js",
336
- chunkFilename: isDev ? "[name].chunk.js" : "static/[name].[chunkhash:8].chunk.js",
343
+ filename: isDev ? "[name].js" : "static/[name].[contenthash:8].js",
344
+ chunkFilename: isDev ? "[name].chunk.js" : "static/[name].[contenthash:8].chunk.js",
337
345
  ...isDev ? {
338
346
  devtoolModuleFilenameTemplate: (info) => `file:///${path.resolve(info.absoluteResourcePath).replace(
339
347
  /\\/g,
@@ -41,7 +41,7 @@ const optimization = (options) => {
41
41
  )[1];
42
42
  return packageName.replace("@", "");
43
43
  },
44
- filename: isDev ? "module-[name].js" : "static/module-[name].[chunkhash:8].js",
44
+ filename: isDev ? "module-[name].js" : "static/module-[name].[contenthash:8].js",
45
45
  priority: 10,
46
46
  minSize: 1e5,
47
47
  minChunks: 1,
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var fs = require('fs-extra');
6
6
  var chalk = require('chalk');
7
+ var minimatch = require('minimatch');
7
8
  var semver = require('semver');
8
9
  var yaml = require('yaml');
9
10
  var z = require('zod');
@@ -46,6 +47,12 @@ const DEP_TYPES = [
46
47
  "optionalDependencies"
47
48
  ];
48
49
  const DEFAULT_PATTERN_GLOB = "@backstage/*";
50
+ function extendsDefaultPattern(pattern) {
51
+ if (!pattern.endsWith("/*")) {
52
+ return false;
53
+ }
54
+ return minimatch.minimatch("@backstage/", pattern.slice(0, -1));
55
+ }
49
56
  var bump = async (opts) => {
50
57
  const lockfilePath = paths.paths.resolveTargetRoot("yarn.lock");
51
58
  const lockfile = await Lockfile.Lockfile.load(lockfilePath);
@@ -174,7 +181,7 @@ var bump = async (opts) => {
174
181
  }
175
182
  });
176
183
  console.log();
177
- if (pattern === DEFAULT_PATTERN_GLOB) {
184
+ if (extendsDefaultPattern(pattern)) {
178
185
  await bumpBackstageJsonVersion(
179
186
  releaseManifest.releaseVersion,
180
187
  hasYarnPlugin
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.12.1-next.1";
3
+ var version = "0.12.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.4.3-next.0";
3
+ var version = "1.4.3";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.9.0-next.1";
3
+ var version = "1.9.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.12.0-next.0";
3
+ var version = "1.12.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.34.2-next.2";
3
+ var version = "0.34.3";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.18.0";
3
+ var version = "1.19.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.17.6-next.1";
3
+ var version = "0.18.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.10.9";
3
+ var version = "1.11.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.1.14-next.2";
3
+ var version = "1.1.14";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.1-next.0";
3
+ var version = "0.3.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.11.1-next.0";
3
+ var version = "0.12.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.6-next.0";
3
+ var version = "0.3.6";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.2.1";
3
+ var version = "1.2.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.25.4-next.1";
3
+ var version = "0.25.4";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.2.12-next.0";
3
+ var version = "0.2.12";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.19.0-next.1";
3
+ var version = "1.19.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.11.1-next.0";
3
+ var version = "0.11.1";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.3-next.1";
3
+ var version = "0.3.3";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.34.2-next.2",
3
+ "version": "0.34.3",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -47,16 +47,16 @@
47
47
  ]
48
48
  },
49
49
  "dependencies": {
50
- "@backstage/catalog-model": "1.7.5",
51
- "@backstage/cli-common": "0.1.15",
52
- "@backstage/cli-node": "0.2.14",
53
- "@backstage/config": "1.3.3",
54
- "@backstage/config-loader": "1.10.3-next.0",
55
- "@backstage/errors": "1.2.7",
56
- "@backstage/eslint-plugin": "0.1.11",
57
- "@backstage/integration": "1.18.0-next.0",
58
- "@backstage/release-manifests": "0.0.13",
59
- "@backstage/types": "1.2.1",
50
+ "@backstage/catalog-model": "^1.7.5",
51
+ "@backstage/cli-common": "^0.1.15",
52
+ "@backstage/cli-node": "^0.2.14",
53
+ "@backstage/config": "^1.3.3",
54
+ "@backstage/config-loader": "^1.10.3",
55
+ "@backstage/errors": "^1.2.7",
56
+ "@backstage/eslint-plugin": "^0.1.11",
57
+ "@backstage/integration": "^1.18.0",
58
+ "@backstage/release-manifests": "^0.0.13",
59
+ "@backstage/types": "^1.2.2",
60
60
  "@manypkg/get-packages": "^1.1.3",
61
61
  "@module-federation/enhanced": "^0.9.0",
62
62
  "@octokit/graphql": "^5.0.0",
@@ -154,22 +154,22 @@
154
154
  "zod-validation-error": "^3.4.0"
155
155
  },
156
156
  "devDependencies": {
157
- "@backstage/backend-plugin-api": "1.4.3-next.0",
158
- "@backstage/backend-test-utils": "1.9.0-next.1",
159
- "@backstage/catalog-client": "1.12.0-next.0",
160
- "@backstage/config": "1.3.3",
161
- "@backstage/core-app-api": "1.18.0",
162
- "@backstage/core-components": "0.17.6-next.1",
163
- "@backstage/core-plugin-api": "1.10.9",
164
- "@backstage/dev-utils": "1.1.14-next.2",
165
- "@backstage/errors": "1.2.7",
166
- "@backstage/plugin-auth-backend": "0.25.4-next.1",
167
- "@backstage/plugin-auth-backend-module-guest-provider": "0.2.12-next.0",
168
- "@backstage/plugin-catalog-node": "1.19.0-next.1",
169
- "@backstage/plugin-scaffolder-node": "0.11.1-next.0",
170
- "@backstage/plugin-scaffolder-node-test-utils": "0.3.3-next.1",
171
- "@backstage/test-utils": "1.7.11",
172
- "@backstage/theme": "0.6.8",
157
+ "@backstage/backend-plugin-api": "^1.4.3",
158
+ "@backstage/backend-test-utils": "^1.9.0",
159
+ "@backstage/catalog-client": "^1.12.0",
160
+ "@backstage/config": "^1.3.3",
161
+ "@backstage/core-app-api": "^1.19.0",
162
+ "@backstage/core-components": "^0.18.0",
163
+ "@backstage/core-plugin-api": "^1.11.0",
164
+ "@backstage/dev-utils": "^1.1.14",
165
+ "@backstage/errors": "^1.2.7",
166
+ "@backstage/plugin-auth-backend": "^0.25.4",
167
+ "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.12",
168
+ "@backstage/plugin-catalog-node": "^1.19.0",
169
+ "@backstage/plugin-scaffolder-node": "^0.11.1",
170
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.3.3",
171
+ "@backstage/test-utils": "^1.7.11",
172
+ "@backstage/theme": "^0.6.8",
173
173
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
174
174
  "@types/cross-spawn": "^6.0.2",
175
175
  "@types/ejs": "^3.1.3",