File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 11## 1.17.2
22
3+ * Deprecate ` !global ` variable assignments to variables that aren't yet defined.
4+ This deprecation message can be avoided by assigning variables to ` null ` at
5+ the top level before globally assigning values to them.
6+
7+ ### Dart API
8+
39* Explicitly mark classes that were never intended to be subclassed or
410 implemented as "sealed".
511
Original file line number Diff line number Diff line change @@ -1124,6 +1124,16 @@ class _EvaluateVisitor
11241124 if (value != null && value != sassNull) return null ;
11251125 }
11261126
1127+ if (node.isGlobal && ! _environment.globalVariableExists (node.name)) {
1128+ _logger.warn (
1129+ "As of Dart Sass 2.0.0, !global assignments won't be able to\n "
1130+ "declare new variables. Consider adding `\$ ${node .name }: null` at "
1131+ "the top level." ,
1132+ span: node.span,
1133+ trace: _stackTrace (node.span),
1134+ deprecation: true );
1135+ }
1136+
11271137 _environment.setVariable (
11281138 node.name,
11291139 (await node.expression.accept (this )).withoutSlash (),
Original file line number Diff line number Diff line change 55// DO NOT EDIT. This file was generated from async_evaluate.dart.
66// See tool/synchronize.dart for details.
77//
8- // Checksum: 08c3aaa09f3be71dd315bf36665e249983ce3d53
8+ // Checksum: 607d30ac9d49b341367f71b69bed09f19f93e77d
99//
1010// ignore_for_file: unused_import
1111
@@ -1119,6 +1119,16 @@ class _EvaluateVisitor
11191119 if (value != null && value != sassNull) return null ;
11201120 }
11211121
1122+ if (node.isGlobal && ! _environment.globalVariableExists (node.name)) {
1123+ _logger.warn (
1124+ "As of Dart Sass 2.0.0, !global assignments won't be able to\n "
1125+ "declare new variables. Consider adding `\$ ${node .name }: null` at "
1126+ "the top level." ,
1127+ span: node.span,
1128+ trace: _stackTrace (node.span),
1129+ deprecation: true );
1130+ }
1131+
11221132 _environment.setVariable (
11231133 node.name,
11241134 node.expression.accept (this ).withoutSlash (),
You can’t perform that action at this time.
0 commit comments