From c63fac43c3bc0ca2035ebabbcb4bc5441f70cdac Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 5 May 2020 23:03:01 +0300 Subject: [PATCH] chore: don't compile when running the _test script --- packages/pnpm/package.json | 4 ++-- utils/updater/src/index.ts | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/pnpm/package.json b/packages/pnpm/package.json index 3d3f2a42d2..95e88b8f36 100644 --- a/packages/pnpm/package.json +++ b/packages/pnpm/package.json @@ -155,8 +155,8 @@ "test:tap": "cd ../.. && c8 --reporter lcov --reports-dir packages/pnpm/coverage ts-node packages/pnpm/test --type-check", "pretest:e2e": "rimraf node_modules/.bin/pnpm", "test:e2e": "registry-mock prepare && run-p -r registry-mock test:tap", - "_test": "pnpm run compile && cross-env PNPM_REGISTRY_MOCK_PORT=7780 pnpm run test:e2e", - "test": "pnpm run _test", + "_test": "cross-env PNPM_REGISTRY_MOCK_PORT=7780 pnpm run test:e2e", + "test": "pnpm run compile && pnpm run _test", "prepublishOnly": "pnpm run compile && npm cache clear --force && publish-packed --prune", "postpublish": "publish-packed", "compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build" diff --git a/utils/updater/src/index.ts b/utils/updater/src/index.ts index e028b3019e..3e9c07e0fb 100644 --- a/utils/updater/src/index.ts +++ b/utils/updater/src/index.ts @@ -76,13 +76,8 @@ async function updateManifest (dir: string, manifest: ProjectManifest) { 'test:e2e': 'registry-mock prepare && run-p -r registry-mock test:tap', } - if (manifest.name === 'pnpm') { - scripts.test = 'pnpm run _test' - scripts._test = `pnpm run compile && cross-env PNPM_REGISTRY_MOCK_PORT=${port} pnpm run test:e2e` - } else { - scripts.test = 'pnpm run compile && pnpm run _test' - scripts._test = `cross-env PNPM_REGISTRY_MOCK_PORT=${port} pnpm run test:e2e` - } + scripts.test = 'pnpm run compile && pnpm run _test' + scripts._test = `cross-env PNPM_REGISTRY_MOCK_PORT=${port} pnpm run test:e2e` break default: if (await exists(path.join(dir, 'test'))) {