Skip to content

Commit

Permalink
update tshy, normalize all package.json files
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 27, 2023
1 parent 0357573 commit 3c4ed07
Show file tree
Hide file tree
Showing 39 changed files with 761 additions and 618 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"tap": "^18.0.0-0",
"trivial-deferred": "^2.0.0",
"ts-node": "npm:@isaacs/ts-node-temp-fork-for-pr-2009@^10.9.1",
"tshy": "^1.1.1",
"tshy": "^1.2.2",
"typedoc": "^0.25.1",
"typescript": "5.2",
"walk-up-path": "^3.0.1",
Expand All @@ -108,7 +108,8 @@
"p": "bash ./scripts/bump-changed.sh",
"pub": "npm run v -- pub",
"deploy:docs": "npm run deploy:prod -w src/docs",
"postv": "npm run deploy:docs"
"postv": "npm run deploy:docs",
"pj": "node scripts/normalize-package-json.js src/*/package.json"
},
"repository": "https://github.com/tapjs/tapjs",
"license": "BlueOak-1.0.0",
Expand Down
46 changes: 46 additions & 0 deletions scripts/normalize-package-json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { readFileSync, writeFileSync } from 'fs'
const files = process.argv.slice(2)

for (const f of files) {
const pkg = JSON.parse(readFileSync(f, 'utf8'))
const {
name,
version,
description,
author,
tshy,
type,
bin,
main,
types,
exports,
files,
scripts,
license,
dependencies,
devDependencies,
peerDependencies,
tap,
...rest
} = pkg
writeFileSync(f, JSON.stringify({
name,
version,
description,
tshy,
type,
bin,
main,
types,
exports,
files,
scripts,
author,
license,
dependencies,
devDependencies,
peerDependencies,
tap,
...rest,
}, null, 2) + '\n')
}
31 changes: 17 additions & 14 deletions src/after-each/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"name": "@tapjs/after-each",
"version": "1.0.7",
"description": "a built-in tap extension for t.afterEach()",
"tshy": {
"main": true,
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"type": "module",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -28,35 +37,29 @@
"format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
"typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts"
},
"author": "Isaac Z. Schlueter",
"license": "BlueOak-1.0.0",
"dependencies": {
"function-loop": "^4.0.0"
},
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"tap": {
"typecheck": false
},
"keywords": [
"tapjs plugin"
],
"author": "Isaac Z. Schlueter",
"license": "BlueOak-1.0.0",
"bugs": {
"url": "https://github.com/tapjs/tapjs/issues"
},
"homepage": "https://github.com/tapjs/tapjs/src/spawn#readme",
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"dependencies": {
"function-loop": "^4.0.0"
},
"engines": {
"node": ">=16"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tapjs/tapjs.git"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
}
}
31 changes: 17 additions & 14 deletions src/after/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"name": "@tapjs/after",
"version": "1.0.7",
"description": "a built-in tap extension for t.after() and t.teardown()",
"tshy": {
"main": true,
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"type": "module",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -28,35 +37,29 @@
"format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
"typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts"
},
"author": "Isaac Z. Schlueter",
"license": "BlueOak-1.0.0",
"dependencies": {
"is-actual-promise": "^1.0.0"
},
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"tap": {
"typecheck": false
},
"keywords": [
"tapjs plugin"
],
"author": "Isaac Z. Schlueter",
"license": "BlueOak-1.0.0",
"bugs": {
"url": "https://github.com/tapjs/tapjs/issues"
},
"homepage": "https://github.com/tapjs/tapjs/src/spawn#readme",
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"engines": {
"node": ">=16"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tapjs/tapjs.git"
},
"dependencies": {
"is-actual-promise": "^1.0.0"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
}
}
39 changes: 21 additions & 18 deletions src/asserts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
"name": "@tapjs/asserts",
"version": "1.0.7",
"description": "",
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)",
"tshy": {
"main": true,
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"type": "module",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -17,13 +25,9 @@
}
}
},
"keywords": [
"tapjs plugin"
],
"files": [
"dist"
],
"license": "BlueOak-1.0.0",
"scripts": {
"prepare": "tshy",
"pretest": "npm run prepare",
Expand All @@ -33,18 +37,23 @@
"format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
"typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts"
},
"tap": {
"coverage-map": "./map.js",
"typecheck": false
},
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)",
"license": "BlueOak-1.0.0",
"dependencies": {
"is-actual-promise": "^1.0.0",
"tcompare": "6.1.0",
"trivial-deferred": "^2.0.0"
},
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"tap": {
"coverage-map": "./map.js",
"typecheck": false
},
"keywords": [
"tapjs plugin"
],
"engines": {
"node": ">=16"
},
Expand All @@ -54,11 +63,5 @@
"repository": {
"type": "git",
"url": "git+https://github.com/tapjs/tapjs.git"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
}
}
31 changes: 17 additions & 14 deletions src/before-each/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"name": "@tapjs/before-each",
"version": "1.0.7",
"description": "a built-in tap extension for t.beforeEach()",
"tshy": {
"main": true,
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"type": "module",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -28,35 +37,29 @@
"format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
"typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts"
},
"author": "Isaac Z. Schlueter",
"license": "BlueOak-1.0.0",
"dependencies": {
"function-loop": "^4.0.0"
},
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"tap": {
"typecheck": false
},
"keywords": [
"tapjs plugin"
],
"author": "Isaac Z. Schlueter",
"license": "BlueOak-1.0.0",
"bugs": {
"url": "https://github.com/tapjs/tapjs/issues"
},
"homepage": "https://github.com/tapjs/tapjs/src/spawn#readme",
"peerDependencies": {
"@tapjs/core": "1.2.0"
},
"dependencies": {
"function-loop": "^4.0.0"
},
"engines": {
"node": ">=16"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tapjs/tapjs.git"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
}
}
Loading

0 comments on commit 3c4ed07

Please sign in to comment.