Skip to content

Commit

Permalink
Fix @cobalt-ui/plugin-sass’ listModes
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow committed May 23, 2022
1 parent 5d458e8 commit cd82302
Show file tree
Hide file tree
Showing 5 changed files with 447 additions and 264 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-icons-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cobalt-ui/plugin-sass': patch
---

Fix listModes bug
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
},
"devDependencies": {
"@changesets/cli": "^2.22.0",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"del-cli": "^4.0.1",
"esbuild": "^0.14.31",
"eslint": "^8.12.0",
"esbuild": "^0.14.39",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"npm-run-all": "^4.1.5",
"pnpm": "^6.32.4",
"pnpm": "^7.1.3",
"prettier": "^2.6.2",
"typescript": "^4.6.3"
"typescript": "^4.6.4"
},
"volta": {
"node": "16.14.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-sass/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ${cbClose}`
@error "No token named \\"#{$tokenName}\\""${semi}
${cbClose}
$_modes: ();
@each $k in map.get($${VAR_TOKENS})${cbOpen}
@each $k in map.get($${VAR_TOKENS}, $tokenName)${cbOpen}
@if $k != "default"${cbOpen}
$_modes: list.append($_modes, $k);
${cbClose}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-sass/test/fixtures/basic/want.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $__token-typography-mixins: (
@error "No token named \"#{$tokenName}\"";
}
$_modes: ();
@each $k in map.get($__token-values) {
@each $k in map.get($__token-values, $tokenName) {
@if $k != "default" {
$_modes: list.append($_modes, $k);
}
Expand Down
Loading

0 comments on commit cd82302

Please sign in to comment.