Skip to content

Commit 96b369e

Browse files
authored
Merge pull request #2 from webpack-contrib/master
update from master repo
2 parents 7c5cdcc + 579fc13 commit 96b369e

Some content is hidden

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

41 files changed

+34601
-17193
lines changed

.cspell.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": "0.2",
3+
"language": "en,en-gb",
4+
"words": [
5+
"pures",
6+
"icss",
7+
"styl",
8+
"nosources",
9+
"unknwon",
10+
"mycss",
11+
"memfs",
12+
"Koppers",
13+
"sokra",
14+
"plusplus",
15+
"localident",
16+
"fullhash",
17+
"requestify",
18+
"XSSI",
19+
"Requestable",
20+
"requestable",
21+
"requestify",
22+
"nourl",
23+
"stylesheet",
24+
"classname",
25+
"EACE",
26+
"UAAU",
27+
"AACZ",
28+
"MCEP",
29+
"stringifier",
30+
"Zvby",
31+
"uncnoun",
32+
"bazzy",
33+
"svars",
34+
"concat",
35+
"camelcase",
36+
"Brotli",
37+
"Contex",
38+
"vspace",
39+
"commitlint",
40+
"eslintcache"
41+
],
42+
43+
"ignorePaths": [
44+
"CHANGELOG.md",
45+
"package.json",
46+
"dist/**",
47+
"**/__snapshots__/**",
48+
"package-lock.json",
49+
"**/*.css",
50+
"**/fonts/**",
51+
"node_modules",
52+
"coverage",
53+
"*.log"
54+
]
55+
}

.github/ISSUE_TEMPLATE/BUG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ about: Something went awry and you'd like to tell us about it.
88

99
### Bug report
1010

11-
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
11+
<!-- Please ask questions on discussions or StackOverflow. -->
1212
<!-- https://github.com/webpack/webpack/discussions -->
1313
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14-
<!-- https://gitter.im/webpack/webpack -->
1514
<!-- Issues which contain questions or support requests will be closed. -->
1615

1716
### Actual Behavior

.github/ISSUE_TEMPLATE/DOCS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Documentation Is:
2020
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
2121
<!-- https://github.com/webpack/webpack/discussions -->
2222
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
23-
<!-- https://gitter.im/webpack/webpack -->
2423
<!-- Issues which contain questions or support requests will be closed. -->
2524

2625
### Your Proposal for Changes

.github/ISSUE_TEMPLATE/FEATURE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ about: Suggest an idea for this project
88

99
### Feature Proposal
1010

11-
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
11+
<!-- Please ask questions on discussions or StackOverflow. -->
1212
<!-- https://github.com/webpack/webpack/discussions -->
1313
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14-
<!-- https://gitter.im/webpack/webpack -->
1514
<!-- Issues which contain questions or support requests will be closed. -->
1615

1716
### Feature Use Case

.github/ISSUE_TEMPLATE/MODIFICATION.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ about: Would you like something work differently? Have an alternative approach?
88

99
### Modification Proposal
1010

11-
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
11+
<!-- Please ask questions on discussions or StackOverflow. -->
1212
<!-- https://github.com/webpack/webpack/discussions -->
1313
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14-
<!-- https://gitter.im/webpack/webpack -->
1514
<!-- Issues which contain questions or support requests will be closed. -->
1615

1716
### Expected Behavior / Situation

.github/ISSUE_TEMPLATE/SUPPORT.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: 🆘 Support, Help, and Advice
3-
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to https://github.com/webpack/webpack/discussions, StackOverflow or https://gitter.im/webpack/webpack.
3+
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to https://github.com/webpack/webpack/discussions or StackOverflow.
44
---
55

