chore(repo): minor changes to improve local e2e experience

This commit is contained in:
Victor Savkin 2022-03-26 12:54:34 -04:00
parent 7a844cb228
commit 16378258cd
No known key found for this signature in database
GPG Key ID: 39178FEB7698B817
2 changed files with 10 additions and 3 deletions

View File

@ -207,7 +207,7 @@ export function runNgNew(
}
export function getSelectedPackageManager(): 'npm' | 'yarn' | 'pnpm' {
return process.env.SELECTED_PM as 'npm' | 'yarn' | 'pnpm';
return (process.env.SELECTED_PM as 'npm' | 'yarn' | 'pnpm') || 'npm';
}
/**

View File

@ -5,6 +5,7 @@ import {
prettierVersion,
typescriptVersion,
} from '../packages/workspace/src/utils/versions';
import { stripIndent } from 'nx/src/utils/logger';
process.env.PUBLISHED_VERSION = `9999.0.2`;
process.env.npm_config_registry = `http://localhost:4872`;
@ -13,10 +14,16 @@ process.env.YARN_REGISTRY = process.env.npm_config_registry;
async function buildPackagePublishAndCleanPorts() {
if (!process.env.NX_E2E_SKIP_BUILD_CLEANUP) {
if (!process.env.CI) {
console.log(`
console.log(
stripIndent(`
Did you know that you can run the command with:
> NX_E2E_SKIP_BUILD_CLEANUP - saves time by reusing the previously built local packages
> CI - simulate the CI environment settings\n`);
> CI - simulate the CI environment settings
If you change create-nx-workspace or create-nx-plugin, make sure to remove your npx cache.
Otherwise the changes won't be reflected in the tests.
\n`)
);
}
await Promise.all([
remove('./build'),