Migrations
Find the breaking changes in each envapt major release from v5 to v9, and the edits each one asks of your code.
The newest release is first. Find the page that starts at your current version, then work up the list to v9.
- v8 to v9. envapt is ESM only and requires Node 22.23.3 or newer.
getUsing,getWith, andparsebecomegetAs, and required reads throwInvalidEnvValuefor a value they can't use. - v7 to v8. The source classes get shorter names, and one universal
envaptimport replaces theworkerdandbrowsersubpaths. The portable file APIs warn once and do nothing by default. - v6 to v7. The default decorators become TC39 Stage 3 accessors, and the legacy decorators move to
envapt/legacy. - v5 to v6. The positional decorator form is removed, and
NODE_ENV=testnow resolves to the test environment. - v4 to v5.
Converters.array()replacesConverters.Array,dotenvConfigbecomesenvFileOptions, and per-environment.envfiles load on their own.