Skip to content

Commit 3f4272c

Browse files
chore(release): 3.0.0-rc.1
1 parent 20f0e1d commit 3f4272c

11 files changed

+411
-180
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"ecmaVersion": 2018
44
},
55
"env": {
6-
"es6": true,
76
"node": true,
7+
"es6": true,
88
"jest": true
99
},
1010
"extends": "eslint:recommended"

.travis.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,4 @@ node_js:
55
- "12"
66
- "14"
77

8-
script: yarn ci
9-
10-
after_success:
11-
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
12-
- cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js
13-
- rm -rf ./coverage
8+
script: yarn test && coveralls < coverage/lcov.info

CHANGELOG.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@
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.0] - 2020-09-21
6+
## [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
7+
8+
### BREAKING CHANGE
9+
10+
- do not handle invalid syntax
11+
12+
## [3.0.0-rc.0](https://github.com/postcss-modules-local-by-default/compare/v2.2.0...v3.0.0-rc.0) - 2020-09-21
713

814
### BREAKING CHANGE
915

1016
- minimum supported `Node.js` version is `>= 10.13.0 || >= 12.13.0 || >= 14`
1117
- minimum supported `postcss` version is `^8.0.3`
1218
- `postcss` was moved to `peerDependencies`, you need to install `postcss` in your project before use the plugin
1319

14-
## [2.2.0] - 2020-03-19
20+
## 2.2.0 - 2020-03-19
1521

1622
- added the `exportGlobals` option to export global classes and ids
1723

18-
## [2.1.1] - 2019-03-05
24+
## 2.1.1 - 2019-03-05
1925

2026
### Fixed
2127

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,13 @@ npm install
7777
npm test
7878
```
7979

80-
[![Build Status](https://travis-ci.org/css-modules/postcss-modules-scope.svg?branch=master)](https://travis-ci.org/css-modules/postcss-modules-scope)
81-
80+
- Status: [![Build Status](https://travis-ci.org/css-modules/postcss-modules-scope.svg?branch=master)](https://travis-ci.org/css-modules/postcss-modules-scope)
8281
- Lines: [![Coverage Status](https://coveralls.io/repos/css-modules/postcss-modules-scope/badge.svg?branch=master)](https://coveralls.io/r/css-modules/postcss-modules-scope?branch=master)
8382
- Statements: [![codecov.io](http://codecov.io/github/css-modules/postcss-modules-scope/coverage.svg?branch=master)](http://codecov.io/github/css-modules/postcss-modules-scope?branch=master)
8483

8584
## Development
8685

87-
- `npm autotest` will watch `src` and `test` for changes and run the tests, and transpile the ES6 to ES5 on success
86+
- `npm test:watch` will watch `src` and `test` for changes and run the tests
8887

8988
## License
9089

husky.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
hooks: {
3+
"pre-commit": "lint-staged",
4+
},
5+
};

lint-staged.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
"*.js": ["eslint --fix", "prettier --write"],
3+
"*.{json,md,yml,css,ts}": ["prettier --write"],
4+
};

package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-modules-scope",
3-
"version": "3.0.0-rc.0",
3+
"version": "3.0.0-rc.1",
44
"description": "A CSS Modules transform to extract export statements from local-scope classes",
55
"main": "src/index.js",
66
"engines": {
@@ -10,11 +10,11 @@
1010
"prettier": "prettier -l --ignore-path .gitignore . \"!test/test-cases\"",
1111
"eslint": "eslint --ignore-path .gitignore .",
1212
"lint": "yarn eslint && yarn prettier",
13+
"test:only": "jest",
14+
"test:watch": "jest --watch",
15+
"test:coverage": "jest --coverage --collectCoverageFrom=\"src/**/*\"",
1316
"pretest": "yarn lint",
14-
"test": "jest",
15-
"autotest": "jest --watch",
16-
"cover": "jest --coverage --collectCoverageFrom=\"src/**/*\"",
17-
"ci": "yarn pretest && yarn cover",
17+
"test": "yarn test:coverage",
1818
"prepublishOnly": "yarn test"
1919
},
2020
"repository": {
@@ -39,10 +39,12 @@
3939
"postcss-selector-parser": "^6.0.3"
4040
},
4141
"devDependencies": {
42-
"cssesc": "^3.0.0",
42+
"coveralls": "^3.1.0",
4343
"eslint": "^7.9.0",
44+
"husky": "^4.3.0",
4445
"jest": "^26.4.2",
45-
"postcss": "^8.0.3",
46+
"lint-staged": "^10.4.0",
47+
"postcss": "^8.0.7",
4648
"prettier": "^2.1.2"
4749
},
4850
"peerDependencies": {

src/index.js

-9
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,6 @@ const plugin = (options = {}) => {
198198

199199
// Find any :local classes
200200
root.walkRules((rule) => {
201-
if (
202-
rule.nodes &&
203-
rule.selector.slice(0, 2) === "--" &&
204-
rule.selector.slice(-1) === ":"
205-
) {
206-
// ignore custom property set
207-
return;
208-
}
209-
210201
let parsedSelector = selectorParser().astSync(rule);
211202

212203
rule.selector = traverseNode(parsedSelector.clone()).toString();
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:root {
2+
--test: {
3+
--test: foo;
4+
--bar: 1;
5+
}
6+
}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:root {
2+
--test: {
3+
--test: foo;
4+
--bar: 1;
5+
}
6+
}

0 commit comments

Comments
 (0)