-
Notifications
You must be signed in to change notification settings - Fork 360
fix: Resolve entries against cwd #1091
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
Conversation
⚠️ No Changeset found
Latest commit: 0485a4c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
|
Size Change: 0 B Total Size: 65.9 kB i️ View Unchanged
|
c4ef5dc to
4167d53
Compare
4167d53 to
0485a4c
Compare
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.
This was super broken & went unnoticed for a long time.
Basically we make the assumption that a test fixture foo-with-cwd is testing --cwd ./foo, and to make sure we were clearing out past runs, set the fixture path to fixtures/foo-with-cwd/foo so that rimraf would clear out all test cases the same way. However, we never set this path back!
When it came time to get the build script & execute it, the CWD was /foo-with-cwd/foo... none of these nested directories actually had a build script defined, as it was meant to come from the parent, and so all of the -with-cwd tests were just running plain microbundle. The build script we provided for our tests was entirely ignored as the test was always ran from the incorrect working dir.
Easy fix though, we just have to reset it.
Uh oh!
There was an error while loading. Please reload this page.
preactjs/preact#4677
tiny-globresolves againstopts.cwdor., and because we don't passcwdintotiny-glob, this can result in incorrect file paths when used with Microbundle's--cwdflag.Edit: Meant to open this as a draft, needs tests &
(削除) ideally errors thrown for missing inputs (削除ここまで)Edit2: Unfortunately we don't throw on missing inputs anywhere else so that'd be inconsistent.