Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Inline last-checks into @turf/turf's test script #2690

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"dependsOn": ["build"],
"cache": true
},
"last-checks": {
"inputs": ["default", "{projectRoot}/test.ts"],
"@turf/turf:test": {
"inputs": ["default", "{projectRoot}/test.ts", "{projectRoot}/index.ts"],
"dependsOn": ["build", "^last-checks"],
"cache": true
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:prettier": "prettier --check .",
"preinstall": "npx only-allow pnpm",
"prepare": "husky && lerna run build",
"test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks"
"test": "pnpm run lint && lerna run test"
},
"lint-staged": {
"package.json": [
Expand Down
1 change: 0 additions & 1 deletion packages/turf-mask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@types/tape": "^4.2.32",
"benchmark": "^2.1.4",
"load-json-file": "^7.0.1",
"mkdirp": "^3.0.1",
"npm-run-all": "^4.1.5",
"tape": "^5.7.2",
"tsup": "^8.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/turf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export { concave } from "@turf/concave";
export { convex } from "@turf/convex";
export { destination } from "@turf/destination";
export { difference } from "@turf/difference"; // JSTS Module
export { directionalMean } from "@turf/directional-mean";
export { dissolve } from "@turf/dissolve"; // JSTS Sub-Model
export { distance } from "@turf/distance";
export { distanceWeight } from "@turf/distance-weight";
Expand Down
8 changes: 4 additions & 4 deletions packages/turf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@
],
"scripts": {
"build": "tsup --config ../../tsup.config.ts && rollup -c rollup.config.js",
"last-checks": "npm-run-all last-checks:testjs last-checks:example",
"last-checks:example": "tsx test.example.js",
"last-checks:testjs": "tsx test.ts",
"test": "echo '@turf/turf tests run in the last-checks step'"
"test": "npm-run-all test:testjs test:example",
"test:example": "tsx test.example.js",
"test:testjs": "tsx test.ts"
},
"devDependencies": {
"@babel/core": "^7.23.2",
Expand Down Expand Up @@ -132,6 +131,7 @@
"@turf/convex": "workspace:^",
"@turf/destination": "workspace:^",
"@turf/difference": "workspace:^",
"@turf/directional-mean": "workspace:^",
"@turf/dissolve": "workspace:^",
"@turf/distance": "workspace:^",
"@turf/distance-weight": "workspace:^",
Expand Down
4 changes: 0 additions & 4 deletions packages/turf/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ test("turf -- invalid dependencies", (t) => {
t.fail(
`${name} @turf/helpers should be located in Dependencies instead of DevDependencies`
);
// if (devDependencies['mkdirp']) t.fail(`${name} tests should not have to create folders`);
}
t.skip('remove "mkdirp" from testing');
t.end();
});

Expand Down Expand Up @@ -164,8 +162,6 @@ test("turf -- pre-defined attributes in package.json", (t) => {
for (const { name, pckg } of modules) {
if (pckg.author !== "Turf Authors")
t.fail(name + ' (author) should be "Turf Authors"');
// if (pckg.main !== 'main.js') t.skip(`${name} (main) must be "main.js" in package.json`);
// if (pckg.module !== 'main.es.js') t.skip(`${name} (module) must be "main.es.js" in package.json`);
if (pckg["jsnext:main"])
t.fail(
`${name} (jsnext:main) is no longer required in favor of using (module) in package.json`
Expand Down
12 changes: 3 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.