From 326bca2c54ac98c1673c29ea358337784cbc1e1e 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 0000000000..6b9a1b703f --- /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 e63498ac10..b0afb4227f 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'));