Skip to content

Commit

Permalink
Bump css-tree to ^1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Oct 27, 2020
1 parent a5df5d6 commit c0ea234
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## next

- Bumped [CSSTree](https://github.com/csstree/csstree) to `^1.0.0`

## 4.0.3 (March 24, 2020)

- Prevented percent sign removal in `flex`/`-ms-flex` (#410)
Expand Down
2 changes: 1 addition & 1 deletion lib/replace/Number.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
var KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
var unsafeToRemovePlusSignAfter = {
Dimension: true,
HexColor: true,
Hash: true,
Identifier: true,
Number: true,
Raw: true,
Expand Down
4 changes: 2 additions & 2 deletions lib/replace/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function compressFunction(node, item, list) {
}

item.data = {
type: 'HexColor',
type: 'Hash',
loc: node.loc,
value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])
};
Expand All @@ -465,7 +465,7 @@ function compressIdent(node, item) {
if (hex.length + 1 <= color.length) {
// replace for shorter hex value
item.data = {
type: 'HexColor',
type: 'Hash',
loc: node.loc,
value: hex
};
Expand Down
2 changes: 1 addition & 1 deletion lib/replace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var handlers = {
Number: require('./Number'),
String: require('./String'),
Url: require('./Url'),
HexColor: require('./color').compressHex,
Hash: require('./color').compressHex,
Identifier: require('./color').compressIdent,
Function: require('./color').compressFunction
};
Expand Down
2 changes: 1 addition & 1 deletion lib/restructure/4-restructShorthand.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TRBL.prototype.getValueSequence = function(declaration, count) {
}
break;

case 'HexColor': // color
case 'Hash': // color
case 'Number':
case 'Percentage':
break;
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"postpublish": "npm run gh-pages"
},
"dependencies": {
"css-tree": "1.0.0-alpha.39"
"css-tree": "^1.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.1",
Expand Down

0 comments on commit c0ea234

Please sign in to comment.