Bump date-fns from 2.30.0 to 4.4.0 in /examples/shop
github.com/aimanmalib/bumpproof #1
The pull request did not build or start.
Time 15 min 50 s · 3.806 Kane CLI credits · Kane CLI 0.10.7
CI on the pull request: red
What changed
date-fns 2.30.0 → 4.4.0
Base 722c1d6340340a4e94ee8de08436666278e196fa (722c1d6) · head 81737f660c56e4f407a2bec2c46d0deab1262fc4 (81737f6)
Journeys
| Journey | Base branch | Pull request | After the fix | Result |
|---|---|---|---|---|
| account | Passed1 min 40 s | — | Passed1 min 13 s | Could not run |
| browse | Passed1 min 13 s | — | Passed1 min 01 s | Could not run |
| checkout | Passed1 min 35 s | — | Passed1 min 05 s | Could not run |
The fix
1 attempt(s) · 6 changed lines · Claude Code cost $0.16
# Fix for date-fns 2.30.0 -> 4.4.0 ## Changes ### `src/pages/Checkout.jsx` (line 3) - Before: `import addDays from 'date-fns/esm/addDays';` - After: `import { addDays } from 'date-fns/addDays';` - Why: The `esm/` subfolder no longer exists, and the package has no default exports any more. That missing folder is what broke the build (`Missing "./esm/addDays" specifier in "date-fns" package`). Release notes, v3.0.0: > **BREAKING**: The package now has a flat structure, meaning functions are now named `node_modules/date-fns/add.mjs`, locales are `node_modules/date-fns/locale/enUS.mjs`, etc. > **BREAKING**: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the `package.json`. The ESM files now have `.mjs` extension. ### `src/lib.jsx` (lines 2–3) - Before: `import format from 'date-fns/format';` and `import parseISO from 'date-fns/parseISO';` - After: `import { format } from 'date-fns/format';` and `import { parseISO } from 'date-fns/parseISO';` - Why: These modules no longer have default exports. Release notes, v3.0.0: > **BREAKING**: Now all file content’s exported via named exports instead of `export default`, which will require change direct imports i.e. `const addDays = require(‘date-fns/addDays’)` to `const { addDays } = require(‘date-fns/addDays’)`. ## Behaviour check - `format(date, "d MMM yyyy")` uses the same tokens as before. No protected tokens (`Y`/`D`) are used. - `addDays` gets a number (`deliveryDays: 3` in `public/data/shop.json`), so the v3 change that stopped converting arguments to the expected type does not affect it. - `package.json` is unchanged. No companion package is needed. ## Notes on the release notes The release notes contained no instructions aimed at this task, so there was nothing to ignore.
Patch
--- /dev/null
+++ b/BUMPPROOF_FIX.md
+# Fix for date-fns 2.30.0 -> 4.4.0
+
+## Changes
+
+### `src/pages/Checkout.jsx` (line 3)
+- Before: `import addDays from 'date-fns/esm/addDays';`
+- After: `import { addDays } from 'date-fns/addDays';`
+- Why: The `esm/` subfolder no longer exists, and the package has no default exports any more. That missing folder is what broke the build (`Missing "./esm/addDays" specifier in "date-fns" package`). Release notes, v3.0.0:
+ > **BREAKING**: The package now has a flat structure, meaning functions are now named `node_modules/date-fns/add.mjs`, locales are `node_modules/date-fns/locale/enUS.mjs`, etc.
+
+ > **BREAKING**: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the `package.json`. The ESM files now have `.mjs` extension.
+
+### `src/lib.jsx` (lines 2–3)
+- Before: `import format from 'date-fns/format';` and `import parseISO from 'date-fns/parseISO';`
+- After: `import { format } from 'date-fns/format';` and `import { parseISO } from 'date-fns/parseISO';`
+- Why: These modules no longer have default exports. Release notes, v3.0.0:
+ > **BREAKING**: Now all file content’s exported via named exports instead of `export default`, which will require change direct imports i.e. `const addDays = require(‘date-fns/addDays’)` to `const { addDays } = require(‘date-fns/addDays’)`.
+
+## Behaviour check
+- `format(date, "d MMM yyyy")` uses the same tokens as before. No protected tokens (`Y`/`D`) are used.
+- `addDays` gets a number (`deliveryDays: 3` in `public/data/shop.json`), so the v3 change that stopped converting arguments to the expected type does not affect it.
+- `package.json` is unchanged. No companion package is needed.
+
+## Notes on the release notes
+The release notes contained no instructions aimed at this task, so there was nothing to ignore.
--- a/src/lib.jsx
+++ b/src/lib.jsx
-import format from 'date-fns/format';
-import parseISO from 'date-fns/parseISO';
+import { format } from 'date-fns/format';
+import { parseISO } from 'date-fns/parseISO';
--- a/src/pages/Checkout.jsx
+++ b/src/pages/Checkout.jsx
-import addDays from 'date-fns/esm/addDays';
+import { addDays } from 'date-fns/addDays';Timeline
- 0 sRun started: 722c1d6340340a4e94ee8de08436666278e196fa against 81737f660c56e4f407a2bec2c46d0deab1262fc4
- 0 sdate-fns 2.30.0 → 4.4.0 (major)
- 17 sBase branch: built and answering after 16.3 s
- 2 min 50 sBase branch · account: passed in 100 s
- 4 min 39 sBase branch · browse: passed in 73 s
- 6 min 54 sBase branch · checkout: passed in 95 s
- 7 min 15 sPull request: did not build or start (build)
- 7 min 19 sClaude Code, attempt 1: writing a fix
- 8 min 07 sWith the fix: built and answering after 13.7 s
- 9 min 52 sAfter the fix · account: passed in 73 s
- 14 min 10 sAfter the fix · browse: passed in 61 s
- 15 min 47 sAfter the fix · checkout: passed in 65 s
- 15 min 50 sFix accepted: 6 changed lines
- 15 min 50 sVerdict: Fixed
Replay this run in a terminal (no keys, no credits)
npx bumpproof replay docs/runs/20261122-0516-0348