Skip to content

Commit

Permalink
Allow the possibility for filesystem importers with null bases (#3815)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 authored Mar 27, 2024
1 parent 141b79a commit c492e66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 5 additions & 3 deletions spec/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ contract:
### Filesystem Importer

A *filesystem importer* is an [importer](#importer) with an associated absolute
`file:` URL named `base`. When a filesystem importer is invoked with a string
named `string`:
A *filesystem importer* is an [importer](#importer) with an optional associated
absolute `file:` URL named `base`. When a filesystem importer is invoked with a
string named `string`:

* If `base` is null and `url` doesn't begin with `"file:"`, return null.

* Let `url` be the result of [parsing `string` as a URL][parsing a URL] with
`base` as the base URL. If this returns a failure, throw that failure.
Expand Down
5 changes: 1 addition & 4 deletions spec/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ a string.

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

* Let `importer` be a [filesystem importer] with an arbitrary `base`.

> This importer will only ever be passed absolute URLs, so its base won't
> matter.
* Let `importer` be a [filesystem importer] with a null `base`.

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

0 comments on commit c492e66

Please sign in to comment.