Skip to content

Commit

Permalink
Add warnings for @import
Browse files Browse the repository at this point in the history
  • Loading branch information
jathak committed Jul 12, 2024
1 parent 6a409f4 commit e70744b
Show file tree
Hide file tree
Showing 102 changed files with 2,796 additions and 29 deletions.
10 changes: 10 additions & 0 deletions spec/core_functions/meta/function_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ a {
b: true;
}

<===> same_module/through_import/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import "other";
| ^^^^^^^
'

<===>
================================================================================
<===> same_module/dash_insensitive/dash_to_underscore/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/get_function/same_module.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ a {
b: 12;
}

<===> through_import/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import "other";
| ^^^^^^^
'

<===>
================================================================================
<===> plain_css/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/get_mixin/same_module.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ a {
b: 12;
}

<===> through_import/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import "other";
| ^^^^^^^
'

<===>
================================================================================
<===> dash_insensitive/dash_to_underscore/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/global_variable_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ a {
b: true;
}

<===> same_module/through_import/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import "other";
| ^^^^^^^
'

<===>
================================================================================
<===> same_module/non_existent/input.scss
Expand Down
29 changes: 29 additions & 0 deletions spec/core_functions/meta/load_css/with.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ b {
c: configured;
}

<===> through_import/direct/warning
DEPRECATION WARNING on line 1, column 9 of _loaded.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "imported";
| ^^^^^^^^^^
'

<===>
================================================================================
<===> through_import/transitive/input.scss
Expand All @@ -187,6 +197,25 @@ b {
c: configured;
}

<===> through_import/transitive/warning
DEPRECATION WARNING on line 1, column 9 of _loaded.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "midstream";
| ^^^^^^^^^^^
'

DEPRECATION WARNING on line 1, column 9 of _midstream.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "upstream";
| ^^^^^^^^^^
'

<===>
================================================================================
<===> through_forward/bare/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/mixin_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ a {
b: true;
}

<===> same_module/through_import/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import "other";
| ^^^^^^^
'

<===>
================================================================================
<===> same_module/non_existent/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/module_functions.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ a {
d: d value;
}

<===> through_import/warning
DEPRECATION WARNING on line 1, column 9 of _used.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "imported";
| ^^^^^^^^^^
'

<===>
================================================================================
<===> core_module/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/module_mixins.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ a {
d-d: value;
}

<===> through_import/warning
DEPRECATION WARNING on line 1, column 9 of _used.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "imported";
| ^^^^^^^^^^
'

<===>
================================================================================
<===> core_module/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/module_variables.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ a {
b: ("c": c value, "d": d value, "e": e value);
}

<===> through_import/warning
DEPRECATION WARNING on line 1, column 9 of _used.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "imported";
| ^^^^^^^^^^
'

<===>
================================================================================
<===> core_module/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/core_functions/meta/variable_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ a {
b: true;
}

<===> through_import/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import "other";
| ^^^^^^^
'

<===>
================================================================================
<===> through_use/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/css/custom_properties/name_interpolation.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,13 @@ a { #{--}: b c }
a {
--: b c;
}

<===> import_nesting_use/warning
DEPRECATION WARNING on line 2, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import 'foo';
| ^^^^^
'
9 changes: 9 additions & 0 deletions spec/css/font-face.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ c {
}

<===> bubble/loaded/import/warning
DEPRECATION WARNING on line 2, column 11 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
2 | @import 'upstream';
| ^^^^^^^^^^
'

DEPRECATION WARNING: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
Expand Down
9 changes: 9 additions & 0 deletions spec/css/plain/error/statement/style_rule.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ a {@import "plain"}
> b {c: d}

<===> leading_combinator/through_import/error
DEPRECATION WARNING on line 1, column 12 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | a {@import "plain"}
| ^^^^^^^
'

Error: Top-level leading combinators aren't allowed in plain CSS.
,
1 | > b {c: d}
Expand Down
10 changes: 10 additions & 0 deletions spec/css/plain/functions.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ c {
d: a();
}

<===> defined_elsewhere/warning
DEPRECATION WARNING on line 3, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
3 | @import "plain";
| ^^^^^^^
'

<===>
================================================================================
<===> hsl/input.scss
Expand Down
10 changes: 10 additions & 0 deletions spec/css/plain/import/css_before_index.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ other {index: true}
other {
index: false;
}

<===> warning
DEPRECATION WARNING on line 1, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import 'other';
| ^^^^^^^
'
10 changes: 10 additions & 0 deletions spec/css/plain/import/in_css.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@

<===> output.css
@import "whatever";

<===> warning
DEPRECATION WARNING on line 1, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "plain";
| ^^^^^^^
'
9 changes: 9 additions & 0 deletions spec/css/plain/import/partial_conflict.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ plain {partial: true}
plain {partial: false}

<===> error
DEPRECATION WARNING on line 1, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "plain";
| ^^^^^^^
'

Error: It's not clear which file to import. Found:
_plain.css
plain.css
Expand Down
10 changes: 10 additions & 0 deletions spec/css/plain/import/sass_takes_precedence.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ other
other {
syntax: sass;
}

<===> warning
DEPRECATION WARNING on line 1, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "other";
| ^^^^^^^
'
10 changes: 10 additions & 0 deletions spec/css/plain/import/scss_takes_precedence.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ other {syntax: scss}
other {
syntax: scss;
}

<===> warning
DEPRECATION WARNING on line 1, column 9 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | @import "other";
| ^^^^^^^
'
30 changes: 30 additions & 0 deletions spec/css/plain/style_rule.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ a b {
c: d;
}

<===> nesting/through_import/one_level/warning
DEPRECATION WARNING on line 1, column 12 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | a {@import "plain"}
| ^^^^^^^
'

<===>
================================================================================
<===> nesting/through_import/two_levels/input.scss
Expand All @@ -254,6 +264,16 @@ a b {
}
}

<===> nesting/through_import/two_levels/warning
DEPRECATION WARNING on line 1, column 12 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | a {@import "plain"}
| ^^^^^^^
'

<===>
================================================================================
<===> nesting/through_import/top_level_parent/input.scss
Expand All @@ -269,6 +289,16 @@ a & {
}
}

<===> nesting/through_import/top_level_parent/warning
DEPRECATION WARNING on line 1, column 12 of input.scss:
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
,
1 | a {@import "plain"}
| ^^^^^^^
'

<===>
================================================================================
<===> top_level_parent/input.scss
Expand Down
Loading

0 comments on commit e70744b

Please sign in to comment.