@backstage/cli 0.29.5-next.1 → 0.29.6

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,40 @@
1
1
  # @backstage/cli
2
2
 
3
+ ## 0.29.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 8258dfb: Treat static file assets as always being free from side effects in package builds.
8
+ - Updated dependencies
9
+ - @backstage/catalog-model@1.7.3
10
+ - @backstage/cli-common@0.1.15
11
+ - @backstage/cli-node@0.2.12
12
+ - @backstage/config@1.3.2
13
+ - @backstage/config-loader@1.9.5
14
+ - @backstage/errors@1.2.7
15
+ - @backstage/eslint-plugin@0.1.10
16
+ - @backstage/integration@1.16.1
17
+ - @backstage/release-manifests@0.0.12
18
+ - @backstage/types@1.2.1
19
+
20
+ ## 0.29.5
21
+
22
+ ### Patch Changes
23
+
24
+ - e937ce0: Fixed incompatible `@typescript-eslint` versions with current `eslint@8.x.x`
25
+ - 8557e09: Removed the `EXPERIMENTAL_VITE` flag for using Vite as a dev server. If you were using this feature, we recommend switching to Rspack via the `EXPERIMENTAL_RSPACK` flag.
26
+ - Updated dependencies
27
+ - @backstage/types@1.2.1
28
+ - @backstage/config-loader@1.9.5
29
+ - @backstage/integration@1.16.1
30
+ - @backstage/catalog-model@1.7.3
31
+ - @backstage/cli-common@0.1.15
32
+ - @backstage/cli-node@0.2.12
33
+ - @backstage/config@1.3.2
34
+ - @backstage/errors@1.2.7
35
+ - @backstage/eslint-plugin@0.1.10
36
+ - @backstage/release-manifests@0.0.12
37
+
3
38
  ## 0.29.5-next.1
4
39
 
5
40
  ### Patch Changes
@@ -44,6 +44,21 @@ function forwardFileImports(options) {
44
44
  }
45
45
  },
46
46
  options(inputOptions) {
47
+ const treeshake = inputOptions.treeshake;
48
+ if (treeshake !== void 0 && typeof treeshake !== "object") {
49
+ throw new Error(
50
+ "Expected treeshake input config to be an object or not set"
51
+ );
52
+ }
53
+ if (treeshake?.moduleSideEffects) {
54
+ throw new Error("treeshake.moduleSideEffects must not be set");
55
+ }
56
+ const moduleSideEffects = (id) => {
57
+ if (filter(id)) {
58
+ return false;
59
+ }
60
+ return true;
61
+ };
47
62
  const origExternal = inputOptions.external;
48
63
  const external = (id, importer, isResolved) => {
49
64
  if (typeof origExternal === "function" && origExternal(id, importer, isResolved)) {
@@ -62,7 +77,11 @@ function forwardFileImports(options) {
62
77
  exportedFiles.add(fullId);
63
78
  return true;
64
79
  };
65
- return { ...inputOptions, external };
80
+ return {
81
+ ...inputOptions,
82
+ external,
83
+ treeshake: { ...treeshake, moduleSideEffects }
84
+ };
66
85
  }
67
86
  };
68
87
  }
@@ -10,7 +10,6 @@ var config = require('../../modules/config/lib/config.cjs.js');
10
10
  var config$1 = require('./config.cjs.js');
11
11
  var packageDetection = require('./packageDetection.cjs.js');
12
12
  var paths = require('./paths.cjs.js');
13
- var hasReactDomClient = require('./hasReactDomClient.cjs.js');
14
13
 
15
14
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
16
15
 
@@ -37,12 +36,8 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
37
36
  checkReactVersion();
38
37
  const { name } = await fs__default.default.readJson(paths$1.paths.resolveTarget("package.json"));
39
38
  let webpackServer = void 0;
40
- let viteServer = void 0;
41
39
  let latestFrontendAppConfigs = [];