66
Hey there! If you need support, help, or advice then this is not the place to ask.
7-
Please visit [Discussions](https://github.com/webpack/webpack/discussions), [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
8-
or [the Webpack Gitter](https://gitter.im/webpack/webpack) instead.
7+
Please visit [GitHub Discussions](https://github.com/webpack/webpack/discussions) or [StackOverflow](https://stackoverflow.com/questions/tagged/webpack) instead.

.github/workflows/cancel.yml

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

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
- name: "Checkout Repository"
1212
uses: actions/checkout@v3
1313
- name: "Dependency Review"
14-
uses: actions/dependency-review-action@v2
14+
uses: actions/dependency-review-action@v3

.github/workflows/nodejs.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-latest]
26-
node-version: [16.x]
26+
node-version: [lts/*]
2727

2828
runs-on: ${{ matrix.os }}
2929

30+
concurrency:
31+
group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
3034
steps:
3135
- uses: actions/checkout@v3
3236
with:
@@ -56,11 +60,15 @@ jobs:
5660
strategy:
5761
matrix:
5862
os: [ubuntu-latest, windows-latest, macos-latest]
59-
node-version: [12.x, 14.x, 16.x, 18.x, 19.x]
63+
node-version: [12.x, 14.x, 16.x, 18.x, 20.x]
6064
webpack-version: [latest]
6165

6266
runs-on: ${{ matrix.os }}
6367

68+
concurrency:
69+
group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ github.ref }}
70+
cancel-in-progress: true
71+
6472
steps:
6573
- name: Setup Git
6674
if: matrix.os == 'windows-latest'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ npm-debug.log*
1414
/test/fixtures/modules/composes/composes-absolute.css
1515
/test/fixtures/import/import-file-protocol.css
1616
/test/fixtures/url/url-file-protocol.css
17+
/test/fixtures/url/many-urls.css
1718

1819
.DS_Store
1920
Thumbs.db

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,47 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [6.8.1](https://github.com/webpack-contrib/css-loader/compare/v6.8.0...v6.8.1) (2023-05-28)
6+
7+
8+
### Bug Fixes
9+
10+
* use `cause` for original errors and warnings ([#1526](https://github.com/webpack-contrib/css-loader/issues/1526)) ([ae3d8ae](https://github.com/webpack-contrib/css-loader/commit/ae3d8ae54ecb5706fe9c3449487cc8306699469f))
11+
12+
## [6.8.0](https://github.com/webpack-contrib/css-loader/compare/v6.7.4...v6.8.0) (2023-05-27)
13+
14+
15+
### Features
16+
17+
* use template literal when it possible to prevent `Maximum call stack size exceeded` ([#1525](https://github.com/webpack-contrib/css-loader/issues/1525)) ([6eb5661](https://github.com/webpack-contrib/css-loader/commit/6eb56618185e974abf339c952c263cc7b8a9a066))
18+
19+
20+
### Bug Fixes
21+
22+
* warning and error serialization ([#1523](https://github.com/webpack-contrib/css-loader/issues/1523)) ([3e52969](https://github.com/webpack-contrib/css-loader/commit/3e52969f0f6b1c9d4d16db41ebff8804b340742c))
23+
24+
### [6.7.4](https://github.com/webpack-contrib/css-loader/compare/v6.7.3...v6.7.4) (2023-05-19)
25+
26+
27+
### Bug Fixes
28+
29+
* bugs in css modules ([c3099fb](https://github.com/webpack-contrib/css-loader/commit/c3099fb0cf03927f879f911ab5f51d9edc20d871))
30+
* output warning when built-in CSS support enabled ([#1520](https://github.com/webpack-contrib/css-loader/issues/1520)) ([0700ce8](https://github.com/webpack-contrib/css-loader/commit/0700ce8cfab2f25d538eaa2309ae80e1a097a6c1))
31+
32+
### [6.7.3](https://github.com/webpack-contrib/css-loader/compare/v6.7.2...v6.7.3) (2022-12-14)
33+
34+
35+
### Bug Fixes
36+
37+
* remove `sourceURL` from emitted CSS ([#1487](https://github.com/webpack-contrib/css-loader/issues/1487)) ([962924c](https://github.com/webpack-contrib/css-loader/commit/962924c79e274be9f6f81d39eac651c1a4876bc2))
38+
39+
### [6.7.2](https://github.com/webpack-contrib/css-loader/compare/v6.7.1...v6.7.2) (2022-11-13)
40+
41+
42+
### Bug Fixes
43+
44+
* css modules generation with inline syntax ([#1480](https://github.com/webpack-contrib/css-loader/issues/1480)) ([2f4c273](https://github.com/webpack-contrib/css-loader/commit/2f4c27399fdadace5af221ae8df95a36642a377e))
45+
546
### [6.7.1](https://github.com/webpack-contrib/css-loader/compare/v6.7.0...v6.7.1) (2022-03-08)
647

748

README.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![node][node]][node-url]
1212
[![tests][tests]][tests-url]
1313
[![coverage][cover]][cover-url]
14-
[![chat][chat]][chat-url]
14+
[![discussion][discussion]][discussion-url]
1515
[![size][size]][size-url]
1616

1717
# css-loader
@@ -22,7 +22,7 @@ The `css-loader` interprets `@import` and `url()` like `import/require()` and wi
2222

2323
> **Warning**
2424
>
25-
> To use css-loader, webpack@5 is required
25+
> To use the latest version of css-loader, webpack@5 is required
2626
2727
To begin, you'll need to install `css-loader`:
2828

@@ -162,7 +162,7 @@ module.exports = {
162162
return false;
163163
}
164164

165-
// Don't handle images under root-relatve /external_images/
165+
// Don't handle images under root-relative /external_images/
166166
if (/^\/external_images\//.test(path)) {
167167
return false;
168168
}
@@ -184,9 +184,17 @@ Type:
184184
<!-- use other name to prettify since import is reserved keyword -->
185185

186186
```ts
187-
type import =
187+
type importFn =
188188
| boolean
189-
| { filter: (url: string, media: string, resourcePath: string) => boolean };
189+
| {
190+
filter: (
191+
url: string,
192+
media: string,
193+
resourcePath: string,
194+
supports?: string,
195+
layer?: string
196+
) => boolean;
197+
};
190198
```
191199

192200
Default: `true`
@@ -481,7 +489,7 @@ To import from multiple modules use multiple `composes:` rules.
481489

482490
```css
483491
:local(.className) {
484-
composes: edit hightlight from "./edit.css";
492+
composes: edit highlight from "./edit.css";
485493
composes: button from "module/button.css";
486494
composes: classFromThisModule;
487495
background: red;
@@ -693,11 +701,11 @@ Type:
693701

694702
```ts
695703
type mode =
696-
| "local"
697-
| "global"
698-
| "pure"
699-
| "icss"
700-
| ((resourcePath) => "local" | "global" | "pure" | "icss"))`
704+
| "local"
705+
| "global"
706+
| "pure"
707+
| "icss"
708+
| ((resourcePath: string) => "local" | "global" | "pure" | "icss");
701709
```
702710

703711
Default: `'local'`
@@ -1696,6 +1704,8 @@ module.exports = {
16961704
module: {
16971705
rules: [
16981706
{
1707+
// If you enable `experiments.css` or `experiments.futureDefaults`, please uncomment line below
1708+
// type: "javascript/auto",
16991709
test: /\.(sa|sc|c)ss$/i,
17001710
use: [
17011711
devMode ? "style-loader" : MiniCssExtractPlugin.loader,
@@ -2026,7 +2036,7 @@ Please take a moment to read our contributing guidelines if you haven't yet done
20262036
[tests-url]: https://github.com/webpack-contrib/css-loader/actions
20272037
[cover]: https://codecov.io/gh/webpack-contrib/css-loader/branch/master/graph/badge.svg
20282038
[cover-url]: https://codecov.io/gh/webpack-contrib/css-loader
2029-
[chat]: https://badges.gitter.im/webpack/webpack.svg
2030-
[chat-url]: https://gitter.im/webpack/webpack
2039+
[discussion]: https://img.shields.io/github/discussions/webpack/webpack
2040+
[discussion-url]: https://github.com/webpack/webpack/discussions
20312041
[size]: https://packagephobia.now.sh/badge?p=css-loader
20322042
[size-url]: https://packagephobia.now.sh/result?p=css-loader

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
"*": ["prettier --write --ignore-unknown"],
2+
"*": ["prettier --write --ignore-unknown", "cspell --no-must-find-files"],
33
"*.js": ["eslint --cache --fix"],
44
};

0 commit comments

Comments
 (0)