From 6eebba57547e799b20a914e216da30963a6eb7bc Mon Sep 17 00:00:00 2001 From: Stan Lewis Date: Mon, 21 Oct 2024 13:39:10 -0400 Subject: [PATCH] fix(cli): allow mutable install for monorepo yarn.lock (#2408) This change updates the CLI to use `--no-immutable` when a plugin package or monorepo `yarn.lock` file is used during the `export-dynamic-plugin` command. Explicitly passing this flag avoids the default Yarn 3.x behavior of `--immutable` when the command is run in a CI environment. Signed-off-by: Stan Lewis --- .changeset/nine-peas-boil.md | 7 +++++++ .../export-dynamic-plugin/backend-embed-as-dependencies.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/nine-peas-boil.md diff --git a/.changeset/nine-peas-boil.md b/.changeset/nine-peas-boil.md new file mode 100644 index 00000000000..6b9a1b703f0 --- /dev/null +++ b/.changeset/nine-peas-boil.md @@ -0,0 +1,7 @@ +--- +"@janus-idp/cli": patch +--- + +fix(cli): allow mutable install for monorepo yarn.lock + +This change updates the CLI to use `--no-immutable` when a plugin package or monorepo `yarn.lock` file is used during the `export-dynamic-plugin` command. Explicitly passing this flag avoids the default Yarn 3.x behavior of `--immutable` when the command is run in a CI environment. diff --git a/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-dependencies.ts b/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-dependencies.ts index e63498ac106..b0afb4227fc 100644 --- a/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-dependencies.ts +++ b/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-dependencies.ts @@ -320,7 +320,7 @@ ${ ? `${yarn} install --production${ yarnLockExists ? ' --frozen-lockfile' : '' }` - : `${yarn} install${yarnLockExists ? ' --immutable' : ''}`; + : `${yarn} install${yarnLockExists ? ' --immutable' : ' --no-immutable'}`; await Task.forCommand(yarnInstall, { cwd: target, optional: false }); await fs.remove(paths.resolveTarget(targetRelativePath, '.yarn'));