Skip to content

Commit

Permalink
chore(repo): use @latest to enforce correct version on e2e (#10332)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed May 16, 2022
1 parent 6024c3d commit 34e74b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions e2e/add-nx-to-monorepo/src/add-nx-to-monorepo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('add-nx-to-monorepo', () => {

// Act
const output = runCommand(
`${packageManagerCommand} add-nx-to-monorepo --nx-cloud false`
`${packageManagerCommand} add-nx-to-monorepo@latest --nx-cloud false`
);
// Assert
expect(output).toContain('🎉 Done!');
Expand All @@ -58,7 +58,7 @@ describe('add-nx-to-monorepo', () => {

// Act
runCommand(
`${packageManagerCommand} add-nx-to-monorepo --nx-cloud false`
`${packageManagerCommand} add-nx-to-monorepo@latest --nx-cloud false`
);
const output = runCLI('build package-a');
// Assert
Expand Down
6 changes: 3 additions & 3 deletions e2e/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export function runCreatePlugin(

const pm = getPackageManagerCommand({ packageManager });

let command = `${pm.runUninstalledPackage} create-nx-plugin ${name}`;
let command = `${pm.runUninstalledPackage} create-nx-plugin@latest ${name}`;

if (pluginName) {
command += ` --pluginName=${pluginName}`;
Expand Down Expand Up @@ -803,7 +803,7 @@ export function getPackageManagerCommand({
run: (script: string, args: string) => `npm run ${script} -- ${args}`,
runNx: `npx nx`,
runNxSilent: `npx nx`,
runUninstalledPackage: `npx`,
runUninstalledPackage: `npx --yes`,
addDev: `npm install --legacy-peer-deps -D`,
list: 'npm ls --depth 10',
},
Expand All @@ -813,7 +813,7 @@ export function getPackageManagerCommand({
run: (script: string, args: string) => `yarn ${script} ${args}`,
runNx: `yarn nx`,
runNxSilent: `yarn --silent nx`,
runUninstalledPackage: 'npx',
runUninstalledPackage: 'npx --yes',
addDev: `yarn add -D`,
list: 'npm ls --depth 10',
},
Expand Down

0 comments on commit 34e74b4

Please sign in to comment.