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

chore: Simplify type generation #23

Merged
merged 3 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"fmt": "prettier --write .",
"fmt:check": "prettier --check ."
"fmt:check": "prettier --check .",
"test:jsr": "npm run test:jsr --workspaces --if-present"
Copy link
Member

Choose a reason for hiding this comment

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

consider adding test:jsr to the ci?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea 👍

},
"workspaces": [
"packages/*"
Expand Down
5 changes: 3 additions & 2 deletions packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
"test": "tests"
},
"scripts": {
"build:prepend-type-ref": "node ../../tools/prepend-type-ref.js dist/esm/index.js",
"build": "rollup -c && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && npm run build:prepend-type-ref",
"build:cts": "node -e \"fs.copyFileSync('dist/esm/index.d.ts', 'dist/cjs/index.d.cts')\"",
"build": "rollup -c && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test": "mocha tests/*.js"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions packages/compat/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
{
file: "dist/esm/index.js",
format: "esm",
banner: '// @ts-self-types="./index.d.ts"',
},
],
plugins: [
Expand Down
9 changes: 0 additions & 9 deletions packages/compat/tsconfig.cjs.json

This file was deleted.

5 changes: 3 additions & 2 deletions packages/config-array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
"homepage": "https://github.com/eslint/rewrite#readme",
"scripts": {
"build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js",
"build:prepend-type-ref": "node ../../tools/prepend-type-ref.js dist/esm/index.js",
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && npm run build:prepend-type-ref",
"build:cts": "node -e \"fs.copyFileSync('dist/esm/index.d.ts', 'dist/cjs/index.d.cts')\"",
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"pretest": "npm run build",
"test": "mocha tests/"
},
Expand Down
1 change: 1 addition & 0 deletions packages/config-array/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
{
file: "dist/esm/index.js",
format: "esm",
banner: '// @ts-self-types="./index.d.ts"',
},
],
plugins: [
Expand Down
9 changes: 0 additions & 9 deletions packages/config-array/tsconfig.cjs.json

This file was deleted.

5 changes: 3 additions & 2 deletions packages/object-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
"test": "tests"
},
"scripts": {
"build:prepend-type-ref": "node ../../tools/prepend-type-ref.js dist/esm/index.js",
"build": "rollup -c && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && npm run build:prepend-type-ref",
"build:cts": "node -e \"fs.copyFileSync('dist/esm/index.d.ts', 'dist/cjs/index.d.cts')\"",
"build": "rollup -c && tsc -p tsconfig.esm.json && npm run build:cts",
aladdin-add marked this conversation as resolved.
Show resolved Hide resolved
"test:jsr": "npx jsr@latest publish --dry-run",
"test": "mocha tests/"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions packages/object-schema/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default {
{
file: "dist/esm/index.js",
format: "esm",
banner: '// @ts-self-types="./index.d.ts"',
},
],
plugins: [
Expand Down
9 changes: 0 additions & 9 deletions packages/object-schema/tsconfig.cjs.json

This file was deleted.

35 changes: 0 additions & 35 deletions tools/prepend-type-ref.js

This file was deleted.