Skip to content

Commit

Permalink
Update specs for @import/global builtins deprecations (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
jathak authored Oct 17, 2024
1 parent 4a5d254 commit d26f4ad
Show file tree
Hide file tree
Showing 185 changed files with 6,237 additions and 470 deletions.
4 changes: 2 additions & 2 deletions js-api-spec/deprecations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ describe('an error', () => {
});
});

// TODO(jathak): Disable these tests when there aren't any future deprecations.
describe('for a future deprecation,', () => {
// Excluding these tests since there aren't any future deprecations currently.
xdescribe('for a future deprecation,', () => {
let importer: Importer;
beforeEach(() => {
importer = {
Expand Down
3 changes: 2 additions & 1 deletion js-api-spec/legacy/render.node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ describe('options', () => {
});
});

describe('futureDeprecations', () => {
// Disabled since there aren't any current future deprecations
xdescribe('futureDeprecations', () => {
it('opts into future deprecation early', () => {
sandbox(dir => {
dir.write({
Expand Down
24 changes: 24 additions & 0 deletions spec/core_functions/color/adjust/global.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ a {
b: #cd0000;
}

<===> legacy/warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: adjust-color(red, $red: -50)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> non_legacy/input.scss
Expand All @@ -15,3 +27,15 @@ a {b: change-color(pink, $chroma: 0.01, $space: oklch)}
a {
b: rgb(217.7587741846, 208.8497862891, 210.1600712342);
}

<===> non_legacy/warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.change instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: change-color(pink, $chroma: 0.01, $space: oklch)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
Loading

0 comments on commit d26f4ad

Please sign in to comment.