Releases: adonisjs/env
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
Update dependencies
- chore: update dependencies 091ac9a
Full Changelog: v4.2.0-4...v4.2.0-5
Export EnvEditor as a submodule
Breaking change: The EnvEditor
is now exported from the ./editor
submodule.
Commits
- refactor: export EnvEditor from subpath f8c6475
- chore: update dependencies 4e01c10
- chore: do not publish source files aec4729
Full Changelog: v4.2.0-3...v4.2.0-4