Skip to content

Commit eeef5b5

Browse files
author
Barthélémy Ledoux
authored
Merge branch '10.0-release' into elevatebart/fix/build-mjs-in-the-cli
2 parents a9ee120 + e6cbc5a commit eeef5b5

File tree

16 files changed

+70
-44
lines changed

16 files changed

+70
-44
lines changed

npm/webpack-preprocessor/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": false,
66
"main": "dist",
77
"scripts": {
8-
"build": "shx rm -rf dist && tsc || echo 'built, with errors'",
8+
"build": "rimraf dist && tsc || echo 'built, with errors'",
99
"build-prod": "yarn build",
1010
"deps": "deps-ok && dependency-check --no-dev .",
1111
"secure": "nsp check",
@@ -53,8 +53,8 @@
5353
"react": "16.13.1",
5454
"react-dom": "16.13.1",
5555
"react-scripts": "3.2",
56+
"rimraf": "3.0.2",
5657
"semantic-release": "17.2.3",
57-
"shx": "0.3.3",
5858
"sinon": "^9.0.0",
5959
"sinon-chai": "^3.5.0",
6060
"snap-shot-it": "7.9.2",

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"check-terminal": "node scripts/check-terminal.js",
1919
"clean": "lerna run clean --parallel --no-bail || echo 'ok, errors while cleaning'",
2020
"check-ts": "gulp checkTs",
21-
"clean-deps": "find . -depth -name node_modules -type d -exec rm -rf {} \\;",
21+
"clean-deps": "find . -depth -name node_modules -type d -exec rimraf {} \\;",
2222
"clean-untracked-files": "git clean -d -f",
2323
"codegen": "yarn gulp codegen",
2424
"precypress:open": "yarn ensure-deps",
@@ -40,7 +40,7 @@
4040
"effective:circle:config": "circleci config process circle.yml | sed /^#/d",
4141
"ensure-deps": "./scripts/ensure-dependencies.sh",
4242
"get-next-version": "node scripts/get-next-version.js",
43-
"postinstall": "patch-package && ./scripts/run-if-not-ci.sh yarn-deduplicate --strategy=highest && yarn clean && gulp postinstall && ./scripts/run-if-not-ci.sh yarn build",
43+
"postinstall": "node ./scripts/run-postInstall.js",
4444
"jscodeshift": "jscodeshift -t ./node_modules/js-codemod/transforms/arrow-function-arguments.js",
4545
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
4646
"lint-changed": "lint-changed",
@@ -203,6 +203,7 @@
203203
"pretty-ms": "7.0.0",
204204
"print-arch": "1.0.0",
205205
"proxyquire": "2.1.3",
206+
"rimraf": "3.0.2",
206207
"semantic-release": "17.2.3",
207208
"semantic-release-monorepo": "7.0.3",
208209
"semver": "7.3.2",

packages/config/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"scripts": {
99
"build-prod": "tsc || echo 'built, with errors'",
1010
"check-ts": "tsc --noEmit",
11-
"clean-deps": "rm -rf node_modules",
12-
"clean": "rm -f ./src/*.js ./src/**/*.js ./src/**/**/*.js ./test/**/*.js || echo 'cleaned'",
11+
"clean-deps": "rimraf node_modules",
12+
"clean": "rimraf --glob ./src/*.js ./src/**/*.js ./src/**/**/*.js ./test/**/*.js || echo 'cleaned'",
1313
"test": "yarn test-unit",
1414
"test-debug": "yarn test-unit --inspect-brk=5566",
1515
"test-unit": "mocha --configFile=../../mocha-reporter-config.json -r @packages/ts/register test/unit/**/*.spec.ts --exit"
@@ -26,7 +26,8 @@
2626
"@packages/types": "0.0.0-development",
2727
"@types/mocha": "9.1.0",
2828
"chai": "4.2.0",
29-
"mocha": "7.0.1"
29+
"mocha": "7.0.1",
30+
"rimraf": "3.0.2"
3031
},
3132
"files": [
3233
"src"

packages/data-context/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"check-ts": "tsc --noEmit && yarn -s tslint",
1010
"clean-deps": "rimraf node_modules",
1111
"tslint": "tslint --config ../ts/tslint.json --project .",
12-
"clean": "rimraf './{src,test}/**/*!(.stories).js'",
12+
"clean": "rimraf --glob \"./{src,test}/**/*!(.stories).js\"",
1313
"test": "yarn test-unit",
1414
"test-unit": "mocha -r @packages/ts/register --config ./test/.mocharc.js"
1515
},

packages/errors/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"build": "../../scripts/run-if-ci.sh tsc || echo 'type errors'",
1111
"build-prod": "tsc",
1212
"check-ts": "tsc --noEmit",
13-
"clean-deps": "rm -rf node_modules",
14-
"clean": "rm -f ./src/*.js ./src/**/*.js ./src/**/**/*.js ./test/**/*.js || echo 'cleaned'",
13+
"clean-deps": "rimraf node_modules",
14+
"clean": "rimraf ./src/*.js ./src/**/*.js ./src/**/**/*.js ./test/**/*.js || echo 'cleaned'",
1515
"pretest-unit": "yarn clean",
1616
"test-unit": "mocha",
1717
"test-electron": "HTML_IMAGE_CONVERSION=1 xvfb-maybe electron --no-sandbox ./node_modules/.bin/_mocha"
@@ -36,6 +36,7 @@
3636
"is-ci": "^3.0.1",
3737
"mocha": "7.0.1",
3838
"pngjs": "^6.0.0",
39+
"rimraf": "3.0.2",
3940
"sinon": "7.5.0",
4041
"terminal-banner": "^1.1.0",
4142
"xvfb-maybe": "^0.2.1"

packages/https-proxy/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"main": "index.js",
66
"scripts": {
7-
"clean-deps": "rm -rf node_modules",
7+
"clean-deps": "rimraf node_modules",
88
"https": "node https.js",
99
"regenerate:certs": "cd ./test/helpers/certs && ./regenerate-certs.sh",
1010
"start": "node index.js",
@@ -30,6 +30,7 @@
3030
"chai": "3.5.0",
3131
"cross-env": "6.0.3",
3232
"mocha": "3.5.3",
33+
"rimraf": "3.0.2",
3334
"sinon": "1.17.7",
3435
"sinon-as-promised": "4.0.3",
3536
"sinon-chai": "3.3.0",

packages/icons/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
"main": "index.js",
77
"scripts": {
88
"build-prod": "yarn build",
9-
"build": "scripts/build.sh && ts-node ./src/ico.ts",
9+
"build": "ts-node ./scripts/build.ts && ts-node ./src/ico.ts",
1010
"test-unit": "NODE_ENV=test mocha -r @packages/ts/register test/*.ts",
1111
"test": "yarn test-unit"
1212
},
1313
"devDependencies": {
1414
"@types/mocha": "^8.0.3",
1515
"@types/to-ico": "^1.1.1",
1616
"chai": "^4.2.0",
17+
"fs-extra": "9.1.0",
1718
"mocha": "^8.1.3",
1819
"to-ico": "^1.1.5"
1920
},

packages/icons/scripts/build.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/icons/scripts/build.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import fs from 'fs-extra'
2+
import path from 'path'
3+
import { exec } from 'child_process'
4+
import os from 'os'
5+
6+
async function build () {
7+
const distPath = path.join(__dirname, '../dist')
8+
const assetsPath = path.join(__dirname, '../assets')
9+
const iconsPath = path.join(distPath, 'icons')
10+
const iconsetPath = path.join(distPath, 'cypress.iconset')
11+
12+
await fs.remove(distPath)
13+
await fs.mkdir(iconsPath, { recursive: true })
14+
15+
await exec('yarn tsc -p ./tsconfig.build.json')
16+
17+
if (os.platform() === 'darwin') {
18+
await exec('iconutil -c icns assets/cypress.iconset -o dist/icons/cypress.icns')
19+
}
20+
21+
await fs.copy(assetsPath, distPath)
22+
await fs.copy(iconsetPath, iconsPath, { overwrite: true })
23+
await fs.remove(iconsetPath)
24+
}
25+
26+
build()

packages/launcher/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"build-prod": "tsc --project .",
7-
"clean": "node scripts/clean.js || true",
7+
"clean": "rimraf --glob \"lib/*.js\" && rimraf --glob \"lib/**/*.js\" || true",
88
"clean-deps": "rimraf node_modules",
99
"clean-js": "yarn clean",
1010
"size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"cli/${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
@@ -29,7 +29,6 @@
2929
"cross-env": "6.0.3",
3030
"mocha": "3.5.3",
3131
"rimraf": "3.0.2",
32-
"shelljs": "0.8.5",
3332
"sinon": "^10.0.0",
3433
"sinon-chai": "3.4.0",
3534
"typescript": "^4.2.3"

0 commit comments

Comments
 (0)