From a924d5e1fee9c0c58e6dcd9464908a8f578e21c4 Mon Sep 17 00:00:00 2001 From: James Beard Date: Sun, 23 Jun 2024 17:50:15 +1000 Subject: [PATCH 1/5] Configuring types.ts tests using a dedicated tsconfig file in each package, rather than specifying the arguments on the command line. --- packages/turf-boolean-touches/package.json | 2 +- packages/turf-boolean-touches/tsconfig.testTypes.json | 7 +++++++ packages/turf-boolean-within/package.json | 2 +- packages/turf-boolean-within/tsconfig.testTypes.json | 7 +++++++ packages/turf-buffer/package.json | 2 +- packages/turf-buffer/tsconfig.testTypes.json | 7 +++++++ packages/turf-center-mean/package.json | 2 +- packages/turf-center-mean/tsconfig.testTypes.json | 7 +++++++ packages/turf-center-of-mass/package.json | 2 +- packages/turf-center-of-mass/tsconfig.testTypes.json | 7 +++++++ packages/turf-center/package.json | 2 +- packages/turf-center/tsconfig.testTypes.json | 7 +++++++ packages/turf-centroid/package.json | 2 +- packages/turf-centroid/tsconfig.testTypes.json | 7 +++++++ packages/turf-circle/package.json | 2 +- packages/turf-circle/tsconfig.testTypes.json | 7 +++++++ packages/turf-clean-coords/package.json | 2 +- packages/turf-clean-coords/tsconfig.testTypes.json | 7 +++++++ packages/turf-clone/package.json | 2 +- packages/turf-clone/tsconfig.testTypes.json | 7 +++++++ packages/turf-clusters-dbscan/package.json | 2 +- packages/turf-clusters-dbscan/tsconfig.testTypes.json | 7 +++++++ packages/turf-clusters-kmeans/package.json | 2 +- packages/turf-clusters-kmeans/tsconfig.testTypes.json | 7 +++++++ packages/turf-clusters/package.json | 2 +- packages/turf-clusters/tsconfig.testTypes.json | 7 +++++++ packages/turf-flatten/package.json | 2 +- packages/turf-flatten/tsconfig.testTypes.json | 7 +++++++ packages/turf-flip/package.json | 2 +- packages/turf-flip/tsconfig.testTypes.json | 7 +++++++ packages/turf-geojson-rbush/package.json | 2 +- packages/turf-geojson-rbush/tsconfig.testTypes.json | 7 +++++++ packages/turf-great-circle/package.json | 2 +- packages/turf-great-circle/tsconfig.testTypes.json | 7 +++++++ packages/turf-helpers/package.json | 2 +- packages/turf-helpers/tsconfig.testTypes.json | 7 +++++++ packages/turf-hex-grid/package.json | 2 +- packages/turf-hex-grid/tsconfig.testTypes.json | 7 +++++++ packages/turf-interpolate/package.json | 2 +- packages/turf-interpolate/tsconfig.testTypes.json | 7 +++++++ packages/turf-intersect/package.json | 2 +- packages/turf-intersect/tsconfig.testTypes.json | 7 +++++++ packages/turf-invariant/package.json | 2 +- packages/turf-invariant/tsconfig.testTypes.json | 7 +++++++ packages/turf-isolines/package.json | 2 +- packages/turf-isolines/tsconfig.testTypes.json | 7 +++++++ packages/turf-kinks/package.json | 2 +- packages/turf-kinks/tsconfig.testTypes.json | 7 +++++++ packages/turf-line-arc/package.json | 2 +- packages/turf-line-arc/tsconfig.testTypes.json | 7 +++++++ packages/turf-line-chunk/package.json | 2 +- packages/turf-line-chunk/tsconfig.testTypes.json | 7 +++++++ packages/turf-line-offset/package.json | 2 +- packages/turf-line-offset/tsconfig.testTypes.json | 7 +++++++ packages/turf-line-overlap/package.json | 2 +- packages/turf-line-overlap/tsconfig.testTypes.json | 7 +++++++ packages/turf-line-to-polygon/package.json | 2 +- packages/turf-line-to-polygon/tsconfig.testTypes.json | 7 +++++++ packages/turf-mask/package.json | 2 +- packages/turf-mask/tsconfig.testTypes.json | 7 +++++++ packages/turf-meta/package.json | 2 +- packages/turf-meta/tsconfig.testTypes.json | 7 +++++++ packages/turf-nearest-point-on-line/package.json | 2 +- .../turf-nearest-point-on-line/tsconfig.testTypes.json | 7 +++++++ packages/turf-nearest-point-to-line/package.json | 2 +- .../turf-nearest-point-to-line/tsconfig.testTypes.json | 7 +++++++ packages/turf-nearest-point/package.json | 2 +- packages/turf-nearest-point/tsconfig.testTypes.json | 7 +++++++ packages/turf-planepoint/package.json | 2 +- packages/turf-planepoint/tsconfig.testTypes.json | 7 +++++++ packages/turf-point-grid/package.json | 2 +- packages/turf-point-grid/tsconfig.testTypes.json | 7 +++++++ packages/turf-point-to-line-distance/package.json | 2 +- .../turf-point-to-line-distance/tsconfig.testTypes.json | 7 +++++++ packages/turf-points-within-polygon/package.json | 2 +- .../turf-points-within-polygon/tsconfig.testTypes.json | 7 +++++++ packages/turf-polygon-smooth/package.json | 2 +- packages/turf-polygon-smooth/tsconfig.testTypes.json | 7 +++++++ packages/turf-polygon-tangents/package.json | 2 +- packages/turf-polygon-tangents/tsconfig.testTypes.json | 7 +++++++ packages/turf-polygonize/package.json | 2 +- packages/turf-polygonize/tsconfig.testTypes.json | 7 +++++++ packages/turf-projection/package.json | 2 +- packages/turf-projection/tsconfig.testTypes.json | 7 +++++++ packages/turf-rewind/package.json | 2 +- packages/turf-rewind/tsconfig.testTypes.json | 7 +++++++ packages/turf-sector/package.json | 2 +- packages/turf-sector/tsconfig.testTypes.json | 7 +++++++ packages/turf-shortest-path/package.json | 2 +- packages/turf-shortest-path/tsconfig.testTypes.json | 7 +++++++ packages/turf-simplify/package.json | 2 +- packages/turf-simplify/tsconfig.testTypes.json | 7 +++++++ packages/turf-standard-deviational-ellipse/package.json | 2 +- .../tsconfig.testTypes.json | 7 +++++++ packages/turf-tin/package.json | 2 +- packages/turf-tin/tsconfig.testTypes.json | 7 +++++++ packages/turf-transform-rotate/package.json | 2 +- packages/turf-transform-rotate/tsconfig.testTypes.json | 7 +++++++ packages/turf-transform-scale/package.json | 2 +- packages/turf-transform-scale/tsconfig.testTypes.json | 7 +++++++ packages/turf-transform-translate/package.json | 2 +- packages/turf-transform-translate/tsconfig.testTypes.json | 7 +++++++ packages/turf-triangle-grid/package.json | 2 +- packages/turf-triangle-grid/tsconfig.testTypes.json | 7 +++++++ packages/turf-truncate/package.json | 2 +- packages/turf-truncate/tsconfig.testTypes.json | 7 +++++++ packages/turf-union/package.json | 2 +- packages/turf-union/tsconfig.testTypes.json | 7 +++++++ packages/turf-unkink-polygon/package.json | 2 +- packages/turf-unkink-polygon/tsconfig.testTypes.json | 7 +++++++ 110 files changed, 440 insertions(+), 55 deletions(-) create mode 100644 packages/turf-boolean-touches/tsconfig.testTypes.json create mode 100644 packages/turf-boolean-within/tsconfig.testTypes.json create mode 100644 packages/turf-buffer/tsconfig.testTypes.json create mode 100644 packages/turf-center-mean/tsconfig.testTypes.json create mode 100644 packages/turf-center-of-mass/tsconfig.testTypes.json create mode 100644 packages/turf-center/tsconfig.testTypes.json create mode 100644 packages/turf-centroid/tsconfig.testTypes.json create mode 100644 packages/turf-circle/tsconfig.testTypes.json create mode 100644 packages/turf-clean-coords/tsconfig.testTypes.json create mode 100644 packages/turf-clone/tsconfig.testTypes.json create mode 100644 packages/turf-clusters-dbscan/tsconfig.testTypes.json create mode 100644 packages/turf-clusters-kmeans/tsconfig.testTypes.json create mode 100644 packages/turf-clusters/tsconfig.testTypes.json create mode 100644 packages/turf-flatten/tsconfig.testTypes.json create mode 100644 packages/turf-flip/tsconfig.testTypes.json create mode 100644 packages/turf-geojson-rbush/tsconfig.testTypes.json create mode 100644 packages/turf-great-circle/tsconfig.testTypes.json create mode 100644 packages/turf-helpers/tsconfig.testTypes.json create mode 100644 packages/turf-hex-grid/tsconfig.testTypes.json create mode 100644 packages/turf-interpolate/tsconfig.testTypes.json create mode 100644 packages/turf-intersect/tsconfig.testTypes.json create mode 100644 packages/turf-invariant/tsconfig.testTypes.json create mode 100644 packages/turf-isolines/tsconfig.testTypes.json create mode 100644 packages/turf-kinks/tsconfig.testTypes.json create mode 100644 packages/turf-line-arc/tsconfig.testTypes.json create mode 100644 packages/turf-line-chunk/tsconfig.testTypes.json create mode 100644 packages/turf-line-offset/tsconfig.testTypes.json create mode 100644 packages/turf-line-overlap/tsconfig.testTypes.json create mode 100644 packages/turf-line-to-polygon/tsconfig.testTypes.json create mode 100644 packages/turf-mask/tsconfig.testTypes.json create mode 100644 packages/turf-meta/tsconfig.testTypes.json create mode 100644 packages/turf-nearest-point-on-line/tsconfig.testTypes.json create mode 100644 packages/turf-nearest-point-to-line/tsconfig.testTypes.json create mode 100644 packages/turf-nearest-point/tsconfig.testTypes.json create mode 100644 packages/turf-planepoint/tsconfig.testTypes.json create mode 100644 packages/turf-point-grid/tsconfig.testTypes.json create mode 100644 packages/turf-point-to-line-distance/tsconfig.testTypes.json create mode 100644 packages/turf-points-within-polygon/tsconfig.testTypes.json create mode 100644 packages/turf-polygon-smooth/tsconfig.testTypes.json create mode 100644 packages/turf-polygon-tangents/tsconfig.testTypes.json create mode 100644 packages/turf-polygonize/tsconfig.testTypes.json create mode 100644 packages/turf-projection/tsconfig.testTypes.json create mode 100644 packages/turf-rewind/tsconfig.testTypes.json create mode 100644 packages/turf-sector/tsconfig.testTypes.json create mode 100644 packages/turf-shortest-path/tsconfig.testTypes.json create mode 100644 packages/turf-simplify/tsconfig.testTypes.json create mode 100644 packages/turf-standard-deviational-ellipse/tsconfig.testTypes.json create mode 100644 packages/turf-tin/tsconfig.testTypes.json create mode 100644 packages/turf-transform-rotate/tsconfig.testTypes.json create mode 100644 packages/turf-transform-scale/tsconfig.testTypes.json create mode 100644 packages/turf-transform-translate/tsconfig.testTypes.json create mode 100644 packages/turf-triangle-grid/tsconfig.testTypes.json create mode 100644 packages/turf-truncate/tsconfig.testTypes.json create mode 100644 packages/turf-union/tsconfig.testTypes.json create mode 100644 packages/turf-unkink-polygon/tsconfig.testTypes.json diff --git a/packages/turf-boolean-touches/package.json b/packages/turf-boolean-touches/package.json index d4cf7fd409..143226f927 100644 --- a/packages/turf-boolean-touches/package.json +++ b/packages/turf-boolean-touches/package.json @@ -54,7 +54,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-boolean-touches/tsconfig.testTypes.json b/packages/turf-boolean-touches/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-boolean-touches/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-boolean-within/package.json b/packages/turf-boolean-within/package.json index 94a9f165fa..12b03cb3e9 100644 --- a/packages/turf-boolean-within/package.json +++ b/packages/turf-boolean-within/package.json @@ -54,7 +54,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-boolean-within/tsconfig.testTypes.json b/packages/turf-boolean-within/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-boolean-within/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-buffer/package.json b/packages/turf-buffer/package.json index 87d1e9a581..668d3e029c 100644 --- a/packages/turf-buffer/package.json +++ b/packages/turf-buffer/package.json @@ -57,7 +57,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-buffer/tsconfig.testTypes.json b/packages/turf-buffer/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-buffer/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-center-mean/package.json b/packages/turf-center-mean/package.json index b613c5fad3..74b098b213 100644 --- a/packages/turf-center-mean/package.json +++ b/packages/turf-center-mean/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/center": "workspace:^", diff --git a/packages/turf-center-mean/tsconfig.testTypes.json b/packages/turf-center-mean/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-center-mean/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-center-of-mass/package.json b/packages/turf-center-of-mass/package.json index cefc548714..5a58a73ec4 100644 --- a/packages/turf-center-of-mass/package.json +++ b/packages/turf-center-of-mass/package.json @@ -47,7 +47,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-center-of-mass/tsconfig.testTypes.json b/packages/turf-center-of-mass/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-center-of-mass/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-center/package.json b/packages/turf-center/package.json index 5cff045363..fa9b935858 100644 --- a/packages/turf-center/package.json +++ b/packages/turf-center/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:^", diff --git a/packages/turf-center/tsconfig.testTypes.json b/packages/turf-center/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-center/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-centroid/package.json b/packages/turf-centroid/package.json index 9169fcf5cb..42119fa8a1 100644 --- a/packages/turf-centroid/package.json +++ b/packages/turf-centroid/package.json @@ -49,7 +49,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-centroid/tsconfig.testTypes.json b/packages/turf-centroid/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-centroid/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-circle/package.json b/packages/turf-circle/package.json index d04995f28e..763b43a964 100644 --- a/packages/turf-circle/package.json +++ b/packages/turf-circle/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@placemarkio/check-geojson": "^0.1.12", diff --git a/packages/turf-circle/tsconfig.testTypes.json b/packages/turf-circle/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-circle/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-clean-coords/package.json b/packages/turf-clean-coords/package.json index 0b283a08b0..a5adda05d1 100644 --- a/packages/turf-clean-coords/package.json +++ b/packages/turf-clean-coords/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-clean-coords/tsconfig.testTypes.json b/packages/turf-clean-coords/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-clean-coords/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-clone/package.json b/packages/turf-clone/package.json index 7696cf7424..4a65f551a0 100644 --- a/packages/turf-clone/package.json +++ b/packages/turf-clone/package.json @@ -50,7 +50,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/meta": "workspace:^", diff --git a/packages/turf-clone/tsconfig.testTypes.json b/packages/turf-clone/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-clone/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-clusters-dbscan/package.json b/packages/turf-clusters-dbscan/package.json index cb48836239..1a9403d640 100644 --- a/packages/turf-clusters-dbscan/package.json +++ b/packages/turf-clusters-dbscan/package.json @@ -57,7 +57,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/centroid": "workspace:^", diff --git a/packages/turf-clusters-dbscan/tsconfig.testTypes.json b/packages/turf-clusters-dbscan/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-clusters-dbscan/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-clusters-kmeans/package.json b/packages/turf-clusters-kmeans/package.json index e7a5676d3e..16b69ae1f5 100644 --- a/packages/turf-clusters-kmeans/package.json +++ b/packages/turf-clusters-kmeans/package.json @@ -56,7 +56,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/centroid": "workspace:^", diff --git a/packages/turf-clusters-kmeans/tsconfig.testTypes.json b/packages/turf-clusters-kmeans/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-clusters-kmeans/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-clusters/package.json b/packages/turf-clusters/package.json index 0a285d63d7..6aa23113fa 100644 --- a/packages/turf-clusters/package.json +++ b/packages/turf-clusters/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-clusters/tsconfig.testTypes.json b/packages/turf-clusters/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-clusters/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-flatten/package.json b/packages/turf-flatten/package.json index 5ea04bea56..7cde1feb31 100644 --- a/packages/turf-flatten/package.json +++ b/packages/turf-flatten/package.json @@ -54,7 +54,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-flatten/tsconfig.testTypes.json b/packages/turf-flatten/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-flatten/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-flip/package.json b/packages/turf-flip/package.json index 772d5e293d..8863d14e04 100644 --- a/packages/turf-flip/package.json +++ b/packages/turf-flip/package.json @@ -49,7 +49,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-flip/tsconfig.testTypes.json b/packages/turf-flip/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-flip/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-geojson-rbush/package.json b/packages/turf-geojson-rbush/package.json index 61f4f0473a..9ffc833ea1 100644 --- a/packages/turf-geojson-rbush/package.json +++ b/packages/turf-geojson-rbush/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:^", diff --git a/packages/turf-geojson-rbush/tsconfig.testTypes.json b/packages/turf-geojson-rbush/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-geojson-rbush/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-great-circle/package.json b/packages/turf-great-circle/package.json index 7effa65b0e..b1e9ac02c6 100644 --- a/packages/turf-great-circle/package.json +++ b/packages/turf-great-circle/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-great-circle/tsconfig.testTypes.json b/packages/turf-great-circle/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-great-circle/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-helpers/package.json b/packages/turf-helpers/package.json index e13b8787e9..47535f30c6 100644 --- a/packages/turf-helpers/package.json +++ b/packages/turf-helpers/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-helpers/tsconfig.testTypes.json b/packages/turf-helpers/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-helpers/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-hex-grid/package.json b/packages/turf-hex-grid/package.json index 748416011b..0d1b2241e9 100644 --- a/packages/turf-hex-grid/package.json +++ b/packages/turf-hex-grid/package.json @@ -59,7 +59,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:^", diff --git a/packages/turf-hex-grid/tsconfig.testTypes.json b/packages/turf-hex-grid/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-hex-grid/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-interpolate/package.json b/packages/turf-interpolate/package.json index e0d457db62..854441d8a7 100644 --- a/packages/turf-interpolate/package.json +++ b/packages/turf-interpolate/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-interpolate/tsconfig.testTypes.json b/packages/turf-interpolate/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-interpolate/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-intersect/package.json b/packages/turf-intersect/package.json index 7100fb0fd7..9e7f9c0449 100644 --- a/packages/turf-intersect/package.json +++ b/packages/turf-intersect/package.json @@ -48,7 +48,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-intersect/tsconfig.testTypes.json b/packages/turf-intersect/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-intersect/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-invariant/package.json b/packages/turf-invariant/package.json index 821fc13bc0..2d4d2b0546 100644 --- a/packages/turf-invariant/package.json +++ b/packages/turf-invariant/package.json @@ -52,7 +52,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-invariant/tsconfig.testTypes.json b/packages/turf-invariant/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-invariant/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-isolines/package.json b/packages/turf-isolines/package.json index df809b5ef7..d35c829872 100644 --- a/packages/turf-isolines/package.json +++ b/packages/turf-isolines/package.json @@ -54,7 +54,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/envelope": "workspace:^", diff --git a/packages/turf-isolines/tsconfig.testTypes.json b/packages/turf-isolines/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-isolines/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-kinks/package.json b/packages/turf-kinks/package.json index 3c261417df..18f6054730 100644 --- a/packages/turf-kinks/package.json +++ b/packages/turf-kinks/package.json @@ -48,7 +48,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/meta": "workspace:^", diff --git a/packages/turf-kinks/tsconfig.testTypes.json b/packages/turf-kinks/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-kinks/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-line-arc/package.json b/packages/turf-line-arc/package.json index c6da7c8c31..5b81823326 100644 --- a/packages/turf-line-arc/package.json +++ b/packages/turf-line-arc/package.json @@ -47,7 +47,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-line-arc/tsconfig.testTypes.json b/packages/turf-line-arc/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-line-arc/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-line-chunk/package.json b/packages/turf-line-chunk/package.json index ccea240d41..127b7fbeef 100644 --- a/packages/turf-line-chunk/package.json +++ b/packages/turf-line-chunk/package.json @@ -56,7 +56,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-line-chunk/tsconfig.testTypes.json b/packages/turf-line-chunk/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-line-chunk/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-line-offset/package.json b/packages/turf-line-offset/package.json index deabf65426..abca4672c0 100644 --- a/packages/turf-line-offset/package.json +++ b/packages/turf-line-offset/package.json @@ -54,7 +54,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-line-offset/tsconfig.testTypes.json b/packages/turf-line-offset/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-line-offset/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-line-overlap/package.json b/packages/turf-line-overlap/package.json index 6b3ec645dd..969eb6d993 100644 --- a/packages/turf-line-overlap/package.json +++ b/packages/turf-line-overlap/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-line-overlap/tsconfig.testTypes.json b/packages/turf-line-overlap/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-line-overlap/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-line-to-polygon/package.json b/packages/turf-line-to-polygon/package.json index 10871952d9..09fe366632 100644 --- a/packages/turf-line-to-polygon/package.json +++ b/packages/turf-line-to-polygon/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-line-to-polygon/tsconfig.testTypes.json b/packages/turf-line-to-polygon/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-line-to-polygon/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-mask/package.json b/packages/turf-mask/package.json index 3f3a07f787..176438949a 100644 --- a/packages/turf-mask/package.json +++ b/packages/turf-mask/package.json @@ -48,7 +48,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-mask/tsconfig.testTypes.json b/packages/turf-mask/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-mask/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-meta/package.json b/packages/turf-meta/package.json index 8db7d4ef0c..962aec2a20 100644 --- a/packages/turf-meta/package.json +++ b/packages/turf-meta/package.json @@ -70,7 +70,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/random": "workspace:^", diff --git a/packages/turf-meta/tsconfig.testTypes.json b/packages/turf-meta/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-meta/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-nearest-point-on-line/package.json b/packages/turf-nearest-point-on-line/package.json index 7b6cd4debb..2ee14690e1 100644 --- a/packages/turf-nearest-point-on-line/package.json +++ b/packages/turf-nearest-point-on-line/package.json @@ -43,7 +43,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/along": "workspace:^", diff --git a/packages/turf-nearest-point-on-line/tsconfig.testTypes.json b/packages/turf-nearest-point-on-line/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-nearest-point-on-line/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-nearest-point-to-line/package.json b/packages/turf-nearest-point-to-line/package.json index 431eee65f7..f83c4c1e95 100644 --- a/packages/turf-nearest-point-to-line/package.json +++ b/packages/turf-nearest-point-to-line/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/circle": "workspace:^", diff --git a/packages/turf-nearest-point-to-line/tsconfig.testTypes.json b/packages/turf-nearest-point-to-line/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-nearest-point-to-line/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-nearest-point/package.json b/packages/turf-nearest-point/package.json index 468406b876..ee95e2b68b 100644 --- a/packages/turf-nearest-point/package.json +++ b/packages/turf-nearest-point/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-nearest-point/tsconfig.testTypes.json b/packages/turf-nearest-point/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-nearest-point/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-planepoint/package.json b/packages/turf-planepoint/package.json index fbf4297dde..6b8b93a297 100644 --- a/packages/turf-planepoint/package.json +++ b/packages/turf-planepoint/package.json @@ -50,7 +50,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "benchmark": "^2.1.4", diff --git a/packages/turf-planepoint/tsconfig.testTypes.json b/packages/turf-planepoint/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-planepoint/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-point-grid/package.json b/packages/turf-point-grid/package.json index cde79c16c4..0255b45f18 100644 --- a/packages/turf-point-grid/package.json +++ b/packages/turf-point-grid/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:^", diff --git a/packages/turf-point-grid/tsconfig.testTypes.json b/packages/turf-point-grid/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-point-grid/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-point-to-line-distance/package.json b/packages/turf-point-to-line-distance/package.json index 065faf4d5c..bc27ca171a 100644 --- a/packages/turf-point-to-line-distance/package.json +++ b/packages/turf-point-to-line-distance/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/circle": "workspace:^", diff --git a/packages/turf-point-to-line-distance/tsconfig.testTypes.json b/packages/turf-point-to-line-distance/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-point-to-line-distance/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-points-within-polygon/package.json b/packages/turf-points-within-polygon/package.json index 67b82b527f..a94c7a9408 100644 --- a/packages/turf-points-within-polygon/package.json +++ b/packages/turf-points-within-polygon/package.json @@ -50,7 +50,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-points-within-polygon/tsconfig.testTypes.json b/packages/turf-points-within-polygon/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-points-within-polygon/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-polygon-smooth/package.json b/packages/turf-polygon-smooth/package.json index d2c9da64b4..7a47e08874 100644 --- a/packages/turf-polygon-smooth/package.json +++ b/packages/turf-polygon-smooth/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-polygon-smooth/tsconfig.testTypes.json b/packages/turf-polygon-smooth/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-polygon-smooth/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-polygon-tangents/package.json b/packages/turf-polygon-tangents/package.json index dc96e17567..fdb3f4a314 100644 --- a/packages/turf-polygon-tangents/package.json +++ b/packages/turf-polygon-tangents/package.json @@ -54,7 +54,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-polygon-tangents/tsconfig.testTypes.json b/packages/turf-polygon-tangents/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-polygon-tangents/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-polygonize/package.json b/packages/turf-polygonize/package.json index 26b237b8e7..7ea85e9c07 100644 --- a/packages/turf-polygonize/package.json +++ b/packages/turf-polygonize/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-polygonize/tsconfig.testTypes.json b/packages/turf-polygonize/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-polygonize/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-projection/package.json b/packages/turf-projection/package.json index 0e8acef559..6b7cff6a40 100644 --- a/packages/turf-projection/package.json +++ b/packages/turf-projection/package.json @@ -61,7 +61,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-projection/tsconfig.testTypes.json b/packages/turf-projection/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-projection/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-rewind/package.json b/packages/turf-rewind/package.json index 331c68d4db..cd6535051c 100644 --- a/packages/turf-rewind/package.json +++ b/packages/turf-rewind/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-rewind/tsconfig.testTypes.json b/packages/turf-rewind/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-rewind/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-sector/package.json b/packages/turf-sector/package.json index 6b49c1207b..cf43e501d2 100644 --- a/packages/turf-sector/package.json +++ b/packages/turf-sector/package.json @@ -47,7 +47,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-sector/tsconfig.testTypes.json b/packages/turf-sector/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-sector/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-shortest-path/package.json b/packages/turf-shortest-path/package.json index 174cb952d7..742752f0be 100644 --- a/packages/turf-shortest-path/package.json +++ b/packages/turf-shortest-path/package.json @@ -52,7 +52,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-shortest-path/tsconfig.testTypes.json b/packages/turf-shortest-path/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-shortest-path/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-simplify/package.json b/packages/turf-simplify/package.json index c446cc44c5..c2aaac38d9 100644 --- a/packages/turf-simplify/package.json +++ b/packages/turf-simplify/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-simplify/tsconfig.testTypes.json b/packages/turf-simplify/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-simplify/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-standard-deviational-ellipse/package.json b/packages/turf-standard-deviational-ellipse/package.json index 7b483a864a..22212d23fb 100644 --- a/packages/turf-standard-deviational-ellipse/package.json +++ b/packages/turf-standard-deviational-ellipse/package.json @@ -52,7 +52,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/random": "workspace:^", diff --git a/packages/turf-standard-deviational-ellipse/tsconfig.testTypes.json b/packages/turf-standard-deviational-ellipse/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-standard-deviational-ellipse/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-tin/package.json b/packages/turf-tin/package.json index f8cfd6b320..13eaddb249 100644 --- a/packages/turf-tin/package.json +++ b/packages/turf-tin/package.json @@ -48,7 +48,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-tin/tsconfig.testTypes.json b/packages/turf-tin/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-tin/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-transform-rotate/package.json b/packages/turf-transform-rotate/package.json index d28ac59441..31786e2a69 100644 --- a/packages/turf-transform-rotate/package.json +++ b/packages/turf-transform-rotate/package.json @@ -53,7 +53,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-transform-rotate/tsconfig.testTypes.json b/packages/turf-transform-rotate/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-transform-rotate/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-transform-scale/package.json b/packages/turf-transform-scale/package.json index c3b4f3b406..88ab978157 100644 --- a/packages/turf-transform-scale/package.json +++ b/packages/turf-transform-scale/package.json @@ -57,7 +57,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:^", diff --git a/packages/turf-transform-scale/tsconfig.testTypes.json b/packages/turf-transform-scale/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-transform-scale/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-transform-translate/package.json b/packages/turf-transform-translate/package.json index f7157bb723..8534add55d 100644 --- a/packages/turf-transform-translate/package.json +++ b/packages/turf-transform-translate/package.json @@ -55,7 +55,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/truncate": "workspace:^", diff --git a/packages/turf-transform-translate/tsconfig.testTypes.json b/packages/turf-transform-translate/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-transform-translate/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-triangle-grid/package.json b/packages/turf-triangle-grid/package.json index 44d1f58a8e..0c0bd58591 100644 --- a/packages/turf-triangle-grid/package.json +++ b/packages/turf-triangle-grid/package.json @@ -51,7 +51,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:^", diff --git a/packages/turf-triangle-grid/tsconfig.testTypes.json b/packages/turf-triangle-grid/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-triangle-grid/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-truncate/package.json b/packages/turf-truncate/package.json index 37a0f46968..ba3acacc3f 100644 --- a/packages/turf-truncate/package.json +++ b/packages/turf-truncate/package.json @@ -52,7 +52,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-truncate/tsconfig.testTypes.json b/packages/turf-truncate/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-truncate/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-union/package.json b/packages/turf-union/package.json index ce7b7e3fe8..ee3bad7ffc 100644 --- a/packages/turf-union/package.json +++ b/packages/turf-union/package.json @@ -47,7 +47,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-union/tsconfig.testTypes.json b/packages/turf-union/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-union/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/packages/turf-unkink-polygon/package.json b/packages/turf-unkink-polygon/package.json index 360b0fb75b..887c21d6ea 100644 --- a/packages/turf-unkink-polygon/package.json +++ b/packages/turf-unkink-polygon/package.json @@ -50,7 +50,7 @@ "docs": "tsx ../../scripts/generate-readmes.ts", "test": "npm-run-all --npm-path npm test:*", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc -p ./tsconfig.testTypes.json" }, "devDependencies": { "@turf/kinks": "workspace:^", diff --git a/packages/turf-unkink-polygon/tsconfig.testTypes.json b/packages/turf-unkink-polygon/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/packages/turf-unkink-polygon/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} From 180efa7906599b5b7fffe228b513f83597b0eb50 Mon Sep 17 00:00:00 2001 From: James Beard Date: Sun, 23 Jun 2024 17:54:20 +1000 Subject: [PATCH 2/5] Experimenting with changes to when and why we build different JS artefacts. See discussion https://github.com/Turfjs/turf/discussions/2629 --- .monorepolint.config.mjs | 11 +- nx.json | 2 +- package.json | 5 +- packages/turf/package.json | 13 ++ pnpm-lock.yaml | 265 +++++------------------------- templates/tsconfig.testTypes.json | 7 + tsconfig.shared.json | 10 +- 7 files changed, 79 insertions(+), 234 deletions(-) create mode 100644 templates/tsconfig.testTypes.json diff --git a/.monorepolint.config.mjs b/.monorepolint.config.mjs index c3bf85e249..b34a950a42 100644 --- a/.monorepolint.config.mjs +++ b/.monorepolint.config.mjs @@ -5,6 +5,7 @@ import * as fs from "node:fs"; import { alphabeticalDependencies, alphabeticalScripts, + fileContents, packageOrder, packageEntry, packageScript, @@ -50,6 +51,13 @@ const JS_TAPE_PACKAGES = TAPE_PACKAGES.filter( export default { rules: [ + fileContents({ + options: { + file: "tsconfig.testTypes.json", + templateFile: "./templates/tsconfig.testTypes.json", + }, + includePackages: TYPES_PACKAGES, + }), packageOrder({ options: { order: [ @@ -208,8 +216,7 @@ export default { packageScript({ options: { scripts: { - "test:types": - "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts", + "test:types": "tsc -p ./tsconfig.testTypes.json", }, }, includePackages: TYPES_PACKAGES, diff --git a/nx.json b/nx.json index 87f3cd2f1b..8bae838462 100644 --- a/nx.json +++ b/nx.json @@ -28,7 +28,7 @@ "{projectRoot}/test/**", "{projectRoot}/types.ts" ], - "dependsOn": ["build"], + "dependsOn": [], "cache": true }, "last-checks": { diff --git a/package.json b/package.json index 7074ca63d8..459cb253f4 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,10 @@ "lint:eslint": "eslint packages", "lint:mrl": "mrl check", "lint:prettier": "prettier --check .", + "postinstall": "husky install", "preinstall": "npx only-allow pnpm", - "prepare": "lerna run build && husky install", - "test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks" + "prepublish": "lerna run build && lerna run --scope @turf/turf last-checks", + "test": "lerna run test" }, "lint-staged": { "package.json": [ diff --git a/packages/turf/package.json b/packages/turf/package.json index d8e3994138..2c2941c09f 100644 --- a/packages/turf/package.json +++ b/packages/turf/package.json @@ -204,6 +204,19 @@ "@turf/union": "workspace:^", "@turf/unkink-polygon": "workspace:^", "@turf/voronoi": "workspace:^", + "concaveman": "^1.2.1", + "d3-geo": "1.7.1", + "d3-voronoi": "1.1.2", + "deep-equal": "^2.2.3", + "earcut": "^2.2.4", + "marchingsquares": "^1.3.3", + "point-in-polygon-hao": "^1.1.0", + "polygon-clipping": "^0.15.3", + "rbush": "^3.0.1", + "skmeans": "0.9.7", + "sweepline-intersections": "^1.5.0", + "topojson-client": "3.x", + "topojson-server": "3.x", "tslib": "^2.6.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 372c573d2e..f70aa1b06b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -449,6 +449,45 @@ importers: '@turf/voronoi': specifier: workspace:^ version: link:../turf-voronoi + concaveman: + specifier: ^1.2.1 + version: 1.2.1 + d3-geo: + specifier: 1.7.1 + version: 1.7.1 + d3-voronoi: + specifier: 1.1.2 + version: 1.1.2 + deep-equal: + specifier: ^2.2.3 + version: 2.2.3 + earcut: + specifier: ^2.2.4 + version: 2.2.4 + marchingsquares: + specifier: ^1.3.3 + version: 1.3.3 + point-in-polygon-hao: + specifier: ^1.1.0 + version: 1.1.0 + polygon-clipping: + specifier: ^0.15.3 + version: 0.15.3 + rbush: + specifier: ^3.0.1 + version: 3.0.1 + skmeans: + specifier: 0.9.7 + version: 0.9.7 + sweepline-intersections: + specifier: ^1.5.0 + version: 1.5.0 + topojson-client: + specifier: 3.x + version: 3.1.0 + topojson-server: + specifier: 3.x + version: 3.0.1 tslib: specifier: ^2.6.2 version: 2.6.2 @@ -551,8 +590,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-along/dist/es: {} - packages/turf-angle: dependencies: '@turf/bearing': @@ -614,8 +651,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-angle/dist/es: {} - packages/turf-area: dependencies: '@turf/helpers': @@ -659,8 +694,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-area/dist/es: {} - packages/turf-bbox: dependencies: '@turf/helpers': @@ -744,8 +777,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-bbox-clip/dist/es: {} - packages/turf-bbox-polygon: dependencies: '@turf/helpers': @@ -780,10 +811,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-bbox-polygon/dist/es: {} - - packages/turf-bbox/dist/es: {} - packages/turf-bearing: dependencies: '@turf/helpers': @@ -827,8 +854,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-bearing/dist/es: {} - packages/turf-bezier-spline: dependencies: '@turf/helpers': @@ -872,8 +897,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-bezier-spline/dist/es: {} - packages/turf-boolean-clockwise: dependencies: '@turf/helpers': @@ -917,8 +940,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-clockwise/dist/es: {} - packages/turf-boolean-concave: dependencies: '@turf/helpers': @@ -962,8 +983,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-concave/dist/es: {} - packages/turf-boolean-contains: dependencies: '@turf/bbox': @@ -1022,8 +1041,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-contains/dist/es: {} - packages/turf-boolean-crosses: dependencies: '@turf/boolean-point-in-polygon': @@ -1079,8 +1096,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-crosses/dist/es: {} - packages/turf-boolean-disjoint: dependencies: '@turf/boolean-point-in-polygon': @@ -1133,8 +1148,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-disjoint/dist/es: {} - packages/turf-boolean-equal: dependencies: '@turf/clean-coords': @@ -1184,8 +1197,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-equal/dist/es: {} - packages/turf-boolean-intersects: dependencies: '@turf/boolean-disjoint': @@ -1232,8 +1243,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-intersects/dist/es: {} - packages/turf-boolean-overlap: dependencies: '@turf/helpers': @@ -1289,8 +1298,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-overlap/dist/es: {} - packages/turf-boolean-parallel: dependencies: '@turf/clean-coords': @@ -1340,8 +1347,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-boolean-parallel/dist/es: {} - packages/turf-boolean-point-in-polygon: dependencies: '@turf/helpers': @@ -1382,8 +1387,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-point-in-polygon/dist/es: {} - packages/turf-boolean-point-on-line: dependencies: '@turf/helpers': @@ -1430,8 +1433,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-boolean-point-on-line/dist/es: {} - packages/turf-boolean-touches: dependencies: '@turf/boolean-point-in-polygon': @@ -1487,8 +1488,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-touches/dist/es: {} - packages/turf-boolean-valid: dependencies: '@turf/bbox': @@ -1562,8 +1561,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-valid/dist/es: {} - packages/turf-boolean-within: dependencies: '@turf/bbox': @@ -1622,8 +1619,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-boolean-within/dist/es: {} - packages/turf-buffer: dependencies: '@turf/bbox': @@ -1679,8 +1674,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-buffer/dist/es: {} - packages/turf-center: dependencies: '@turf/bbox': @@ -1788,8 +1781,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-center-mean/dist/es: {} - packages/turf-center-median: dependencies: '@turf/center-mean': @@ -1854,8 +1845,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-center-median/dist/es: {} - packages/turf-center-of-mass: dependencies: '@turf/centroid': @@ -1911,10 +1900,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-center-of-mass/dist/es: {} - - packages/turf-center/dist/es: {} - packages/turf-centroid: dependencies: '@turf/helpers': @@ -1961,8 +1946,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-centroid/dist/es: {} - packages/turf-circle: dependencies: '@turf/destination': @@ -2012,8 +1995,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-circle/dist/es: {} - packages/turf-clean-coords: dependencies: '@turf/helpers': @@ -2060,8 +2041,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-clean-coords/dist/es: {} - packages/turf-clone: dependencies: '@turf/helpers': @@ -2099,8 +2078,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-clone/dist/es: {} - packages/turf-clusters: dependencies: '@turf/helpers': @@ -2205,8 +2182,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-clusters-dbscan/dist/es: {} - packages/turf-clusters-kmeans: dependencies: '@turf/clone': @@ -2277,10 +2252,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-clusters-kmeans/dist/es: {} - - packages/turf-clusters/dist/es: {} - packages/turf-collect: dependencies: '@turf/bbox': @@ -2327,8 +2298,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-collect/dist/es: {} - packages/turf-combine: dependencies: '@turf/helpers': @@ -2366,8 +2335,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-combine/dist/es: {} - packages/turf-concave: dependencies: '@turf/clone': @@ -2435,8 +2402,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-concave/dist/es: {} - packages/turf-convex: dependencies: '@turf/helpers': @@ -2489,8 +2454,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-convex/dist/es: {} - packages/turf-destination: dependencies: '@turf/helpers': @@ -2540,8 +2503,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-destination/dist/es: {} - packages/turf-difference: dependencies: '@turf/helpers': @@ -2591,8 +2552,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-difference/dist/es: {} - packages/turf-directional-mean: dependencies: '@turf/bearing': @@ -2651,8 +2610,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-directional-mean/dist/es: {} - packages/turf-dissolve: dependencies: '@turf/flatten': @@ -2705,8 +2662,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-dissolve/dist/es: {} - packages/turf-distance: dependencies: '@turf/helpers': @@ -2799,10 +2754,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-distance-weight/dist/es: {} - - packages/turf-distance/dist/es: {} - packages/turf-ellipse: dependencies: '@turf/helpers': @@ -2870,8 +2821,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-ellipse/dist/es: {} - packages/turf-envelope: dependencies: '@turf/bbox': @@ -2915,8 +2864,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-envelope/dist/es: {} - packages/turf-explode: dependencies: '@turf/helpers': @@ -2960,8 +2907,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-explode/dist/es: {} - packages/turf-flatten: dependencies: '@turf/helpers': @@ -3005,8 +2950,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-flatten/dist/es: {} - packages/turf-flip: dependencies: '@turf/clone': @@ -3053,8 +2996,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-flip/dist/es: {} - packages/turf-geojson-rbush: dependencies: '@turf/bbox': @@ -3150,8 +3091,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-great-circle/dist/es: {} - packages/turf-helpers: dependencies: deep-equal: @@ -3189,8 +3128,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-helpers/dist/es: {} - packages/turf-hex-grid: dependencies: '@turf/distance': @@ -3246,8 +3183,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-hex-grid/dist/es: {} - packages/turf-interpolate: dependencies: '@turf/bbox': @@ -3318,8 +3253,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-interpolate/dist/es: {} - packages/turf-intersect: dependencies: '@turf/helpers': @@ -3369,8 +3302,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-intersect/dist/es: {} - packages/turf-invariant: dependencies: '@turf/helpers': @@ -3405,8 +3336,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-invariant/dist/es: {} - packages/turf-isobands: dependencies: '@turf/area': @@ -3486,8 +3415,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-isobands/dist/es: {} - packages/turf-isolines: dependencies: '@turf/bbox': @@ -3558,8 +3485,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-isolines/dist/es: {} - packages/turf-kinks: dependencies: '@turf/helpers': @@ -3606,8 +3531,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-kinks/dist/es: {} - packages/turf-length: dependencies: '@turf/distance': @@ -3654,8 +3577,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-length/dist/es: {} - packages/turf-line-arc: dependencies: '@turf/circle': @@ -3705,8 +3626,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-arc/dist/es: {} - packages/turf-line-chunk: dependencies: '@turf/helpers': @@ -3753,8 +3672,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-chunk/dist/es: {} - packages/turf-line-intersect: dependencies: '@turf/helpers': @@ -3801,8 +3718,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-intersect/dist/es: {} - packages/turf-line-offset: dependencies: '@turf/helpers': @@ -3846,8 +3761,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-offset/dist/es: {} - packages/turf-line-overlap: dependencies: '@turf/boolean-point-on-line': @@ -3912,8 +3825,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-overlap/dist/es: {} - packages/turf-line-segment: dependencies: '@turf/helpers': @@ -3960,8 +3871,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-segment/dist/es: {} - packages/turf-line-slice: dependencies: '@turf/helpers': @@ -4051,10 +3960,6 @@ importers: specifier: ^4.6.2 version: 4.6.2 - packages/turf-line-slice-along/dist/es: {} - - packages/turf-line-slice/dist/es: {} - packages/turf-line-split: dependencies: '@turf/bbox': @@ -4116,8 +4021,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-split/dist/es: {} - packages/turf-line-to-polygon: dependencies: '@turf/bbox': @@ -4167,8 +4070,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-line-to-polygon/dist/es: {} - packages/turf-mask: dependencies: '@turf/helpers': @@ -4209,8 +4110,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-mask/dist/es: {} - packages/turf-meta: dependencies: '@turf/helpers': @@ -4239,8 +4138,6 @@ importers: specifier: ^4.6.2 version: 4.6.2 - packages/turf-meta/dist/es: {} - packages/turf-midpoint: dependencies: '@turf/bearing': @@ -4275,8 +4172,6 @@ importers: specifier: ^4.6.2 version: 4.6.2 - packages/turf-midpoint/dist/es: {} - packages/turf-moran-index: dependencies: '@turf/distance-weight': @@ -4323,8 +4218,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-moran-index/dist/es: {} - packages/turf-nearest-neighbor-analysis: dependencies: '@turf/area': @@ -4389,8 +4282,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-nearest-neighbor-analysis/dist/es: {} - packages/turf-nearest-point: dependencies: '@turf/clone': @@ -4507,8 +4398,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-nearest-point-on-line/dist/es: {} - packages/turf-nearest-point-to-line: dependencies: '@turf/helpers': @@ -4567,10 +4456,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-nearest-point-to-line/dist/es: {} - - packages/turf-nearest-point/dist/es: {} - packages/turf-planepoint: dependencies: '@turf/helpers': @@ -4596,8 +4481,6 @@ importers: specifier: ^4.6.2 version: 4.6.2 - packages/turf-planepoint/dist/es: {} - packages/turf-point-grid: dependencies: '@turf/boolean-within': @@ -4653,8 +4536,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-point-grid/dist/es: {} - packages/turf-point-on-feature: dependencies: '@turf/boolean-point-in-polygon': @@ -4710,8 +4591,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-point-on-feature/dist/es: {} - packages/turf-point-to-line-distance: dependencies: '@turf/bearing': @@ -4776,8 +4655,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-point-to-line-distance/dist/es: {} - packages/turf-points-within-polygon: dependencies: '@turf/boolean-point-in-polygon': @@ -4818,8 +4695,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-points-within-polygon/dist/es: {} - packages/turf-polygon-smooth: dependencies: '@turf/helpers': @@ -4866,8 +4741,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-polygon-smooth/dist/es: {} - packages/turf-polygon-tangents: dependencies: '@turf/bbox': @@ -4923,8 +4796,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-polygon-tangents/dist/es: {} - packages/turf-polygon-to-line: dependencies: '@turf/helpers': @@ -4968,8 +4839,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-polygon-to-line/dist/es: {} - packages/turf-polygonize: dependencies: '@turf/boolean-point-in-polygon': @@ -5022,8 +4891,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-polygonize/dist/es: {} - packages/turf-projection: dependencies: '@turf/clone': @@ -5076,8 +4943,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-projection/dist/es: {} - packages/turf-quadrat-analysis: dependencies: '@turf/area': @@ -5145,8 +5010,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-quadrat-analysis/dist/es: {} - packages/turf-random: dependencies: '@turf/helpers': @@ -5184,8 +5047,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-random/dist/es: {} - packages/turf-rectangle-grid: dependencies: '@turf/boolean-intersects': @@ -5238,8 +5099,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-rectangle-grid/dist/es: {} - packages/turf-rewind: dependencies: '@turf/boolean-clockwise': @@ -5292,8 +5151,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-rewind/dist/es: {} - packages/turf-rhumb-bearing: dependencies: '@turf/helpers': @@ -5337,8 +5194,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-rhumb-bearing/dist/es: {} - packages/turf-rhumb-destination: dependencies: '@turf/helpers': @@ -5385,8 +5240,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-rhumb-destination/dist/es: {} - packages/turf-rhumb-distance: dependencies: '@turf/helpers': @@ -5433,8 +5286,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-rhumb-distance/dist/es: {} - packages/turf-sample: dependencies: '@turf/helpers': @@ -5469,8 +5320,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-sample/dist/es: {} - packages/turf-sector: dependencies: '@turf/circle': @@ -5526,8 +5375,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-sector/dist/es: {} - packages/turf-shortest-path: dependencies: '@turf/bbox': @@ -5595,8 +5442,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-shortest-path/dist/es: {} - packages/turf-simplify: dependencies: '@turf/clean-coords': @@ -5649,8 +5494,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-simplify/dist/es: {} - packages/turf-square: dependencies: '@turf/distance': @@ -5722,10 +5565,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-square-grid/dist/es: {} - - packages/turf-square/dist/es: {} - packages/turf-standard-deviational-ellipse: dependencies: '@turf/center-mean': @@ -5781,8 +5620,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-standard-deviational-ellipse/dist/es: {} - packages/turf-tag: dependencies: '@turf/boolean-point-in-polygon': @@ -5829,8 +5666,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-tag/dist/es: {} - packages/turf-tesselate: dependencies: '@turf/helpers': @@ -5859,8 +5694,6 @@ importers: specifier: ^4.6.2 version: 4.6.2 - packages/turf-tesselate/dist/es: {} - packages/turf-tin: dependencies: '@turf/helpers': @@ -5895,8 +5728,6 @@ importers: specifier: ^5.2.2 version: 5.3.3 - packages/turf-tin/dist/es: {} - packages/turf-transform-rotate: dependencies: '@turf/centroid': @@ -5955,8 +5786,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-transform-rotate/dist/es: {} - packages/turf-transform-scale: dependencies: '@turf/bbox': @@ -6027,8 +5856,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-transform-scale/dist/es: {} - packages/turf-transform-translate: dependencies: '@turf/clone': @@ -6078,8 +5905,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-transform-translate/dist/es: {} - packages/turf-triangle-grid: dependencies: '@turf/distance': @@ -6132,8 +5957,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-triangle-grid/dist/es: {} - packages/turf-truncate: dependencies: '@turf/helpers': @@ -6177,8 +6000,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-truncate/dist/es: {} - packages/turf-union: dependencies: '@turf/helpers': @@ -6228,8 +6049,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-union/dist/es: {} - packages/turf-unkink-polygon: dependencies: '@turf/area': @@ -6279,8 +6098,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-unkink-polygon/dist/es: {} - packages/turf-voronoi: dependencies: '@turf/clone': @@ -6327,10 +6144,6 @@ importers: specifier: ^5.0.0 version: 5.0.0 - packages/turf-voronoi/dist/es: {} - - packages/turf/dist/es: {} - packages: /@aashutoshrathi/word-wrap@1.2.6: diff --git a/templates/tsconfig.testTypes.json b/templates/tsconfig.testTypes.json new file mode 100644 index 0000000000..9ec75a08c6 --- /dev/null +++ b/templates/tsconfig.testTypes.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["types.ts"] +} diff --git a/tsconfig.shared.json b/tsconfig.shared.json index 56c4f8ea85..511ff491e6 100644 --- a/tsconfig.shared.json +++ b/tsconfig.shared.json @@ -1,12 +1,16 @@ { "compilerOptions": { "target": "es2017", - "module": "node16", + "module": "esnext", "declaration": true, "esModuleInterop": true, "strict": true, - "moduleResolution": "node16", + "moduleResolution": "bundler", "importHelpers": true, - "skipLibCheck": true + "skipLibCheck": true, + "baseUrl": ".", + "paths": { + "@turf/*": ["./packages/turf-*"] + } } } From 0821730470e89c662dcf80ed4feabb5632126b5d Mon Sep 17 00:00:00 2001 From: James Beard Date: Sun, 23 Jun 2024 17:55:20 +1000 Subject: [PATCH 3/5] Need to remove some old weird type workarounds for the new approach to building to work. Simplifies things overall. --- packages/turf-clusters-dbscan/index.ts | 4 ++-- packages/turf-clusters-dbscan/lib/rbush-export.ts | 7 ------- packages/turf-collect/index.ts | 2 +- packages/turf-collect/lib/rbush-export.ts | 7 ------- packages/turf-kinks/index.ts | 4 ++-- packages/turf-kinks/lib/sweepline-intersections-export.ts | 7 ------- packages/turf-line-intersect/index.ts | 4 ++-- .../lib/sweepline-intersections-export.ts | 7 ------- 8 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 packages/turf-clusters-dbscan/lib/rbush-export.ts delete mode 100644 packages/turf-collect/lib/rbush-export.ts delete mode 100644 packages/turf-kinks/lib/sweepline-intersections-export.ts delete mode 100644 packages/turf-line-intersect/lib/sweepline-intersections-export.ts diff --git a/packages/turf-clusters-dbscan/index.ts b/packages/turf-clusters-dbscan/index.ts index 7ad8906200..bccc6b6756 100644 --- a/packages/turf-clusters-dbscan/index.ts +++ b/packages/turf-clusters-dbscan/index.ts @@ -2,7 +2,7 @@ import { GeoJsonProperties, FeatureCollection, Point } from "geojson"; import { clone } from "@turf/clone"; import { distance } from "@turf/distance"; import { degreesToRadians, lengthToDegrees, Units } from "@turf/helpers"; -import { rbush as RBush } from "./lib/rbush-export.js"; +import rbush from "rbush"; type Dbscan = "core" | "edge" | "noise"; type DbscanProps = GeoJsonProperties & { @@ -67,7 +67,7 @@ function clustersDbscan( const latDistanceInDegrees = lengthToDegrees(maxDistance, options.units); // Create a spatial index - var tree = new RBush(points.features.length); + var tree = new rbush(points.features.length); // Keeps track of whether a point has been visited or not. var visited = points.features.map((_) => false); diff --git a/packages/turf-clusters-dbscan/lib/rbush-export.ts b/packages/turf-clusters-dbscan/lib/rbush-export.ts deleted file mode 100644 index 49463b8ab5..0000000000 --- a/packages/turf-clusters-dbscan/lib/rbush-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "rbush"; - -export const rbush = lib as unknown as typeof lib.default; diff --git a/packages/turf-collect/index.ts b/packages/turf-collect/index.ts index bde4e7c069..d8b713adab 100644 --- a/packages/turf-collect/index.ts +++ b/packages/turf-collect/index.ts @@ -1,7 +1,7 @@ import { FeatureCollection, Polygon, Point } from "geojson"; import { bbox as turfbbox } from "@turf/bbox"; import { booleanPointInPolygon } from "@turf/boolean-point-in-polygon"; -import { rbush } from "./lib/rbush-export.js"; +import rbush from "rbush"; interface Entry { minX: number; diff --git a/packages/turf-collect/lib/rbush-export.ts b/packages/turf-collect/lib/rbush-export.ts deleted file mode 100644 index 49463b8ab5..0000000000 --- a/packages/turf-collect/lib/rbush-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "rbush"; - -export const rbush = lib as unknown as typeof lib.default; diff --git a/packages/turf-kinks/index.ts b/packages/turf-kinks/index.ts index f8dcfb6c30..87e70783d9 100644 --- a/packages/turf-kinks/index.ts +++ b/packages/turf-kinks/index.ts @@ -8,7 +8,7 @@ import { Polygon, } from "geojson"; import { point } from "@turf/helpers"; -import { sweeplineIntersections as findIntersections } from "./lib/sweepline-intersections-export.js"; +import sweeplineIntersections from "sweepline-intersections"; /** * Takes a {@link LineString|linestring}, {@link MultiLineString|multi-linestring}, @@ -49,7 +49,7 @@ function kinks( "Polygon, or MultiPolygon Feature or Geometry" ); } - const intersections = findIntersections(featureIn, false); + const intersections = sweeplineIntersections(featureIn, false); for (let i = 0; i < intersections.length; ++i) { const intersection = intersections[i]; results.features.push(point([intersection[0], intersection[1]])); diff --git a/packages/turf-kinks/lib/sweepline-intersections-export.ts b/packages/turf-kinks/lib/sweepline-intersections-export.ts deleted file mode 100644 index 2d10f64b69..0000000000 --- a/packages/turf-kinks/lib/sweepline-intersections-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "sweepline-intersections"; - -export const sweeplineIntersections = lib as unknown as typeof lib.default; diff --git a/packages/turf-line-intersect/index.ts b/packages/turf-line-intersect/index.ts index e4c83d30ed..9538fd022e 100644 --- a/packages/turf-line-intersect/index.ts +++ b/packages/turf-line-intersect/index.ts @@ -9,7 +9,7 @@ import { Polygon, } from "geojson"; import type { Intersection } from "sweepline-intersections"; -import { sweeplineIntersections as findIntersections } from "./lib/sweepline-intersections-export.js"; +import sweeplineIntersections from "sweepline-intersections"; /** * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). @@ -66,7 +66,7 @@ function lineIntersect< features.push(feature(line2)); } - const intersections = findIntersections( + const intersections = sweeplineIntersections( featureCollection(features), ignoreSelfIntersections ); diff --git a/packages/turf-line-intersect/lib/sweepline-intersections-export.ts b/packages/turf-line-intersect/lib/sweepline-intersections-export.ts deleted file mode 100644 index 2d10f64b69..0000000000 --- a/packages/turf-line-intersect/lib/sweepline-intersections-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "sweepline-intersections"; - -export const sweeplineIntersections = lib as unknown as typeof lib.default; From 232efc71412f54b2d0a1744b19ccb79278a15205 Mon Sep 17 00:00:00 2001 From: James Beard Date: Sun, 23 Jun 2024 22:20:17 +1000 Subject: [PATCH 4/5] Enabling skipNodeModulesBundle was causing dependent modules to be inlined in dist/esm/index.js files, greatly increasing their size. --- tsup.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tsup.config.ts b/tsup.config.ts index 9ff2aa452b..6f314636a0 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,6 @@ const baseOptions: Options = { dts: true, entry: ["index.?s"], // while we have a mix of TS and JS packages minify: false, - skipNodeModulesBundle: true, sourcemap: true, target: "es2017", tsconfig: "./tsconfig.json", From d966fd80cfc993cc8aefe9bc25a36ef7643e2902 Mon Sep 17 00:00:00 2001 From: James Beard Date: Sun, 23 Jun 2024 23:10:53 +1000 Subject: [PATCH 5/5] These packages weren't actually needed by @turf/turf. Suspect they were causing problems in a previous build because skipNodeModulesBundle was true. That's now been removed and @turf/turf does build fine without them. --- packages/turf/package.json | 13 ------ pnpm-lock.yaml | 96 ++++++++++++++++++++++---------------- 2 files changed, 56 insertions(+), 53 deletions(-) diff --git a/packages/turf/package.json b/packages/turf/package.json index 2c2941c09f..d8e3994138 100644 --- a/packages/turf/package.json +++ b/packages/turf/package.json @@ -204,19 +204,6 @@ "@turf/union": "workspace:^", "@turf/unkink-polygon": "workspace:^", "@turf/voronoi": "workspace:^", - "concaveman": "^1.2.1", - "d3-geo": "1.7.1", - "d3-voronoi": "1.1.2", - "deep-equal": "^2.2.3", - "earcut": "^2.2.4", - "marchingsquares": "^1.3.3", - "point-in-polygon-hao": "^1.1.0", - "polygon-clipping": "^0.15.3", - "rbush": "^3.0.1", - "skmeans": "0.9.7", - "sweepline-intersections": "^1.5.0", - "topojson-client": "3.x", - "topojson-server": "3.x", "tslib": "^2.6.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f70aa1b06b..922b5c80a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -449,45 +449,6 @@ importers: '@turf/voronoi': specifier: workspace:^ version: link:../turf-voronoi - concaveman: - specifier: ^1.2.1 - version: 1.2.1 - d3-geo: - specifier: 1.7.1 - version: 1.7.1 - d3-voronoi: - specifier: 1.1.2 - version: 1.1.2 - deep-equal: - specifier: ^2.2.3 - version: 2.2.3 - earcut: - specifier: ^2.2.4 - version: 2.2.4 - marchingsquares: - specifier: ^1.3.3 - version: 1.3.3 - point-in-polygon-hao: - specifier: ^1.1.0 - version: 1.1.0 - polygon-clipping: - specifier: ^0.15.3 - version: 0.15.3 - rbush: - specifier: ^3.0.1 - version: 3.0.1 - skmeans: - specifier: 0.9.7 - version: 0.9.7 - sweepline-intersections: - specifier: ^1.5.0 - version: 1.5.0 - topojson-client: - specifier: 3.x - version: 3.1.0 - topojson-server: - specifier: 3.x - version: 3.0.1 tslib: specifier: ^2.6.2 version: 2.6.2 @@ -533,7 +494,7 @@ importers: version: 5.7.2 tsup: specifier: ^8.0.1 - version: 8.0.1(ts-node@9.1.1)(typescript@5.3.3) + version: 8.0.1(typescript@5.3.3) tsx: specifier: ^4.6.2 version: 4.6.2 @@ -15157,6 +15118,22 @@ packages: engines: {node: '>=0.10.0'} dev: true + /postcss-load-config@4.0.2: + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 3.0.0 + yaml: 2.3.4 + dev: true + /postcss-load-config@4.0.2(ts-node@9.1.1): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} @@ -17001,6 +16978,45 @@ packages: - ts-node dev: true + /tsup@8.0.1(typescript@5.3.3): + resolution: {integrity: sha512-hvW7gUSG96j53ZTSlT4j/KL0q1Q2l6TqGBFc6/mu/L46IoNWqLLUzLRLP1R8Q7xrJTmkDxxDoojV5uCVs1sVOg==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + dependencies: + bundle-require: 4.0.2(esbuild@0.19.11) + cac: 6.7.14 + chokidar: 3.5.3 + debug: 4.3.4 + esbuild: 0.19.11 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss-load-config: 4.0.2 + resolve-from: 5.0.0 + rollup: 4.9.0 + source-map: 0.8.0-beta.0 + sucrase: 3.34.0 + tree-kill: 1.2.2 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + /tsutils@3.21.0(typescript@3.9.10): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'}