Skip to content

Commit

Permalink
Allow the possibility for filesystem importers with null bases
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Mar 21, 2024
1 parent 49a0f24 commit cd394e5
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
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
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 cd394e5

Please sign in to comment.