Skip to content

Commit fc9ebca

Browse files
chore: migrate from npm to pnpm (#57)
1 parent 8a377da commit fc9ebca

15 files changed

Lines changed: 8264 additions & 13382 deletions

.eslintrc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"extends": [
66
"airbnb-base",
77
"prettier",
8-
"plugin:node/recommended"
8+
"plugin:n/recommended"
99
],
1010
"env": {
1111
"es6": true,
@@ -34,8 +34,9 @@
3434
"no-underscore-dangle": ["off", { "allowAfterThis": true, "allowAfterSuper": true }],
3535
"no-unused-vars": ["error", {"vars": "all", "args": "none", "ignoreRestSiblings": true}],
3636
"no-use-before-define": ["error", { "variables": false, "classes": false, "functions": false }],
37-
"node/no-unsupported-features/es-syntax": ["error", {"version": ">=10.0.0","ignores": []}],
38-
"node/process-exit-as-throw": ["off"],
37+
"n/no-unsupported-features/es-syntax": ["error", {"version": ">=10.0.0","ignores": []}],
38+
"n/process-exit-as-throw": ["off"],
39+
"n/no-process-exit": ["off"],
3940
"object-curly-spacing": ["error", "never"],
4041
"object-property-newline": ["off", { "allowMultiplePropertiesPerLine": true }],
4142
"prefer-destructuring": ["warn", {"array": false, "object": true}],
@@ -47,7 +48,7 @@
4748
"strict": ["off"],
4849
"import/extensions": ["off"],
4950
"import/no-unresolved": ["warn"],
50-
"node/no-missing-require": ["warn"],
51+
"n/no-missing-require": ["warn"],
5152
"prefer-arrow-callback": ["warn"],
5253
"radix": ["warn"],
5354
"arrow-body-style": ["off"],

.github/workflows/asset-size.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ jobs:
1414
- uses: actions/checkout@v6
1515
with:
1616
fetch-depth: 0
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v4
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version: '24'
22+
cache: 'pnpm'
1723
- uses: chrysanthos/simple-asset-size-reporter@1.0.2
1824
with:
1925
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2026
files: '["dist/*.js"]'
2127
with-same: "false"
22-
build-assets: "npm run prepare-and-install"
28+
build-assets: "pnpm run prepare-and-install"

.github/workflows/publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,24 @@ jobs:
2727
with:
2828
ref: ${{ inputs.version }}
2929

30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
3033
- name: Setup Node.js
3134
uses: actions/setup-node@v6
3235
with:
3336
node-version: '24'
34-
cache: 'npm'
37+
cache: 'pnpm'
3538
registry-url: 'https://registry.npmjs.org'
3639

37-
# npm version 11.5.1 or later is required to use Trusted Publishing
38-
- name: NPM Version
39-
run: npm --version
40-
4140
- name: Install dependencies
42-
run: npm ci
41+
run: pnpm install --frozen-lockfile
4342

4443
- name: Clean previous build
45-
run: npm run clean
44+
run: pnpm run clean
4645

4746
- name: Build package
48-
run: npm run build
47+
run: pnpm run build
4948

5049
- name: Verify build artifacts
5150
run: |

.github/workflows/tests.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ jobs:
2727
git config --global core.symlinks true
2828
if: runner.os == 'Windows'
2929
- uses: actions/checkout@v6
30+
- name: Install pnpm
31+
uses: pnpm/action-setup@v4
3032
- name: Use Node.js ${{ matrix.node-version }}
3133
uses: actions/setup-node@v6
3234
with:
3335
node-version: ${{ matrix.node-version }}
34-
cache: 'npm'
35-
- run: npm ci
36-
- run: npm test
36+
cache: 'pnpm'
37+
- run: pnpm install --frozen-lockfile
38+
- run: pnpm test
3739
env:
3840
CI: true
3941

@@ -46,12 +48,14 @@ jobs:
4648

4749
steps:
4850
- uses: actions/checkout@v6
51+
- name: Install pnpm
52+
uses: pnpm/action-setup@v4
4953
- uses: actions/setup-node@v6
5054
with:
5155
node-version: 18
52-
cache: 'npm'
53-
- run: npm ci
54-
- run: npm run benchmark
56+
cache: 'pnpm'
57+
- run: pnpm install --frozen-lockfile
58+
- run: pnpm run benchmark
5559
env:
5660
CI: true
5761

@@ -64,11 +68,13 @@ jobs:
6468

6569
steps:
6670
- uses: actions/checkout@v6
71+
- name: Install pnpm
72+
uses: pnpm/action-setup@v4
6773
- uses: actions/setup-node@v6
6874
with:
6975
node-version: 18
70-
cache: 'npm'
71-
- run: npm ci
72-
- run: npm run type-check
76+
cache: 'pnpm'
77+
- run: pnpm install --frozen-lockfile
78+
- run: pnpm run type-check
7379
env:
7480
CI: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Reverse engineered from Excel spreadsheet files as a project.
1313
# Installation
1414

1515
```shell
16-
npm install devextreme-exceljs-fork
16+
pnpm install devextreme-exceljs-fork
1717
```
1818

1919
# New Features!

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# 安装
1212

1313
```shell
14-
npm install devextreme-exceljs-fork
14+
pnpm install devextreme-exceljs-fork
1515
```
1616

1717
# 新的功能!

lib/dx-exceljs-fork.browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable import/no-extraneous-dependencies,node/no-unpublished-require */
1+
/* eslint-disable import/no-extraneous-dependencies,n/no-unpublished-require */
22
require('core-js/modules/es.promise');
33
require('core-js/modules/es.promise.finally');
44
require('core-js/modules/es.object.assign');

lib/utils/browser-buffer-decode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
1+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
22
const textDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf-8');
33

44
function bufferToString(chunk) {

lib/utils/browser-buffer-encode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
1+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
22
const textEncoder = typeof TextEncoder === 'undefined' ? null : new TextEncoder('utf-8');
33
const {Buffer} = require('buffer');
44

0 commit comments

Comments
 (0)