File tree Expand file tree Collapse file tree 6 files changed +31
-3
lines changed Expand file tree Collapse file tree 6 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1+ ## 1.62.0
2+
3+ * Deprecate the use of multiple ` !global ` or ` !default ` flags on the same
4+ variable. This deprecation is named ` duplicate-var-flags ` .
5+
16## 1.61.0
27
38* ** Potentially breaking change:** Drop support for End-of-Life Node.js 12.
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ enum Deprecation {
5454 deprecatedIn: '1.56.0' ,
5555 description: 'Passing invalid units to built-in functions.' ),
5656
57+ duplicateVariableFlags ('duplicate-var-flags' ,
58+ deprecatedIn: '1.62.0' ,
59+ description:
60+ 'Using !default or !global multiple times for one variable.' ),
61+
5762 /// Deprecation for `@import` rules.
5863 import.future ('import' , description: '@import rules.' ),
5964
Original file line number Diff line number Diff line change @@ -230,11 +230,25 @@ abstract class StylesheetParser extends Parser {
230230 while (scanner.scanChar ($exclamation)) {
231231 var flag = identifier ();
232232 if (flag == 'default' ) {
233+ if (guarded) {
234+ logger.warnForDeprecation (
235+ Deprecation .duplicateVariableFlags,
236+ '!default should only be written once for each variable.\n '
237+ 'This will be an error in Dart Sass 2.0.0.' ,
238+ span: scanner.spanFrom (flagStart));
239+ }
240+
233241 guarded = true ;
234242 } else if (flag == 'global' ) {
235243 if (namespace != null ) {
236244 error ("!global isn't allowed for variables in other modules." ,
237245 scanner.spanFrom (flagStart));
246+ } else if (global) {
247+ logger.warnForDeprecation (
248+ Deprecation .duplicateVariableFlags,
249+ '!global should only be written once for each variable.\n '
250+ 'This will be an error in Dart Sass 2.0.0.' ,
251+ span: scanner.spanFrom (flagStart));
238252 }
239253
240254 global = true ;
Original file line number Diff line number Diff line change 1+ ## 6.3.0
2+
3+ * No user-visible changes.
4+
15## 6.2.0
26
37* No user-visible changes.
Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ name: sass_api
22# Note: Every time we add a new Sass AST node, we need to bump the *major*
33# version because it's a breaking change for anyone who's implementing the
44# visitor interface(s).
5- version : 6.2.0
5+ version : 6.3.0-dev
66description : Additional APIs for Dart Sass.
77homepage : https://github.com/sass/dart-sass
88
99environment :
1010 sdk : " >=2.17.0 <3.0.0"
1111
1212dependencies :
13- sass : 1.61 .0
13+ sass : 1.62 .0
1414
1515dev_dependencies :
1616 dartdoc : ^5.0.0
Original file line number Diff line number Diff line change 11name : sass
2- version : 1.61.0
2+ version : 1.62.0-dev
33description : A Sass implementation in Dart.
44homepage : https://github.com/sass/dart-sass
55
You can’t perform that action at this time.
0 commit comments