Skip to content

Commit

Permalink
Store local yarn versions as .cjs files (#8145)
Browse files Browse the repository at this point in the history
This improves the experience of working with yarn
in workspaces that are marked as "type": "module"
in the package.json file.

This change has also been applied in yarn 2, see yarnpkg/berry#1354
  • Loading branch information
bgotink authored and arcanis committed Aug 27, 2020
1 parent 1f5524c commit 8c1e278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/commands/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const {run, setFlags, examples} = buildSubCommands('policies', {

const bundle = await fetchBundle(config, bundleUrl);

const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.js`);
const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.cjs`);
reporter.log(`Saving it into ${chalk.magenta(yarnPath)}...`);
await fs.mkdirp(path.dirname(yarnPath));
await fs.writeFile(yarnPath, bundle);
Expand Down

0 comments on commit 8c1e278

Please sign in to comment.