Releases: adonisjs/env
Introduce defineIdentifier and defineIdentifierIfMissing methods
The Env.identifier
method has been deprecated in favor of defineIdentifier
and defineIdentifierIfMissing
method is added to define the identifier only when its not already defined
6.2.0 (2025-03-19)
- test: small improvements to the test cases (f1e786b)
- test: update test to have assertions (459aece)
- ci: add stale workflow (c62fe26)
- chore: update dependencies (9629685)
- feat(parser): rename identifier to defineIdentifier and add IfMissingDefineIdentifier (526ce63)
What's Changed
- feat(parser): rename identifier to defineIdentifier and add IfMissing… by @RomainLanz in #44
Full Changelog: v6.1.1...v6.2.0
Update dependencies
6.1.1 (2025-01-11)
- chore: add release workflow (595d694)
- chore: update dependencies (5faeed1)
- chore: update to eslint 9 (15cf5eb)
- chore(package): correct author & contributors field (f75e8cf)
- chore(package): remove corepack field (ce41d99)
- ci: add labels workflow (bae355c)
- ci: update release-it config (fbfb69c)
- refactor: migrate to ts-node-maintained (a814ca1)
Full Changelog: v6.1.0...v6.1.1
Empty Example value
Changes
Added a third argument withEmptyExampleValue
to the EnvEditor
add
method which allows to insert a empty value in the .env.example file
const editor = await EnvEditor.create(fs.baseUrl)
editor.add('SECRET_VALUE', 'key, true)
This will result in SECRET_VALUE=key
in the .env
file, but with SECRET_VALUE=
in the .env.example file.
Commits
Update dependencies
Allow to add identifiers
This release adds the possibility to define identifier
.
The identifier is a string that prefix the environment variable value and let you customize the value resolution.
import { readFile } from 'node:fs/promises'
import { EnvParser } from '@adonisjs/env'
EnvParser.identifier('file', (value) => {
return readFile(value, 'utf-8')
})
const envParser = new EnvParser(`
DB_PASSWORD=file:/run/secret/db_password
`)
console.log(await envParser.parse()) // { DB_PASSWORD: 'Value from file /run/secret/db_password' }
Breaking
The parse
method of the EnvParser
class is now async.
Commits
Update dependencies
- chore: update dependencies 60010d1
Full Changelog: v5.0.0...v5.0.1
Stable major release
Please check the following releases to learn more about breaking changes and new features
Breaking change - https://github.com/adonisjs/env/releases/tag/v4.0.0-0
Improvements - https://github.com/adonisjs/env/releases/tag/v4.0.0-1
New Feature - https://github.com/adonisjs/env/releases/tag/v4.0.1-0
Commits
- chore: publish under latest tag 423743e
- Merge pull request #36 from adonisjs/next 32907b4
- chore: update dependencies b576fc5
What's Changed
- chore: update dependencies by @targos in #30
- refactor: extract
@poppinss/validator-lite
by @Julien-R44 in #31 - Merge to develop for final release by @thetutlage in #36
New Contributors
- @thetutlage made their first contribution in #36
Full Changelog: v3.0.9...v5.0.0
Update dependencies
- chore: update dependencies af388f6
Full Changelog: v4.2.0-7...v4.2.0-8
Generate bundled types using TSC
- fix: path to test files 0e44ec5
- chore: generate types using tsc 4332c0a
- chore: update dependencies c848234
Full Changelog: v4.2.0-6...v4.2.0-7
Use TSUP for bundling
- refactor: rename exceptions.ts to errors.ts 8b71a71
- docs(README): update EnvEditor example 1855648
- chore: use tsup for bundling 1a918f7
- chore: update dependencies 5070aae
Full Changelog: v4.2.0-5...v4.2.0-6