Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade lerna, et al to address security vulnerabilities, modernise build environment #2507

Merged
merged 9 commits into from
Oct 6, 2023
Merged
4 changes: 2 additions & 2 deletions .monorepolint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ module.exports = {
options: {
scripts: {
docs: "tsx ../../scripts/generate-readmes",
test: "npm-run-all test:*",
test: "npm-run-all --npm-path npm test:*",
},
},
excludePackages: [MAIN_PACKAGE],
},
{
options: {
scripts: {
build: "npm-run-all build:*",
build: "npm-run-all --npm-path npm build:*",
"build:js": "tsc",
"build:es":
'tsc --outDir dist/es --module esnext --declaration false && echo \'{"type":"module"}\' > dist/es/package.json',
Expand Down
13 changes: 3 additions & 10 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"packages": [
"packages/*"
],
"npmClient": "yarn",
"version": "7.0.0-alpha.2",
"command": {
"bootstrap": {
"useWorkspaces": true,
"ignoreScripts": true
},
"publish": {
"registry": "https://registry.npmjs.org"
}
},
"npmClient": "yarn",
"version": "7.0.0-alpha.2"
}
}
52 changes: 52 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll admit to not being fully up to speed on nx, but this looks sane to me.

"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"build",
"build:es",
"build:js",
"test",
"test:tape",
"test:types",
"last-checks",
"last-checks:example",
"last-checks:testjs"
]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"]
},
"build:es": {
"dependsOn": ["^build:es"],
"outputs": ["{projectRoot}/dist"]
},
"build:js": {
"dependsOn": ["^build:js"],
"outputs": ["{projectRoot}/dist"]
},
"test": {
"dependsOn": ["^test"]
},
"test:tape": {
"dependsOn": ["^test:tape"]
},
"test:types": {
"dependsOn": ["^test:types"]
},
"last-checks": {
"dependsOn": ["^last-checks"]
},
"last-checks:example": {
"dependsOn": ["^last-checks:example"]
},
"last-checks:testjs": {
"dependsOn": ["^last-checks:testjs"]
}
}
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:escheck-esm": "es-check --module es8 packages/*/dist/es/index.js",
"lint:escheck-es5": "es-check es5 packages/turf/turf.min.js",
"postlint": "documentation lint packages/turf-*/index.js",
"prepare": "lerna bootstrap && lerna run build && node ./scripts/add-import-extensions.js",
"prepare": "lerna run build && node ./scripts/add-import-extensions.js",
"pretest": "npm run lint",
"test": "lerna run test",
"posttest": "lerna run --scope @turf/turf last-checks",
Expand All @@ -39,22 +39,22 @@
},
"devDependencies": {
"@types/geojson": "7946.0.8",
"@types/node": "^17.0.2",
"@types/node": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^4.8.0",
"@typescript-eslint/parser": "^4.8.0",
"acorn": "^7.4.1",
"camelcase": "*",
"d3-queue": "*",
"decamelize": "*",
"dependency-tree": "^8.1.2",
"documentation": "^13.2.5",
"es-check": "^5.1.4",
"documentation": "^14.0.2",
"es-check": "^7.1.1",
"eslint": "~7.13.0",
"eslint-config-prettier": "^6.15.0",
"esm": "^3.2.25",
"fs-extra": "*",
"husky": "^4.2.3",
"lerna": "^4.0.0",
"lerna": "^7.3.0",
"lint-staged": "^10.0.8",
"load-json-file": "*",
"meow": "*",
Expand All @@ -63,7 +63,7 @@
"prettier": "^2.1.2",
"progress": "*",
"rollup": "^2.34.2",
"tape": "*",
"tape": "^5.7.0",
"ts-node": "^9.0.0",
"tsx": "^3.12.8",
"typescript": "^3.8.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-along/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-angle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-area/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-bbox-clip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-bbox-polygon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-bbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-bearing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-bezier-spline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-clockwise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-concave/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-contains/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-crosses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-disjoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-equal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-intersects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-overlap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-parallel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-boolean-point-in-polygon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
],
"scripts": {
"bench": "tsx bench.js",
"build": "npm-run-all build:*",
"build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test": "npm-run-all --npm-path npm test:*",
"test:tape": "tsx test.js"
},
"devDependencies": {
Expand Down
Loading