Skip to content

Commit f6e64ff

Browse files
Upgrade lerna, et al to address security vulnerabilities, modernise build environment (#2507)
* Upgrading to newest @types/node for the typescript version we currently use (3.8.3). https://www.npmjs.com/package/@types/node?activeTab=versions * Big update to lerna to address security vulnerabilities. bootstrap command no longer required. Seems to build and test ok. May need some tweaking. Will add build caching at a later date. * Updating documentation (the NPM library) to address security vulnerabilities. Had to wrap body of script so as be async, though otherwise unchanged. * Updating es-check to address security vulnerabilities. * Updating tape library to address security vulnerabilities. * Add lerna caching (via nx). Simplistic setup so will need some tweaking. Remove redundant packages setting from lerna.json (will default to packages setting in package.json instead). Have to add --npm-path to all npm-run-all calls so that lerna doesn't accidentally end up being used as the npm binary. mysticatea/npm-run-all#218 and lerna/lerna#1842 have more details. * Missed a couple of carats in package.json dependency specs. * Also need to commit a new yarn.lock file to reflect version spec changes in previous commit. --------- Co-authored-by: mfedderly <mdfedderly@mdfedderly.com>
1 parent 7c62021 commit f6e64ff

File tree

118 files changed

+4548
-2284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+4548
-2284
lines changed

.monorepolint.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ module.exports = {
165165
options: {
166166
scripts: {
167167
docs: "tsx ../../scripts/generate-readmes",
168-
test: "npm-run-all test:*",
168+
test: "npm-run-all --npm-path npm test:*",
169169
},
170170
},
171171
excludePackages: [MAIN_PACKAGE],
172172
},
173173
{
174174
options: {
175175
scripts: {
176-
build: "npm-run-all build:*",
176+
build: "npm-run-all --npm-path npm build:*",
177177
"build:js": "tsc",
178178
"build:es":
179179
'tsc --outDir dist/es --module esnext --declaration false && echo \'{"type":"module"}\' > dist/es/package.json',

lerna.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
{
2-
"packages": [
3-
"packages/*"
4-
],
2+
"npmClient": "yarn",
3+
"version": "7.0.0-alpha.2",
54
"command": {
6-
"bootstrap": {
7-
"useWorkspaces": true,
8-
"ignoreScripts": true
9-
},
105
"publish": {
116
"registry": "https://registry.npmjs.org"
127
}
13-
},
14-
"npmClient": "yarn",
15-
"version": "7.0.0-alpha.2"
8+
}
169
}

nx.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"tasksRunnerOptions": {
3+
"default": {
4+
"runner": "nx/tasks-runners/default",
5+
"options": {
6+
"cacheableOperations": [
7+
"build",
8+
"build:es",
9+
"build:js",
10+
"test",
11+
"test:tape",
12+
"test:types",
13+
"last-checks",
14+
"last-checks:example",
15+
"last-checks:testjs"
16+
]
17+
}
18+
}
19+
},
20+
"targetDefaults": {
21+
"build": {
22+
"dependsOn": ["^build"],
23+
"outputs": ["{projectRoot}/dist"]
24+
},
25+
"build:es": {
26+
"dependsOn": ["^build:es"],
27+
"outputs": ["{projectRoot}/dist"]
28+
},
29+
"build:js": {
30+
"dependsOn": ["^build:js"],
31+
"outputs": ["{projectRoot}/dist"]
32+
},
33+
"test": {
34+
"dependsOn": ["^test"]
35+
},
36+
"test:tape": {
37+
"dependsOn": ["^test:tape"]
38+
},
39+
"test:types": {
40+
"dependsOn": ["^test:types"]
41+
},
42+
"last-checks": {
43+
"dependsOn": ["^last-checks"]
44+
},
45+
"last-checks:example": {
46+
"dependsOn": ["^last-checks:example"]
47+
},
48+
"last-checks:testjs": {
49+
"dependsOn": ["^last-checks:testjs"]
50+
}
51+
}
52+
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lint:escheck-esm": "es-check --module es8 packages/*/dist/es/index.js",
1414
"lint:escheck-es5": "es-check es5 packages/turf/turf.min.js",
1515
"postlint": "documentation lint packages/turf-*/index.js",
16-
"prepare": "lerna bootstrap && lerna run build && node ./scripts/add-import-extensions.js",
16+
"prepare": "lerna run build && node ./scripts/add-import-extensions.js",
1717
"pretest": "npm run lint",
1818
"test": "lerna run test",
1919
"posttest": "lerna run --scope @turf/turf last-checks",
@@ -39,22 +39,22 @@
3939
},
4040
"devDependencies": {
4141
"@types/geojson": "7946.0.8",
42-
"@types/node": "^17.0.2",
42+
"@types/node": "^17.0.21",
4343
"@typescript-eslint/eslint-plugin": "^4.8.0",
4444
"@typescript-eslint/parser": "^4.8.0",
4545
"acorn": "^7.4.1",
4646
"camelcase": "*",
4747
"d3-queue": "*",
4848
"decamelize": "*",
4949
"dependency-tree": "^8.1.2",
50-
"documentation": "^13.2.5",
51-
"es-check": "^5.1.4",
50+
"documentation": "^14.0.2",
51+
"es-check": "^7.1.1",
5252
"eslint": "~7.13.0",
5353
"eslint-config-prettier": "^6.15.0",
5454
"esm": "^3.2.25",
5555
"fs-extra": "*",
5656
"husky": "^4.2.3",
57-
"lerna": "^4.0.0",
57+
"lerna": "^7.3.0",
5858
"lint-staged": "^10.0.8",
5959
"load-json-file": "*",
6060
"meow": "*",
@@ -63,7 +63,7 @@
6363
"prettier": "^2.1.2",
6464
"progress": "*",
6565
"rollup": "^2.34.2",
66-
"tape": "*",
66+
"tape": "^5.7.0",
6767
"ts-node": "^9.0.0",
6868
"tsx": "^3.12.8",
6969
"typescript": "^3.8.3",

packages/turf-along/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
],
4141
"scripts": {
4242
"bench": "tsx bench.js",
43-
"build": "npm-run-all build:*",
43+
"build": "npm-run-all --npm-path npm build:*",
4444
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4545
"build:js": "tsc",
4646
"docs": "tsx ../../scripts/generate-readmes",
47-
"test": "npm-run-all test:*",
47+
"test": "npm-run-all --npm-path npm test:*",
4848
"test:tape": "tsx test.js"
4949
},
5050
"devDependencies": {

packages/turf-angle/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
],
4141
"scripts": {
4242
"bench": "tsx bench.js",
43-
"build": "npm-run-all build:*",
43+
"build": "npm-run-all --npm-path npm build:*",
4444
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4545
"build:js": "tsc",
4646
"docs": "tsx ../../scripts/generate-readmes",
47-
"test": "npm-run-all test:*",
47+
"test": "npm-run-all --npm-path npm test:*",
4848
"test:tape": "tsx test.js"
4949
},
5050
"devDependencies": {

packages/turf-area/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
],
4040
"scripts": {
4141
"bench": "tsx bench.js",
42-
"build": "npm-run-all build:*",
42+
"build": "npm-run-all --npm-path npm build:*",
4343
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4444
"build:js": "tsc",
4545
"docs": "tsx ../../scripts/generate-readmes",
46-
"test": "npm-run-all test:*",
46+
"test": "npm-run-all --npm-path npm test:*",
4747
"test:tape": "tsx test.js"
4848
},
4949
"devDependencies": {

packages/turf-bbox-clip/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
],
4646
"scripts": {
4747
"bench": "tsx bench.js",
48-
"build": "npm-run-all build:*",
48+
"build": "npm-run-all --npm-path npm build:*",
4949
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
5050
"build:js": "tsc",
5151
"docs": "tsx ../../scripts/generate-readmes",
52-
"test": "npm-run-all test:*",
52+
"test": "npm-run-all --npm-path npm test:*",
5353
"test:tape": "tsx test.js"
5454
},
5555
"devDependencies": {

packages/turf-bbox-polygon/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
],
4141
"scripts": {
4242
"bench": "tsx bench.js",
43-
"build": "npm-run-all build:*",
43+
"build": "npm-run-all --npm-path npm build:*",
4444
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4545
"build:js": "tsc",
4646
"docs": "tsx ../../scripts/generate-readmes",
47-
"test": "npm-run-all test:*",
47+
"test": "npm-run-all --npm-path npm test:*",
4848
"test:tape": "tsx test.js"
4949
},
5050
"devDependencies": {

packages/turf-bbox/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
],
4242
"scripts": {
4343
"bench": "tsx bench.js",
44-
"build": "npm-run-all build:*",
44+
"build": "npm-run-all --npm-path npm build:*",
4545
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4646
"build:js": "tsc",
4747
"docs": "tsx ../../scripts/generate-readmes",
48-
"test": "npm-run-all test:*",
48+
"test": "npm-run-all --npm-path npm test:*",
4949
"test:tape": "tsx test.js"
5050
},
5151
"devDependencies": {

packages/turf-bearing/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
],
3838
"scripts": {
3939
"bench": "tsx bench.js",
40-
"build": "npm-run-all build:*",
40+
"build": "npm-run-all --npm-path npm build:*",
4141
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4242
"build:js": "tsc",
4343
"docs": "tsx ../../scripts/generate-readmes",
44-
"test": "npm-run-all test:*",
44+
"test": "npm-run-all --npm-path npm test:*",
4545
"test:tape": "tsx test.js"
4646
},
4747
"devDependencies": {

packages/turf-bezier-spline/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
],
4141
"scripts": {
4242
"bench": "tsx bench.js",
43-
"build": "npm-run-all build:*",
43+
"build": "npm-run-all --npm-path npm build:*",
4444
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4545
"build:js": "tsc",
4646
"docs": "tsx ../../scripts/generate-readmes",
47-
"test": "npm-run-all test:*",
47+
"test": "npm-run-all --npm-path npm test:*",
4848
"test:tape": "tsx test.js"
4949
},
5050
"devDependencies": {

packages/turf-boolean-clockwise/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
],
4545
"scripts": {
4646
"bench": "tsx bench.js",
47-
"build": "npm-run-all build:*",
47+
"build": "npm-run-all --npm-path npm build:*",
4848
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4949
"build:js": "tsc",
5050
"docs": "tsx ../../scripts/generate-readmes",
51-
"test": "npm-run-all test:*",
51+
"test": "npm-run-all --npm-path npm test:*",
5252
"test:tape": "tsx test.js"
5353
},
5454
"devDependencies": {

packages/turf-boolean-concave/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
],
4444
"scripts": {
4545
"bench": "tsx bench.js",
46-
"build": "npm-run-all build:*",
46+
"build": "npm-run-all --npm-path npm build:*",
4747
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4848
"build:js": "tsc",
4949
"docs": "tsx ../../scripts/generate-readmes",
50-
"test": "npm-run-all test:*",
50+
"test": "npm-run-all --npm-path npm test:*",
5151
"test:tape": "tsx test.js"
5252
},
5353
"devDependencies": {

packages/turf-boolean-contains/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
],
4444
"scripts": {
4545
"bench": "tsx bench.js",
46-
"build": "npm-run-all build:*",
46+
"build": "npm-run-all --npm-path npm build:*",
4747
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4848
"build:js": "tsc",
4949
"docs": "tsx ../../scripts/generate-readmes",
50-
"test": "npm-run-all test:*",
50+
"test": "npm-run-all --npm-path npm test:*",
5151
"test:tape": "tsx test.js"
5252
},
5353
"devDependencies": {

packages/turf-boolean-crosses/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
],
4444
"scripts": {
4545
"bench": "tsx bench.js",
46-
"build": "npm-run-all build:*",
46+
"build": "npm-run-all --npm-path npm build:*",
4747
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4848
"build:js": "tsc",
4949
"docs": "tsx ../../scripts/generate-readmes",
50-
"test": "npm-run-all test:*",
50+
"test": "npm-run-all --npm-path npm test:*",
5151
"test:tape": "tsx test.js"
5252
},
5353
"devDependencies": {

packages/turf-boolean-disjoint/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
],
4444
"scripts": {
4545
"bench": "tsx bench.js",
46-
"build": "npm-run-all build:*",
46+
"build": "npm-run-all --npm-path npm build:*",
4747
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4848
"build:js": "tsc",
4949
"docs": "tsx ../../scripts/generate-readmes",
50-
"test": "npm-run-all test:*",
50+
"test": "npm-run-all --npm-path npm test:*",
5151
"test:tape": "tsx test.js"
5252
},
5353
"devDependencies": {

packages/turf-boolean-equal/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
],
4747
"scripts": {
4848
"bench": "tsx bench.js",
49-
"build": "npm-run-all build:*",
49+
"build": "npm-run-all --npm-path npm build:*",
5050
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
5151
"build:js": "tsc",
5252
"docs": "tsx ../../scripts/generate-readmes",
53-
"test": "npm-run-all test:*",
53+
"test": "npm-run-all --npm-path npm test:*",
5454
"test:tape": "tsx test.js"
5555
},
5656
"devDependencies": {

packages/turf-boolean-intersects/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
],
4444
"scripts": {
4545
"bench": "tsx bench.js",
46-
"build": "npm-run-all build:*",
46+
"build": "npm-run-all --npm-path npm build:*",
4747
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4848
"build:js": "tsc",
4949
"docs": "tsx ../../scripts/generate-readmes",
50-
"test": "npm-run-all test:*",
50+
"test": "npm-run-all --npm-path npm test:*",
5151
"test:tape": "tsx test.js"
5252
},
5353
"devDependencies": {

packages/turf-boolean-overlap/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
],
4646
"scripts": {
4747
"bench": "tsx bench.js",
48-
"build": "npm-run-all build:*",
48+
"build": "npm-run-all --npm-path npm build:*",
4949
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
5050
"build:js": "tsc",
5151
"docs": "tsx ../../scripts/generate-readmes",
52-
"test": "npm-run-all test:*",
52+
"test": "npm-run-all --npm-path npm test:*",
5353
"test:tape": "tsx test.js"
5454
},
5555
"devDependencies": {

packages/turf-boolean-parallel/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
],
4343
"scripts": {
4444
"bench": "tsx bench.js",
45-
"build": "npm-run-all build:*",
45+
"build": "npm-run-all --npm-path npm build:*",
4646
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4747
"build:js": "tsc",
4848
"docs": "tsx ../../scripts/generate-readmes",
49-
"test": "npm-run-all test:*",
49+
"test": "npm-run-all --npm-path npm test:*",
5050
"test:tape": "tsx test.js"
5151
},
5252
"devDependencies": {

packages/turf-boolean-point-in-polygon/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
],
4242
"scripts": {
4343
"bench": "tsx bench.js",
44-
"build": "npm-run-all build:*",
44+
"build": "npm-run-all --npm-path npm build:*",
4545
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
4646
"build:js": "tsc",
4747
"docs": "tsx ../../scripts/generate-readmes",
48-
"test": "npm-run-all test:*",
48+
"test": "npm-run-all --npm-path npm test:*",
4949
"test:tape": "tsx test.js"
5050
},
5151
"devDependencies": {

0 commit comments

Comments
 (0)