fix: replace mkdirp with node's recursive mkdirSync - #248
Merged
Conversation
mkdirp v3 removed the default export, so the open renovate bump (#197) could not compile: `import mkdirp from 'mkdirp'` has no binding to import. Rather than migrate to the named `mkdirpSync` export, drop the dependency — `mkdirp.sync` has been a wrapper over `fs.mkdirSync(path, { recursive: true })` since Node 10, and `ensureFolderExist()` is the only caller in src. Also removes the stale `@types/mkdirp` (v1 types, pinned against a v2 runtime). Verified: 7 suites / 63 tests pass with no mkdirp installed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ETjy9oQGyETyFmDBdR9Egz
🦋 Changeset detectedLatest commit: 4e085ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
=======================================
Coverage 97.19% 97.19%
=======================================
Files 9 9
Lines 321 321
Branches 86 87 +1
=======================================
Hits 312 312
Misses 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes the second, separate cause of fixture's red dependency PRs. (The first is #247 —
@swc/corebuild approval, which blocks #235 at install. These are independent.)Why #197 could not pass
mkdirp v3 removed the default export:
There is no
default, soimport mkdirp from 'mkdirp'has nothing to bind and the build fails. The renovate PR bumps the version without touching the two call sites, so it can never go green on its own.Why drop it rather than migrate to
mkdirpSyncmkdirp.synchas been a thin wrapper overfs.mkdirSync(path, { recursive: true })since Node 10.ensureFolderExist()is the only caller ints/, plus one in a spec. Removing the dependency:@types/mkdirp(v1 types pinned against a v2 runtime),Behaviour is identical.
Verification
pnpm verifywith no mkdirp installed: 7 suites / 63 tests pass, coverage unchanged.Patch changeset included, since this changes the published package's dependency list.