Skip to content

Commit bef29cf

Browse files
authored
Merge pull request #27 from huggingface/nico/pnpm
switched to pnpm
2 parents bb01f1c + 9ebbaed commit bef29cf

7 files changed

Lines changed: 5639 additions & 7043 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,40 @@ jobs:
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030

31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@v4
33+
3134
- name: Setup Node.js
3235
uses: actions/setup-node@v6
3336
with:
3437
node-version: 24.x
38+
cache: pnpm
3539

36-
- name: Log NPM version
37-
run: npm -v
40+
- name: Log pnpm version
41+
run: pnpm -v
3842

3943
- name: Configure git
4044
run: |
4145
git config user.name "github-actions[bot]"
4246
git config user.email "github-actions[bot]@users.noreply.github.com"
4347
4448
- name: Install dependencies
45-
run: npm ci
49+
run: pnpm install --frozen-lockfile
4650

4751
- name: Run format check
48-
run: npm run format:check
52+
run: pnpm run format:check
4953

5054
- name: Run linter
51-
run: npm run lint
55+
run: pnpm run lint
5256

5357
- name: Build application
54-
run: npm run build
58+
run: pnpm run build
5559

5660
- name: Run tests
57-
run: npm test
61+
run: pnpm test
5862

5963
- name: Bump version
60-
run: npm version ${{ inputs.version }} -m "🔖 @huggingface/tokenizers@%s"
64+
run: pnpm version ${{ inputs.version }} -m "🔖 @huggingface/tokenizers@%s"
6165

6266
- name: Get new version
6367
id: package-version
@@ -69,4 +73,4 @@ jobs:
6973
git push --tags
7074
7175
- name: Publish to NPM
72-
run: npm publish
76+
run: pnpm publish

.github/workflows/tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ jobs:
2020

2121
strategy:
2222
matrix:
23-
node-version: [18, 20, 22, 24, latest]
23+
node-version: [22, 24, latest]
2424

2525
steps:
2626
- uses: actions/checkout@v5
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
2729
- name: Use Node.js ${{ matrix.node-version }}
2830
uses: actions/setup-node@v6
2931
with:
3032
node-version: ${{ matrix.node-version }}
31-
- run: npm ci
32-
- run: npm run build
33-
- run: npm run test
33+
cache: pnpm
34+
- run: pnpm install --frozen-lockfile
35+
- run: pnpm run build
36+
- run: pnpm run test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Run today's most used tokenizers directly in your browser or Node.js application
2727
## Installation
2828

2929
```bash
30-
npm install @huggingface/tokenizers
30+
pnpm add @huggingface/tokenizers
3131
```
3232

3333
Alternatively, you can use it via a CDN as follows:

0 commit comments

Comments
 (0)