42
40
  const triggerReload = () => {
43
- if (viteServer) {
44
- viteServer.restart();
45
- }
46
41
  if (webpackServer) {
47
42
  webpackServer.invalidate();
48
43
  if (process.env.EXPERIMENTAL_RSPACK) {
@@ -110,144 +105,66 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
110
105
  additionalEntryPoints: detectedModulesEntryPoint,
111
106
  moduleFederation: options.moduleFederation
112
107
  });
113
- if (process.env.EXPERIMENTAL_VITE) {
114
- const vite = require("vite");
115
- const { default: viteReact } = require("@vitejs/plugin-react");
116
- const { default: viteYaml } = require("@modyfi/vite-plugin-yaml");
117
- const { nodePolyfills: viteNodePolyfills } = require("vite-plugin-node-polyfills");
118
- const { createHtmlPlugin: viteHtml } = require("vite-plugin-html");
119
- viteServer = await vite.createServer({
120
- define: {
121
- "process.argv": JSON.stringify(process.argv),
122
- "process.env.APP_CONFIG": JSON.stringify(cliConfig.frontendAppConfigs),
123
- // This allows for conditional imports of react-dom/client, since there's no way
124
- // to check for presence of it in source code without module resolution errors.
125
- "process.env.HAS_REACT_DOM_CLIENT": JSON.stringify(hasReactDomClient.hasReactDomClient())
126
- },
127
- optimizeDeps: {
128
- esbuildOptions: {
129
- plugins: [
130
- {
131
- name: "custom-define",
132
- setup(build) {
133
- const define = build.initialOptions.define ||= {};
134
- define["process.env.HAS_REACT_DOM_CLIENT"] = JSON.stringify(
135
- hasReactDomClient.hasReactDomClient()
136
- );
137
- define["process.env.NODE_ENV"] = JSON.stringify("development");
138
- }
139
- }
140
- ]
141
- }
108
+ const bundler = rspack ?? webpack__default.default;
109
+ const DevServer = rspack ? require("@rspack/dev-server").RspackDevServer : WebpackDevServer__default.default;
110
+ if (rspack) {
111
+ console.log(
112
+ chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using experimental RSPack dev server.`)
113
+ );
114
+ }
115
+ const publicPaths = await paths.resolveOptionalBundlingPaths({
116
+ entry: "src/index-public-experimental",
117
+ dist: "dist/public"
118
+ });
119
+ if (publicPaths) {
120
+ console.log(
121
+ chalk__default.default.yellow(
122
+ `\u26A0\uFE0F WARNING: The app /public entry point is an experimental feature that may receive immediate breaking changes.`
123
+ )
124
+ );
125
+ }
126
+ const compiler = publicPaths ? bundler([config$2, await config$1.createConfig(publicPaths, commonConfigOptions)]) : bundler(config$2);
127
+ webpackServer = new DevServer(
128
+ {
129
+ hot: !process.env.CI,
130
+ devMiddleware: {
131
+ publicPath: config$2.output?.publicPath,
132
+ stats: "errors-warnings"
142
133
  },
143
- plugins: [
144
- viteReact(),
145
- viteNodePolyfills({
146
- include: [
147
- "buffer",
148
- "events",
149
- "fs",
150
- "http",
151
- "https",
152
- "os",
153
- "path",
154
- "process",
155
- "querystring",
156
- "stream",
157
- "url",
158
- "util",
159
- "zlib"
160
- ],
161
- globals: {
162
- global: true,
163
- Buffer: true,
164
- process: true
165
- }
166
- }),
167
- viteYaml(),
168
- viteHtml({
169
- entry: paths$2.targetEntry,
170
- // todo(blam): we should look at contributing to thPe plugin here
171
- // to support absolute paths, but works in the interim at least.
172
- template: "public/index.html",
173
- inject: {
174
- data: {
175
- config: frontendConfig,
176
- publicPath: config$2.output?.publicPath
177
- }
178
- }
179
- })
180
- ],
181
- server: {
182
- host,
183
- port
134
+ static: paths$2.targetPublic ? {
135
+ publicPath: config$2.output?.publicPath,
136
+ directory: paths$2.targetPublic
137
+ } : void 0,
138
+ historyApiFallback: options.moduleFederation?.mode === "remote" ? false : {
139
+ // Paths with dots should still use the history fallback.
140
+ // See https://github.com/facebookincubator/create-react-app/issues/387.
141
+ disableDotRule: true,
142
+ // The index needs to be rewritten relative to the new public path, including subroutes.
143
+ index: `${config$2.output?.publicPath}index.html`
184
144
  },
185
- publicDir: paths$2.targetPublic,
186
- root: paths$2.targetPath
187
- });
188
- } else {
189
- const bundler = rspack ?? webpack__default.default;
190
- const DevServer = rspack ? require("@rspack/dev-server").RspackDevServer : WebpackDevServer__default.default;
191
- if (rspack) {
192
- console.log(
193
- chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using experimental RSPack dev server.`)
194
- );
195
- }
196
- const publicPaths = await paths.resolveOptionalBundlingPaths({
197
- entry: "src/index-public-experimental",
198
- dist: "dist/public"
199
- });
200
- if (publicPaths) {
201
- console.log(
202
- chalk__default.default.yellow(
203
- `\u26A0\uFE0F WARNING: The app /public entry point is an experimental feature that may receive immediate breaking changes.`
204
- )
205
- );
206
- }
207
- const compiler = publicPaths ? bundler([config$2, await config$1.createConfig(publicPaths, commonConfigOptions)]) : bundler(config$2);
208
- webpackServer = new DevServer(
209
- {
210
- hot: !process.env.CI,
211
- devMiddleware: {
212
- publicPath: config$2.output?.publicPath,
213
- stats: "errors-warnings"
214
- },
215
- static: paths$2.targetPublic ? {
216
- publicPath: config$2.output?.publicPath,
217
- directory: paths$2.targetPublic
218
- } : void 0,
219
- historyApiFallback: options.moduleFederation?.mode === "remote" ? false : {
220
- // Paths with dots should still use the history fallback.
221
- // See https://github.com/facebookincubator/create-react-app/issues/387.
222
- disableDotRule: true,
223
- // The index needs to be rewritten relative to the new public path, including subroutes.
224
- index: `${config$2.output?.publicPath}index.html`
225
- },
226
- server: url.protocol === "https:" ? {
227
- type: "https",
228
- options: {
229
- cert: fullConfig.getString("app.https.certificate.cert"),
230
- key: fullConfig.getString("app.https.certificate.key")
231
- }
232
- } : {},
233
- host,
234
- port,
235
- proxy: targetPkg.proxy,
236
- // When the dev server is behind a proxy, the host and public hostname differ
237
- allowedHosts: [url.hostname],
238
- client: {
239
- webSocketURL: { hostname: host, port }
240
- },
241
- headers: {
242
- "Access-Control-Allow-Origin": "*",
243
- "Access-Control-Allow-Methods": "GET, OPTIONS",
244
- "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
145
+ server: url.protocol === "https:" ? {
146
+ type: "https",
147
+ options: {
148
+ cert: fullConfig.getString("app.https.certificate.cert"),
149
+ key: fullConfig.getString("app.https.certificate.key")
245
150
  }
151
+ } : {},
152
+ host,
153
+ port,
154
+ proxy: targetPkg.proxy,
155
+ // When the dev server is behind a proxy, the host and public hostname differ
156
+ allowedHosts: [url.hostname],
157
+ client: {
158
+ webSocketURL: { hostname: host, port }
246
159
  },
247
- compiler
248
- );
249
- }
250
- await viteServer?.listen();
160
+ headers: {
161
+ "Access-Control-Allow-Origin": "*",
162
+ "Access-Control-Allow-Methods": "GET, OPTIONS",
163
+ "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
164
+ }
165
+ },
166
+ compiler
167
+ );
251
168
  await new Promise(async (resolve, reject) => {
252
169
  if (webpackServer) {
253
170
  webpackServer.startCallback((err) => {
@@ -268,7 +185,6 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
268
185
  for (const signal of ["SIGINT", "SIGTERM"]) {
269
186
  process.on(signal, () => {
270
187
  webpackServer?.stop();
271
- viteServer?.close();
272
188
  process.exit();
273
189
  });
274
190
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.7.0-next.1";
3
+ var version = "0.7.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.1-next.1";
3
+ var version = "1.1.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.2.1-next.1";
3
+ var version = "1.2.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.9.1-next.0";
3
+ var version = "1.9.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.29.5-next.1";
3
+ var version = "0.29.6";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -152,13 +152,9 @@ var devDependencies = {
152
152
  "@types/terser-webpack-plugin": "^5.0.4",
153
153
  "@types/webpack-sources": "^3.2.3",
154
154
  "@types/yarnpkg__lockfile": "^1.1.4",
155
- "@vitejs/plugin-react": "^4.3.1",
156
155
  del: "^8.0.0",
157
156
  msw: "^1.0.0",
158
- nodemon: "^3.0.1",
159
- vite: "^5.0.0",
160
- "vite-plugin-html": "^3.2.2",
161
- "vite-plugin-node-polyfills": "^0.22.0"
157
+ nodemon: "^3.0.1"
162
158
  };
163
159
 
164
160
  exports.dependencies = dependencies;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.3.2-next.0";
3
+ var version = "1.3.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 = "1.15.4-next.0";
3
+ var version = "1.15.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.16.3-next.0";
3
+ var version = "0.16.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.10.3-next.0";
3
+ var version = "1.10.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.1.6-next.1";
3
+ var version = "1.1.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.7-next.0";
3
+ var version = "1.2.7";
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.7.4-next.0";
3
+ var version = "1.7.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.24.2-next.1";
3
+ var version = "0.24.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.2.4-next.1";
3
+ var version = "0.2.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 = "1.15.1-next.1";
3
+ var version = "1.15.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.6.3-next.1";
3
+ var version = "0.6.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 = "0.1.18-next.1";
3
+ var version = "0.1.18";
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.29.5-next.1",
3
+ "version": "0.29.6",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -42,16 +42,16 @@
42
42
  "watch": "./src"
43
43
  },
44
44
  "dependencies": {
45
- "@backstage/catalog-model": "1.7.3-next.0",
46
- "@backstage/cli-common": "0.1.15",
47
- "@backstage/cli-node": "0.2.12-next.0",
48
- "@backstage/config": "1.3.2-next.0",
49
- "@backstage/config-loader": "1.9.5-next.1",
50
- "@backstage/errors": "1.2.7-next.0",
51
- "@backstage/eslint-plugin": "0.1.10",
52
- "@backstage/integration": "1.16.1-next.0",
53
- "@backstage/release-manifests": "0.0.12",
54
- "@backstage/types": "1.2.1-next.0",
45
+ "@backstage/catalog-model": "^1.7.3",
46
+ "@backstage/cli-common": "^0.1.15",
47
+ "@backstage/cli-node": "^0.2.12",
48
+ "@backstage/config": "^1.3.2",
49
+ "@backstage/config-loader": "^1.9.5",
50
+ "@backstage/errors": "^1.2.7",
51
+ "@backstage/eslint-plugin": "^0.1.10",
52
+ "@backstage/integration": "^1.16.1",
53
+ "@backstage/release-manifests": "^0.0.12",
54
+ "@backstage/types": "^1.2.1",
55
55
  "@manypkg/get-packages": "^1.1.3",
56
56
  "@module-federation/enhanced": "^0.8.0",
57
57
  "@octokit/graphql": "^5.0.0",
@@ -157,22 +157,22 @@
157
157
  "zod": "^3.22.4"
158
158
  },
159
159
  "devDependencies": {
160
- "@backstage/backend-plugin-api": "1.1.1-next.1",
161
- "@backstage/backend-test-utils": "1.2.1-next.1",
162
- "@backstage/catalog-client": "1.9.1-next.0",
163
- "@backstage/config": "1.3.2-next.0",
164
- "@backstage/core-app-api": "1.15.4-next.0",
165
- "@backstage/core-components": "0.16.3-next.0",
166
- "@backstage/core-plugin-api": "1.10.3-next.0",
167
- "@backstage/dev-utils": "1.1.6-next.1",
168
- "@backstage/errors": "1.2.7-next.0",
169
- "@backstage/plugin-auth-backend": "0.24.2-next.1",
170
- "@backstage/plugin-auth-backend-module-guest-provider": "0.2.4-next.1",
171
- "@backstage/plugin-catalog-node": "1.15.1-next.1",
172
- "@backstage/plugin-scaffolder-node": "0.6.3-next.1",
173
- "@backstage/plugin-scaffolder-node-test-utils": "0.1.18-next.1",
174
- "@backstage/test-utils": "1.7.4-next.0",
175
- "@backstage/theme": "0.6.3",
160
+ "@backstage/backend-plugin-api": "^1.1.1",
161
+ "@backstage/backend-test-utils": "^1.2.1",
162
+ "@backstage/catalog-client": "^1.9.1",
163
+ "@backstage/config": "^1.3.2",
164
+ "@backstage/core-app-api": "^1.15.4",
165
+ "@backstage/core-components": "^0.16.3",
166
+ "@backstage/core-plugin-api": "^1.10.3",
167
+ "@backstage/dev-utils": "^1.1.6",
168
+ "@backstage/errors": "^1.2.7",
169
+ "@backstage/plugin-auth-backend": "^0.24.2",
170
+ "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.4",
171
+ "@backstage/plugin-catalog-node": "^1.15.1",
172
+ "@backstage/plugin-scaffolder-node": "^0.6.3",
173
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.1.18",
174
+ "@backstage/test-utils": "^1.7.4",
175
+ "@backstage/theme": "^0.6.3",
176
176
  "@rspack/core": "^1.0.10",
177
177
  "@rspack/dev-server": "^1.0.9",
178
178
  "@rspack/plugin-react-refresh": "^1.0.0",
@@ -192,28 +192,16 @@
192
192
  "@types/terser-webpack-plugin": "^5.0.4",
193
193
  "@types/webpack-sources": "^3.2.3",
194
194
  "@types/yarnpkg__lockfile": "^1.1.4",
195
- "@vitejs/plugin-react": "^4.3.1",
196
195
  "del": "^8.0.0",
197
196
  "msw": "^1.0.0",
198
- "nodemon": "^3.0.1",
199
- "vite": "^5.0.0",
200
- "vite-plugin-html": "^3.2.2",
201
- "vite-plugin-node-polyfills": "^0.22.0"
197
+ "nodemon": "^3.0.1"
202
198
  },
203
199
  "peerDependencies": {
204
- "@modyfi/vite-plugin-yaml": "^1.1.0",
205
200
  "@rspack/core": "^1.0.10",
206
201
  "@rspack/dev-server": "^1.0.9",
207
- "@rspack/plugin-react-refresh": "^1.0.0",
208
- "@vitejs/plugin-react": "^4.0.4",
209
- "vite": "^5.0.0",
210
- "vite-plugin-html": "^3.2.0",
211
- "vite-plugin-node-polyfills": "^0.22.0"
202
+ "@rspack/plugin-react-refresh": "^1.0.0"
212
203
  },
213
204
  "peerDependenciesMeta": {
214
- "@modyfi/vite-plugin-yaml": {
215
- "optional": true
216
- },
217
205
  "@rspack/core": {
218
206
  "optional": true
219
207
  },
@@ -222,18 +210,6 @@
222
210
  },
223
211
  "@rspack/plugin-react-refresh": {
224
212
  "optional": true
225
- },
226
- "@vitejs/plugin-react": {
227
- "optional": true
228
- },
229
- "vite": {
230
- "optional": true
231
- },
232
- "vite-plugin-html": {
233
- "optional": true
234
- },
235
- "vite-plugin-node-polyfills": {
236
- "optional": true
237
213
  }
238
214
  },
239
215
  "configSchema": {