Skip to content

Commit 7869b29

Browse files
feat: support node-sass v6.0.0 (#947)
1 parent 00a46a7 commit 7869b29

File tree

8 files changed

+22359
-4613
lines changed

8 files changed

+22359
-4613
lines changed

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

husky.config.js

-6
This file was deleted.

package-lock.json

+22,326-4,581
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+20-22
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@
3131
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
3232
"pretest": "npm run lint",
3333
"test": "npm run test:coverage",
34-
"prepare": "npm run build",
35-
"release": "standard-version",
36-
"defaults": "webpack-defaults"
34+
"prepare": "husky install && npm run build",
35+
"release": "standard-version"
3736
},
3837
"files": [
3938
"dist"
4039
],
4140
"peerDependencies": {
4241
"fibers": ">= 3.1.0",
43-
"node-sass": "^4.0.0 || ^5.0.0",
42+
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0",
4443
"sass": "^1.3.0",
4544
"webpack": "^5.0.0"
4645
},
@@ -60,41 +59,40 @@
6059
"neo-async": "^2.6.2"
6160
},
6261
"devDependencies": {
63-
"@babel/cli": "^7.12.10",
64-
"@babel/core": "^7.12.10",
65-
"@babel/preset-env": "^7.12.11",
66-
"@commitlint/cli": "^11.0.0",
67-
"@commitlint/config-conventional": "^11.0.0",
68-
"@webpack-contrib/defaults": "^6.3.0",
62+
"@babel/cli": "^7.13.16",
63+
"@babel/core": "^7.14.0",
64+
"@babel/preset-env": "^7.14.1",
65+
"@commitlint/cli": "^12.1.1",
66+
"@commitlint/config-conventional": "^12.1.1",
6967
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
7068
"babel-jest": "^26.6.3",
7169
"bootstrap": "^4.5.3",
7270
"bootstrap-sass": "^3.4.1",
7371
"cross-env": "^7.0.3",
74-
"css-loader": "^5.0.1",
72+
"css-loader": "^5.2.4",
7573
"del": "^6.0.0",
7674
"del-cli": "^3.0.1",
77-
"enhanced-resolve": "^5.5.0",
78-
"eslint": "^7.13.0",
79-
"eslint-config-prettier": "^7.1.0",
75+
"enhanced-resolve": "^5.8.0",
76+
"eslint": "^7.26.0",
77+
"eslint-config-prettier": "^8.3.0",
8078
"eslint-plugin-import": "^2.22.1",
8179
"fibers": "^5.0.0",
8280
"file-loader": "^6.2.0",
8381
"foundation-sites": "^6.6.3",
84-
"husky": "^4.3.6",
82+
"husky": "^6.0.0",
8583
"jest": "^26.6.3",
86-
"lint-staged": "^10.5.4",
84+
"lint-staged": "^11.0.0",
8785
"material-components-web": "^8.0.0",
88-
"memfs": "^3.2.0",
86+
"memfs": "^3.2.2",
8987
"node-sass": "^5.0.0",
9088
"node-sass-glob-importer": "^5.3.2",
9189
"npm-run-all": "^4.1.5",
92-
"prettier": "^2.2.1",
93-
"sass": "^1.32.0",
94-
"semver": "^7.3.4",
95-
"standard-version": "^9.1.0",
90+
"prettier": "^2.3.0",
91+
"sass": "^1.32.12",
92+
"semver": "^7.3.5",
93+
"standard-version": "^9.3.0",
9694
"style-loader": "^2.0.0",
97-
"webpack": "^5.21.2"
95+
"webpack": "^5.36.2"
9896
},
9997
"keywords": [
10098
"sass",

src/utils.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ const MODULE_REQUEST_REGEX = /^[^?]*~/;
216216
// - ~@org/
217217
// - ~@org/package
218218
// - ~@org/package/
219-
const IS_MODULE_IMPORT = /^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;
219+
const IS_MODULE_IMPORT =
220+
/^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;
220221

221222
/**
222223
* When `sass`/`node-sass` tries to resolve an import, it uses a special algorithm.

test/helpers/getCodeFromSass.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ function getCodeFromSass(testId, options) {
1616
}
1717

1818
const { implementation } = loaderOptions;
19-
const isNodeSassImplementation = loaderOptions.implementation.info.includes(
20-
"node-sass"
21-
);
19+
const isNodeSassImplementation =
20+
loaderOptions.implementation.info.includes("node-sass");
2221

2322
delete loaderOptions.implementation;
2423

0 commit comments

Comments
 (0)