fix: tentative fix for absolute paths on windows#324
Open
mrginglymus wants to merge 1 commit into
Open
Conversation
Member
|
let's wait for @pi0 but i wonder if we should be fixing this at the source instead of the call site Lines 14 to 19 in e9faaf8 i feel like maybe this logic should be switcheroo'd? export function fileURLToPath(id: string | URL): string {
const idString = typeof id === 'string' ? id : id.href;
if (id.startsWith("file://")) {
return normalizeSlash(_fileURLToPath(id)); // pass the original `URL | string` since the built in fileURLToPath accepts both
}
return normalizeSlash(idString);
} |
Member
|
Thanks for the PR. I haven't read it through but unlikely we make risky changes in mlly resolve utils anymore as should be deprecated. I suggest migrating to exsolve and report any windows related issues (i think should be less/no issues with exsolve) |
mrginglymus
added a commit
to mrginglymus/storybook
that referenced
this pull request
Sep 3, 2025
mlly resolve utils are deprecated (unjs/mlly#324 (comment)), and it is recommended to use exsolve instead. The old strip-abs-node-modules-path utility is reintroduced as there is no equivalent in exsolve, and the mlly implementation was more or less the same anyway (except using regex instead of split)
8 tasks
mrginglymus
added a commit
to mrginglymus/storybook
that referenced
this pull request
Sep 3, 2025
mlly resolve utils are deprecated (unjs/mlly#324 (comment)), and it is recommended to use exsolve instead. The old strip-abs-node-modules-path utility is reintroduced as there is no equivalent in exsolve, and the mlly implementation was more or less the same anyway (except using regex instead of split)
mrginglymus
added a commit
to mrginglymus/storybook
that referenced
this pull request
Sep 3, 2025
mlly resolve utils are deprecated (unjs/mlly#324 (comment)), and it is recommended to use exsolve instead. The old strip-abs-node-modules-path utility is reintroduced as there is no equivalent in exsolve, and the mlly implementation was more or less the same anyway (except using regex instead of split)
Author
|
I've raised a PR to migrate to exsolve; however, at this late stage in the release cycle they may be unwilling to switch implementations. |
Member
|
Added two comments on storybookjs/storybook#32383 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Given that upstream doesn't want to address this directly (wooorm/import-meta-resolve#31) and downstream is now blocked on this (storybookjs/storybook#32364) here's a tentative workaround for
[error] The URL must be of scheme filewhen called with absolute path on windows #297