date-fns
4.4.0 · 29 May 2026MIT126.2M / weekRepositorynpmAtom feed
Upgrading date-fns From 2.30.0 to 3.0.0
1 release in betweenevery note read
- 15
- changes to make
- 0
- advisories fixed
- 6
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
Release by release
- 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.mjsextension. - Breaking
The package now has a flat structure, meaning functions are now named
node_modules/date-fns/add.mjs, locales arenode_modules/date-fns/locale/enUS.mjs, etc. - 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’)toconst { addDays } = require(‘date-fns/addDays’). - Breaking
TypeScript types are now completely rewritten, check out the
d.tsfiles for more information.
- Breaking
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.