Skip to content

Commit 30113f6

Browse files
chore(release): 3.0.0-rc.2
1 parent 3f4272c commit 30113f6

File tree

5 files changed

+443
-419
lines changed

5 files changed

+443
-419
lines changed

.eslintrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"ecmaVersion": 2018
44
},
55
"env": {
6-
"node": true,
76
"es6": true,
7+
"node": true,
88
"jest": true
99
},
10-
"extends": "eslint:recommended"
10+
"extends": ["eslint:recommended", "prettier"]
1111
}

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [3.0.0-rc.2](https://github.com/postcss-modules-local-by-default/compare/v3.0.0-rc.1...v3.0.0-rc.2) - 2020-10-11
7+
8+
### BREAKING CHANGE
9+
10+
- minimum supported `postcss` version is `^8.1.0`
11+
12+
### Fixes
13+
14+
- minimum supported `Node.js` version is `^10 || ^12 || >= 14`
15+
- compatibility with PostCSS 8
16+
617
## [3.0.0-rc.1](https://github.com/postcss-modules-local-by-default/compare/v3.0.0-rc.0...v3.0.0-rc.1) - 2020-09-22
718

819
### BREAKING CHANGE

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "postcss-modules-scope",
3-
"version": "3.0.0-rc.1",
3+
"version": "3.0.0-rc.2",
44
"description": "A CSS Modules transform to extract export statements from local-scope classes",
55
"main": "src/index.js",
66
"engines": {
7-
"node": ">= 10.13.0 || >= 12.13.0 || >= 14"
7+
"node": "^10 || ^12 || >= 14"
88
},
99
"scripts": {
1010
"prettier": "prettier -l --ignore-path .gitignore . \"!test/test-cases\"",
@@ -36,18 +36,19 @@
3636
},
3737
"homepage": "https://github.com/css-modules/postcss-modules-scope",
3838
"dependencies": {
39-
"postcss-selector-parser": "^6.0.3"
39+
"postcss-selector-parser": "^6.0.4"
4040
},
4141
"devDependencies": {
4242
"coveralls": "^3.1.0",
4343
"eslint": "^7.9.0",
44+
"eslint-config-prettier": "^6.12.0",
4445
"husky": "^4.3.0",
4546
"jest": "^26.4.2",
4647
"lint-staged": "^10.4.0",
47-
"postcss": "^8.0.7",
48+
"postcss": "^8.1.0",
4849
"prettier": "^2.1.2"
4950
},
5051
"peerDependencies": {
51-
"postcss": "^8.0.0"
52+
"postcss": "^8.1.0"
5253
}
5354
}

src/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const plugin = (options = {}) => {
8888

8989
return {
9090
postcssPlugin: "postcss-modules-scope",
91-
RootExit(root, { rule }) {
91+
OnceExit(root, { rule }) {
9292
const exports = Object.create(null);
9393

9494
function exportScopedName(name, rawName) {
@@ -202,7 +202,7 @@ const plugin = (options = {}) => {
202202

203203
rule.selector = traverseNode(parsedSelector.clone()).toString();
204204

205-
rule.walkDecls(/composes|compose-with/, (decl) => {
205+
rule.walkDecls(/composes|compose-with/i, (decl) => {
206206
const localNames = getSingleLocalNamesForComposes(parsedSelector);
207207
const classes = decl.value.split(/\s+/);
208208

@@ -259,12 +259,12 @@ const plugin = (options = {}) => {
259259
});
260260

261261
// Find any :local keyframes
262-
root.walkAtRules((atrule) => {
263-
if (/keyframes$/i.test(atrule.name)) {
264-
const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atrule.params);
262+
root.walkAtRules((atRule) => {
263+
if (/keyframes$/i.test(atRule.name)) {
264+
const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params);
265265

266266
if (localMatch) {
267-
atrule.params = exportScopedName(localMatch[1]);
267+
atRule.params = exportScopedName(localMatch[1]);
268268
}
269269
}
270270
});

0 commit comments

Comments
 (0)