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

chore: use pnpm over yarn #34

Merged
merged 3 commits into from
Nov 7, 2023
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: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
always-auth: true
registry-url: https://registry.npmjs.org

- uses: pnpm/action-setup@v2
with:
version: 7.12

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: Tests
run: yarn test
run: pnpm test

- name: Build
run: yarn build
run: pnpm build
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,33 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: actions/checkout
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_ADMIN_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
always-auth: true
registry-url: https://registry.npmjs.org

- uses: pnpm/action-setup@v2
with:
version: 7.12

- name: Setup Git
run: |
git config --local user.name "kettanaito"
git config --local user.email "[email protected]"

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: release
run: yarn release
run: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ There are, however, use cases when this extension can be applicable:

```sh
$ npm install @mswjs/http-middleware
# or
$ yarn add @mswjs/http-middleware
```

### Declare request handlers
Expand Down
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ How to run:

```bash
# From the root directory
yarn example:basic
pnpm example:basic
```

Then you can POST to `/login` or `/logout` using curl or Postman.
Expand All @@ -23,7 +23,7 @@ How to run:

```bash
# From the root directory
yarn example:custom
pnpm example:custom
```

Then you can open your browser to [http://localhost:9090](http://localhost:9090) to try logging in or out.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"test": "jest",
"lint": "eslint \"{examples,src,test}/**/*.ts\"",
"clean": "rimraf ./lib",
"build": "yarn clean && tsc",
"example-build": "yarn build && cd examples && rimraf ./lib && tsc && cp -R public lib/examples/public",
"example:basic": "yarn example-build && node examples/lib/examples/basic-server.js",
"example:custom": "yarn example-build && node examples/lib/examples/custom-server.js",
"build": "pnpm clean && tsc",
"example-build": "pnpm build && cd examples && rimraf ./lib && tsc && cp -R public lib/examples/public",
"example:basic": "pnpm example-build && node examples/lib/examples/basic-server.js",
"example:custom": "pnpm example-build && node examples/lib/examples/custom-server.js",
"release": "release publish",
"prepare": "husky install",
"prepublishOnly": "yarn lint && yarn test && yarn build"
"prepublishOnly": "pnpm lint && pnpm test && pnpm build"
},
"lint-staged": {
"*.ts": [
Expand All @@ -41,7 +41,8 @@
"lib"
],
"dependencies": {
"express": "^4.18.2"
"express": "^4.18.2",
"strict-event-emitter": "^0.5.1"
},
"devDependencies": {
"@open-draft/test-server": "0.4.x",
Expand All @@ -50,8 +51,8 @@
"@types/jest": "^27.0.2",
"@types/node": "^20.8.7",
"@types/node-fetch": "^2.5.11",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-prettier": "^4.2.1",
Expand All @@ -67,11 +68,10 @@
"typescript": "^5.0.0"
},
"peerDependencies": {
"headers-polyfill": "^3.0.4",
"msw": ">=2.0.0"
},
"engines": {
"node": ">=18",
"packageManager": "yarn"
}
}
"node": ">=18"
},
"packageManager": "[email protected]"
}
Loading