Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(references): use unfiltered dictionary for reference resolution in formats #553

Merged
merged 6 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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