From 48bf205b6a76ea01d531839286f2add8d5fae2d7 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 11 Sep 2025 15:11:39 +0300 Subject: [PATCH 1/2] refactor: migrate on the main --- .github/CONTRIBUTING.md | 6 +++--- .github/workflows/nodejs.yml | 5 +++-- CHANGELOG.md | 2 +- README.md | 6 +++--- lerna.json | 2 +- open-bot.yml | 4 ++-- packages/README.md | 10 +++++----- packages/configtest/package.json | 2 +- packages/create-webpack-app/package.json | 2 +- packages/info/package.json | 2 +- packages/serve/README.md | 2 +- packages/serve/package.json | 2 +- packages/webpack-cli/CHANGELOG.md | 2 +- packages/webpack-cli/README.md | 2 +- packages/webpack-cli/package.json | 2 +- 15 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6a74a6b9254..67169e76245 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -122,7 +122,7 @@ In case you are suggesting a new feature, we will match your idea with our curre ## Editor Config -The [.editorconfig](https://github.com/webpack/webpack-cli/blob/master/.editorconfig) in the root should ensure consistent formatting. Please make sure you've [installed the plugin](http://editorconfig.org/#download) if your text editor needs one. +The [.editorconfig](https://github.com/webpack/webpack-cli/blob/main/.editorconfig) in the root should ensure consistent formatting. Please make sure you've [installed the plugin](http://editorconfig.org/#download) if your text editor needs one. ## Dependencies @@ -134,7 +134,7 @@ To update dependencies, import each dependency and make sure the command line bu ## Branching Model -We base our branching model on [git flow](http://nvie.com/posts/a-successful-git-branching-model/). Instead of working with a `develop` base branch, we use the `master` branch. We do it to ease the workflow a bit. However, we find that adding prefixes to the branches is useful. +We base our branching model on [git flow](http://nvie.com/posts/a-successful-git-branching-model/). Instead of working with a `develop` base branch, we use the `main` branch. We do it to ease the workflow a bit. However, we find that adding prefixes to the branches is useful. ## Naming a branch @@ -143,7 +143,7 @@ Making a branch in your fork for your contribution is helpful in the following w - It allows you to submit more than one contribution in a single PR. - It allows us to identify what your contribution is about from the branch name. -You will want to checkout the `master` branch locally before creating your new branch. +You will want to checkout the `main` branch locally before creating your new branch. There are two types of branches: diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8d45dbd7cdb..2ce7ee20e1f 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,10 +3,11 @@ name: webpack-cli on: push: branches: - - master + - main + - next pull_request: branches: - - master + - main - next permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index 549f0efa1be..a1206a939dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### BREAKING CHANGES - the minimum required Node.js version is `18.12.0` -- removed `init`, `loader` and `plugin` commands in favor [`create-webpack-app`](https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app) +- removed `init`, `loader` and `plugin` commands in favor [`create-webpack-app`](https://github.com/webpack/webpack-cli/tree/main/packages/create-webpack-app) - dropped support for `webpack-dev-server@v4` - minimum supported webpack version is `5.82.0` - The `--define-process-env-node-env` option was renamed to `--config-node-env` diff --git a/README.md b/README.md index 805b1168057..0d992060f04 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Get to know what are the available commands and arguments [here](./packages/webp ## Packages -We organize webpack CLI as a multi-package repository using [lerna](https://github.com/lerna/lerna). The main CLI logic using options, resides in [`packages/webpack-cli`](https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli), while commands supported by the CLI, has dedicated subfolders in the folder [`packages`](https://github.com/webpack/webpack-cli/tree/master/packages). +We organize webpack CLI as a multi-package repository using [lerna](https://github.com/lerna/lerna). The main CLI logic using options, resides in [`packages/webpack-cli`](https://github.com/webpack/webpack-cli/tree/main/packages/webpack-cli), while commands supported by the CLI, has dedicated subfolders in the folder [`packages`](https://github.com/webpack/webpack-cli/tree/master/packages). A summary of supported commands is described below. @@ -97,9 +97,9 @@ If you like **webpack**, please consider donating through [Open Collective](http [npm]: https://img.shields.io/npm/v/webpack-cli.svg [npm-url]: https://www.npmjs.com/package/webpack-cli -[build-status]: https://github.com/webpack/webpack-cli/workflows/webpack-cli/badge.svg?branch=master +[build-status]: https://github.com/webpack/webpack-cli/workflows/webpack-cli/badge.svg?branch=main [build-status-url]: https://github.com/webpack/webpack-cli/actions -[codecov-badge]: https://codecov.io/gh/webpack/webpack-cli/branch/master/graph/badge.svg?token=6B6NxtsZc3 +[codecov-badge]: https://codecov.io/gh/webpack/webpack-cli/branch/main/graph/badge.svg?token=6B6NxtsZc3 [codecov-url]: https://codecov.io/gh/webpack/webpack-cli [size]: https://packagephobia.com/badge?p=webpack-cli [size-url]: https://packagephobia.com/result?p=webpack-cli diff --git a/lerna.json b/lerna.json index 54f2954de52..4d0243efa8f 100644 --- a/lerna.json +++ b/lerna.json @@ -7,7 +7,7 @@ "version": { "message": "chore(release): publish new version", "conventionalCommits": true, - "allowBranch": ["master", "next"] + "allowBranch": ["main", "next"] } } } diff --git a/open-bot.yml b/open-bot.yml index 5c0b6eb7661..10f430d0388 100644 --- a/open-bot.yml +++ b/open-bot.yml @@ -224,11 +224,11 @@ rules: minimum: 1d maximum: 1w pull_request: - head_ref: "^master$" + head_ref: "^main$" permission: "read|none" actions: comment: - identifier: "head-master" + identifier: "head-main" edit: true message: |- Hi @{{pull_request.user.login}}. diff --git a/packages/README.md b/packages/README.md index f09c39d2665..58f4f39427e 100644 --- a/packages/README.md +++ b/packages/README.md @@ -13,11 +13,11 @@ This folder is the collection of those packages. ## Packages -1. [configtest](https://github.com/webpack/webpack-cli/tree/master/packages/configtest) -2. [create-webpack-app](https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app) -3. [info](https://github.com/webpack/webpack-cli/tree/master/packages/info) -4. [serve](https://github.com/webpack/webpack-cli/tree/master/packages/serve) -5. [webpack-cli](https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli) +1. [configtest](https://github.com/webpack/webpack-cli/tree/main/packages/configtest) +2. [create-webpack-app](https://github.com/webpack/webpack-cli/tree/main/packages/create-webpack-app) +3. [info](https://github.com/webpack/webpack-cli/tree/main/packages/info) +4. [serve](https://github.com/webpack/webpack-cli/tree/main/packages/serve) +5. [webpack-cli](https://github.com/webpack/webpack-cli/tree/main/packages/webpack-cli) ## Generic Installation diff --git a/packages/configtest/package.json b/packages/configtest/package.json index 477df466f3e..7a12e7a558a 100644 --- a/packages/configtest/package.json +++ b/packages/configtest/package.json @@ -2,7 +2,7 @@ "name": "@webpack-cli/configtest", "version": "3.0.1", "description": "Validate a webpack configuration.", - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/configtest", + "homepage": "https://github.com/webpack/webpack-cli/tree/main/packages/configtest", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" diff --git a/packages/create-webpack-app/package.json b/packages/create-webpack-app/package.json index f92f70588b5..9d10088ae3e 100644 --- a/packages/create-webpack-app/package.json +++ b/packages/create-webpack-app/package.json @@ -11,7 +11,7 @@ "web", "frameworks" ], - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app", + "homepage": "https://github.com/webpack/webpack-cli/tree/main/packages/create-webpack-app", "bugs": "https://github.com/webpack/webpack-cli/issues", "repository": { "type": "git", diff --git a/packages/info/package.json b/packages/info/package.json index 1a9360537d3..385271f60da 100644 --- a/packages/info/package.json +++ b/packages/info/package.json @@ -2,7 +2,7 @@ "name": "@webpack-cli/info", "version": "3.0.1", "description": "Outputs info about system and webpack config", - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/info", + "homepage": "https://github.com/webpack/webpack-cli/tree/main/packages/info", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" diff --git a/packages/serve/README.md b/packages/serve/README.md index b0a0a45073f..6f1d4807e5f 100644 --- a/packages/serve/README.md +++ b/packages/serve/README.md @@ -26,7 +26,7 @@ npx webpack-cli serve ### Options -Checkout [`SERVE-OPTIONS-v4.md`](https://github.com/webpack/webpack-cli/blob/master/SERVE-OPTIONS-v4.md) or [`SERVE-OPTIONS-v5.md`](https://github.com/webpack/webpack-cli/blob/master/SERVE-OPTIONS-v5.md) to see list of all available options for `serve` command for respective [`webpack-dev-server`](https://github.com/webpack/webpack-dev-server) version. +Checkout [`SERVE-OPTIONS-v4.md`](https://github.com/webpack/webpack-cli/blob/main/SERVE-OPTIONS-v4.md) or [`SERVE-OPTIONS-v5.md`](https://github.com/webpack/webpack-cli/blob/main/SERVE-OPTIONS-v5.md) to see list of all available options for `serve` command for respective [`webpack-dev-server`](https://github.com/webpack/webpack-dev-server) version. [downloads]: https://img.shields.io/npm/dm/@webpack-cli/serve.svg [downloads-url]: https://www.npmjs.com/package/@webpack-cli/serve diff --git a/packages/serve/package.json b/packages/serve/package.json index 67ce8e62369..dcb2c407ad4 100644 --- a/packages/serve/package.json +++ b/packages/serve/package.json @@ -3,7 +3,7 @@ "version": "3.0.1", "description": "", "keywords": [], - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/serve", + "homepage": "https://github.com/webpack/webpack-cli/tree/main/packages/serve", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" diff --git a/packages/webpack-cli/CHANGELOG.md b/packages/webpack-cli/CHANGELOG.md index f95580cfa48..d0f05f37288 100644 --- a/packages/webpack-cli/CHANGELOG.md +++ b/packages/webpack-cli/CHANGELOG.md @@ -14,7 +14,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### BREAKING CHANGES - the minimum required Node.js version is `18.12.0` -- removed `init`, `loader` and `plugin` commands in favor [`create-webpack-app`](https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app) +- removed `init`, `loader` and `plugin` commands in favor [`create-webpack-app`](https://github.com/webpack/webpack-cli/tree/main/packages/create-webpack-app) - dropped support for `webpack-dev-server@v4` - minimum supported webpack version is `5.82.0` diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 42d2b0bcf52..780b42df8be 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -110,7 +110,7 @@ Global options: -h, --help [verbose] Display help for commands and options. ``` -Checkout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md) to see list of all available options. +Checkout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/main/OPTIONS.md) to see list of all available options. ## Exit codes and their meanings diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index 68b9028c414..30c172a0529 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -10,7 +10,7 @@ "bundler", "web" ], - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli", + "homepage": "https://github.com/webpack/webpack-cli/tree/main/packages/webpack-cli", "bugs": "https://github.com/webpack/webpack-cli/issues", "repository": { "type": "git", From 45cf8599a0bff9895af824bbc0a36073b2f7cd2f Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 11 Sep 2025 15:14:00 +0300 Subject: [PATCH 2/2] docs: avoid using branches directly --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d992060f04..545f83676c6 100644 --- a/README.md +++ b/README.md @@ -97,9 +97,9 @@ If you like **webpack**, please consider donating through [Open Collective](http [npm]: https://img.shields.io/npm/v/webpack-cli.svg [npm-url]: https://www.npmjs.com/package/webpack-cli -[build-status]: https://github.com/webpack/webpack-cli/workflows/webpack-cli/badge.svg?branch=main +[build-status]: https://github.com/webpack/webpack-cli/workflows/webpack-cli/badge.svg [build-status-url]: https://github.com/webpack/webpack-cli/actions -[codecov-badge]: https://codecov.io/gh/webpack/webpack-cli/branch/main/graph/badge.svg?token=6B6NxtsZc3 +[codecov-badge]: https://codecov.io/gh/webpack/webpack-cli/graph/badge.svg?token=mDP3mQJNnn [codecov-url]: https://codecov.io/gh/webpack/webpack-cli [size]: https://packagephobia.com/badge?p=webpack-cli [size-url]: https://packagephobia.com/result?p=webpack-cli