Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack/webpack-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: [email protected]
Choose a base ref
...
head repository: webpack/webpack-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: [email protected]
Choose a head ref
Loading
Showing 408 changed files with 16,903 additions and 16,896 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:14

# Add global instances of prettier and eslint for vscode
RUN npm install -g eslint prettier
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"postCreateCommand": "yarn install && yarn bootstrap && yarn build",
"postCreateCommand": "yarn install && yarn lerna bootstrap && yarn build",
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
21 changes: 5 additions & 16 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 233

[*.js]
end_of_line = lf

[*.json]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false

[test/cases/parsing/bom/bomfile.{css,js}]
charset = utf-8-bom

[*.md]
trim_trailing_whitespace = false
87 changes: 41 additions & 46 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,46 @@
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
extends: [
"eslint:recommended",
"plugin:node/recommended",
"plugin:prettier/recommended",
"prettier",
],
parserOptions: { ecmaVersion: 2018, sourceType: "script" },
plugins: ["node"],
settings: {
root: true,
reportUnusedDisableDirectives: true,
extends: ["eslint:recommended", "plugin:node/recommended", "prettier"],
parserOptions: { ecmaVersion: 2018, sourceType: "script" },
plugins: ["node"],
settings: {
node: {
allowModules: ["@webpack-cli/generators"],
},
},
env: {
node: true,
es6: true,
jest: true,
},
rules: {
"no-process-exit": "off",
"no-template-curly-in-string": "error",
"no-caller": "error",
"no-extra-bind": "error",
"no-loop-func": "error",
"no-undef": "error",
"prefer-const": "error",
},
overrides: [
{
settings: {
node: {
allowModules: ["@webpack-cli/generators"],
tryExtensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
},
},
files: ["**/*.ts"],
extends: [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {
"node/no-unsupported-features/es-syntax": "off",
},
},
env: {
node: true,
es6: true,
jest: true,
},
rules: {
"no-process-exit": "off",
"no-template-curly-in-string": "error",
"no-caller": "error",
"no-extra-bind": "error",
"no-loop-func": "error",
"no-undef": "error",
"prefer-const": "error",
},
overrides: [
{
settings: {
node: {
tryExtensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
},
},
files: ["**/*.ts"],
extends: [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {
"node/no-unsupported-features/es-syntax": "off",
},
},
],
],
};
170 changes: 85 additions & 85 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -7,26 +7,26 @@ work is not in vain.

Table of Contents

- [Issues](#issues)
- [Your first Contribution](#your-first-contribution)
- [Setup](#setup)
- [Running Tests](#running-tests)
- [Using yarn](#using-yarn)
- [Editor Config](#editor-config)
- [Dependencies](#dependencies)
- [Branching Model](#branching-model)
- [Naming a branch](#naming-a-branch)
- [Features](#features)
- [Fixes](#fixes)
- [Testing](#testing)
- [Pull Requests](#pull-requests)
- [Submitting a good Pull Request](#submitting-a-good-pull-request)
- [Commit message](#commit-message)
- [Commit Message Format](#commit-message-format)
- [Contributor License Agreement](#contributor-license-agreement)
- [Documentation](#documentation)
- [Releasing](#releasing)
- [Join The Development](#join-the-development)
- [Issues](#issues)
- [Your first Contribution](#your-first-contribution)
- [Setup](#setup)
- [Running Tests](#running-tests)
- [Using yarn](#using-yarn)
- [Editor Config](#editor-config)
- [Dependencies](#dependencies)
- [Branching Model](#branching-model)
- [Naming a branch](#naming-a-branch)
- [Features](#features)
- [Fixes](#fixes)
- [Testing](#testing)
- [Pull Requests](#pull-requests)
- [Submitting a good Pull Request](#submitting-a-good-pull-request)
- [Commit message](#commit-message)
- [Commit Message Format](#commit-message-format)
- [Contributor License Agreement](#contributor-license-agreement)
- [Documentation](#documentation)
- [Releasing](#releasing)
- [Join The Development](#join-the-development)

## Issues

@@ -52,74 +52,74 @@ In case you are suggesting a new feature, we will match your idea with our curre

## Setup

- Install [Node.js](https://nodejs.org/) if you don't have it already.
_Note: Node 6 or greater would be better for "best results"._
- Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
- `git clone <your-clone-url> && cd webpack-cli`
- Install [Node.js](https://nodejs.org/) if you don't have it already.
_Note: Node 6 or greater would be better for "best results"._
- Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli).
- `git clone <your-clone-url> && cd webpack-cli`

- We use [yarn](https://yarnpkg.com/lang/en/) workspaces, please install it:
- We use [yarn](https://yarnpkg.com/lang/en/) workspaces, please install it:

Read the [Installation Guide](https://yarnpkg.com/en/docs/install) on their official website for detailed instructions on how to install Yarn.
Read the [Installation Guide](https://yarnpkg.com/en/docs/install) on their official website for detailed instructions on how to install Yarn.

> Using yarn is not a requirement, [npm](https://www.npmjs.com/) is included in node.
- Install the dependencies:
- Install the dependencies:

```bash
yarn install
```
```bash
yarn install
```

- Bootstrap all the submodules before building for the first time
- Bootstrap all the submodules before building for the first time

```bash
yarn lerna bootstrap
yarn build
```
```bash
yarn lerna bootstrap
yarn build
```

> 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
## Running Tests

### Using yarn

- Run all the tests with:
- Run all the tests with:

```bash
yarn test
```
```bash
yarn test
```

- Run CLI tests with:
- Run CLI tests with:

```bash
yarn test:cli
```
```bash
yarn test:cli
```

- Run tests of all packages:
- Run tests of all packages:

```bash
yarn test:packages
```
```bash
yarn test:packages
```

- Test a single CLI test case:
- Test a single CLI test case:

> Must run from root of the project
> Must run from root of the project
```bash
yarn jest path/to/my-test.js
```
```bash
yarn jest path/to/my-test.js
```

- You can also install jest globally and run tests without npx:
- You can also install jest globally and run tests without npx:

```bash
yarn global add jest
jest path/to/my-test.js
```
```bash
yarn global add jest
jest path/to/my-test.js
```

- You can run the linters:
- You can run the linters:

```bash
yarn lint
```
```bash
yarn lint
```

## Editor Config

@@ -139,15 +139,15 @@ We base our branching model on [git flow](http://nvie.com/posts/a-successful-git

Making a branch in your fork for your contribution is helpful in the following ways:

- 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.
- 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.

There are two types of branches:

- Feature
- Bugfix
- Feature
- Bugfix

### Features

@@ -178,12 +178,12 @@ In case you've got a small change in most of the cases, your pull request would

## Submitting a good Pull Request

- Write tests.
- Follow the existing coding style.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
- For a major bugfix/feature make sure your PR has an issue and if it doesn't, please create one. This would help discussion with the community, and polishing ideas in case of a new feature.
- Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. ([More info](https://github.com/blog/1506-closing-issues-via-pull-requests))
- When you have lot of commits in your PR, it's good practice to squash all your commits in one single commit. ([Learn how to squash here](https://davidwalsh.name/squash-commits-git))
- Write tests.
- Follow the existing coding style.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
- For a major bugfix/feature make sure your PR has an issue and if it doesn't, please create one. This would help discussion with the community, and polishing ideas in case of a new feature.
- Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. ([More info](https://github.com/blog/1506-closing-issues-via-pull-requests))
- When you have lot of commits in your PR, it's good practice to squash all your commits in one single commit. ([Learn how to squash here](https://davidwalsh.name/squash-commits-git))

## Commit message

@@ -206,17 +206,17 @@ format that includes a **type** and a **subject**:

This is the list of _type_ of commits that we accept:

- **build** : Changes that affect the build system or external dependencies (example scopes: typescript, webpack, npm).
- **chore** : Updating deps, docs, linting, etc.
- **ci** : Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- **docs** : Documentation only changes.
- **feat** : A new feature.
- **fix** : A bug fix.
- **perf** : A code change that improves performance.
- **refactor** : A code change that neither fixes a bug nor adds a feature.
- **revert** : Reverts the previous commit.
- **style** : Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
- **test** : Adding missing tests or correcting existing tests.
- **build** : Changes that affect the build system or external dependencies (example scopes: typescript, webpack, npm).
- **chore** : Updating deps, docs, linting, etc.
- **ci** : Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- **docs** : Documentation only changes.
- **feat** : A new feature.
- **fix** : A bug fix.
- **perf** : A code change that improves performance.
- **refactor** : A code change that neither fixes a bug nor adds a feature.
- **revert** : Reverts the previous commit.
- **style** : Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
- **test** : Adding missing tests or correcting existing tests.

The **header** is mandatory.

@@ -252,8 +252,8 @@ Run `yarn publish:monorepo` to build all packages and bump versions, this will t

## Join the development

- Before you join development, please set up the project on your local machine, run it and go through the application completely. Use any command you can find and see what it does. Explore.
- Before you join development, please set up the project on your local machine, run it and go through the application completely. Use any command you can find and see what it does. Explore.

> Don't worry ... Nothing will happen to the project or to you due to the exploring. Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the project.
> Don't worry ... Nothing will happen to the project or to you due to the exploring. Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the project.
- If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please feel free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely.
- If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please feel free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ Steps to reproduce the behavior:

<!-- If applicable, add screenshots to help explain your problem. -->

**Please paste the results of `webpack-cli info` here, and mention other relevant information**
**Please paste the results of `npx webpack-cli info` here, and mention other relevant information**

**Additional context**

Loading