diff --git a/.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch b/.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch deleted file mode 100644 index c5fb350..0000000 --- a/.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/dist/lib/bundler/config.cjs.js b/dist/lib/bundler/config.cjs.js -index f5860c14d9a1e8046f23e9c542882494dc8e8b30..3fe00ad9ac51582e1e5648936f9486bcbaa5621d 100644 ---- a/dist/lib/bundler/config.cjs.js -+++ b/dist/lib/bundler/config.cjs.js -@@ -299,7 +299,17 @@ async function createConfig(paths, options) { - css: false - } - }, -- plugins -+ plugins, -+ ...options.moduleFederationRemote && { -+ // TODO: remove this warning skipping as soon as the corresponding bundler limitation -+ // described in issue https://github.com/web-infra-dev/rspack/issues/13635 is fixed -+ // when PR: https://github.com/web-infra-dev/rspack/pull/13636 is merged. -+ ignoreWarnings: [ -+ { -+ message: /No version specified and unable to automatically determine one\. No version in description file/ -+ } -+ ] -+ } - }; - } - diff --git a/CHANGELOG.md b/CHANGELOG.md index fcab735..2b967a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to `@red-hat-developer-hub/cli` are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.10.4 - 2026-04-09 + +### Changed + +- **`export-dynamic-plugin` (module federation):** while running **`buildFrontend`** with **`isModuleFederationRemote`**, **`CI`** is temporarily set to **`false`** when it was **`true`**, **`1`**, or **`yes`** (case-insensitive), then restored. That avoids Rspack treating CI builds as strict in a way that breaks **`npx`** / **`CI=true`** environments ([rspack#13635](https://github.com/web-infra-dev/rspack/issues/13635)), without **`postinstall`** or patching **`node_modules`**. +- **`typescript`** is now a **runtime `dependency`** so the published CLI satisfies peers such as **`@module-federation/dts-plugin`** under strict installers (for example **Yarn PnP** with **`yarn dlx`**). + ## 1.10.3 - 2026-04-08 ### Changed diff --git a/package.json b/package.json index 6362dc9..0613825 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@red-hat-developer-hub/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "1.10.3", + "version": "1.10.4", "publishConfig": { "access": "public" }, @@ -80,6 +80,7 @@ "semver": "^7.5.4", "style-loader": "^3.3.1", "swc-loader": "^0.2.3", + "typescript": "5.4.5", "typescript-json-schema": "^0.64.0", "webpack": "~5.105.0", "webpack-dev-server": "^5.0.0", @@ -122,8 +123,7 @@ "tar": "^7.5.7", "ts-jest": "^29.3.4", "ts-node": "10.9.2", - "type-fest": "4.20.1", - "typescript": "5.4.5" + "type-fest": "4.20.1" }, "peerDependencies": { "@microsoft/api-extractor": "^7.21.2" @@ -155,9 +155,5 @@ "prettier --write" ] }, - "packageManager": "yarn@3.8.6", - "resolutions": { - "@backstage/cli-module-build@0.1.0": "patch:@backstage/cli-module-build@npm%3A0.1.0#./.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch", - "@backstage/cli-module-build@^0.1.0": "patch:@backstage/cli-module-build@npm%3A0.1.0#./.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch" - } + "packageManager": "yarn@3.8.6" } diff --git a/src/commands/export-dynamic-plugin/frontend.ts b/src/commands/export-dynamic-plugin/frontend.ts index 79d319f..ca7b2e9 100644 --- a/src/commands/export-dynamic-plugin/frontend.ts +++ b/src/commands/export-dynamic-plugin/frontend.ts @@ -30,6 +30,14 @@ import { paths } from '../../lib/paths'; import { Task } from '../../lib/tasks'; import { customizeForDynamicUse } from './backend'; +function isTruthyCiEnv(value: string | undefined): boolean { + if (value === undefined) { + return false; + } + const normalized = value.trim().toLowerCase(); + return normalized === 'true' || normalized === '1' || normalized === 'yes'; +} + export async function frontend( _: PackageRoleInfo, opts: OptionValues, @@ -57,12 +65,27 @@ export async function frontend( path.join(paths.targetDir, 'dist'), )}`, ); - await buildFrontend({ - targetDir: paths.targetDir, - configPaths: [], - writeStats: false, - isModuleFederationRemote: true, - }); + const previousCi = process.env.CI; + const unsetCiForMfBuild = isTruthyCiEnv(previousCi); + if (unsetCiForMfBuild) { + process.env.CI = 'false'; + } + try { + await buildFrontend({ + targetDir: paths.targetDir, + configPaths: [], + writeStats: false, + isModuleFederationRemote: true, + }); + } finally { + if (unsetCiForMfBuild) { + if (previousCi === undefined) { + delete process.env.CI; + } else { + process.env.CI = previousCi; + } + } + } } const distDynamicRelativePath = 'dist-dynamic'; diff --git a/yarn.lock b/yarn.lock index 0cdf75e..b45004d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1689,7 +1689,7 @@ __metadata: languageName: node linkType: hard -"@backstage/cli-module-build@npm:0.1.0": +"@backstage/cli-module-build@npm:0.1.0, @backstage/cli-module-build@npm:^0.1.0": version: 0.1.0 resolution: "@backstage/cli-module-build@npm:0.1.0" dependencies: @@ -1758,75 +1758,6 @@ __metadata: languageName: node linkType: hard -"@backstage/cli-module-build@patch:@backstage/cli-module-build@npm%3A0.1.0#./.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch::locator=%40red-hat-developer-hub%2Fcli%40workspace%3A.": - version: 0.1.0 - resolution: "@backstage/cli-module-build@patch:@backstage/cli-module-build@npm%3A0.1.0#./.yarn/patches/@backstage-cli-module-build-npm-0.1.0-3994b93767.patch::version=0.1.0&hash=ed10c5&locator=%40red-hat-developer-hub%2Fcli%40workspace%3A." - dependencies: - "@backstage/cli-common": ^0.2.0 - "@backstage/cli-node": ^0.3.0 - "@backstage/config": ^1.3.6 - "@backstage/config-loader": ^1.10.9 - "@backstage/errors": ^1.2.7 - "@backstage/module-federation-common": ^0.1.2 - "@manypkg/get-packages": ^1.1.3 - "@module-federation/enhanced": ^0.21.6 - "@pmmmwh/react-refresh-webpack-plugin": ^0.6.0 - "@rollup/plugin-commonjs": ^26.0.0 - "@rollup/plugin-json": ^6.0.0 - "@rollup/plugin-node-resolve": ^15.0.0 - "@rollup/plugin-yaml": ^4.0.0 - "@rspack/core": ^1.4.11 - "@rspack/dev-server": ^1.1.4 - "@rspack/plugin-react-refresh": ^1.4.3 - "@swc/core": ^1.15.6 - bfj: ^9.0.2 - buffer: ^6.0.3 - chalk: ^4.0.0 - chokidar: ^3.3.1 - cleye: ^2.3.0 - cross-spawn: ^7.0.3 - css-loader: ^6.5.1 - ctrlc-windows: ^2.1.0 - esbuild-loader: ^4.0.0 - eslint-rspack-plugin: ^4.2.1 - eslint-webpack-plugin: ^4.2.0 - fork-ts-checker-webpack-plugin: ^9.0.0 - fs-extra: ^11.2.0 - glob: ^7.1.7 - html-webpack-plugin: ^5.6.3 - lodash: ^4.17.21 - mini-css-extract-plugin: ^2.4.2 - node-stdlib-browser: ^1.3.1 - npm-packlist: ^5.0.0 - p-queue: ^6.6.2 - postcss: ^8.1.0 - postcss-import: ^16.1.0 - process: ^0.11.10 - raw-loader: ^4.0.2 - react-dev-utils: ^12.0.0-next.60 - react-refresh: ^0.18.0 - rollup: ^4.27.3 - rollup-plugin-dts: ^6.1.0 - rollup-plugin-esbuild: ^6.1.1 - rollup-plugin-postcss: ^4.0.0 - rollup-pluginutils: ^2.8.2 - shell-quote: ^1.8.1 - style-loader: ^3.3.1 - swc-loader: ^0.2.3 - tar: ^7.5.6 - ts-checker-rspack-plugin: ^1.1.5 - ts-morph: ^24.0.0 - util: ^0.12.3 - webpack: ~5.105.0 - webpack-dev-server: ^5.0.0 - yml-loader: ^2.1.0 - yn: ^4.0.0 - bin: - cli-module-build: bin/backstage-cli-module-build - checksum: 2091bce591861bcf365282d1a70dba3f29bec2eed1afd83e60da6c90f43261d28589312747d3cea1b2077a32e64ab21cf6e0a12871bf0255bc9db7e42a5a510c - languageName: node - linkType: hard - "@backstage/cli-module-config@npm:^0.1.0": version: 0.1.0 resolution: "@backstage/cli-module-config@npm:0.1.0"