Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit 266bb1c

Browse files
chore(release): 2.0.0
* chore(deps): update * chore: webpack-defaults * refactor: structure * refactor: code * test: more * chore: remove examples * chore: refactor `package.json` * feat: switch to `uglify-js` * docs: readme * chore(deps): update `package-lock.json` * test: fix * chore(release): 2.0.0
1 parent 4d3b3d2 commit 266bb1c

File tree

95 files changed

+12222
-8286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+12222
-8286
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"useBuiltIns": true,
77
"targets": {
8-
"node": "4.8"
8+
"node": "6.9.0"
99
},
1010
"exclude": [
1111
"transform-async-to-generator",

.circleci/config.yml

Lines changed: 48 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,32 @@ unit_tests: &unit_tests
44
- restore_cache:
55
key: dependency-cache-{{ checksum "package-lock.json" }}
66
- run:
7-
name: NPM Rebuild
8-
command: npm install
7+
name: Install Latest NPM.
8+
# npm@3 is buggy
9+
command: if [[ $(npm -v | cut -c -1) > 3 ]] ; then npm i -g npm@latest; else echo "Skip npm updating"; fi
910
- run:
10-
name: Build project.
11-
command: npm run build
11+
name: NPM Install.
12+
command: npm ci || npm i
1213
- run:
13-
name: Run unit tests.
14+
name: Run Test.
1415
command: npm run ci:test
1516
canary_tests: &canary_tests
1617
steps:
1718
- checkout
1819
- restore_cache:
1920
key: dependency-cache-{{ checksum "package-lock.json" }}
2021
- run:
21-
name: NPM Rebuild
22-
command: npm install
22+
name: Install Latest NPM.
23+
command: npm i -g npm@latest
2324
- run:
24-
name: Install Webpack Canary
25-
command: npm i --no-save webpack@next
25+
name: NPM Install.
26+
command: npm ci
2627
- run:
27-
name: Build project.
28-
command: npm run build
28+
name: Install Webpack Canary.
29+
command: npm i --no-save webpack@next
2930
- run:
30-
name: Run unit tests.
31-
command: if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test ; fi
31+
name: Run Test.
32+
command: if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test; fi
3233

3334
version: 2
3435
jobs:
@@ -40,41 +41,46 @@ jobs:
4041
- restore_cache:
4142
key: dependency-cache-{{ checksum "package-lock.json" }}
4243
- run:
43-
name: Install Dependencies
44-
command: npm install
44+
name: Install Latest NPM.
45+
command: npm i -g npm@latest
46+
- run:
47+
name: NPM Install.
48+
command: npm ci
4549
- save_cache:
4650
key: dependency-cache-{{ checksum "package-lock.json" }}
4751
paths:
4852
- ./node_modules
49-
53+
node6-latest:
54+
docker:
55+
- image: webpackcontrib/circleci-node6:latest
56+
<<: *unit_tests
5057
node8-latest:
5158
docker:
5259
- image: webpackcontrib/circleci-node8:latest
60+
<<: *unit_tests
61+
node10-latest:
62+
docker:
63+
- image: webpackcontrib/circleci-node10:latest
5364
steps:
5465
- checkout
5566
- restore_cache:
5667
key: dependency-cache-{{ checksum "package-lock.json" }}
5768
- run:
58-
name: NPM Rebuild
59-
command: npm install
69+
name: Install Latest NPM.
70+
command: npm i -g npm@latest
6071
- run:
61-
name: Run unit tests.
72+
name: NPM Install.
73+
command: npm ci
74+
- run:
75+
name: Run Test.
6276
command: npm run ci:coverage
6377
- run:
6478
name: Submit coverage data to codecov.
6579
command: bash <(curl -s https://codecov.io/bash)
6680
when: on_success
67-
node6-latest:
68-
docker:
69-
- image: webpackcontrib/circleci-node6:latest
70-
<<: *unit_tests
71-
node9-latest:
72-
docker:
73-
- image: webpackcontrib/circleci-node9:latest
74-
<<: *unit_tests
75-
node8-canary:
81+
node10-canary:
7682
docker:
77-
- image: webpackcontrib/circleci-node8:latest
83+
- image: webpackcontrib/circleci-node10:latest
7884
<<: *canary_tests
7985
analysis:
8086
docker:
@@ -84,47 +90,33 @@ jobs:
8490
- restore_cache:
8591
key: dependency-cache-{{ checksum "package-lock.json" }}
8692
- run:
87-
name: NPM Rebuild
88-
command: npm install
93+
name: Install Latest NPM.
94+
command: npm i -g npm@latest
95+
- run:
96+
name: NPM Install.
97+
command: npm ci
8998
- run:
9099
name: Run linting.
91100
command: npm run lint
92101
- run:
93-
name: Run NSP Security Check.
102+
name: Run NPM Audit.
94103
command: npm run security
95-
# - run:
96-
# name: Validate Commit Messages
97-
# command: npm run ci:lint:commits
98-
publish:
99-
docker:
100-
- image: webpackcontrib/circleci-node-base:latest
101-
steps:
102-
- checkout
103-
- restore_cache:
104-
key: dependency-cache-{{ checksum "package-lock.json" }}
105-
- run:
106-
name: NPM Rebuild
107-
command: npm install
108-
# - run:
109-
# name: Validate Commit Messages
110-
# command: npm run release:validate
111104
- run:
112-
name: Publish to NPM
113-
command: printf "noop running conventional-github-releaser"
105+
name: Validate Commit Messages.
106+
command: npm run ci:lint:commits
114107

115-
version: 2.0
116108
workflows:
117109
version: 2
118-
validate-publish:
110+
test:
119111
jobs:
120112
- dependency_cache
121-
- node6-latest:
113+
- analysis:
122114
requires:
123115
- dependency_cache
124116
filters:
125117
tags:
126118
only: /.*/
127-
- analysis:
119+
- node6-latest:
128120
requires:
129121
- dependency_cache
130122
filters:
@@ -137,26 +129,17 @@ workflows:
137129
filters:
138130
tags:
139131
only: /.*/
140-
- node9-latest:
132+
- node10-latest:
141133
requires:
142134
- analysis
143135
- node6-latest
144136
filters:
145137
tags:
146138
only: /.*/
147-
- node8-canary:
139+
- node10-canary:
148140
requires:
149141
- analysis
150142
- node6-latest
151143
filters:
152144
tags:
153145
only: /.*/
154-
- publish:
155-
requires:
156-
- node8-latest
157-
- node8-canary
158-
- node9-latest
159-
filters:
160-
branches:
161-
only:
162-
- master

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11-
[.md]
11+
[*.md]
1212
insert_final_newline = false
1313
trim_trailing_whitespace = false

.eslintrc

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

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
root: true,
3+
plugins: ['prettier'],
4+
extends: ['@webpack-contrib/eslint-config-webpack'],
5+
rules: {
6+
'prettier/prettier': [
7+
'error',
8+
{ singleQuote: true, trailingComma: 'es5', arrowParens: 'always' },
9+
],
10+
},
11+
};

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
yarn.lock -diff
1+
package-lock.json -diff
22
* text=auto
33
bin/* eol=lf
4-
package-lock.json -diff

.github/.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# These are the default owners for everything in
2+
# webpack-contrib
3+
@webpack-contrib/org-maintainers
4+
5+
# Add repository specific users / groups
6+
# below here for libs that are not maintained by the org.

.github/.github/CONTRIBUTING.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
## Contributing in @webpack-contrib
2+
3+
We'd always love contributions to further improve the webpack / webpack-contrib ecosystem!
4+
Here are the guidelines we'd like you to follow:
5+
6+
* [Questions and Problems](#question)
7+
* [Issues and Bugs](#issue)
8+
* [Feature Requests](#feature)
9+
* [Pull Request Submission Guidelines](#submit-pr)
10+
* [Commit Message Conventions](#commit)
11+
12+
### <a name="question"></a> Got a Question or Problem?
13+
14+
Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack).
15+
StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack).
16+
The issue tracker is for bug reports and feature discussions.
17+
18+
### <a name="issue"></a> Found an Issue or Bug?
19+
20+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
21+
22+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:
23+
24+
- version of Webpack used
25+
- version of the loader / plugin you are creating a bug report for
26+
- the use-case that fails
27+
28+
A minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem.
29+
30+
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
31+
32+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
33+
34+
### <a name="feature"></a> Feature Requests?
35+
36+
You can *request* a new feature by creating an issue on Github.
37+
38+
If you would like to *implement* a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project.
39+
40+
### <a name="submit-pr"></a> Pull Request Submission Guidelines
41+
42+
Before you submit your Pull Request (PR) consider the following guidelines:
43+
44+
- Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort.
45+
- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
46+
- Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored.
47+
- Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account.
48+
49+
### <a name="commit"></a> Webpack Contrib Commit Conventions
50+
51+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
52+
format that includes a **type**, a **scope** and a **subject**:
53+
54+
```
55+
<type>(<scope>): <subject>
56+
<BLANK LINE>
57+
<body>
58+
<BLANK LINE>
59+
<footer>
60+
```
61+
62+
The **header** is mandatory and the **scope** of the header is optional.
63+
64+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
65+
to read on GitHub as well as in various git tools.
66+
67+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
68+
69+
Examples:
70+
```
71+
docs(readme): update install instructions
72+
```
73+
```
74+
fix: refer to the `entrypoint` instead of the first `module`
75+
```
76+
77+
#### Revert
78+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
79+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
80+
81+
#### Type
82+
Must be one of the following:
83+
84+
* **build**: Changes that affect the build system or external dependencies (example scopes: babel, npm)
85+
* **chore**: Changes that fall outside of build / docs that do not effect source code (example scopes: package, defaults)
86+
* **ci**: Changes to our CI configuration files and scripts (example scopes: circleci, travis)
87+
* **docs**: Documentation only changes (example scopes: readme, changelog)
88+
* **feat**: A new feature
89+
* **fix**: A bug fix
90+
* **perf**: A code change that improves performance
91+
* **refactor**: A code change that neither fixes a bug nor adds a feature
92+
* **revert**: Used when reverting a committed change
93+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
94+
* **test**: Addition of or updates to Jest tests
95+
96+
#### Scope
97+
The scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.
98+
99+
#### Subject
100+
The subject contains a succinct description of the change:
101+
102+
* use the imperative, present tense: "change" not "changed" nor "changes"
103+
* don't capitalize the first letter
104+
* no dot (.) at the end
105+
106+
#### Body
107+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
108+
The body should include the motivation for the change and contrast this with previous behavior.
109+
110+
#### Footer
111+
The footer should contain any information about **Breaking Changes** and is also the place to
112+
reference GitHub issues that this commit **Closes**.
113+
114+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
115+
116+
Example
117+
118+
```
119+
BREAKING CHANGE: Updates to `Chunk.mapModules`.
120+
121+
This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
122+
Migration: see webpack/webpack#5225
123+
124+
```

.github/.github/ISSUE_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
👉🏽 Need support, advice, or help? Don't open an issue!
3+
Head to StackOverflow or https://gitter.im/webpack/webpack.
4+
5+
Hey there!
6+
7+
You arrived at this template because you felt none of the other options
8+
matched the kind of issue you'd like to report. Please use this opportunity to
9+
tell us about your particular type of issue so we can try to accomodate
10+
similar issues in the future.
11+
12+
PLEASE do note, if you're using this to report an issue already covered by the
13+
existing template types, your issue may be closed as invalid. Our issue
14+
templates contain fields that help us help you, and without that important
15+
info, we might as well be ice-skating uphill, carrying a wooly mammoth.
16+
-->

0 commit comments

Comments
 (0)