| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
⚠️ No Changeset foundLatest 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 changesetsWhen 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 |
Sorry, something went wrong.
|
Size Change: 0 B Total Size: 65.9 kB ℹ️ View Unchanged
|
Sorry, something went wrong.
| // Now that dirs have been cleared, reset the fixturePath back to the parent dir | ||
| if (fixtureDir.endsWith('-with-cwd')) { | ||
| fixturePath = resolve(FIXTURES_DIR, fixtureDir); | ||
| } |
There was a problem hiding this comment.
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.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
preactjs/preact#4677
tiny-glob resolves against opts.cwd or ., and because we don't pass cwd into tiny-glob, this can result in incorrect file paths when used with Microbundle's --cwd flag.
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.