Skip to content

Commit c492e66

Browse files
authored
Allow the possibility for filesystem importers with null bases (#3815)
See sass/dart-sass#2199
1 parent 141b79a commit c492e66

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

spec/modules.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,11 @@ contract:
193193
194194
### Filesystem Importer
195195

196-
A *filesystem importer* is an [importer](#importer) with an associated absolute
197-
`file:` URL named `base`. When a filesystem importer is invoked with a string
198-
named `string`:
196+
A *filesystem importer* is an [importer](#importer) with an optional associated
197+
absolute `file:` URL named `base`. When a filesystem importer is invoked with a
198+
string named `string`:
199+
200+
* If `base` is null and `url` doesn't begin with `"file:"`, return null.
199201

200202
* Let `url` be the result of [parsing `string` as a URL][parsing a URL] with
201203
`base` as the base URL. If this returns a failure, throw that failure.

spec/spec.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ a string.
120120

121121
* Let `url` be the absolute `file:` URL corresponding to `path`.
122122

123-
* Let `importer` be a [filesystem importer] with an arbitrary `base`.
124-
125-
> This importer will only ever be passed absolute URLs, so its base won't
126-
> matter.
123+
* Let `importer` be a [filesystem importer] with a null `base`.
127124

128125
* Return the result of [compiling](#compiling-a-string) `text` with `syntax`,
129126
`url`, `importer`, `importers`, and `load-paths`.

0 commit comments

Comments
 (0)