File tree Expand file tree Collapse file tree 11 files changed +83
-10
lines changed Expand file tree Collapse file tree 11 files changed +83
-10
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.88.0
2
+
3
+ * Deprecate passing a relative URL to ` compileString() ` and related functions.
4
+
1
5
## 1.87.0
2
6
3
7
* ** Potentially breaking bug fix:** When a plain CSS file with a top-level
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ export 'src/evaluation_context.dart' show warn;
49
49
///
50
50
/// Imports are resolved by trying, in order:
51
51
///
52
- /// * Loading a file relative to [path] .
52
+ /// * **For relative URLs only:** the URL resolved relative to the current
53
+ /// stylesheet's canonical URL, passed to the importer that loaded the current
54
+ /// stylesheet.
53
55
///
54
56
/// * Each importer in [importers] .
55
57
///
@@ -147,7 +149,14 @@ CompileResult compileToResult(
147
149
///
148
150
/// Imports are resolved by trying, in order:
149
151
///
150
- /// * The given [importer] , with the imported URL resolved relative to [url] .
152
+ /// * **For relative URLs only:** the URL resolved relative to the current
153
+ /// stylesheet's canonical URL, passed to the importer that loaded the current
154
+ /// stylesheet.
155
+ ///
156
+ /// For the entrypoint file, [url] is the canonical URL and [importer] is the
157
+ /// importer that loaded it. If [url] is a `file:` URL and [importer] is null,
158
+ /// it defaults to a [FilesystemImporter] that loads relative URLs from the
159
+ /// filesystem.
151
160
///
152
161
/// * Each importer in [importers] .
153
162
///
Original file line number Diff line number Diff line change @@ -133,6 +133,16 @@ Future<CompileResult> compileStringAsync(
133
133
134
134
var stylesheet = Stylesheet .parse (source, syntax ?? Syntax .scss, url: url);
135
135
136
+ if (stylesheet.span.sourceUrl case Uri (scheme: '' )
137
+ when nodeImporter == null ) {
138
+ deprecationLogger.warnForDeprecation (
139
+ Deprecation .compileStringRelativeUrl,
140
+ 'Passing a relative `url` argument (${stylesheet .span .sourceUrl }) to '
141
+ 'compileString() or related functions is deprecated and will be an error '
142
+ 'in Dart Sass 2.0.0.' ,
143
+ );
144
+ }
145
+
136
146
var result = await _compileStylesheet (
137
147
stylesheet,
138
148
logger,
Original file line number Diff line number Diff line change 5
5
// DO NOT EDIT. This file was generated from async_compile.dart.
6
6
// See tool/grind/synchronize.dart for details.
7
7
//
8
- // Checksum: ef3310e5d44fa5a9411c9416fb36f51741dfe6ad
8
+ // Checksum: d305a0f75e329a29f5aff734ac31ce145fd3b8d5
9
9
//
10
10
// ignore_for_file: unused_import
11
11
@@ -142,6 +142,16 @@ CompileResult compileString(
142
142
143
143
var stylesheet = Stylesheet .parse (source, syntax ?? Syntax .scss, url: url);
144
144
145
+ if (stylesheet.span.sourceUrl case Uri (scheme: '' )
146
+ when nodeImporter == null ) {
147
+ deprecationLogger.warnForDeprecation (
148
+ Deprecation .compileStringRelativeUrl,
149
+ 'Passing a relative `url` argument (${stylesheet .span .sourceUrl }) to '
150
+ 'compileString() or related functions is deprecated and will be an error '
151
+ 'in Dart Sass 2.0.0.' ,
152
+ );
153
+ }
154
+
145
155
var result = _compileStylesheet (
146
156
stylesheet,
147
157
logger,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ enum Deprecation {
15
15
// DO NOT EDIT. This section was generated from the language repo.
16
16
// See tool/grind/generate_deprecations.dart for details.
17
17
//
18
- // Checksum: 3639e60773866019c018ae16267c8f23e4df86cf
18
+ // Checksum: c57ab2eb07ab1df48581b8484ef9bdbad0ddceaa
19
19
20
20
/// Deprecation for passing a string directly to meta.call().
21
21
callString (
@@ -173,6 +173,13 @@ enum Deprecation {
173
173
description: 'Functions named "type".' ,
174
174
),
175
175
176
+ /// Deprecation for passing a relative url to compileString().
177
+ compileStringRelativeUrl (
178
+ 'compile-string-relative-url' ,
179
+ deprecatedIn: '1.88.0' ,
180
+ description: 'Passing a relative url to compileString().' ,
181
+ ),
182
+
176
183
// END AUTOGENERATED CODE
177
184
178
185
/// Used for deprecations coming from user-authored code.
Original file line number Diff line number Diff line change
1
+ ## 0.4.20
2
+
3
+ * No user-visible changes.
4
+
1
5
## 0.4.19
2
6
3
7
* No user-visible changes.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " sass-parser" ,
3
- "version" : " 0.4.19 " ,
3
+ "version" : " 0.4.20 " ,
4
4
"description" : " A PostCSS-compatible wrapper of the official Sass parser" ,
5
5
"repository" : " sass/sass" ,
6
6
"author" : " Google Inc." ,
Original file line number Diff line number Diff line change
1
+ ## 15.5.0
2
+
3
+ * No user-visible changes.
4
+
1
5
## 15.4.0
2
6
3
7
* No user-visible changes.
Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ name: sass_api
2
2
# Note: Every time we add a new Sass AST node, we need to bump the *major*
3
3
# version because it's a breaking change for anyone who's implementing the
4
4
# visitor interface(s).
5
- version : 15.4 .0
5
+ version : 15.5 .0
6
6
description : Additional APIs for Dart Sass.
7
7
homepage : https://github.com/sass/dart-sass
8
8
9
9
environment :
10
10
sdk : " >=3.6.0 <4.0.0"
11
11
12
12
dependencies :
13
- sass : 1.87 .0
13
+ sass : 1.88 .0
14
14
15
15
dev_dependencies :
16
16
dartdoc : ^8.0.14
Original file line number Diff line number Diff line change 1
1
name : sass
2
- version : 1.87 .0
2
+ version : 1.88 .0
3
3
description : A Sass implementation in Dart.
4
4
homepage : https://github.com/sass/dart-sass
5
5
You can’t perform that action at this time.
0 commit comments