Skip to content

Commit a60bf2d

Browse files
chore: migrate to npm (#4607)
1 parent 4ada5f1 commit a60bf2d

File tree

22 files changed

+28128
-12381
lines changed

22 files changed

+28128
-12381
lines changed

.cspell.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
"**/dist/**",
114114
"**/__snapshots__/**",
115115
"**/*.tsbuildinfo",
116-
"**/yarn.lock",
117116
"**/*.png.tpl",
118117
"**/package-lock.json",
119118
"packages/*/lib/**",

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"settings": {
66
"terminal.integrated.shell.linux": "/bin/bash"
77
},
8-
"postCreateCommand": "yarn install && yarn build",
8+
"postCreateCommand": "npm install && npm run build",
99
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
1010
}

.github/CONTRIBUTING.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Table of Contents
1111
- [Your first Contribution](#your-first-contribution)
1212
- [Setup](#setup)
1313
- [Running Tests](#running-tests)
14-
- [Using yarn](#using-yarn)
1514
- [Editor Config](#editor-config)
1615
- [Dependencies](#dependencies)
1716
- [Branching Model](#branching-model)
@@ -53,71 +52,58 @@ In case you are suggesting a new feature, we will match your idea with our curre
5352
## Setup
5453

5554
- Install [Node.js](https://nodejs.org/) if you don't have it already.
56-
_Note: Node 6 or greater would be better for "best results"._
57-
- Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
58-
- `git clone <your-clone-url> && cd webpack-cli`
59-
60-
- We use [yarn](https://yarnpkg.com/lang/en/) workspaces, please install it:
55+
_Note: Node 22 or greater would be better for "best results"._
6156

62-
Read the [Installation Guide](https://yarnpkg.com/en/docs/install) on their official website for detailed instructions on how to install Yarn.
57+
- Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
6358

64-
> Using yarn is not a requirement, [npm](https://www.npmjs.com/) is included in node.
59+
- `git clone <your-clone-url> && cd webpack-cli`
6560

6661
- Install the dependencies:
6762

6863
```bash
69-
yarn install
64+
npm install
7065
```
7166

7267
- Build all the submodules before building for the first time
7368

7469
```bash
75-
yarn build
70+
npm run build
7671
```
7772

7873
> If you are a Docker and Visual Studio Code user, you can quickstart development using [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) Extension
7974
8075
## Running Tests
8176

82-
### Using yarn
83-
8477
- Run all the tests with:
8578

8679
```bash
87-
yarn test
80+
npm run test
8881
```
8982

9083
- Run CLI tests with:
9184

9285
```bash
93-
yarn test:cli
86+
npm run test:cli
9487
```
9588

9689
- Run tests of all packages:
9790

9891
```bash
99-
yarn test:packages
92+
npm run test:packages
10093
```
10194

10295
- Test a single CLI test case:
10396

10497
> Must run from root of the project
10598
10699
```bash
107-
yarn jest path/to/my-test.js
108-
```
109-
110-
- You can also install jest globally and run tests without npx:
111-
112-
```bash
113-
yarn global add jest
114100
jest path/to/my-test.js
115101
```
116102

117103
- You can run the linters:
118104

119105
```bash
120-
yarn lint
106+
npm run lint
121107
```
122108

123109
## Editor Config
@@ -128,8 +114,6 @@ The [.editorconfig](https://github.com/webpack/webpack-cli/blob/main/.editorconf
128114

129115
This is a multi-package repository and dependencies are managed using [lerna](https://lerna.js.org/)
130116

131-
> If you are adding or updating any dependency, please commit the updated `yarn.lock` file.
132-
133117
To update dependencies, import each dependency and make sure the command line build passes. The dependency should support our minimal supported node version for webpack, found in `package.json`.
134118

135119
## Branching Model
@@ -249,7 +233,7 @@ documentation.
249233

250234
## Releasing
251235

252-
Run `yarn publish:monorepo` to build all packages and bump versions, this will then get published on npm.
236+
Run `npm run publish:monorepo` to build all packages and bump versions, this will then get published on npm.
253237

254238
## Join the development
255239

.github/dependabot.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@ updates:
66
interval: daily
77
time: "04:00"
88
timezone: Europe/Berlin
9-
open-pull-requests-limit: 10
9+
open-pull-requests-limit: 20
1010
versioning-strategy: lockfile-only
11+
labels:
12+
- dependencies
1113
groups:
1214
dependencies:
1315
patterns:
1416
- "*"
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
schedule:
20+
interval: daily
21+
time: "04:00"
22+
timezone: Europe/Berlin
23+
open-pull-requests-limit: 20
24+
labels:
25+
- dependencies

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: "Checkout Repository"
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1313
- name: "Dependency Review"
14-
uses: actions/dependency-review-action@v4
14+
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2

.github/workflows/nodejs.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ jobs:
3030
webpack-version: [latest]
3131

3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3434

3535
- name: Using Node v${{ matrix.node-version }}
36-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3737
with:
3838
node-version: ${{ matrix.node-version }}
39-
cache: "yarn"
39+
cache: "npm"
4040

4141
- name: Install dependencies
42-
run: yarn --frozen-lockfile
42+
run: npm ci
4343

4444
- name: Build
45-
run: yarn build
45+
run: npm run build
4646

4747
- name: Lint
48-
run: yarn lint
48+
run: npm run lint
4949

5050
build:
5151
name: Tests and Coverage - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}, DevServer ${{ matrix.dev-server-version }} (${{ matrix.shard }})
@@ -65,31 +65,31 @@ jobs:
6565
dev-server-version: [latest]
6666

6767
steps:
68-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
6969
with:
7070
fetch-depth: 0
7171

7272
- name: Using Node v${{ matrix.node-version }}
73-
uses: actions/setup-node@v4
73+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
7474
with:
7575
node-version: ${{ matrix.node-version }}
76-
cache: "yarn"
76+
cache: "npm"
7777

78-
- uses: pnpm/action-setup@v4
78+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #4.2.0
7979
with:
8080
version: 9
8181

8282
- name: Install dependencies
83-
run: yarn --frozen-lockfile --ignore-engines --ignore-scripts
83+
run: npm ci --ignore-scripts
8484

8585
- name: Prepare environment for tests
86-
run: yarn build:ci
86+
run: npm run build:ci
8787

8888
- name: Run tests and generate coverage
89-
run: yarn test:coverage --ci --shard=${{ matrix.shard }}
89+
run: npm run test:coverage --ci --shard=${{ matrix.shard }}
9090

9191
- name: Upload coverage to Codecov
92-
uses: codecov/codecov-action@v5
92+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
9393
with:
9494
token: ${{ secrets.CODECOV_TOKEN }}
9595
verbose: true
@@ -105,24 +105,24 @@ jobs:
105105
os: [ubuntu-latest]
106106
node-version: [lts/*]
107107
steps:
108-
- uses: actions/checkout@v4
108+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
109109
with:
110110
fetch-depth: 0
111111

112112
- name: Using Node v${{ matrix.node-version }}
113-
uses: actions/setup-node@v4
113+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
114114
with:
115115
node-version: ${{ matrix.node-version }}
116-
cache: "yarn"
116+
cache: "npm"
117117

118118
- name: Install dependencies
119-
run: yarn --frozen-lockfile --ignore-engines
119+
run: npm ci
120120

121121
- name: Prepare environment for tests
122-
run: yarn build:ci
122+
run: npm run build:ci
123123

124124
- name: Run smoketests
125-
run: yarn test:smoketests
125+
run: npm run test:smoketests
126126

127127
commitlint:
128128
name: Lint Commit Messages
@@ -131,16 +131,16 @@ jobs:
131131
group: commitlint-${{ github.ref }}
132132
cancel-in-progress: true
133133
steps:
134-
- uses: actions/checkout@v4
134+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
135135
with:
136136
fetch-depth: 0
137137

138-
- uses: actions/setup-node@v4
138+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
139139
with:
140140
node-version: "lts/*"
141-
cache: "yarn"
141+
cache: "npm"
142142

143-
- run: yarn --frozen-lockfile
143+
- run: npm ci
144144

145145
- name: Validate PR commits with commitlint
146146
if: github.event_name == 'pull_request'

.github/workflows/update-docs.yml

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ node_modules
1818
test/**/node_modules
1919

2020
# Lock files
21+
yarn.lock
2122
test/**/yarn.lock
2223
test/**/package-json.lock
2324
!test/api/**/yarn.lock
@@ -40,7 +41,6 @@ lerna-debug.log
4041
.yo-rc.json
4142

4243
# package-lock file
43-
package-lock.json
4444
!test/api/**/package-lock.json
4545

4646
junit.xml

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ test/build/config/error-array/webpack.config.js
1212
test/build/config/error-mjs/syntax-error.mjs
1313
test/configtest/with-config-path/syntax-error.config.js
1414
test/build/build-errors/stats.json
15+
16+
/.nx/workspace-data

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)