-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Package Importer] Add types and specs #3728
Conversation
* main: [Package Importer] Draft 1.5 (sass#3777)
…to feature.package-importer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since baseURL
is now a directory rather than a file path, and the Node.js algorithms expect a file path, we should explicitly add a basename before passing it into those algorithms.
@nex3 Based on my reading of the algorithm, the It's also unclear to me what we would use as a basename when the user only provides a directory. |
I think what @nex3 means is that we can should pass |
@nex3 Does this match your expectations- adding * Let `pkgImporter` be a [Node Package Importer] with an associated
`entryPointURL` of the absolute file URL for `entryPointDirectory`
appended with a [single-dot URL path segment](https://url.spec.whatwg.org/#single-dot-path-segment). My reading of this is that this is only a change to the spec, and we don't need to update the implementation as well, correct? |
The
None of these operations actually looks at the basename. Even for resolving the relative path, All that said, I think the best place to compensate for a weird API like this is immediately before invoking it. Store the information "at rest" in a way that makes the most sense semantically—as the directory that we first check for
That's right. The implementation now avoids the issue entirely by always operating in terms of directories in the first place. |
Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net>
Continuation of #3660
Issue
Blocked until proposal is accepted.