Skip to content

Commit

Permalink
chore(release): 3.0.0-rc.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Oct 11, 2020
1 parent 3f4272c commit 30113f6
Show file tree
Hide file tree
Showing 5 changed files with 443 additions and 419 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"ecmaVersion": 2018
},
"env": {
"node": true,
"es6": true,
"node": true,
"jest": true
},
"extends": "eslint:recommended"
"extends": ["eslint:recommended", "prettier"]
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
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.2](https://github.com/postcss-modules-local-by-default/compare/v3.0.0-rc.1...v3.0.0-rc.2) - 2020-10-11

### BREAKING CHANGE

- minimum supported `postcss` version is `^8.1.0`

### Fixes

- minimum supported `Node.js` version is `^10 || ^12 || >= 14`
- compatibility with PostCSS 8

## [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
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "postcss-modules-scope",
"version": "3.0.0-rc.1",
"version": "3.0.0-rc.2",
"description": "A CSS Modules transform to extract export statements from local-scope classes",
"main": "src/index.js",
"engines": {
"node": ">= 10.13.0 || >= 12.13.0 || >= 14"
"node": "^10 || ^12 || >= 14"
},
"scripts": {
"prettier": "prettier -l --ignore-path .gitignore . \"!test/test-cases\"",
Expand Down Expand Up @@ -36,18 +36,19 @@
},
"homepage": "https://github.com/css-modules/postcss-modules-scope",
"dependencies": {
"postcss-selector-parser": "^6.0.3"
"postcss-selector-parser": "^6.0.4"
},
"devDependencies": {
"coveralls": "^3.1.0",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.12.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"lint-staged": "^10.4.0",
"postcss": "^8.0.7",
"postcss": "^8.1.0",
"prettier": "^2.1.2"
},
"peerDependencies": {
"postcss": "^8.0.0"
"postcss": "^8.1.0"
}
}
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const plugin = (options = {}) => {

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

function exportScopedName(name, rawName) {
Expand Down Expand Up @@ -202,7 +202,7 @@ const plugin = (options = {}) => {

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

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

Expand Down Expand Up @@ -259,12 +259,12 @@ const plugin = (options = {}) => {
});

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

if (localMatch) {
atrule.params = exportScopedName(localMatch[1]);
atRule.params = exportScopedName(localMatch[1]);
}
}
});
Expand Down
Loading

0 comments on commit 30113f6

Please sign in to comment.