Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 10 additions & 6 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ jobs:
runs-on: "depot-ubuntu-24.04-small"
steps:
- uses: "actions/checkout@v6"
- uses: "bahmutov/npm-install@v1"
- uses: "actions/setup-node@v6"
with:
useLockFile: false
- name: "Run prettier"
run: "CI=true yarn run oxfmt --check"
node-version: "24"
- uses: "pnpm/action-setup@v6"
with:
cache: true
run_install: true
- name: "Run format"
run: "pnpm run format:check"
- name: "Run lint"
run: "CI=true yarn lint"
run: "pnpm lint"
- name: "Run publint"
run: "yarn build && yarn lint:package"
run: "pnpm build && pnpm lint:package"

conventional-commits:
name: "Lint Commit Messages"
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: "actions/setup-node@v6"
with:
cache-dependency-path: ./package.json
cache: "yarn"
node-version: 18
- uses: bahmutov/npm-install@v1
node-version: "24"
- uses: "pnpm/action-setup@v6"
with:
useLockFile: false
cache: true
run_install: true
# Set the version in package.json to match the tag
- name: Write release version
run: |
Expand All @@ -40,21 +39,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: "actions/setup-node@v6"
with:
node-version: 18
cache-dependency-path: ./package.json
cache: "yarn"
# Install deps in base package and build into js-dist
- uses: bahmutov/npm-install@v1
node-version: "24"
- uses: "pnpm/action-setup@v6"
with:
useLockFile: false
cache: true
run_install: true
- name: Run build
run: yarn build-js-client
- uses: bahmutov/npm-install@v1
with:
useLockFile: false
working-directory: ./js-dist
run: pnpm build-js-client
# Set the version in package.json to match the tag
- name: Write release version
run: |
Expand Down
30 changes: 12 additions & 18 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: "depot-ubuntu-24.04-small"
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [22, 24, 26]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change reflects the currently-active versions according to node's website.

needs: "paths-filter"
if: |
needs.paths-filter.outputs.codechange == 'true'
Expand All @@ -41,19 +41,18 @@ jobs:
- uses: "actions/setup-node@v6"
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: ./package.json
cache: "yarn"
- uses: "bahmutov/npm-install@v1"
- uses: "pnpm/action-setup@v6"
with:
useLockFile: false
- name: Run Yarn tests
run: "CI=true yarn only-run-tests"
cache: true
run_install: true
- name: Run tests
run: "CI=true pnpm only-run-tests"
build-js-client:
name: "Build and Test JS client"
runs-on: "depot-ubuntu-24.04-small"
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [22, 24, 26]
needs: "paths-filter"
if: |
needs.paths-filter.outputs.codechange == 'true'
Expand All @@ -65,20 +64,15 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: ./package.json
cache: "yarn"
- uses: bahmutov/npm-install@v1
- uses: "pnpm/action-setup@v6"
with:
useLockFile: false
cache: true
run_install: true
- name: Run build
run: yarn build-js-client
run: pnpm build-js-client
working-directory: ./
- uses: bahmutov/npm-install@v1
with:
useLockFile: false
working-directory: ./js-dist
- name: Run tests
run: CI=true yarn only-run-tests
run: CI=true pnpm only-run-tests
working-directory: ./js-dist
- uses: actions/upload-artifact@v6
with:
Expand Down
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
node_modules
dist

# Because of how node's dependency management works,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removing these ignores because we're re-adding pnpm's lockfile

# and the fact that a lockfile in a published package
# isn't exported, keeping these files out of the repo
# will make our tests reflect installed usage more closely.
yarn.lock
package-lock.json
js-dist/yarn.lock
js-dist/package-lock.json
js-dist/src
44 changes: 0 additions & 44 deletions eslint.config.mjs

This file was deleted.

3 changes: 2 additions & 1 deletion js-dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"devDependencies": {
"grpc-tools": "^1.13.1",
"vitest": "^4.0.18"
}
},
"packageManager": "pnpm@11.1.1"
}
5 changes: 5 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from "oxlint";

export default defineConfig({
ignorePatterns: ["src/authzedapi"],
});
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@
"test": "./scripts/run-and-test.sh",
"only-run-tests": "vitest",
"buf": "buf generate && tsc-esm-fix --src src/authzedapi --ext='.js'",
"lint": "./node_modules/.bin/eslint src",
"lint:package": "publint --pack npm",
"format": "oxfmt",
"build": "tsc",
"lint": "pnpm oxlint --type-check --type-aware",
"lint:package": "pnpm publint --pack npm",
"format": "pnpm oxfmt",
"format:check": "pnpm oxfmt --check",
"build": "pnpm tsc",
"postbuild": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs && cp dist/src/index.d.ts dist/src/index.d.cts",
"prepublish": "yarn build",
"build-js-client": "tsc --declaration false --outDir js-dist"
"prepublish": "pnpm build",
"build-js-client": "pnpm tsc --declaration false --outDir js-dist"
},
"dependencies": {
"@grpc/grpc-js": "^1.14.3",
Expand All @@ -56,19 +57,17 @@
"google-protobuf": "^4.0.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@protobuf-ts/plugin": "^2.11.1",
"@tsconfig/node18": "^18.2.6",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"eslint": "^9.39.2",
"grpc-tools": "^1.13.1",
"oxfmt": "^0.28.0",
"oxlint": "^1.64.0",
"oxlint-tsgolint": "^0.22.1",
"publint": "^0.3.17",
"rollup": "^4.57.1",
"tsc-esm-fix": "^3.1.2",
"typescript": "^5.9",
"vitest": "^4.0.18"
}
},
"packageManager": "pnpm@11.1.1"
}
Loading
Loading