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

Exp: Trying pnpm #2067

Closed
wants to merge 12 commits into from
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ updates:
patterns:
- "vitest"
- "@vitest/coverage-istanbul"
- "@vitest/pretty-format"
typescript-eslint:
patterns:
- "typescript-eslint"
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,21 @@ jobs:
node-version: [18.18.0, 18.x, 20.9.0, 20.x, 22.0.0, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Get yarn cache dir
id: yarnCache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- run: corepack enable
- name: Install Node.js ${{ matrix.node-version }}
id: setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-yarn
with:
path: ${{ steps.yarnCache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
cache: pnpm
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Lint
run: yarn lint
run: pnpm lint
- name: Test
run: yarn test
run: pnpm test
- name: Coveralls
uses: coverallsapp/github-action@v2
continue-on-error: true
Expand All @@ -49,15 +41,15 @@ jobs:
flag-name: run-${{ matrix.node-version }}
parallel: true
- name: Build
run: yarn build
run: pnpm build
- name: CJS test
run: yarn test:cjs
run: pnpm test:cjs
- name: ESM test
run: yarn test:esm
run: pnpm test:esm
- name: Compatibility test
run: yarn test:compat
run: pnpm test:compat
- name: Issue 952 # see https://github.com/RobinTail/express-zod-api/issues/952
run: yarn test:952
run: pnpm test:952
finish:
needs: build
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn test:oas
- run: pnpm install
- run: pnpm test:oas
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn precommit
pnpm precommit
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"bugs": "https://github.com/RobinTail/express-zod-api/issues",
"funding": "https://github.com/sponsors/RobinTail",
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "tsx example/index.ts",
"prebuild": "yarn build:docs && yarn build:client && yarn build:md",
"prebuild": "pnpm build:docs && pnpm build:client && pnpm build:md",
"build": "tsup && attw --pack",
"postbuild": "tsx tools/make-tests.ts",
"build:docs": "tsx example/generate-documentation.ts",
Expand All @@ -26,16 +27,16 @@
"pretest": "tsc --noEmit",
"test": "vitest run --coverage tests/unit tests/system",
"posttest": "make-coverage-badge --output-path coverage.svg",
"test:cjs": "yarn --cwd tests/cjs && vitest run -r tests/cjs",
"test:esm": "yarn --cwd tests/esm && vitest run -r tests/esm",
"test:952": "yarn --cwd tests/issue952 && yarn --cwd tests/issue952 test",
"test:compat": "yarn --cwd tests/compat && yarn --cwd tests/compat test",
"test:cjs": "pnpm --cwd tests/cjs && vitest run -r tests/cjs",
"test:esm": "pnpm --cwd tests/esm && vitest run -r tests/esm",
"test:952": "pnpm --cwd tests/issue952 && pnpm --cwd tests/issue952 test",
"test:compat": "pnpm --cwd tests/compat && pnpm --cwd tests/compat test",
"test:oas": "vitest run tests/oas",
"bench": "vitest bench --run tests/bench",
"lint": "eslint && yarn prettier *.md --check",
"lint": "eslint && pnpm prettier *.md --check",
"mdfix": "prettier *.md --write",
"precommit": "yarn lint && yarn test && yarn build && git add *.md example/example.* LICENSE coverage.svg",
"prepublishOnly": "yarn lint && yarn test && yarn build",
"precommit": "pnpm lint && pnpm test && pnpm build && git add *.md example/example.* LICENSE coverage.svg",
"prepublishOnly": "pnpm lint && pnpm test && pnpm build",
"postversion": "git push && git push --tags",
"install_hooks": "husky"
},
Expand Down Expand Up @@ -130,9 +131,11 @@
"@types/swagger-ui-express": "^4.1.6",
"@typescript-eslint/rule-tester": "^8.15.0",
"@vitest/coverage-v8": "^2.1.6",
"@vitest/pretty-format": "^2.1.6",
"camelize-ts": "^3.0.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"depd": "^2.0.0",
"eslint": "^9.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-allowed-dependencies": "^1.0.0",
Expand All @@ -155,10 +158,11 @@
"typescript-eslint": "^8.15.0",
"undici": "^6.19.8",
"vitest": "^2.1.6",
"yaml": "^2.6.1",
"zod": "^3.23.0"
},
"resolutions": {
"**/@scarf/scarf": "npm:empty-npm-package@1.0.0"
"@scarf/scarf": "npm:empty-npm-package@1.0.0"
},
"keywords": [
"nodejs",
Expand All @@ -181,5 +185,6 @@
"swagger-documentation",
"zod",
"validation"
]
],
"packageManager": "pnpm@9.11.0+sha256.1c0e33f70e5df9eede84a357bdfa0b1f9dba6e58194628d48a1055756f553754"
}
Loading
Loading