Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support node-sass v6.0.0 #947

Merged
merged 1 commit into from May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
6 changes: 0 additions & 6 deletions husky.config.js

This file was deleted.

26,907 changes: 22,326 additions & 4,581 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 20 additions & 22 deletions package.json
Expand Up @@ -31,16 +31,15 @@
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
"pretest": "npm run lint",
"test": "npm run test:coverage",
"prepare": "npm run build",
"release": "standard-version",
"defaults": "webpack-defaults"
"prepare": "husky install && npm run build",
"release": "standard-version"
},
"files": [
"dist"
],
"peerDependencies": {
"fibers": ">= 3.1.0",
"node-sass": "^4.0.0 || ^5.0.0",
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0",
"sass": "^1.3.0",
"webpack": "^5.0.0"
},
Expand All @@ -60,41 +59,40 @@
"neo-async": "^2.6.2"
},
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@webpack-contrib/defaults": "^6.3.0",
"@babel/cli": "^7.13.16",
"@babel/core": "^7.14.0",
"@babel/preset-env": "^7.14.1",
"@commitlint/cli": "^12.1.1",
"@commitlint/config-conventional": "^12.1.1",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^26.6.3",
"bootstrap": "^4.5.3",
"bootstrap-sass": "^3.4.1",
"cross-env": "^7.0.3",
"css-loader": "^5.0.1",
"css-loader": "^5.2.4",
"del": "^6.0.0",
"del-cli": "^3.0.1",
"enhanced-resolve": "^5.5.0",
"eslint": "^7.13.0",
"eslint-config-prettier": "^7.1.0",
"enhanced-resolve": "^5.8.0",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"fibers": "^5.0.0",
"file-loader": "^6.2.0",
"foundation-sites": "^6.6.3",
"husky": "^4.3.6",
"husky": "^6.0.0",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"lint-staged": "^11.0.0",
"material-components-web": "^8.0.0",
"memfs": "^3.2.0",
"memfs": "^3.2.2",
"node-sass": "^5.0.0",
"node-sass-glob-importer": "^5.3.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"sass": "^1.32.0",
"semver": "^7.3.4",
"standard-version": "^9.1.0",
"prettier": "^2.3.0",
"sass": "^1.32.12",
"semver": "^7.3.5",
"standard-version": "^9.3.0",
"style-loader": "^2.0.0",
"webpack": "^5.21.2"
"webpack": "^5.36.2"
},
"keywords": [
"sass",
Expand Down
3 changes: 2 additions & 1 deletion src/utils.js
Expand Up @@ -216,7 +216,8 @@ const MODULE_REQUEST_REGEX = /^[^?]*~/;
// - ~@org/
// - ~@org/package
// - ~@org/package/
const IS_MODULE_IMPORT = /^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;
const IS_MODULE_IMPORT =
/^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;

/**
* When `sass`/`node-sass` tries to resolve an import, it uses a special algorithm.
Expand Down
5 changes: 2 additions & 3 deletions test/helpers/getCodeFromSass.js
Expand Up @@ -16,9 +16,8 @@ function getCodeFromSass(testId, options) {
}

const { implementation } = loaderOptions;
const isNodeSassImplementation = loaderOptions.implementation.info.includes(
"node-sass"
);
const isNodeSassImplementation =
loaderOptions.implementation.info.includes("node-sass");

delete loaderOptions.implementation;

Expand Down