Skip to content

Commit c8301da

Browse files
chore: migrate from npm to pnpm (#1084)
1 parent ff700ea commit c8301da

16 files changed

Lines changed: 6519 additions & 19599 deletions

.github/workflows/applications.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@ jobs:
4242
- name: Get sources
4343
uses: actions/checkout@v4
4444

45+
- name: Install pnpm
46+
uses: pnpm/action-setup@v4
47+
4548
- name: Use Node.js
4649
uses: actions/setup-node@v4
4750
with:
4851
node-version: '24'
52+
cache: 'pnpm'
4953

5054
- name: Install dependencies
5155
env:
5256
PUPPETEER_SKIP_DOWNLOAD: true
53-
run: npm ci --no-audit --no-fund
57+
run: pnpm install --frozen-lockfile
5458

5559
- uses: browser-actions/setup-chrome@v1
5660
id: setup-chrome
@@ -60,7 +64,8 @@ jobs:
6064
run: npm config set legacy-peer-deps true
6165

6266
- name: Create ${{ matrix.APPROACH }} application
63-
run: npm run create-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
67+
working-directory: packages/devextreme-cli
68+
run: node ./testing/creating.js -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
6469
timeout-minutes: 30
6570

6671
- name: Install Internal Packages
@@ -70,14 +75,14 @@ jobs:
7075

7176
- name: Lint created application
7277
if: ${{ matrix.OS != 'windows-latest' }}
73-
run: npm run lint-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
78+
run: pnpm run lint-template -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
7479

7580
- name: Run template tests
7681
if: ${{ matrix.OS != 'windows-latest' }}
7782
env:
7883
LAUNCH_BROWSER: true
7984
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
80-
run: npm run test-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
85+
run: pnpm run test-template -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
8186
timeout-minutes: 40
8287

8388
- name: Archive artifacts
@@ -110,17 +115,19 @@ jobs:
110115
- name: Get sources
111116
uses: actions/checkout@v4
112117

118+
- name: Install pnpm
119+
uses: pnpm/action-setup@v4
120+
113121
- name: Set up Node.js and restore cache
114122
uses: actions/setup-node@v4
115123
with:
116124
node-version: 24
117-
cache: 'npm'
118-
cache-dependency-path: '**/package-lock.json'
125+
cache: 'pnpm'
119126

120127
- name: Install dependencies
121128
env:
122129
PUPPETEER_SKIP_DOWNLOAD: true
123-
run: npm ci --no-audit --no-fund
130+
run: pnpm install --frozen-lockfile
124131

125132
- name: Run schematics tests
126-
run: cd packages/devextreme-schematics && npm run test
133+
run: pnpm --filter devextreme-schematics run test

.github/workflows/check-nextjs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
- name: Get sources
2626
uses: actions/checkout@v4
2727

28+
- name: Install pnpm
29+
uses: pnpm/action-setup@v4
30+
2831
- name: Set up Node.js
2932
uses: actions/setup-node@v4
3033
with:
3134
node-version: ${{ matrix.NODE }}
32-
cache: 'npm'
33-
cache-dependency-path: |
34-
package-lock.json
35-
apps/nextjs-testing/**/package-lock.json
35+
cache: 'pnpm'
3636

3737
- name: Determine test app directory
3838
run: |
@@ -48,13 +48,15 @@ jobs:
4848
COMMITTED_VERSION=$(node -e "const m = require('./apps/nextjs-testing/.generator-meta.json'); console.log(m['create-next-app'])")
4949
if [ "$EXPECTED_VERSION" != "$COMMITTED_VERSION" ]; then
5050
echo "ERROR: Committed test apps use create-next-app@$COMMITTED_VERSION but latest-versions.js specifies $EXPECTED_VERSION"
51-
echo "Run 'npm run regenerate-nextjs-apps' and commit the results"
51+
echo "Run 'pnpm run regenerate-nextjs-apps' and commit the results"
5252
exit 1
5353
fi
5454
shell: bash
5555

5656
- name: Install devextreme-cli dependencies
57-
run: npm ci --prefix packages/devextreme-cli
57+
env:
58+
PUPPETEER_SKIP_DOWNLOAD: true
59+
run: pnpm install --frozen-lockfile
5860
timeout-minutes: 5
5961

6062
- name: Install test app dependencies

.github/workflows/lint.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,19 @@ jobs:
1616
- name: Get sources
1717
uses: actions/checkout@v4
1818

19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v4
21+
1922
- name: Use Node.js
2023
uses: actions/setup-node@v4
2124
with:
2225
node-version: '24'
26+
cache: 'pnpm'
2327

2428
- name: Install dependencies
2529
env:
2630
PUPPETEER_SKIP_DOWNLOAD: true
27-
run: npm ci --no-audit --no-fund
31+
run: pnpm install --frozen-lockfile
2832

2933
- name: Run tests
30-
run: npm run lint
34+
run: pnpm run lint

.github/workflows/publish.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,23 @@ jobs:
2323
- name: Get sources
2424
uses: actions/checkout@v4
2525

26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v4
28+
2629
- name: Use Node.js
2730
uses: actions/setup-node@v4
2831
with:
2932
node-version: '24'
33+
cache: 'pnpm'
3034

31-
- name: Install dependencies (root)
32-
run: npm ci --no-audit --no-fund
33-
34-
- name: Install dependencies (devextreme-schematics)
35-
working-directory: packages/devextreme-schematics
36-
run: npm ci --no-audit --no-fund
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
3737

3838
- name: Test devextreme-schematics
39-
working-directory: packages/devextreme-schematics
40-
run: npm run test
39+
run: pnpm --filter devextreme-schematics run test
4140

4241
- name: Build devextreme-schematics
43-
working-directory: packages/devextreme-schematics
44-
run: npm run build
42+
run: pnpm --filter devextreme-schematics run build
4543

4644
- uses: fregante/setup-git-user@v2
4745

@@ -53,6 +51,11 @@ jobs:
5351
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5452
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5553
run: |
56-
npx --no-install lerna version ${{ github.event.inputs.version }} -y --no-push
54+
NEW_VERSION=$(cd packages/devextreme-cli && npm version ${{ github.event.inputs.version }} --no-git-tag-version)
55+
(cd packages/devextreme-schematics && npm version "$NEW_VERSION" --no-git-tag-version)
56+
npm version "$NEW_VERSION" --no-git-tag-version
57+
git add -A
58+
git commit -m "$NEW_VERSION"
59+
git tag "$NEW_VERSION"
5760
git push -f --follow-tags --no-verify --atomic origin master
58-
npx --no-install lerna publish from-git -y
61+
pnpm --filter './packages/*' publish --no-git-checks

.github/workflows/themebuilder.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,19 @@ jobs:
1818
- name: Get sources
1919
uses: actions/checkout@v4
2020

21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
2124
- name: Use Node.js
2225
uses: actions/setup-node@v4
2326
with:
2427
node-version: ${{ matrix.NODE }}
25-
26-
- name: Restore npm cache
27-
uses: actions/cache@v4
28-
with:
29-
path: ~/.npm
30-
key: themebuilder-${{ runner.os }}-node-${{ matrix.NODE }}-${{ hashFiles('**/package-lock.json') }}
31-
restore-keys: |
32-
themebuilder-${{ runner.os }}-node-${{ matrix.NODE }}
33-
themebuilder-${{ runner.os }}-node-
28+
cache: 'pnpm'
3429

3530
- name: Install dependencies
3631
env:
3732
PUPPETEER_SKIP_DOWNLOAD: true
38-
run: npm ci --no-audit --no-fund
33+
run: pnpm install --frozen-lockfile
3934

4035
- name: Run tests
41-
run: npm run test-themebuilder
36+
run: pnpm run test-themebuilder

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Misc
88
**/node_modules/
99
**/npm-debug.log*
10+
**/pnpm-debug.log*
1011
**/yarn-error.log*
1112
packages/devextreme-cli/testing/sandbox/
1213
packages/devextreme-cli/testing/__tests__/__diff_snapshots__/

README_DEVELOPERS.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
## Build docker image
44
```sh
5-
$ lerna run docker:build
5+
$ pnpm --filter devextreme-cli run docker:build
66
```
77

88
## Run docker image with browser
99
```sh
10-
$ lerna run docker:run
10+
$ pnpm --filter devextreme-cli run docker:run
1111
```
1212

1313
## Run tests
1414

1515
To run tests for all target frameworks, use the following command:
1616

1717
```sh
18-
$ npm run test
18+
$ pnpm run test
1919
```
2020

2121
This script creates test applications in the `testing/sandbox` folder, starts a web server for each framework, and runs the snapshot tests.
@@ -29,61 +29,61 @@ You can find test results in the following folders:
2929
## Generate Applications
3030

3131
```sh
32-
npm run create-template
32+
pnpm run create-template
3333
```
3434

3535
## Generate Applications for an Individual Framework
3636

3737
```sh
38-
npm run create-template -- -- -e angular
39-
npm run create-template -- -- -e react
40-
npm run create-template -- -- -e react-ts
41-
npm run create-template -- -- -e vue-v3
38+
pnpm run create-template -e angular
39+
pnpm run create-template -e react
40+
pnpm run create-template -e react-ts
41+
pnpm run create-template -e vue-v3
4242
```
4343

4444
## Lint Applications
4545

4646
```sh
47-
npm run lint-template
47+
pnpm run lint-template
4848
```
4949

5050
## Lint Applications for an Individual Framework
5151

5252
```sh
53-
npm run lint-template -- -- -e angular
54-
npm run lint-template -- -- -e react
55-
npm run lint-template -- -- -e react-ts
56-
npm run lint-template -- -- -e vue-v3
53+
pnpm run lint-template -e angular
54+
pnpm run lint-template -e react
55+
pnpm run lint-template -e react-ts
56+
pnpm run lint-template -e vue-v3
5757
```
5858

5959
## Test Applications
6060

6161
```sh
62-
npm run test-template
62+
pnpm run test-template
6363
```
6464

6565
## Test Applications for an Individual Framework
6666

6767
```sh
68-
npm run test-template -- -- -e angular
69-
npm run test-template -- -- -e react
70-
npm run test-template -- -- -e react-ts
71-
npm run test-template -- -- -e vue-v3
68+
pnpm run test-template -e angular
69+
pnpm run test-template -e react
70+
pnpm run test-template -e react-ts
71+
pnpm run test-template -e vue-v3
7272
```
7373

7474
## Run Tests for Existing Test Applications
7575

7676
```sh
77-
npm run test-dev
77+
pnpm run test-dev
7878
```
7979

8080
## Run Tests for an Individual Framework
8181

8282
```sh
83-
npm run test -- -- -t angular
84-
npm run test -- -- -t react
85-
npm run test -- -- -t react-ts
86-
npm run test -- -- -t vue-v3
83+
pnpm run test -t angular
84+
pnpm run test -t react
85+
pnpm run test -t react-ts
86+
pnpm run test -t vue-v3
8787
```
8888

8989
## Replace etalon
@@ -99,13 +99,13 @@ Modifying an application template directly is not recommended. Instead, generate
9999
3. Run a script that updates templates for all frameworks:
100100

101101
```sh
102-
npm run update-template
102+
pnpm run update-template
103103
```
104104

105105
... or a script that updates the template for an individual framework:
106106

107107
```sh
108-
npm run update-template -- -p angular
109-
npm run update-template -- -p react-ts
110-
npm run update-template -- -p vue-v3
108+
pnpm run update-template -p angular
109+
pnpm run update-template -p react-ts
110+
pnpm run update-template -p vue-v3
111111
```

lerna.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)