Skip to content

Commit

Permalink
chore(release): 3.0.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Sep 22, 2020
1 parent 20f0e1d commit 3f4272c
Show file tree
Hide file tree
Showing 11 changed files with 411 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"ecmaVersion": 2018
},
"env": {
"es6": true,
"node": true,
"es6": true,
"jest": true
},
"extends": "eslint:recommended"
Expand Down
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@ node_js:
- "12"
- "14"

script: yarn ci

after_success:
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
- cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js
- rm -rf ./coverage
script: yarn test && coveralls < coverage/lcov.info
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.0.0-rc.0] - 2020-09-21
## [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

### BREAKING CHANGE

- do not handle invalid syntax

## [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

### BREAKING CHANGE

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

## [2.2.0] - 2020-03-19
## 2.2.0 - 2020-03-19

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

## [2.1.1] - 2019-03-05
## 2.1.1 - 2019-03-05

### Fixed

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ npm install
npm test
```

[![Build Status](https://travis-ci.org/css-modules/postcss-modules-scope.svg?branch=master)](https://travis-ci.org/css-modules/postcss-modules-scope)

- Status: [![Build Status](https://travis-ci.org/css-modules/postcss-modules-scope.svg?branch=master)](https://travis-ci.org/css-modules/postcss-modules-scope)
- 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)
- 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)

## Development

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

## License

Expand Down
5 changes: 5 additions & 0 deletions husky.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
hooks: {
"pre-commit": "lint-staged",
},
};
4 changes: 4 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
"*.js": ["eslint --fix", "prettier --write"],
"*.{json,md,yml,css,ts}": ["prettier --write"],
};
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-modules-scope",
"version": "3.0.0-rc.0",
"version": "3.0.0-rc.1",
"description": "A CSS Modules transform to extract export statements from local-scope classes",
"main": "src/index.js",
"engines": {
Expand All @@ -10,11 +10,11 @@
"prettier": "prettier -l --ignore-path .gitignore . \"!test/test-cases\"",
"eslint": "eslint --ignore-path .gitignore .",
"lint": "yarn eslint && yarn prettier",
"test:only": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage --collectCoverageFrom=\"src/**/*\"",
"pretest": "yarn lint",
"test": "jest",
"autotest": "jest --watch",
"cover": "jest --coverage --collectCoverageFrom=\"src/**/*\"",
"ci": "yarn pretest && yarn cover",
"test": "yarn test:coverage",
"prepublishOnly": "yarn test"
},
"repository": {
Expand All @@ -39,10 +39,12 @@
"postcss-selector-parser": "^6.0.3"
},
"devDependencies": {
"cssesc": "^3.0.0",
"coveralls": "^3.1.0",
"eslint": "^7.9.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"postcss": "^8.0.3",
"lint-staged": "^10.4.0",
"postcss": "^8.0.7",
"prettier": "^2.1.2"
},
"peerDependencies": {
Expand Down
9 changes: 0 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,6 @@ const plugin = (options = {}) => {

// Find any :local classes
root.walkRules((rule) => {
if (
rule.nodes &&
rule.selector.slice(0, 2) === "--" &&
rule.selector.slice(-1) === ":"
) {
// ignore custom property set
return;
}

let parsedSelector = selectorParser().astSync(rule);

rule.selector = traverseNode(parsedSelector.clone()).toString();
Expand Down
6 changes: 6 additions & 0 deletions test/test-cases/nested-rule/expected.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:root {
--test: {
--test: foo;
--bar: 1;
}
}
6 changes: 6 additions & 0 deletions test/test-cases/nested-rule/source.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:root {
--test: {
--test: foo;
--bar: 1;
}
}
Loading

0 comments on commit 3f4272c

Please sign in to comment.