diff --git a/.yarn/versions/27b23f7e.yml b/.yarn/versions/27b23f7e.yml new file mode 100644 index 000000000000..14ccf038783a --- /dev/null +++ b/.yarn/versions/27b23f7e.yml @@ -0,0 +1,23 @@ +releases: + "@yarnpkg/cli": patch + "@yarnpkg/plugin-dlx": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-essentials" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/builder" + - "@yarnpkg/core" + - "@yarnpkg/doctor" diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/commands/dlx.test.js b/packages/acceptance-tests/pkg-tests-specs/sources/commands/dlx.test.js index e1a2f7004ac4..a1ae31f15d5f 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/commands/dlx.test.js +++ b/packages/acceptance-tests/pkg-tests-specs/sources/commands/dlx.test.js @@ -150,5 +150,14 @@ describe(`Commands`, () => { }); }), ); + + test( + `it should use the exact tag specified`, + makeTemporaryEnv({}, async ({path, run, source}) => { + await expect(run(`dlx`, `-p`, `has-bin-entries`, `-p`, `no-deps-tags@rc`, `has-bin-entries`)).resolves.toMatchObject({ + stdout: expect.stringContaining(`no-deps-tags@npm:1.0.0-rc.1`), + }); + }), + ); }); }); diff --git a/packages/plugin-dlx/sources/commands/dlx.ts b/packages/plugin-dlx/sources/commands/dlx.ts index 2f817e219f61..13feb83e37e5 100644 --- a/packages/plugin-dlx/sources/commands/dlx.ts +++ b/packages/plugin-dlx/sources/commands/dlx.ts @@ -101,7 +101,7 @@ export default class DlxCommand extends BaseCommand { let command = structUtils.parseDescriptor(this.command).name; - const addExitCode = await this.cli.run([`add`, `--`, ...pkgs], {cwd: tmpDir, quiet: this.quiet}); + const addExitCode = await this.cli.run([`add`, `--fixed`, `--`, ...pkgs], {cwd: tmpDir, quiet: this.quiet}); if (addExitCode !== 0) return addExitCode;