Skip to content

Commit

Permalink
chore: Clean up JSR build (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas authored May 10, 2024
1 parent ae1269e commit 760e15d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/nodejs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Node CI
on: [push, pull_request]

jobs:
build:
test:

runs-on: ${{ matrix.os }}

Expand All @@ -25,3 +25,5 @@ jobs:
npm test
env:
CI: true
- name: JSR Publish Test
run: npm run test:jsr
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
},
"scripts": {
"build:cts-types": "node -e \"fs.copyFileSync('dist/retrier.d.ts', 'dist/retrier.d.cts')\"",
"build:prepend-type-ref": "node tools/prepend-type-ref.js dist/retrier.js",
"build": "rollup -c && tsc && npm run build:prepend-type-ref && npm run build:cts-types",
"build": "rollup -c && tsc && npm run build:cts-types",
"prepare": "npm run build",
"lint": "eslint src/ tests/",
"pretest": "npm run build",
"test:unit": "mocha tests/retrier.test.js",
"test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs",
"test:jsr": "npx jsr@latest publish --dry-run",
"test": "npm run test:unit && npm run test:build"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default [
},
{
file: "dist/retrier.js",
format: "esm"
format: "esm",
banner: "// @ts-self-types=\"./retrier.d.ts\""
}
]
},
Expand Down
35 changes: 0 additions & 35 deletions tools/prepend-type-ref.js

This file was deleted.

0 comments on commit 760e15d

Please sign in to comment.