Skip to content

Commit 84d9456

Browse files
committed
πŸš€ Publish to JSR
1 parent 79f8926 commit 84d9456

File tree

5 files changed

+21
-10
lines changed

5 files changed

+21
-10
lines changed

β€Ž.github/CODEOWNERSβ€Ž

Lines changed: 0 additions & 6 deletions
This file was deleted.

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- run: npm install --ignore-scripts
1616
- run: echo "$PWD/node_modules/.bin" >> "$GITHUB_PATH"
1717
- run: deno test --no-run
1818
- run: deno lint
1919

2020
- run: src/cli.ts
21-
- run: lib/cli.js --outDir nodejs/
21+
- run: node lib/cli.js --outDir nodejs/
2222
- run: git diff --no-index lib/ nodejs/
2323

2424
- run: deno test --allow-read=. src/

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
npm:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- run: npm ci --ignore-scripts
1818
- run: npm run prepare
19+
1920
- name: Publish to npm
2021
run: |
2122
npm config set //registry.npmjs.org/:_authToken '${NPM_TOKEN}'
@@ -25,3 +26,5 @@ jobs:
2526
env:
2627
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2728
NPM_CONFIG_PROVENANCE: true
29+
- name: Publish to JSR
30+
run: npx deno publish --allow-dirty --set-version="${GITHUB_REF_NAME/v/}"

β€Ždeno.jsonβ€Ž

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
2+
"name": "@wojpawlik/deno2node",
3+
"exports": "./mod.ts",
4+
"publish": {
5+
"exclude": [
6+
".*",
7+
"scripts/",
8+
"src/**/*.test.ts"
9+
]
10+
},
11+
212
"lock": false,
3-
"unstable": ["byonm"],
413
"fmt": { "proseWrap": "preserve" },
514
"exclude": ["lib/", "package-lock.json"]
615
}

β€Žmod.tsβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
#!/usr/bin/env node
12
export * from "./src/mod.ts";
3+
import { argv } from "node:process";
4+
if (import.meta.main ?? import.meta.filename === argv[1]) {
5+
await import("./src/cli" + argv[1].slice(-3));
6+
}

0 commit comments

Comments
Β (0)