UNPKG

@backstage/cli

Version:

CLI for developing Backstage plugins and apps

1,084 lines (850 loc) • 241 kB
# @backstage/cli ## 0.34.6 ### Patch Changes - Upgraded `tar` dependency to v7. ## 0.34.5 ### Patch Changes - fc7cbfc: The templates executed with the `yarn new` command now supports templating filenames. - da19cb5: Fix inconsistent behavior in the `new` command for the `@internal` scope: it now consistently defaults to the `backstage-plugin-` infix whether the `--scope` option is not set or it's set to `internal`. - fc7cbfc: Added a template for the `yarn new` command to create an catalog entity provider. To add this template to an explicit list in the root `package.json`, use `@backstage/cli/templates/catalog-provider-module`. - b2bef92: Convert all enums to erasable-syntax compliant patterns - 279279c: Fixes an issue where using the `backstage-cli new --scope` command with a scope that already includes the `@` symbol (e.g., `@backstage-community`) would result in a double `@@` prefix in the generated package name, causing invalid `package.json` files. - 05f60e1: Refactored constructor parameter properties to explicit property declarations for compatibility with TypeScript's `erasableSyntaxOnly` setting. This internal refactoring maintains all existing functionality while ensuring TypeScript compilation compatibility. - Updated dependencies - @backstage/integration@1.18.2 - @backstage/eslint-plugin@0.2.0 - @backstage/config-loader@1.10.6 - @backstage/config@1.3.6 - @backstage/cli-node@0.2.15 - @backstage/catalog-model@1.7.6 ## 0.34.5-next.1 ### Patch Changes - da19cb5: Fix inconsistent behavior in the `new` command for the `@internal` scope: it now consistently defaults to the `backstage-plugin-` infix whether the `--scope` option is not set or it's set to `internal`. - b2bef92: Convert all enums to erasable-syntax compliant patterns ## 0.34.5-next.0 ### Patch Changes - fc7cbfc: The templates executed with the `yarn new` command now supports templating filenames. - fc7cbfc: Added a template for the `yarn new` command to create an catalog entity provider. To add this template to an explicit list in the root `package.json`, use `@backstage/cli/templates/catalog-provider-module`. - 05f60e1: Refactored constructor parameter properties to explicit property declarations for compatibility with TypeScript's `erasableSyntaxOnly` setting. This internal refactoring maintains all existing functionality while ensuring TypeScript compilation compatibility. - Updated dependencies - @backstage/eslint-plugin@0.2.0-next.0 - @backstage/config-loader@1.10.6-next.0 - @backstage/config@1.3.6-next.0 - @backstage/cli-node@0.2.15-next.0 - @backstage/catalog-model@1.7.6-next.0 - @backstage/integration@1.18.2-next.0 - @backstage/cli-common@0.1.15 - @backstage/errors@1.2.7 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.2 ## 0.34.4 ### Patch Changes - f2cf564: Removed the script transform cache from the default Jest configuration. The script cache provided a moderate performance boost, but it is incompatible with Jest 30. - 33faad2: Allow using custom manifest location in the yarn plugin and version bump. The Backstage yarn plugin and version bump allows two new environment variables to configure custom manifest location: - `BACKSTAGE_VERSIONS_BASE_URL`: The base URL for fetching the Backstage version manifest. Defaults to `https://versions.backstage.io/v1/releases/VERSION/manifest.json`. Useful for running the plugin in environment without direct access to the internet, for example by using a mirror of the versions API or a proxy. Note that the environment variable is just the host name, and the path is appended by the plugin. If you are using the yarn plugin, bump version command will also try to fetch the new version of the yarn plugin from the same base URL (defaults to `https://versions.backstage.io/v1/releases/RELEASE/yarn-plugin`) - `BACKSTAGE_MANIFEST_FILE`: Path to a local manifest file. If set, the plugin will not attempt to fetch the manifest from the network. Useful for running the plugin in environment without internet access and without mirror of the versions API. - 6ebc1ea: Fixed module federation config by only setting `import: false` on shared libraries for remote. - ab96bb7: Added a new `--entrypoint` option to the `package start` command, which allows you to specify a custom entry directory/file for development applications. This is particularly useful when maintaining separate dev apps for different versions of your plugin (e.g., stable and alpha). **Example usage:** Consider the following plugin dev folder structure: ``` dev/ index.tsx alpha/ index.ts ``` - The default `yarn package start` command uses the `dev/` folder as the entry point and executes `dev/index.tsx` file; - Running `yarn package start --entrypoint dev/alpha` will instead use `dev/alpha/` as the entry point and execute `dev/alpha/index.ts` file. - 024645e: Remove unused @octokit modules from cli package - @octokit/graphql - @octokit/graphql-schema - @octokit/oauth-app - d14ef24: Added automatic detection and support for the Backstage Yarn plugin when generating new packages with `yarn new`. When the plugin is installed, new packages will automatically use `backstage:^` ranges for `@backstage/*` dependencies. - Updated dependencies - @backstage/eslint-plugin@0.1.12 - @backstage/integration@1.18.1 - @backstage/config-loader@1.10.5 - @backstage/config@1.3.5 ## 0.34.4-next.3 ### Patch Changes - f2cf564: Removed the script transform cache from the default Jest configuration. The script cache provided a moderate performance boost, but it is incompatible with Jest 30. - 024645e: Remove unused @octokit modules from cli package - @octokit/graphql - @octokit/graphql-schema - @octokit/oauth-app - d14ef24: Added automatic detection and support for the Backstage Yarn plugin when generating new packages with `yarn new`. When the plugin is installed, new packages will automatically use `backstage:^` ranges for `@backstage/*` dependencies. ## 0.34.4-next.2 ### Patch Changes - ab96bb7: Added a new `--entrypoint` option to the `package start` command, which allows you to specify a custom entry directory/file for development applications. This is particularly useful when maintaining separate dev apps for different versions of your plugin (e.g., stable and alpha). **Example usage:** Consider the following plugin dev folder structure: ``` dev/ index.tsx alpha/ index.ts ``` - The default `yarn package start` command uses the `dev/` folder as the entry point and executes `dev/index.tsx` file; - Running `yarn package start --entrypoint dev/alpha` will instead use `dev/alpha/` as the entry point and execute `dev/alpha/index.ts` file. ## 0.34.4-next.1 ### Patch Changes - Updated dependencies - @backstage/config-loader@1.10.4-next.0 - @backstage/config@1.3.4-next.0 - @backstage/integration@1.18.1-next.1 - @backstage/cli-node@0.2.14 - @backstage/release-manifests@0.0.13 ## 0.34.4-next.0 ### Patch Changes - 6ebc1ea: Fixed module federation config by only setting `import: false` on shared libraries for remote. - Updated dependencies - @backstage/integration@1.18.1-next.0 - @backstage/catalog-model@1.7.5 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.14 - @backstage/config@1.3.3 - @backstage/config-loader@1.10.3 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.11 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.2 ## 0.34.2 ### Patch Changes - 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. - fffd434: Disallow import fallback of critical shared dependencies in module federation. - 080f252: Fixed the `new-frontend-plugin` template that was incorrectly passing `id` instead of `pluginId` to `createFrontendPlugin` and unnecessarily importing `React`. - e0db9b8: Modify the `backstage.json` also for custom patterns if it extends the default pattern. Examples: - `@backstage/*` (default pattern) - `@{backstage,backstage-community}/*` - `@{extra1,backstage,extra2}/*` - 275bda8: Fixed an issue that could cause conflicts of detected modules in workspaces with multiple apps. - e1adce4: Updated the backend plugin template to use a new pattern for the `TodoListService` that reduces boilerplate. - Updated dependencies - @backstage/config-loader@1.10.3 - @backstage/integration@1.18.0 - @backstage/types@1.2.2 ## 0.34.2-next.2 ### Patch Changes - Updated dependencies - @backstage/config-loader@1.10.3-next.0 - @backstage/integration@1.18.0-next.0 ## 0.34.2-next.1 ### Patch Changes - e1adce4: Updated the backend plugin template to use a new pattern for the `TodoListService` that reduces boilerplate. - Updated dependencies - @backstage/integration@1.18.0-next.0 ## 0.34.1-next.0 ### Patch Changes - 080f252: Fixed the `new-frontend-plugin` template that was incorrectly passing `id` instead of `pluginId` to `createFrontendPlugin` and unnecessarily importing `React`. - 275bda8: Fixed an issue that could cause conflicts of detected modules in workspaces with multiple apps. - Updated dependencies - @backstage/catalog-model@1.7.5 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.14 - @backstage/config@1.3.3 - @backstage/config-loader@1.10.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.11 - @backstage/integration@1.17.1 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.34.0 ### Minor Changes - 38b4243: Added plugin and module templates for the new frontend system. These templates are not included by default, but can be included by adding `@backstage/cli/templates/new-frontend-plugin` and `@backstage/cli/templates/new-frontend-plugin-module` as [custom templates](https://backstage.io/docs/tooling/cli/templates#installing-custom-templates). - 923ceb2: **BREAKING**: The new app build based on [Rspack](https://rspack.dev/) is now the default, and the `EXPERIMENTAL_RSPACK` flag has been removed. To revert to the old behavior, set the `LEGACY_WEBPACK_BUILD` environment flag and install the following optional dependencies: ```json { "dependencies": { "@module-federation/enhanced": "^0.9.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "esbuild-loader": "^4.0.0", "eslint-webpack-plugin": "^4.2.0", "fork-ts-checker-webpack-plugin": "^9.0.0", "mini-css-extract-plugin": "^2.4.2", "terser-webpack-plugin": "^5.1.3", "webpack": "^5.96.0", "webpack-dev-server": "^5.0.0" } } ``` If you do encounter a blocking issue that forces you to use the old WebPack build, please [open an issue](https://github.com/backstage/backstage/issues) explaining the problem. The WebPack build will be removed in a future release. - eda80c7: **BREAKING**: Removed support for `.icon.svg` imports, which have been deprecated since the 1.19 release. ### Patch Changes - 2b8082a: Internal refactor of error handling - 8b1bf6e: Deprecated new frontend system config setting `app.experimental.packages` to just `app.packages`. The old config will continue working for the time being, but may be removed in a future release. - ead626f: The Node.js transform in `@backstage/cli/config/nodeTransformHooks.mjs` now supports the built-in type stripping in Node.js, which is enabled by default from v22.18.0. - a6af768: Allow js files to be processed by the nodeTransform loader - Updated dependencies - @backstage/cli-node@0.2.14 ## 0.34.0-next.2 ### Minor Changes - 923ceb2: **BREAKING**: The new app build based on [Rspack](https://rspack.dev/) is now the default, and the `EXPERIMENTAL_RSPACK` flag has been removed. To revert to the old behavior, set the `LEGACY_WEBPACK_BUILD` environment flag and install the following optional dependencies: ```json { "dependencies": { "@module-federation/enhanced": "^0.9.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "esbuild-loader": "^4.0.0", "eslint-webpack-plugin": "^4.2.0", "fork-ts-checker-webpack-plugin": "^9.0.0", "mini-css-extract-plugin": "^2.4.2", "terser-webpack-plugin": "^5.1.3", "webpack": "^5.96.0", "webpack-dev-server": "^5.0.0" } } ``` If you do encounter a blocking issue that forces you to use the old WebPack build, please [open an issue](https://github.com/backstage/backstage/issues) explaining the problem. The WebPack build will be removed in a future release. - eda80c7: **BREAKING**: Removed support for `.icon.svg` imports, which have been deprecated since the 1.19 release. ### Patch Changes - 8b1bf6e: Deprecated new frontend system config setting `app.experimental.packages` to just `app.packages`. The old config will continue working for the time being, but may be removed in a future release. - ead626f: The Node.js transform in `@backstage/cli/config/nodeTransformHooks.mjs` now supports the built-in type stripping in Node.js, which is enabled by default from v22.18.0. ## 0.34.0-next.1 ### Minor Changes - 38b4243: Added plugin and module templates for the new frontend system. These templates are not included by default, but can be included by adding `@backstage/cli/templates/new-frontend-plugin` and `@backstage/cli/templates/new-frontend-plugin-module` as [custom templates](https://backstage.io/docs/tooling/cli/templates#installing-custom-templates). ### Patch Changes - Updated dependencies - @backstage/catalog-model@1.7.5 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.3 - @backstage/config-loader@1.10.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.11 - @backstage/integration@1.17.1 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.33.2-next.0 ### Patch Changes - a6af768: Allow js files to be processed by the nodeTransform loader - Updated dependencies - @backstage/cli-node@0.2.13 - @backstage/config-loader@1.10.2 - @backstage/catalog-model@1.7.5 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.3 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.11 - @backstage/integration@1.17.1 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.33.1 ### Patch Changes - 50f0ce6: Fixes a module not found error when running `backstage-cli info`. - Updated dependencies - @backstage/config-loader@1.10.2 - @backstage/config@1.3.3 - @backstage/catalog-model@1.7.5 - @backstage/integration@1.17.1 ## 0.33.1-next.2 ### Patch Changes - 50f0ce6: Fixes a module not found error when running `backstage-cli info`. ## 0.33.1-next.1 ### Patch Changes - Updated dependencies - @backstage/config-loader@1.10.2-next.0 - @backstage/config@1.3.3-next.0 - @backstage/catalog-model@1.7.5-next.0 - @backstage/integration@1.17.1-next.1 ## 0.33.1-next.0 ### Patch Changes - Updated dependencies - @backstage/integration@1.17.1-next.0 - @backstage/cli-node@0.2.13 - @backstage/config-loader@1.10.1 - @backstage/catalog-model@1.7.4 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.11 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.33.0 ### Minor Changes - eef0e83: Internal update to promote the modular CLI entrypoint to stable. ### Patch Changes - d07fe35: Added user feedback when opening config docs in browser. The command now clearly indicates what it's doing and provides fallback instructions if the browser fails to open. - ce70439: The `BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE` flag has been removed. Existing users are encouraged to switch to `EXPERIMENTAL_RSPACK` instead. - 1d8f00b: Switched to using the `ModuleFederationPlugin` from `@module-federation/enhanced/rspack` for Rspack, rather than the built-in one. - 2b9633f: The experimental `FORCE_REACT_DEVELOPMENT` flag has been removed. - d8c4a54: Only use the caching Jest module loader for frontend packages in order to avoid breaking real ESM module imports. - d6d63c7: Updating the scaffolder action boilerplate to use new `zod` schema - e36e855: Added `backstage.pluginId` field in `package.json` to all default plugin package templates for the `new` command. - 1bab255: Internal refactor to combine alpha `build` and `start` modules. - 713e957: fix: merge eslint reports when using json format - 8a0164c: Fix an issue where some commands were not usable because of missing dist files - Updated dependencies - @backstage/eslint-plugin@0.1.11 - @backstage/catalog-model@1.7.4 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.1 - @backstage/errors@1.2.7 - @backstage/integration@1.17.0 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.33.0-next.2 ### Patch Changes - 8a0164c: Fix an issue where some commands were not usable because of missing dist files - Updated dependencies - @backstage/eslint-plugin@0.1.11-next.0 - @backstage/catalog-model@1.7.4 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.1 - @backstage/errors@1.2.7 - @backstage/integration@1.17.0 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.33.0-next.1 ### Minor Changes - eef0e83: Internal update to promote the modular CLI entrypoint to stable. ### Patch Changes - d07fe35: Added user feedback when opening config docs in browser. The command now clearly indicates what it's doing and provides fallback instructions if the browser fails to open. - d6d63c7: Updating the scaffolder action boilerplate to use new `zod` schema - e36e855: Added `backstage.pluginId` field in `package.json` to all default plugin package templates for the `new` command. - Updated dependencies - @backstage/catalog-model@1.7.4 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.1 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.17.0 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.32.2-next.0 ### Patch Changes - ce70439: The `BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE` flag has been removed. Existing users are encouraged to switch to `EXPERIMENTAL_RSPACK` instead. - 1d8f00b: Switched to using the `ModuleFederationPlugin` from `@module-federation/enhanced/rspack` for Rspack, rather than the built-in one. - 2b9633f: The experimental `FORCE_REACT_DEVELOPMENT` flag has been removed. - d8c4a54: Only use the caching Jest module loader for frontend packages in order to avoid breaking real ESM module imports. - 1bab255: Internal refactor to combine alpha `build` and `start` modules. - 713e957: fix: merge eslint reports when using json format - Updated dependencies - @backstage/catalog-model@1.7.4 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.1 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.17.0 - @backstage/release-manifests@0.0.13 - @backstage/types@1.2.1 ## 0.32.1 ### Patch Changes - 674def9: fix: enable `lazyCompilation` and `refreshOptions` for rspack - d649df0: Internal code cleanup - c2cae47: Add missing modules to the Backstage CLI alpha entrypoint. - 3f45861: Add a warning for React 17 deprecation that triggers when frontend packages and plugins start. - 9aaec54: Internal refactor of opaque type handling. - 9285385: Added `info` object to the context of the alpha CLI. - 6cc9507: Updated dependency `@octokit/request` to `^8.0.0`. - 5cd3c54: Updated dependency `react-refresh` to `^0.17.0`. - 72d019d: Removed various typos - 19a4e7c: Internal refactor to move things closer to home - Updated dependencies - @backstage/integration@1.17.0 - @backstage/catalog-model@1.7.4 - @backstage/release-manifests@0.0.13 - @backstage/config-loader@1.10.1 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/cli-common@0.1.15 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/types@1.2.1 ## 0.32.1-next.3 ### Patch Changes - 674def9: fix: enable `lazyCompilation` and `refreshOptions` for rspack - 19a4e7c: Internal refactor to move things closer to home - Updated dependencies - @backstage/release-manifests@0.0.13-next.0 - @backstage/integration@1.17.0-next.3 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.1-next.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/types@1.2.1 ## 0.32.1-next.2 ### Patch Changes - Updated dependencies - @backstage/integration@1.17.0-next.2 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/release-manifests@0.0.12 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/config-loader@1.10.1-next.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/types@1.2.1 ## 0.32.1-next.1 ### Patch Changes - d649df0: Internal code cleanup - 9aaec54: Internal refactor of opaque type handling. - 9285385: Added `info` object to the context of the alpha CLI. - 6cc9507: Updated dependency `@octokit/request` to `^8.0.0`. - 72d019d: Removed various typos - Updated dependencies - @backstage/integration@1.16.4-next.1 - @backstage/config-loader@1.10.1-next.0 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.32.1-next.0 ### Patch Changes - 5cd3c54: Updated dependency `react-refresh` to `^0.17.0`. - Updated dependencies - @backstage/integration@1.16.4-next.0 - @backstage/cli-node@0.2.13 - @backstage/config-loader@1.10.0 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.32.0 ### Minor Changes - a47fd39: Removes default React imports from template files, aligning with the requirements for the upcoming React 19 migration. Introduces a new ESLint rule to disallow `import React from 'react'` and `import * as React from 'react'`. <https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html> - 65b584c: Internal update to move the `new` and `create-github-app` to their own module. - c7254ae: Internal update to move the `clean`, `pre/postpack` and `fix` commands into their own separate module. ### Patch Changes - 4ea76f7: Bump @module-federation/enhanced ^0.9.0 to fix GHSA-593f-38f6-jp5m - 87a5cb4: Fixed an issue causing the `repo lint` command to fail when the `--max-warnings` option was used. - 6969f79: Avoid trailing `/*` when automatically adding imports for package with multiple entry points. - 98b7131: Update the `to do` plugin template to stop using the deprecated catalog alpha service reference. If you start seeing the `should create TODO item with catalog information` test failing, you have two options to fix this: Update the test to mock the legacy alpha catalog service, or migrate the `TODO` plugin backend to use the new catalog service reference. We recommend the second option, see [this](https://github.com/backstage/backstage/pull/29450/files/267115d0436009443ca68ac84e7dcc646c9c938d#diff-47e01aeb12dd55fab9e697f810be21a8d08d39c37df1b078f6d0894f9bad5a1b) pull request for an example of how to do the migration. - d5c4fed: make certificate strings optional for Dev environments - d83f3f4: Resolved a problem where the `start` command did not correctly handle multiple `--require` flags, ensuring all specified modules are now properly loaded. - d2091c6: Added a new `repo start` command to replace the existing pattern of using `yarn dev` scripts. The `repo start` command runs the app and/or backend package in the repo by default, but will also fall back to running other individual frontend or backend packages or even plugin dev entry points if the can be uniquely selected. The goal of this change is to reduce the number of different necessary scripts and align on `yarn start` being the only command needed for local development, similar to how `repo test` handles testing in the repo. It also opens up for more powerful options, like the `--plugin <pluginId>` flag that runs the dev entry point of the selected plugin. The new script is installed as follows, replacing the existing `yarn start` script: ```json { "scripts": { "start": "backstage-cli repo start" } } ``` In order to help users migrate in existing projects, it is recommended to add the following scripts to the root `package.json`: ```json { "scripts": { "dev": "echo \"Use 'yarn start' instead\"", "start-backend": "echo \"Use 'yarn start backend' instead\"" } } ``` For more information, run `yarn start --help` once the new command is installed. - 918c883: Included a reference to the JSX transform guide in the warning about using the default React import. - Updated dependencies - @backstage/integration@1.16.3 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.32.0-next.2 ### Minor Changes - a47fd39: Removes default React imports from template files, aligning with the requirements for the upcoming React 19 migration. Introduces a new ESLint rule to disallow `import React from 'react'` and `import * as React from 'react'`. <https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html> ### Patch Changes - 6969f79: Avoid trailing `/*` when automatically adding imports for package with multiple entry points. - 98b7131: Update the `to do` plugin template to stop using the deprecated catalog alpha service reference. If you start seeing the `should create TODO item with catalog information` test failing, you have two options to fix this: Update the test to mock the legacy alpha catalog service, or migrate the `TODO` plugin backend to use the new catalog service reference. We recommend the second option, see [this](https://github.com/backstage/backstage/pull/29450/files/267115d0436009443ca68ac84e7dcc646c9c938d#diff-47e01aeb12dd55fab9e697f810be21a8d08d39c37df1b078f6d0894f9bad5a1b) pull request for an example of how to do the migration. - d5c4fed: make certificate strings optional for Dev environments - d2091c6: Added a new `repo start` command to replace the existing pattern of using `yarn dev` scripts. The `repo start` command runs the app and/or backend package in the repo by default, but will also fall back to running other individual frontend or backend packages or even plugin dev entry points if the can be uniquely selected. The goal of this change is to reduce the number of different necessary scripts and align on `yarn start` being the only command needed for local development, similar to how `repo test` handles testing in the repo. It also opens up for more powerful options, like the `--plugin <pluginId>` flag that runs the dev entry point of the selected plugin. The new script is installed as follows, replacing the existing `yarn start` script: ```json { "scripts": { "start": "backstage-cli repo start" } } ``` In order to help users migrate in existing projects, it is recommended to add the following scripts to the root `package.json`: ```json { "scripts": { "dev": "echo \"Use 'yarn start' instead\"", "start-backend": "echo \"Use 'yarn start backend' instead\"" } } ``` For more information, run `yarn start --help` once the new command is installed. - Updated dependencies - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.3-next.0 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.32.0-next.1 ### Patch Changes - Updated dependencies - @backstage/integration@1.16.3-next.0 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.32.0-next.0 ### Minor Changes - c7254ae: Internal update to move the `clean`, `pre/postpack` and `fix` commands into their own separate module. ### Patch Changes - 4ea76f7: Bump @module-federation/enhanced ^0.9.0 to fix GHSA-593f-38f6-jp5m - 87a5cb4: Fixed an issue causing the `repo lint` command to fail when the `--max-warnings` option was used. - d83f3f4: Resolved a problem where the `start` command did not correctly handle multiple `--require` flags, ensuring all specified modules are now properly loaded. - Updated dependencies - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.10.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.2 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.31.0 ### Minor Changes - 5b70679: **BREAKING**: ESLint warnings no longer trigger system exit codes like errors do. Set the max number of warnings to `-1` during linting to enable the gradual adoption of new ESLint rules. To restore the previous behavior, include the `--max-warnings 0` flag in the `backstage-cli <repo|package> lint` command. ### Patch Changes - 0586d4c: Internal change to move the `migrate` and `version:*` commands into a new migrate module. - e0b226b: build(deps): bump `esbuild` from 0.24.2 to 0.25.0 - 4d45498: Fixed the package prepack command so that it no longer produces unnecessary `index` entries in the `typesVersions` map, which could cause `/index` to be added when automatically adding imports. - 485b3ba: Internal update to move `test` commands to a separate module. - a76c482: Internal change to migrate `lint` to the new module system. - 8df78bf: Internal update to move build commands to a CLI module. - d0fc357: Internal update to move `info` commands to a separate module. - f8bd342: Fix a bug in the translation of the deprecated `--scope` option for the `new` command that could cause plugins to have `backstage-backstage-plugin` in their name. - Updated dependencies - @backstage/config-loader@1.10.0 - @backstage/integration@1.16.2 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.31.0-next.1 ### Minor Changes - 5b70679: **BREAKING**: ESLint warnings no longer trigger system exit codes like errors do. Set the max number of warnings to `-1` during linting to enable the gradual adoption of new ESLint rules. To restore the previous behavior, include the `--max-warnings 0` flag in the `backstage-cli <repo|package> lint` command. ### Patch Changes - e0b226b: build(deps): bump `esbuild` from 0.24.2 to 0.25.0 - 4d45498: Fixed the package prepack command so that it no longer produces unnecessary `index` entries in the `typesVersions` map, which could cause `/index` to be added when automatically adding imports. - f8bd342: Fix a bug in the translation of the deprecated `--scope` option for the `new` command that could cause plugins to have `backstage-backstage-plugin` in their name. - Updated dependencies - @backstage/config-loader@1.10.0-next.0 - @backstage/integration@1.16.2-next.0 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.30.1-next.0 ### Patch Changes - 0586d4c: Internal change to move the `migrate` and `version:*` commands into a new migrate module. - 485b3ba: Internal update to move `test` commands to a separate module. - 8df78bf: Internal update to move build commands to a CLI module. - d0fc357: Internal update to move `info` commands to a separate module. - Updated dependencies - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13 - @backstage/config@1.3.2 - @backstage/config-loader@1.9.6 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.30.0 ### Minor Changes - cb76663: **BREAKING**: Add support for native ESM in Node.js code. This changes the behavior of dynamic import expressions in Node.js code. Typically this can be fixed by replacing `import(...)` with `require(...)`, with an `as typeof import(...)` cast if needed for types. This is because dynamic imports will no longer be transformed to `require(...)` calls, but instead be left as-is. This in turn allows you to load ESM modules from CommonJS code using `import(...)`. This change adds support for the following in Node.js packages, across type checking, package builds, runtime transforms and Jest tests: - Dynamic imports that load ESM modules from CommonJS code. - Both `.mjs` and `.mts` files as explicit ESM files, as well as `.cjs` and `.cts` as explicit CommonJS files. - Support for the `"type": "module"` field in `package.json` to indicate that the package is an ESM package. There are a few caveats to be aware of: - To enable support for native ESM in tests, you need to run the tests with the `--experimental-vm-modules` flag enabled, typically via `NODE_OPTIONS='--experimental-vm-modules'`. - Declaring a package as `"type": "module"` in `package.json` is supported, but in tests it will cause all local transitive dependencies to also be treated as ESM, regardless of whether they declare `"type": "module"` or not. - Node.js has an [ESM interoperability layer with CommonJS](https://nodejs.org/docs/latest-v22.x/api/esm.html#interoperability-with-commonjs) that allows for imports from ESM to identify named exports in CommonJS packages. This interoperability layer is **only** enabled when importing packages with a `.cts` or `.cjs` extension. This is because the interoperability layer is not fully compatible with the NPM ecosystem, and would break package if it was enabled for `.js` files. - Dynamic imports of CommonJS packages will vary in shape depending on the runtime, i.e. test vs local development, etc. It is therefore recommended to avoid dynamic imports of CommonJS packages and instead use `require`, or to use the explicit CommonJS extensions as mentioned above. If you do need to dynamically import CommonJS packages, avoid using `default` exports, as the shape of them vary across different environments and you would otherwise need to manually unwrap the import based on the shape of the module object. - b30e788: The `new` command is now powered by a new template system that allows you to define your own templates in a declarative way, as well as import existing templates from external sources. See the [CLI templates documentation](https://backstage.io/docs/tooling/cli/templates) for more information. The following flags for the `new` command have been deprecated and will be removed in a future release: - `--license=<license>`: Configure the global `license` instead. - `--no-private`: Configure the global `private` instead. - `--baseVersion=<version>`: Configure the global `version` instead. - `--npmRegistry=<url>`: Configure the global `publishRegistry` instead. - `--scope=<scope>`: Configure the global `namePrefix` and/or `namePluginInfix` instead. As part of this change the template IDs and their options have changed. The following backwards compatibility mappings for the `--select` and `--option` flags are enabled when using the default set of templates, but they will also be removed in the future: - `--select=plugin` is mapped to `--select=frontend-plugin` instead. - `--option=id=<id>` is mapped to `--option=pluginId=<id>` instead. ### Patch Changes - f17ef61: The `versions:bump` command will now reject `*` as a pattern. - 86c72c1: The packing process when running `build-workspace` with the `--alwaysYarnPack` flag now respects the `BACKSTAGE_CLI_BUILD_PARALLEL` environment variable, defaulting parallel work limits based on CPU availability. - 2167afc: Treat static file assets as always being free from side effects in package builds. - f54eed0: Fixed an issue where default feature type information wasn't being added to package.json/exports before publishing if exports didn't exist beforehand - 90a1edf: Add check to make sure that the `--link` option for the `start` command is a valid workspace. - 207f88f: Fixed the file path pattern of many static assets output as part of the frontend build process, where there was an extra `.` before the extension, leading to names like `image-af7946b..png`. - 9638f6d: Only allow pass through of `.mjs` in Jest transform if static ESM is supported. - 9d49e04: Replaced dependency `node-libs-browser` with `node-stdlib-browser` - 2c14147: Corrected path when trying to add dependency to respective `package.json` when using `yarn new` templates - f21b125: Ensure that both global-agent and undici agents are enabled when proxying is enabled. - Updated dependencies - @backstage/cli-node@0.2.13 - @backstage/config-loader@1.9.6 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.30.0-next.3 ### Minor Changes - b30e788: The `new` command is now powered by a new template system that allows you to define your own templates in a declarative way, as well as import existing templates from external sources. See the [CLI templates documentation](https://backstage.io/docs/tooling/cli/templates) for more information. The following flags for the `new` command have been deprecated and will be removed in a future release: - `--license=<license>`: Configure the global `license` instead. - `--no-private`: Configure the global `private` instead. - `--baseVersion=<version>`: Configure the global `version` instead. - `--npmRegistry=<url>`: Configure the global `publishRegistry` instead. - `--scope=<scope>`: Configure the global `namePrefix` and/or `namePluginInfix` instead. As part of this change the template IDs and their options have changed. The following backwards compatibility mappings for the `--select` and `--option` flags are enabled when using the default set of templates, but they will also be removed in the future: - `--select=plugin` is mapped to `--select=frontend-plugin` instead. - `--option=id=<id>` is mapped to `--option=pluginId=<id>` instead. ### Patch Changes - Updated dependencies - @backstage/cli-node@0.2.13-next.1 - @backstage/config-loader@1.9.6-next.0 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.30.0-next.2 ### Patch Changes - f17ef61: The `versions:bump` command will now reject `*` as a pattern. - 86c72c1: The packing process when running `build-workspace` with the `--alwaysYarnPack` flag now respects the `BACKSTAGE_CLI_BUILD_PARALLEL` environment variable, defaulting parallel work limits based on CPU availability. - 2167afc: Treat static file assets as always being free from side effects in package builds. - f54eed0: Fixed an issue where default feature type information wasn't being added to package.json/exports before publishing if exports didn't exist beforehand - 9638f6d: Only allow pass through of `.mjs` in Jest transform if static ESM is supported. - Updated dependencies - @backstage/cli-node@0.2.13-next.1 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.2 - @backstage/config-loader@1.9.6-next.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.30.0-next.1 ### Patch Changes - 207f88f: Fixed the file path pattern of many static assets output as part of the frontend build process, where there was an extra `.` before the extension, leading to names like `image-af7946b..png`. - Updated dependencies - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.13-next.0 - @backstage/config@1.3.2 - @backstage/config-loader@1.9.6-next.0 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.30.0-next.0 ### Minor Changes - cb76663: **BREAKING**: Add support for native ESM in Node.js code. This changes the behavior of dynamic import expressions in Node.js code. Typically this can be fixed by replacing `import(...)` with `require(...)`, with an `as typeof import(...)` cast if needed for types. This is because dynamic imports will no longer be transformed to `require(...)` calls, but instead be left as-is. This in turn allows you to load ESM modules from CommonJS code using `import(...)`. This change adds support for the following in Node.js packages, across type checking, package builds, runtime transforms and Jest tests: - Dynamic imports that load ESM modules from CommonJS code. - Both `.mjs` and `.mts` files as explicit ESM files, as well as `.cjs` and `.cts` as explicit CommonJS files. - Support for the `"type": "module"` field in `package.json` to indicate that the package is an ESM package. There are a few caveats to be aware of: - To enable support for native ESM in tests, you need to run the tests with the `--experimental-vm-modules` flag enabled, typically via `NODE_OPTIONS='--experimental-vm-modules'`. - Declaring a package as `"type": "module"` in `package.json` is supported, but in tests it will cause all local transitive dependencies to also be treated as ESM, regardless of whether they declare `"type": "module"` or not. - Node.js has an [ESM interoperability layer with CommonJS](https://nodejs.org/docs/latest-v22.x/api/esm.html#interoperability-with-commonjs) that allows for imports from ESM to identify named exports in CommonJS packages. This interoperability layer is **only** enabled when importing packages with a `.cts` or `.cjs` extension. This is because the interoperability layer is not fully compatible with the NPM ecosystem, and would break package if it was enabled for `.js` files. - Dynamic imports of CommonJS packages will vary in shape depending on the runtime, i.e. test vs local development, etc. It is therefore recommended to avoid dynamic imports of CommonJS packages and instead use `require`, or to use the explicit CommonJS extensions as mentioned above. If you do need to dynamically import CommonJS packages, avoid using `default` exports, as the shape of them vary across different environments and you would otherwise need to manually unwrap the import based on the shape of the module object. ### Patch Changes - f21b125: Ensure that both global-agent and undici agents are enabled when proxying is enabled. - Updated dependencies - @backstage/cli-node@0.2.13-next.0 - @backstage/config-loader@1.9.6-next.0 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.1 ## 0.29.5 ### Patch Changes - e937ce0: Fixed incompatible `@typescript-eslint` versions with current `eslint@8.x.x` - 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. - Updated dependencies - @backstage/types@1.2.1 - @backstage/config-loader@1.9.5 - @backstage/integration@1.16.1 - @backstage/catalog-model@1.7.3 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.12 - @backstage/config@1.3.2 - @backstage/errors@1.2.7 - @backstage/eslint-plugin@0.1.10 - @backstage/release-manifests@0.0.12 ## 0.29.5-next.1 ### Patch Changes - Updated dependencies - @backstage/types@1.2.1-next.0 - @backstage/catalog-model@1.7.3-next.0 - @backstage/cli-node@0.2.12-next.0 - @backstage/config@1.3.2-next.0 - @backstage/config-loader@1.9.5-next.1 - @backstage/errors@1.2.7-next.0 - @backstage/release-manifests@0.0.12 - @backstage/cli-common@0.1.15 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.1-next.0 ## 0.29.5-next.0 ### Patch Changes - e937ce0: Fixed incompatible `@typescript-eslint` versions with current `eslint@8.x.x` - Updated dependencies - @backstage/config-loader@1.9.5-next.0 - @backstage/catalog-model@1.7.2 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.11 - @backstage/config@1.3.1 - @backstage/errors@1.2.6 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.0 - @backstage/release-manifests@0.0.12 - @backstage/types@1.2.0 ## 0.29.4 ### Patch Changes - 2b6c1ea: If the Backstage yarn plugin is installed, it will now be automatically updated as part of `versions:bump`. - 7dcff85: Remove special-casing for `@types` packages when generating dependency entries during templating - 3c3a7e6: Revert `css-loader@v7` bump - 0aff006: Bumped the version range for `html-webpack-plugin` to fix the `htmlPluginExports.getCompilationHooks is not a function` error when using experimental Rspack. - 583f3d4: Added `@backstage/cli/config/prettier` as a replacement for `@spotify/prettier-config`, but with the same configuration. - 62a9062: Updated dependency `@module-federation/enhanced` to `^0.8.0`. - 5f04976: Update `rollup` to avoid issues with build output when running `backstage-cli package build`. - 5f04976: Fixed a bug that caused missing code in published packages. - a49030a: Add support for `--output-file` option from ESLint to `package lint` and `repo lint` commands. - 96331fa: Enhance the behavior of the experimental support for module federation in the backstage CLI, by using the `package.json` exports (when present) to complete the list of exposed modules. This allows, for example, using exported `alpha` definitions through module federation. - 5c9cc05: Use native fetch instead of node-fetch - dcd99d2: added experimental RSPack support for build command in the repo scope - Updated dependencies - @backstage/integration@1.16.0 - @backstage/release-manifests@0.0.12 - @backstage/cli-node@0.2.11 - @backstage/config-loader@1.9.3 - @backstage/errors@1.2.6 - @backstage/catalog-model@1.7.2 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.1 - @backstage/eslint-plugin@0.1.10 - @backstage/types@1.2.0 ## 0.29.3-next.2 ### Patch Changes - 62a9062: Updated dependency `@module-federation/enhanced` to `^0.8.0`. - Updated dependencies - @backstage/errors@1.2.6-next.0 - @backstage/cli-node@0.2.11-next.1 - @backstage/config-loader@1.9.3-next.1 - @backstage/catalog-model@1.7.2-next.0 - @backstage/cli-common@0.1.15 - @backstage/config@1.3.1-next.0 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.0-next.1 - @backstage/release-manifests@0.0.12-next.1 - @backstage/types@1.2.0 ## 0.29.3-next.1 ### Patch Changes - a49030a: Add support for `--output-file` option from ESLint to `package lint` and `repo lint` commands. - 5c9cc05: Use native fetch instead of node-fetch - Updated dependencies - @backstage/config-loader@1.9.3-next.0 - @backstage/release-manifests@0.0.12-next.1 - @backstage/catalog-model@1.7.1 - @backstage/cli-common@0.1.15 - @backstage/cli-node@0.2.11-next.0 - @backstage/config@1.3.0 - @backstage/errors@1.2.5 - @backstage/eslint-plugin@0.1.10 - @backstage/integration@1.16.0-next.0 - @backstage/types@1.2.0 ## 0.29.3-next.0 ### Patch Changes - 2b6c1ea: If the Backstage yarn plugin is installed, it will now be automatically updated as part of `versions:bump`. - 7dcff85: Remove special-casing for `@types` packages when generating dependency entries during templating - 0aff006: Bumped the version range for `html-webpack-plugin` to fix the `htmlPluginExports.getCompilationHooks is not a function` error when using experimental Rspack. - 583f3d4: Added `@backstage/cli/config/prettier` as a replacement for `@spotify/prettier-config`, but with the same configuration. - 5f04976: Update `rollup` to avoid issues with build output when running `backstage-cli package build`. - 5f04976: Fixed a bug that caused missing code in published packages. - Updated dependencies - @backstage/integration@1.16.0-next.0 - @backstage/release-manifests@0.0.12-next.0 - @backstage/cli-n