Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 073b588

Browse files
michael-ciniawskyjoshwiens
authored andcommitted
refactor: apply webpack-defaults (#102)
- Upgrades to `[email protected]` - Drops support for `node =< v4.0.0` - Sets the minimum `peerDependency` to `webpack >= 3.0.0` BREAKING CHANGE: Sets `engines` to `"node": ">= 6.9.0 || >= 8.9.0"` BREAKING CHANGE: Drops support for `webpack =< v2.0.0`
1 parent 672ba80 commit 073b588

37 files changed

+727
-96
lines changed

.babelrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"useBuiltIns": true,
7+
"targets": {
8+
"node": "6.9.0"
9+
},
10+
"exclude": [
11+
"transform-async-to-generator",
12+
"transform-regenerator"
13+
]
14+
}
15+
]
16+
],
17+
"plugins": [
18+
[
19+
"transform-object-rest-spread",
20+
{
21+
"useBuiltIns": true
22+
}
23+
]
24+
],
25+
"env": {
26+
"test": {
27+
"presets": [
28+
"env"
29+
],
30+
"plugins": [
31+
"transform-object-rest-spread"
32+
]
33+
}
34+
}
35+
}

.circleci/config.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
unit_tests: &unit_tests
2+
steps:
3+
- checkout
4+
- setup_remote_docker
5+
- restore_cache:
6+
key: dependency-cache-{{ checksum "package.json" }}
7+
- run:
8+
name: NPM Rebuild
9+
command: npm rebuild
10+
- run:
11+
name: Run unit tests.
12+
command: npm run ci:test
13+
canary_tests: &canary_tests
14+
steps:
15+
- checkout
16+
- setup_remote_docker
17+
- restore_cache:
18+
key: dependency-cache-{{ checksum "package.json" }}
19+
- run:
20+
name: NPM Rebuild
21+
command: npm rebuild
22+
- run:
23+
name: Install Webpack Canary
24+
command: npm i --no-save webpack@next
25+
- run:
26+
name: Run unit tests.
27+
command: npm run ci:test
28+
29+
version: 2
30+
jobs:
31+
dependency_cache:
32+
docker:
33+
- image: webpackcontrib/circleci-node-base:latest
34+
steps:
35+
- checkout
36+
- setup_remote_docker
37+
- restore_cache:
38+
key: dependency-cache-{{ checksum "package.json" }}
39+
- run:
40+
name: Install Dependencies
41+
command: npm install
42+
- save_cache:
43+
key: dependency-cache-{{ checksum "package.json" }}
44+
paths:
45+
- ./node_modules
46+
47+
node8_webpack_latest:
48+
docker:
49+
- image: webpackcontrib/circleci-node8:latest
50+
steps:
51+
- checkout
52+
- setup_remote_docker
53+
- restore_cache:
54+
key: dependency-cache-{{ checksum "package.json" }}
55+
- run:
56+
name: NPM Rebuild
57+
command: npm rebuild
58+
- run:
59+
name: Run unit tests.
60+
command: npm run ci:coverage
61+
- run:
62+
name: Submit coverage data to codecov.
63+
command: bash <(curl -s https://codecov.io/bash)
64+
when: on_success
65+
node6_webpack_latest:
66+
docker:
67+
- image: webpackcontrib/circleci-node6:latest
68+
<<: *unit_tests
69+
node9_webpack_latest:
70+
docker:
71+
- image: webpackcontrib/circleci-node9:latest
72+
<<: *unit_tests
73+
node8_webpack_canary:
74+
docker:
75+
- image: webpackcontrib/circleci-node8:latest
76+
<<: *canary_tests
77+
analysis:
78+
docker:
79+
- image: webpackcontrib/circleci-node-base:latest
80+
steps:
81+
- checkout
82+
- setup_remote_docker
83+
- restore_cache:
84+
key: dependency-cache-{{ checksum "package.json" }}
85+
- run:
86+
name: NPM Rebuild
87+
command: npm rebuild
88+
- run:
89+
name: Run linting.
90+
command: npm run lint
91+
- run:
92+
name: Run NSP Security Check.
93+
command: npm run security
94+
- run:
95+
name: Validate Commit Messages
96+
command: npm run ci:lint:commits
97+
publish:
98+
docker:
99+
- image: webpackcontrib/circleci-node-base:latest
100+
steps:
101+
- checkout
102+
- setup_remote_docker
103+
- restore_cache:
104+
key: dependency-cache-{{ checksum "package.json" }}
105+
- run:
106+
name: NPM Rebuild
107+
command: npm rebuild
108+
- run:
109+
name: Validate Commit Messages
110+
command: npm run release:validate
111+
- run:
112+
name: Publish to NPM
113+
command: printf "noop running conventional-github-releaser"
114+
115+
version: 2.0
116+
workflows:
117+
version: 2
118+
validate-publish:
119+
jobs:
120+
- dependency_cache
121+
- node6_webpack_latest:
122+
requires:
123+
- dependency_cache
124+
filters:
125+
tags:
126+
only: /.*/
127+
- node8_webpack_latest:
128+
requires:
129+
- dependency_cache
130+
filters:
131+
tags:
132+
only: /.*/
133+
- node9_webpack_latest:
134+
requires:
135+
- dependency_cache
136+
filters:
137+
tags:
138+
only: /.*/
139+
- node8_webpack_canary:
140+
requires:
141+
- dependency_cache
142+
filters:
143+
tags:
144+
only: /.*/
145+
- analysis:
146+
requires:
147+
- node6_webpack_latest
148+
- node8_webpack_latest
149+
- node9_webpack_latest
150+
filters:
151+
tags:
152+
only: /.*/
153+
- publish:
154+
requires:
155+
- node6_webpack_latest
156+
- node8_webpack_latest
157+
- node9_webpack_latest
158+
- analysis
159+
filters:
160+
branches:
161+
only:
162+
- master

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[.md]
12+
insert_final_newline = false
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/dist

.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package-lock.json -diff
2+
* text=auto
3+
bin/* eol=lf

.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/ISSUE_TEMPLATE.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
<!-- Before creating an issue please make sure you are using the latest version of url-loader. -->
1+
<!--
2+
1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).
3+
2. If the issue is still there, write a minimal project showing the problem and expected output.
4+
3. Link to the project and mention Node version and OS in your report.
25
3-
**Do you want to request a *feature* or report a *bug*?**
4-
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). Questions will be closed. -->
5-
6-
**What is the current behavior?**
7-
8-
**If the current behavior is a bug, please provide the steps to reproduce.**
9-
<!-- A great way to do this is to provide your configuration via a GitHub gist. -->
10-
11-
**What is the expected behavior?**
12-
13-
**If this is a feature request, what is motivation or use case for changing the behavior?**
14-
15-
**Please mention other relevant information such as your webpack version, Node.js version and Operating System.**
6+
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
7+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
2-
3-
**What kind of change does this PR introduce?**
4-
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->
5-
6-
**Did you add tests for your changes?**
7-
8-
**If relevant, did you update the README?**
9-
10-
**Summary**
11-
12-
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
13-
<!-- Try to link to an open issue for more information. -->
14-
15-
**Does this PR introduce a breaking change?**
16-
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->
17-
18-
**Other information**
1+
<!--
2+
1. [Read and sign the CLA](https://cla.js.foundation/webpack/webpack.js.org). This needs to be done only once. PRs that haven't signed it won't be accepted.
3+
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
4+
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
5+
-->

.gitignore

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
node_modules
1+
node_modules
2+
logs
3+
*.log
4+
npm-debug.log*
5+
.eslintcache
6+
/coverage
7+
/dist
8+
/local
9+
/reports
10+
/node_modules
11+
.DS_Store
12+
Thumbs.db
13+
.idea
14+
.vscode
15+
*.sublime-project
16+
*.sublime-workspace

0 commit comments

Comments
 (0)