Skip to content

Commit

Permalink
fix(cli): allow mutable install for monorepo yarn.lock (janus-idp#2408)
Browse files Browse the repository at this point in the history
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 <gashcrumb@gmail.com>
  • Loading branch information
gashcrumb authored Oct 21, 2024
1 parent a5abb98 commit 326bca2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/nine-peas-boil.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 326bca2

Please sign in to comment.