From ac1599c26bd20e882c3fd9c77636ee870c9e5cf4 Mon Sep 17 00:00:00 2001 From: Huafu Gandon Date: Tue, 21 Aug 2018 22:20:54 +0200 Subject: [PATCH] fix: uses cross-platform spawn + fix pkg versions --- e2e/__helpers__/test-case/runtime.ts | 2 +- e2e/__templates__/default/package.json | 6 +++--- e2e/__templates__/with-babel-6/package.json | 8 ++++---- e2e/__templates__/with-babel-7/package.json | 10 +++++----- e2e/__templates__/with-jest-22/package.json | 6 +++--- .../with-typescript-2-7/package-lock.json | 2 +- e2e/__templates__/with-typescript-2-7/package.json | 6 +++--- .../with-unsupported-version/package-lock.json | 2 +- .../with-unsupported-version/package.json | 6 +++--- scripts/lib/spawn-sync.js | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/e2e/__helpers__/test-case/runtime.ts b/e2e/__helpers__/test-case/runtime.ts index d8e3261085..15dba3f45c 100644 --- a/e2e/__helpers__/test-case/runtime.ts +++ b/e2e/__helpers__/test-case/runtime.ts @@ -20,7 +20,7 @@ import { outputJsonSync, } from 'fs-extra' import merge from 'lodash.merge' -import { spawnSync } from 'child_process' +import { sync as spawnSync } from 'cross-spawn' const TEMPLATE_EXCLUDED_ITEMS = ['node_modules', 'package-lock.json'] diff --git a/e2e/__templates__/default/package.json b/e2e/__templates__/default/package.json index d3ffd54dd2..8b11572cbb 100644 --- a/e2e/__templates__/default/package.json +++ b/e2e/__templates__/default/package.json @@ -3,8 +3,8 @@ "version": "0.0.0-tmpl.0", "private": true, "devDependencies": { - "@types/jest": "^23.3.1", - "jest": "^23.4.2", - "typescript": "^3.0.1" + "@types/jest": "23.3.1", + "jest": "23.4.2", + "typescript": "3.0.1" } } diff --git a/e2e/__templates__/with-babel-6/package.json b/e2e/__templates__/with-babel-6/package.json index 72811ba9ea..888ee1f77c 100644 --- a/e2e/__templates__/with-babel-6/package.json +++ b/e2e/__templates__/with-babel-6/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-tmpl.0", "private": true, "devDependencies": { - "@types/jest": "^23.3.1", - "babel-core": "^6.26.3", - "jest": "^23.4.2", - "typescript": "^3.0.1" + "@types/jest": "23.3.1", + "babel-core": "6.26.3", + "jest": "23.4.2", + "typescript": "3.0.1" } } diff --git a/e2e/__templates__/with-babel-7/package.json b/e2e/__templates__/with-babel-7/package.json index 046b552b45..bf3e7da19a 100644 --- a/e2e/__templates__/with-babel-7/package.json +++ b/e2e/__templates__/with-babel-7/package.json @@ -3,10 +3,10 @@ "version": "0.0.0-tmpl.0", "private": true, "devDependencies": { - "@babel/core": "^7.0.0-beta.56", - "@types/jest": "^23.3.1", - "babel-core": "^7.0.0-bridge.0", - "jest": "^23.4.2", - "typescript": "^3.0.1" + "@babel/core": "7.0.0-beta.56", + "@types/jest": "23.3.1", + "babel-core": "7.0.0-bridge.0", + "jest": "23.4.2", + "typescript": "3.0.1" } } diff --git a/e2e/__templates__/with-jest-22/package.json b/e2e/__templates__/with-jest-22/package.json index 16ce4ee280..b3ca56e2ca 100644 --- a/e2e/__templates__/with-jest-22/package.json +++ b/e2e/__templates__/with-jest-22/package.json @@ -3,8 +3,8 @@ "version": "0.0.0-tmpl.0", "private": true, "devDependencies": { - "@types/jest": "^22.2.3", - "jest": "^22.4.4", - "typescript": "^3.0.1" + "@types/jest": "22.2.3", + "jest": "22.4.4", + "typescript": "3.0.1" } } diff --git a/e2e/__templates__/with-typescript-2-7/package-lock.json b/e2e/__templates__/with-typescript-2-7/package-lock.json index 94f833e12b..84f56e5bf8 100644 --- a/e2e/__templates__/with-typescript-2-7/package-lock.json +++ b/e2e/__templates__/with-typescript-2-7/package-lock.json @@ -1,5 +1,5 @@ { - "name": "ts-jest-e2e-tmpl-default", + "name": "ts-jest-e2e-tmpl-with-typescript-2-7", "version": "0.0.0-tmpl.0", "lockfileVersion": 1, "requires": true, diff --git a/e2e/__templates__/with-typescript-2-7/package.json b/e2e/__templates__/with-typescript-2-7/package.json index cb37891f17..a1661564c9 100644 --- a/e2e/__templates__/with-typescript-2-7/package.json +++ b/e2e/__templates__/with-typescript-2-7/package.json @@ -3,8 +3,8 @@ "version": "0.0.0-tmpl.0", "private": true, "devDependencies": { - "@types/jest": "^23.3.1", - "jest": "^23.4.2", - "typescript": "^2.7.2" + "@types/jest": "23.3.1", + "jest": "23.4.2", + "typescript": "2.7.2" } } diff --git a/e2e/__templates__/with-unsupported-version/package-lock.json b/e2e/__templates__/with-unsupported-version/package-lock.json index 37c252b4e4..2f5044fc2a 100644 --- a/e2e/__templates__/with-unsupported-version/package-lock.json +++ b/e2e/__templates__/with-unsupported-version/package-lock.json @@ -1,5 +1,5 @@ { - "name": "ts-jest-e2e-tmpl-with-unsupported", + "name": "ts-jest-e2e-tmpl-with-unsupported-version", "version": "0.0.0-tmpl.0", "lockfileVersion": 1, "requires": true, diff --git a/e2e/__templates__/with-unsupported-version/package.json b/e2e/__templates__/with-unsupported-version/package.json index 94c0f5a1d5..53039dce9c 100644 --- a/e2e/__templates__/with-unsupported-version/package.json +++ b/e2e/__templates__/with-unsupported-version/package.json @@ -3,8 +3,8 @@ "version": "0.0.0-tmpl.0", "private": true, "devDependencies": { - "@types/jest": "^23.3.1", - "jest": "^23.4.2", - "typescript": "^2.5.3" + "@types/jest": "23.3.1", + "jest": "23.4.2", + "typescript": "2.5.3" } } diff --git a/scripts/lib/spawn-sync.js b/scripts/lib/spawn-sync.js index 7a8a0894db..11cf45a16a 100644 --- a/scripts/lib/spawn-sync.js +++ b/scripts/lib/spawn-sync.js @@ -1,4 +1,4 @@ -const { spawnSync: sync } = require('child_process') +const { sync } = require('cross-spawn') /** * @type {typeof sync}