Skip to content

Commit

Permalink
fix: 🐛 fix postcss-less parse interpolation error, updagrade postcss-…
Browse files Browse the repository at this point in the history
…less to v5.0.0

detail: shellscape/postcss-less#159
  • Loading branch information
malei0311 committed Feb 10, 2023
1 parent cf409fe commit d35b5fd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"outdent": "0.8.0",
"parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
"please-upgrade-node": "3.2.0",
"postcss-less": "3.1.4",
"postcss-less": "5.0.0",
"postcss-media-query-parser": "0.2.3",
"postcss-scss": "2.1.1",
"postcss-selector-parser": "2.2.3",
Expand Down
32 changes: 32 additions & 0 deletions tests/format/less/less/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3530,3 +3530,35 @@ printWidth: 80
================================================================================
`;
exports[`selector-interpolation.less format 1`] = `
====================================options=====================================
parsers: ["less"]
printWidth: 80
| printWidth
=====================================input======================================
/*
* deail -> https://github.com/shellscape/postcss-less/pull/159
* postcss-less v5 fix the bug
*/
@prefix: foo;
.@{prefix}-bar{
color: red;
}
=====================================output=====================================
/*
* deail -> https://github.com/shellscape/postcss-less/pull/159
* postcss-less v5 fix the bug
*/
@prefix: foo;
.@{prefix}-bar {
color: red;
}
================================================================================
`;
10 changes: 10 additions & 0 deletions tests/format/less/less/selector-interpolation.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* deail -> https://github.com/shellscape/postcss-less/pull/159
* postcss-less v5 fix the bug
*/

@prefix: foo;

.@{prefix}-bar{
color: red;
}
12 changes: 5 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5423,12 +5423,10 @@ pluralize@^8.0.0:
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==

[email protected]:
version "3.1.4"
resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-3.1.4.tgz#369f58642b5928ef898ffbc1a6e93c958304c5ad"
integrity sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==
dependencies:
postcss "^7.0.14"
[email protected]:
version "5.0.0"
resolved "https://registry.npm.alibaba-inc.com/postcss-less/download/postcss-less-5.0.0.tgz#3fa361ed8e52a9c3e6e4fdb9bb95fd9032f3c62b"
integrity sha1-P6Nh7Y5SqcPm5P25u5X9kDLzxis=

[email protected]:
version "0.2.3"
Expand Down Expand Up @@ -5460,7 +5458,7 @@ [email protected]:
indexes-of "^1.0.1"
uniq "^1.0.1"

postcss@^7.0.14, postcss@^7.0.6:
postcss@^7.0.6:
version "7.0.39"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309"
integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==
Expand Down

0 comments on commit d35b5fd

Please sign in to comment.