-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Core: Unified story specifiers #16220
Core: Unified story specifiers #16220
Conversation
Nx Cloud ReportCI ran the following commands for commit 87008af. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
STORIES: stories.map((specifier) => ({ | ||
...specifier, | ||
importPathMatcher: specifier.importPathMatcher.source, | ||
})), |
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.
I had to add this little hack as the regexps weren't being serialized properly
02ad3c6
to
e0b29fd
Compare
… it. This mainly to stop tests from hanging
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.
Looking great esp the nice tests! 💯
Just one minor request 🙏
// Watchpack passes paths either with no leading './' - e.g. `src/Foo.stories.js`, | ||
// or with a leading `../` (etc), e.g. `../src/Foo.stories.js`. | ||
// We want to deal in importPaths relative to the working dir, or absolute paths. | ||
const importPath = watchpackPath.startsWith('.') ? watchpackPath : `./${watchpackPath}`; |
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.
is this the only place we do this now? is this unified from before?
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.
Yes, any time we talk about paths we either use an importPath
(JS-style relative to workingDir
) [for things that end up inside the bundle] or an absolutePath
[for things that don't]. The two things that liked to use "html-style" relative paths were:
watchpack
, which is why we do this heremicromatch
, which is why we have to futz with the generated regexp a little bit.
Issue: Specifiers were a bit of an unspecified (ha) mess.
Telescoping on #16160
What I did
What I still need to do