Skip to content

Commit b5c4b69

Browse files
chore: migrate from npm to pnpm
1 parent 42e358e commit b5c4b69

16 files changed

Lines changed: 10376 additions & 19598 deletions

File tree

.github/workflows/applications.yml

Lines changed: 17 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,16 @@ 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+
working-directory: packages/devextreme-cli
79+
run: node ./testing/linting.js -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
7480

7581
- name: Run template tests
7682
if: ${{ matrix.OS != 'windows-latest' }}
7783
env:
7884
LAUNCH_BROWSER: true
7985
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
80-
run: npm run test-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
86+
working-directory: packages/devextreme-cli
87+
run: node ./testing/testing.js -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
8188
timeout-minutes: 40
8289

8390
- name: Archive artifacts
@@ -110,17 +117,19 @@ jobs:
110117
- name: Get sources
111118
uses: actions/checkout@v4
112119

120+
- name: Install pnpm
121+
uses: pnpm/action-setup@v4
122+
113123
- name: Set up Node.js and restore cache
114124
uses: actions/setup-node@v4
115125
with:
116126
node-version: 24
117-
cache: 'npm'
118-
cache-dependency-path: '**/package-lock.json'
127+
cache: 'pnpm'
119128

120129
- name: Install dependencies
121130
env:
122131
PUPPETEER_SKIP_DOWNLOAD: true
123-
run: npm ci --no-audit --no-fund
132+
run: pnpm install --frozen-lockfile
124133

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

.github/workflows/check-nextjs.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,48 +29,48 @@ jobs:
2929
uses: actions/setup-node@v4
3030
with:
3131
node-version: ${{ matrix.NODE }}
32-
cache: 'npm'
33-
cache-dependency-path: |
34-
package-lock.json
35-
apps/nextjs-testing/**/package-lock.json
3632

37-
- name: Determine test app directory
33+
- name: Extract create-next-app version
3834
run: |
39-
TS_PART=${{ matrix.TYPESCRIPT == true && 'ts' || 'js' }}
40-
SRC_PART=${{ matrix.SRC_DIR == true && 'src' || 'nosrc' }}
41-
ROUTER_PART=${{ matrix.APP_ROUTER == true && 'app' || 'pages' }}
42-
echo "TEST_APP_DIR=apps/nextjs-testing/${TS_PART}-${SRC_PART}-${ROUTER_PART}" >> $GITHUB_ENV
35+
NEXT_APP_VERSION=$(node -e "const versions = require('./packages/devextreme-cli/src/utility/latest-versions.js'); console.log(versions['create-next-app'])")
36+
echo "Using create-next-app version: $NEXT_APP_VERSION"
37+
echo "NEXT_APP_VERSION=$NEXT_APP_VERSION" >> $GITHUB_ENV
4338
shell: bash
4439

45-
- name: Verify committed apps are up-to-date
40+
- name: Create Next.js application
4641
run: |
47-
EXPECTED_VERSION=$(node -e "const v = require('./packages/devextreme-cli/src/utility/latest-versions.js'); console.log(v['create-next-app'])")
48-
COMMITTED_VERSION=$(node -e "const m = require('./apps/nextjs-testing/.generator-meta.json'); console.log(m['create-next-app'])")
49-
if [ "$EXPECTED_VERSION" != "$COMMITTED_VERSION" ]; then
50-
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"
52-
exit 1
53-
fi
42+
npx create-next-app@${{ env.NEXT_APP_VERSION }} test-nextjs-app \
43+
--typescript=${{ matrix.TYPESCRIPT }} \
44+
--src-dir=${{ matrix.SRC_DIR }} \
45+
--app=${{ matrix.APP_ROUTER }} \
46+
--eslint \
47+
--no-tailwind \
48+
--import-alias="@/*" \
49+
--no-git \
50+
--use-npm
5451
shell: bash
5552

56-
- name: Install devextreme-cli dependencies
57-
run: npm ci --prefix packages/devextreme-cli
58-
timeout-minutes: 5
59-
60-
- name: Install test app dependencies
61-
run: cd ${{ env.TEST_APP_DIR }} && npm ci
62-
timeout-minutes: 5
53+
- name: Add actual devExtreme-cli
54+
run: |
55+
cd test-nextjs-app
56+
npm add devextreme-cli
57+
rm -r ./node_modules/devextreme-cli/src/
58+
cp -r ../packages/devextreme-cli/src/ ./node_modules/devextreme-cli/
59+
ls ./node_modules/devextreme-cli
60+
ls ./node_modules/devextreme-cli/src
61+
shell: bash
62+
timeout-minutes: 15
6363

6464
- name: Add DevExtreme to Next.js application
6565
run: |
66-
cd ${{ env.TEST_APP_DIR }}
67-
node ../../../packages/devextreme-cli/index.js add devextreme-react
66+
cd test-nextjs-app
67+
npx devextreme-cli add devextreme-react
6868
shell: bash
6969
timeout-minutes: 15
7070

7171
- name: Verify DevExtreme dependencies in package.json
7272
run: |
73-
cd ${{ env.TEST_APP_DIR }}
73+
cd test-nextjs-app
7474
7575
if ! grep -q '"devextreme":' package.json; then
7676
echo "Error: devextreme dependency not found in package.json"
@@ -87,7 +87,7 @@ jobs:
8787

8888
- name: Build Next.js application
8989
run: |
90-
cd ${{ env.TEST_APP_DIR }}
90+
cd test-nextjs-app
9191
npm run build
9292
shell: bash
9393
timeout-minutes: 15

.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

.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 --filter devextreme-cli exec node ./testing/creating.js -e angular
39+
pnpm --filter devextreme-cli exec node ./testing/creating.js -e react
40+
pnpm --filter devextreme-cli exec node ./testing/creating.js -e react-ts
41+
pnpm --filter devextreme-cli exec node ./testing/creating.js -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 --filter devextreme-cli exec node ./testing/linting.js -e angular
54+
pnpm --filter devextreme-cli exec node ./testing/linting.js -e react
55+
pnpm --filter devextreme-cli exec node ./testing/linting.js -e react-ts
56+
pnpm --filter devextreme-cli exec node ./testing/linting.js -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 --filter devextreme-cli exec node ./testing/testing.js -e angular
69+
pnpm --filter devextreme-cli exec node ./testing/testing.js -e react
70+
pnpm --filter devextreme-cli exec node ./testing/testing.js -e react-ts
71+
pnpm --filter devextreme-cli exec node ./testing/testing.js -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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "1.14.2"
5+
"version": "1.14.2",
6+
"npmClient": "pnpm",
7+
"useWorkspaces": true
68
}

0 commit comments

Comments
 (0)