Skip to content

Commit f78eceb

Browse files
chore: update webpack-default
1 parent 6d5c11e commit f78eceb

File tree

5 files changed

+130
-151
lines changed

5 files changed

+130
-151
lines changed

.circleci/config.yml

+119-130
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,145 @@
11
unit_tests: &unit_tests
22
steps:
3-
- checkout
4-
- restore_cache:
5-
key: dependency-cache-{{ checksum "package-lock.json" }}
6-
- run:
7-
name: NPM Rebuild
8-
command: npm install
9-
- run:
10-
name: Run unit tests.
11-
command: npm run ci:test
12-
canary_tests: &canary_tests
13-
steps:
14-
- checkout
15-
- restore_cache:
16-
key: dependency-cache-{{ checksum "package-lock.json" }}
17-
- run:
18-
name: NPM Rebuild
19-
command: npm install
20-
- run:
21-
name: Install Webpack Canary
22-
command: npm i --no-save webpack@next
23-
- run:
24-
name: Run unit tests.
25-
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
26-
27-
version: 2
28-
jobs:
29-
dependency_cache:
30-
docker:
31-
- image: webpackcontrib/circleci-node-base:latest
32-
steps:
333
- checkout
344
- restore_cache:
355
key: dependency-cache-{{ checksum "package-lock.json" }}
366
- run:
37-
name: Install Dependencies
38-
command: npm install
39-
- save_cache:
40-
key: dependency-cache-{{ checksum "package-lock.json" }}
41-
paths:
42-
- ./node_modules
43-
44-
node8-latest:
45-
docker:
46-
- image: webpackcontrib/circleci-node8:latest
47-
steps:
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
10+
- run:
11+
name: NPM Install.
12+
command: npm ci || npm i
13+
- run:
14+
name: Run Test.
15+
command: npm run ci:test
16+
canary_tests: &canary_tests
17+
steps:
4818
- checkout
4919
- restore_cache:
5020
key: dependency-cache-{{ checksum "package-lock.json" }}
5121
- run:
52-
name: NPM Rebuild
53-
command: npm install
22+
name: Install Latest NPM.
23+
command: npm i -g npm@latest
5424
- run:
55-
name: Run unit tests.
56-
command: npm run ci:coverage
25+
name: NPM Install.
26+
command: npm ci
5727
- run:
58-
name: Submit coverage data to codecov.
59-
command: bash <(curl -s https://codecov.io/bash)
60-
when: on_success
28+
name: Install Webpack Canary.
29+
command: npm i --no-save webpack@next
30+
- run:
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
33+
34+
version: 2
35+
jobs:
36+
dependency_cache:
37+
docker:
38+
- image: webpackcontrib/circleci-node-base:latest
39+
steps:
40+
- checkout
41+
- restore_cache:
42+
key: dependency-cache-{{ checksum "package-lock.json" }}
43+
- run:
44+
name: Install Latest NPM.
45+
command: npm i -g npm@latest
46+
- run:
47+
name: NPM Install.
48+
command: npm ci
49+
- save_cache:
50+
key: dependency-cache-{{ checksum "package-lock.json" }}
51+
paths:
52+
- ./node_modules
6153
node6-latest:
6254
docker:
63-
- image: webpackcontrib/circleci-node6:latest
55+
- image: webpackcontrib/circleci-node6:latest
6456
<<: *unit_tests
65-
node10-latest:
57+
node8-latest:
6658
docker:
67-
- image: webpackcontrib/circleci-node10:latest
59+
- image: webpackcontrib/circleci-node8:latest
6860
<<: *unit_tests
69-
node8-canary:
61+
node10-latest:
7062
docker:
71-
- image: webpackcontrib/circleci-node8:latest
63+
- image: webpackcontrib/circleci-node10:latest
64+
steps:
65+
- checkout
66+
- restore_cache:
67+
key: dependency-cache-{{ checksum "package-lock.json" }}
68+
- run:
69+
name: Install Latest NPM.
70+
command: npm i -g npm@latest
71+
- run:
72+
name: NPM Install.
73+
command: npm ci
74+
- run:
75+
name: Run Test.
76+
command: npm run ci:coverage
77+
- run:
78+
name: Submit coverage data to codecov.
79+
command: bash <(curl -s https://codecov.io/bash)
80+
when: on_success
81+
node10-canary:
82+
docker:
83+
- image: webpackcontrib/circleci-node10:latest
7284
<<: *canary_tests
7385
analysis:
7486
docker:
75-
- image: webpackcontrib/circleci-node-base:latest
87+
- image: webpackcontrib/circleci-node-base:latest
7688
steps:
77-
- checkout
78-
- restore_cache:
79-
key: dependency-cache-{{ checksum "package-lock.json" }}
80-
- run:
81-
name: NPM Rebuild
82-
command: npm install
83-
- run:
84-
name: Run linting.
85-
command: npm run lint
86-
- run:
87-
name: Run NSP Security Check.
88-
command: npm run security
89-
- run:
90-
name: Validate Commit Messages
91-
command: npm run ci:lint:commits
92-
publish:
93-
docker:
94-
- image: webpackcontrib/circleci-node-base:latest
95-
steps:
96-
- checkout
97-
- restore_cache:
98-
key: dependency-cache-{{ checksum "package-lock.json" }}
99-
- run:
100-
name: NPM Rebuild
101-
command: npm install
102-
# - run:
103-
# name: Validate Commit Messages
104-
# command: npm run release:validate
105-
- run:
106-
name: Publish to NPM
107-
command: printf "noop running conventional-github-releaser"
89+
- checkout
90+
- restore_cache:
91+
key: dependency-cache-{{ checksum "package-lock.json" }}
92+
- run:
93+
name: Install Latest NPM.
94+
command: npm i -g npm@latest
95+
- run:
96+
name: NPM Install.
97+
command: npm ci
98+
- run:
99+
name: Run linting.
100+
command: npm run lint
101+
- run:
102+
name: Run NPM Audit.
103+
command: npm run security
104+
- run:
105+
name: Validate Commit Messages.
106+
command: npm run ci:lint:commits
108107

109-
version: 2.0
110108
workflows:
111109
version: 2
112-
validate-publish:
110+
test:
113111
jobs:
114-
- dependency_cache
115-
- node6-latest:
116-
requires:
117-
- dependency_cache
118-
filters:
119-
tags:
120-
only: /.*/
121-
- analysis:
122-
requires:
123-
- dependency_cache
124-
filters:
125-
tags:
126-
only: /.*/
127-
- node8-latest:
128-
requires:
129-
- analysis
130-
- node6-latest
131-
filters:
132-
tags:
133-
only: /.*/
134-
- node10-latest:
135-
requires:
136-
- analysis
137-
- node6-latest
138-
filters:
139-
tags:
140-
only: /.*/
141-
- node8-canary:
142-
requires:
143-
- analysis
144-
- node6-latest
145-
filters:
146-
tags:
147-
only: /.*/
148-
- publish:
149-
requires:
150-
- node8-latest
151-
- node8-canary
152-
- node10-latest
153-
filters:
154-
branches:
155-
only:
156-
- master
112+
- dependency_cache
113+
- analysis:
114+
requires:
115+
- dependency_cache
116+
filters:
117+
tags:
118+
only: /.*/
119+
- node6-latest:
120+
requires:
121+
- dependency_cache
122+
filters:
123+
tags:
124+
only: /.*/
125+
- node8-latest:
126+
requires:
127+
- analysis
128+
- node6-latest
129+
filters:
130+
tags:
131+
only: /.*/
132+
- node10-latest:
133+
requires:
134+
- analysis
135+
- node6-latest
136+
filters:
137+
tags:
138+
only: /.*/
139+
- node10-canary:
140+
requires:
141+
- analysis
142+
- node6-latest
143+
filters:
144+
tags:
145+
only: /.*/

.editorconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
12-
insert_final_newline = false
13-
trim_trailing_whitespace = false
12+
insert_final_newline = true
13+
trim_trailing_whitespace = false

appveyor.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ branches:
44
- next
55
init:
66
- git config --global core.autocrlf input
7+
cache:
8+
- node_modules
9+
- '%APPDATA%\npm-cache'
710
environment:
811
matrix:
912
- nodejs_version: '10'
@@ -24,12 +27,12 @@ matrix:
2427
install:
2528
- ps: Install-Product node $env:nodejs_version x64
2629
- npm i -g npm@latest
27-
- npm install
30+
- npm ci
2831
- npm i -g @webpack-contrib/tag-versions
2932
before_test:
3033
- cmd: npm install webpack@%webpack_version%
3134
test_script:
3235
- node --version
3336
- npm --version
3437
- cmd: FOR /F %%I in ('compver --name webpack --gte %webpack_version% --lt latest') do SET COMPARED_VERSION_RESULT=%%I
35-
- cmd: IF %COMPARED_VERSION_RESULT% NEQ -1 (npm run ci:%job_part%) ELSE (ECHO "Next is older than Latest - Skipping Canary Suite")
38+
- cmd: IF %COMPARED_VERSION_RESULT% NEQ -1 (npm run ci:%job_part%) ELSE (ECHO "Next is older than Latest - Skipping Canary Suite")

codecov.yml

-10
This file was deleted.

package.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "A loader for webpack which transforms CSS files into JS module",
55
"license": "MIT",
6-
"repository": "https://github.com/webpack-contrib/css-loader",
6+
"repository": "webpack-contrib/css-loader",
77
"author": "Tobias Koppers @sokra",
88
"homepage": "https://github.com/webpack-contrib/css-loader",
99
"bugs": "https://github.com/webpack-contrib/css-loader/issues",
@@ -86,17 +86,14 @@
8686
"keywords": [
8787
"webpack"
8888
],
89+
"jest": {
90+
"testEnvironment": "node"
91+
},
8992
"pre-commit": "lint-staged",
9093
"lint-staged": {
9194
"*.js": [
9295
"eslint --fix",
9396
"git add"
9497
]
95-
},
96-
"jest": {
97-
"testURL": "http://localhost",
98-
"collectCoverageFrom": [
99-
"src/**/*.js"
100-
]
10198
}
10299
}

0 commit comments

Comments
 (0)