Skip to content

Releases: adonisjs/env

Empty Example value

29 Apr 09:51
Compare
Choose a tag to compare

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

  • Merge pull request #39 from adonisjs/feat/empty-example (418e443)
  • chore: wip (9168360)
  • chore: readme (eae8a30)
  • feat: add with empty example value (ddaa57a)

Update dependencies

22 Apr 04:53
Compare
Choose a tag to compare
  • chore: replace np with release-it (94e38fc)
  • chore: update dependencies (494c7c3)
  • chore: update readme to add identifier feature (7fb9a8c)

Allow to add identifiers

30 Mar 14:58
Compare
Choose a tag to compare

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

  • Merge pull request #37 from adonisjs/feat/identifier e7574df
  • feat(parser): allow to escape identifier fbba16b
  • test(parser): ensure identifier can be escaped b5b63fa
  • fix(parser): ensure identifier fully-match before using it 821ef92
  • feat(parser): allow to add identifiers 0e612ae

v5.0.1...v6.0.0

Update dependencies

23 Jan 10:38
Compare
Choose a tag to compare
  • chore: update dependencies 60010d1

Full Changelog: v5.0.0...v5.0.1

Stable major release

05 Jan 08:43
32907b4
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v3.0.9...v5.0.0

Update dependencies

18 Dec 10:04
Compare
Choose a tag to compare
Update dependencies Pre-release
Pre-release
  • chore: update dependencies af388f6

Full Changelog: v4.2.0-7...v4.2.0-8

Generate bundled types using TSC

22 Nov 06:29
Compare
Choose a tag to compare
Pre-release
  • 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

16 Oct 06:44
Compare
Choose a tag to compare
Use TSUP for bundling Pre-release
Pre-release
  • 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

23 Aug 05:07
Compare
Choose a tag to compare
Update dependencies Pre-release
Pre-release
  • chore: update dependencies 091ac9a

Full Changelog: v4.2.0-4...v4.2.0-5

Export EnvEditor as a submodule

26 Jul 04:50
Compare
Choose a tag to compare
Pre-release

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

v4.2.0-3...v4.2.0-4

Full Changelog: v4.2.0-3...v4.2.0-4