Skip to content

Commit

Permalink
fix(references): use unfiltered dictionary for reference resolution i…
Browse files Browse the repository at this point in the history
…n formats (#553)
  • Loading branch information
dbanksdesign authored Mar 24, 2021
1 parent ebfba3e commit 62c8fb8
Show file tree
Hide file tree
Showing 8 changed files with 458 additions and 19 deletions.
336 changes: 332 additions & 4 deletions __integration__/__snapshots__/customFormats.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,89 @@ exports[`integration custom formats inline custom with new args should match sna
\\"xl\\"
]
}
]
],
\\"_properties\\": {
\\"size\\": {
\\"padding\\": {
\\"small\\": {
\\"value\\": \\"0.5rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 0.5
},
\\"name\\": \\"SizePaddingSmall\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"small\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"small\\"
]
},
\\"medium\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingMedium\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"medium\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"medium\\"
]
},
\\"large\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingLarge\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"large\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"large\\"
]
},
\\"xl\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingXl\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"xl\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"xl\\"
]
}
}
}
}
},
\\"allProperties\\": [
{
Expand Down Expand Up @@ -539,7 +621,89 @@ exports[`integration custom formats inline custom with old args should match sna
\\"xl\\"
]
}
]
],
\\"_properties\\": {
\\"size\\": {
\\"padding\\": {
\\"small\\": {
\\"value\\": \\"0.5rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 0.5
},
\\"name\\": \\"SizePaddingSmall\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"small\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"small\\"
]
},
\\"medium\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingMedium\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"medium\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"medium\\"
]
},
\\"large\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingLarge\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"large\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"large\\"
]
},
\\"xl\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingXl\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"xl\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"xl\\"
]
}
}
}
}
},
\\"allProperties\\": [
{
Expand Down Expand Up @@ -961,7 +1125,89 @@ exports[`integration custom formats register custom format with new args should
\\"xl\\"
]
}
]
],
\\"_properties\\": {
\\"size\\": {
\\"padding\\": {
\\"small\\": {
\\"value\\": \\"0.5rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 0.5
},
\\"name\\": \\"SizePaddingSmall\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"small\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"small\\"
]
},
\\"medium\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingMedium\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"medium\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"medium\\"
]
},
\\"large\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingLarge\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"large\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"large\\"
]
},
\\"xl\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingXl\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"xl\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"xl\\"
]
}
}
}
}
},
\\"allProperties\\": [
{
Expand Down Expand Up @@ -1338,7 +1584,89 @@ exports[`integration custom formats register custom format with old args should
\\"xl\\"
]
}
]
],
\\"_properties\\": {
\\"size\\": {
\\"padding\\": {
\\"small\\": {
\\"value\\": \\"0.5rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 0.5
},
\\"name\\": \\"SizePaddingSmall\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"small\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"small\\"
]
},
\\"medium\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingMedium\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"medium\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"medium\\"
]
},
\\"large\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingLarge\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"large\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"large\\"
]
},
\\"xl\\": {
\\"value\\": \\"1rem\\",
\\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
\\"isSource\\": true,
\\"original\\": {
\\"value\\": 1
},
\\"name\\": \\"SizePaddingXl\\",
\\"attributes\\": {
\\"category\\": \\"size\\",
\\"type\\": \\"padding\\",
\\"item\\": \\"xl\\"
},
\\"path\\": [
\\"size\\",
\\"padding\\",
\\"xl\\"
]
}
}
}
}
},
\\"allProperties\\": [
{
Expand Down
15 changes: 15 additions & 0 deletions __integration__/__snapshots__/scss.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,21 @@ $size-padding-large: 1rem;
$size-padding-xl: 1rem;"
`;

exports[`integration scss scss/variables with filter and output references should match snapshot 1`] = `
"
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
$color-background-primary: $color-core-neutral-0 !default;
$color-background-secondary: $color-core-neutral-100;
$color-background-tertiary: $color-core-neutral-200;
$color-background-danger: $color-core-red-0;
$color-background-warning: $color-core-orange-0;
$color-background-success: $color-core-green-0;
$color-background-info: $color-core-blue-0;
$color-background-disabled: $color-background-tertiary;"
`;

exports[`integration scss scss/variables with outputReferences should match snapshot 1`] = `
"
// Do not edit directly
Expand Down
Loading

0 comments on commit 62c8fb8

Please sign in to comment.