Skip to content

Commit b0514f2

Browse files
chore(release): 4.0.0-rc.2 (#12)
1 parent ad53000 commit b0514f2

8 files changed

+384
-160
lines changed

.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

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
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+
## [4.0.0-rc.2](https://github.com/postcss-modules-local-by-default/compare/v4.0.0-rc.1...v4.0.0-rc.2) - 2020-09-22
7+
8+
### Fixes
9+
10+
- avoid using `postcss` directly to create decls and rules
11+
612
## [4.0.0-rc.1](https://github.com/postcss-modules-local-by-default/compare/v4.0.0-rc.0...v4.0.0-rc.1) - 2020-09-22
713

814
### BREAKING CHANGE

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ Note also you can _import_ multiple values at once but can only _define_ one val
6565
@value a: b, c: d; /* defines a as "b, c: d" */
6666
```
6767

68-
### Justification
69-
70-
See [this PR](https://github.com/css-modules/css-modules-loader-core/pull/28) for more background
71-
7268
## License
7369

7470
ISC

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-modules-values",
3-
"version": "4.0.0-rc.1",
3+
"version": "4.0.0-rc.2",
44
"description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files",
55
"main": "src/index.js",
66
"files": [
@@ -13,12 +13,11 @@
1313
"prettier": "prettier -l --ignore-path .gitignore .",
1414
"eslint": "eslint --ignore-path .gitignore .",
1515
"lint": "yarn eslint && yarn prettier",
16-
"pretest": "yarn lint",
17-
"test": "jest",
1816
"test:only": "jest",
1917
"test:watch": "jest --watch",
2018
"test:coverage": "jest --coverage --collectCoverageFrom=\"src/**/*\"",
21-
"test:ci": "yarn pretest && yarn cover",
19+
"pretest": "yarn lint",
20+
"test": "yarn test:coverage",
2221
"prepublishOnly": "yarn test"
2322
},
2423
"repository": {
@@ -37,8 +36,11 @@
3736
},
3837
"homepage": "https://github.com/css-modules/postcss-modules-values#readme",
3938
"devDependencies": {
39+
"coveralls": "^3.1.0",
4040
"eslint": "^7.9.0",
41+
"husky": "^4.3.0",
4142
"jest": "^26.4.2",
43+
"lint-staged": "^10.4.0",
4244
"postcss": "^8.0.7",
4345
"prettier": "^2.1.2"
4446
},

src/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
const postcss = require("postcss");
43
const ICSSUtils = require("icss-utils");
54

65
const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
@@ -79,7 +78,7 @@ module.exports = () => {
7978
}
8079
},
8180
},
82-
RootExit(root) {
81+
RootExit(root, postcss) {
8382
/* We want to export anything defined by now, but don't add it to the CSS yet or it well get picked up by the replacement stuff */
8483
const exportDeclarations = Object.keys(definitions).map((key) =>
8584
postcss.decl({

0 commit comments

Comments
 (0)