css-loader 4.2.2 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  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.
4
4
 
5
+ ## [4.3.0](https://github.com/webpack-contrib/css-loader/compare/v4.2.2...v4.3.0) (2020-09-08)
6
+
7
+
8
+ ### Features
9
+
10
+ * the `importLoaders` can be `string` ([#1178](https://github.com/webpack-contrib/css-loader/issues/1178)) ([ec58a7c](https://github.com/webpack-contrib/css-loader/commit/ec58a7cfda46443e35539d66b86685195fa5db03))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * line breaks in `url` function ([88b8ddc](https://github.com/webpack-contrib/css-loader/commit/88b8ddc1d78a2b6a917ed2dfe2f2a37cf6a84190))
16
+
5
17
  ### [4.2.2](https://github.com/webpack-contrib/css-loader/compare/v4.2.1...v4.2.2) (2020-08-24)
6
18
 
7
19
 
package/dist/options.json CHANGED
@@ -136,6 +136,9 @@
136
136
  {
137
137
  "type": "boolean"
138
138
  },
139
+ {
140
+ "type": "string"
141
+ },
139
142
  {
140
143
  "type": "integer"
141
144
  }
package/dist/utils.js CHANGED
@@ -97,8 +97,8 @@ function defaultGetLocalIdent(loaderContext, localIdentName, localName, options)
97
97
  function normalizeUrl(url, isStringValue) {
98
98
  let normalizedUrl = url;
99
99
 
100
- if (isStringValue && /\\[\n]/.test(normalizedUrl)) {
101
- normalizedUrl = normalizedUrl.replace(/\\[\n]/g, '');
100
+ if (isStringValue && /\\(\n|\r\n|\r|\f)/.test(normalizedUrl)) {
101
+ normalizedUrl = normalizedUrl.replace(/\\(\n|\r\n|\r|\f)/g, '');
102
102
  }
103
103
 
104
104
  if (matchNativeWin32Path.test(url)) {
@@ -223,7 +223,7 @@ function normalizeOptions(rawOptions, loaderContext) {
223
223
  // TODO remove in the next major release
224
224
  icss: typeof rawOptions.icss === 'undefined' ? false : rawOptions.icss,
225
225
  sourceMap: typeof rawOptions.sourceMap === 'boolean' ? rawOptions.sourceMap : loaderContext.sourceMap,
226
- importLoaders: rawOptions.importLoaders,
226
+ importLoaders: typeof rawOptions.importLoaders === 'string' ? parseInt(rawOptions.importLoaders, 10) : rawOptions.importLoaders,
227
227
  esModule: typeof rawOptions.esModule === 'undefined' ? true : rawOptions.esModule
228
228
  };
229
229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "css-loader",
3
- "version": "4.2.2",
3
+ "version": "4.3.0",
4
4
  "description": "css loader module for webpack",
5
5
  "license": "MIT",
6
6
  "repository": "webpack-contrib/css-loader",
@@ -53,15 +53,15 @@
53
53
  "postcss-modules-scope": "^2.2.0",
54
54
  "postcss-modules-values": "^3.0.0",
55
55
  "postcss-value-parser": "^4.1.0",
56
- "schema-utils": "^2.7.0",
56
+ "schema-utils": "^2.7.1",
57
57
  "semver": "^7.3.2"
58
58
  },
59
59
  "devDependencies": {
60
- "@babel/cli": "^7.10.5",
61
- "@babel/core": "^7.11.4",
62
- "@babel/preset-env": "^7.10.4",
63
- "@commitlint/cli": "^10.0.0",
64
- "@commitlint/config-conventional": "^10.0.0",
60
+ "@babel/cli": "^7.11.6",
61
+ "@babel/core": "^7.11.6",
62
+ "@babel/preset-env": "^7.11.5",
63
+ "@commitlint/cli": "^11.0.0",
64
+ "@commitlint/config-conventional": "^11.0.0",
65
65
  "@webpack-contrib/defaults": "^6.3.0",
66
66
  "@webpack-contrib/eslint-config-webpack": "^3.0.0",
67
67
  "babel-jest": "^26.1.0",
@@ -69,22 +69,23 @@
69
69
  "del": "^5.1.0",
70
70
  "del-cli": "^3.0.1",
71
71
  "es-check": "^5.1.0",
72
- "eslint": "^7.5.0",
72
+ "eslint": "^7.8.1",
73
73
  "eslint-config-prettier": "^6.11.0",
74
74
  "eslint-plugin-import": "^2.22.0",
75
- "file-loader": "^6.0.0",
76
- "husky": "^4.2.5",
77
- "jest": "^26.1.0",
78
- "less-loader": "^6.2.0",
79
- "lint-staged": "^10.2.11",
75
+ "file-loader": "^6.1.0",
76
+ "husky": "^4.3.0",
77
+ "jest": "^26.4.2",
78
+ "less": "^3.12.2",
79
+ "less-loader": "^7.0.1",
80
+ "lint-staged": "^10.3.0",
80
81
  "memfs": "^3.2.0",
81
- "mini-css-extract-plugin": "^0.10.0",
82
+ "mini-css-extract-plugin": "^0.11.0",
82
83
  "npm-run-all": "^4.1.5",
83
- "postcss-loader": "^3.0.0",
84
+ "postcss-loader": "^4.0.0",
84
85
  "postcss-preset-env": "^6.7.0",
85
- "prettier": "^2.0.5",
86
+ "prettier": "^2.1.1",
86
87
  "sass": "^1.26.10",
87
- "sass-loader": "^9.0.2",
88
+ "sass-loader": "^10.0.2",
88
89
  "standard-version": "^9.0.0",
89
90
  "strip-ansi": "^6.0.0",
90
91
  "style-loader": "^1.2.1",