Skip to content
Open
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
14 changes: 13 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ jobs:
uses: actions/setup-node@v5
with:
node-version: 22
cache: "npm"
cache: 'npm'

- name: npm lint
run: |
npm ci
npm run lint
npm run lint:types
env:
CI: true

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Deno lint
run: deno lint
- name: Deno check
run: deno task check
10 changes: 8 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
publish-npm:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v5
with:
Expand Down Expand Up @@ -53,10 +56,13 @@ jobs:
git reset --hard "refs/tags/${TAG}" # Ensure code matches the tag
git pull origin ${{ steps.get_branch.outputs.branch }}
npm version $TAG --no-git-tag-version
git add package.json package-lock.json
jq '.version = "'$TAG'"' jsr.json > jsr.json.tmp && mv jsr.json.tmp jsr.json
jq '.version = "'$TAG'"' deno.json > deno.json.tmp && mv deno.json.tmp deno.json
git add package.json package-lock.json jsr.json deno.json
git commit -m "ci: set version to $TAG [skip ci]" || true
git push origin ${{ steps.get_branch.outputs.branch }}
- run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- run: npx jsr publish
14 changes: 14 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@trojs/openapi-server",
"version": "3.4.1",
"license": "MIT",
"exports": "./src/server.js",
"compilerOptions": {
"lib": [
"esnext"
]
},
"tasks": {
"check": "deno check src/server.js"
}
}
20 changes: 18 additions & 2 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "nodenext",
"lib": [
"ESNext"
],
"rootDirs": [
"src"
"src",
"types"
],
"baseUrl": ".",
"resolveJsonModule": true,
"types": [
"node"
],
"resolveJsonModule": true
"skipLibCheck": true,
"esModuleInterop": true,
"noEmit": true
},
"include": [
"src/**/*",
"types/**/*"
],
"exclude": [
"node_modules",
"**/node_modules/*"
Expand Down
6 changes: 6 additions & 0 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "@trojs/openapi-server",
"version": "3.4.1",
"license": "MIT",
"exports": "./src/server.js"
}
Loading
Loading