Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotenvx/dotenvx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.38.0
Choose a base ref
...
head repository: dotenvx/dotenvx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.39.0
Choose a head ref

Commits on May 9, 2024

  1. update README

    motdotla committed May 9, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    ce7daf0 View commit details

Commits on May 10, 2024

  1. resort order of commands so that deprecated commands are listed last

    motdotla committed May 10, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    7e1389e View commit details

Commits on May 11, 2024

  1. remove reference to setting DOTENV_KEY

    motdotla committed May 11, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    63d132b View commit details

Commits on May 14, 2024

  1. add advanced usage section

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    2afb891 View commit details
  2. add to advanced usage

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    022d09c View commit details
  3. more advanced usage examples

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    0ae0ca4 View commit details
  4. update README

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    dfa99d0 View commit details
  5. update Advanced Usage

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    c9062ae View commit details
  6. add --version example

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    6527c80 View commit details
  7. add dotenvx help

    motdotla committed May 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7b705ed View commit details
  8. add get examples

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    4b73af3 View commit details
  9. add support for get --convention

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    106d2d4 View commit details
  10. add to advanced usage

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    3784f0a View commit details
  11. call it json

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    983e1b8 View commit details
  12. add advanced usage set command

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    69bc2bf View commit details
  13. move ls after set

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    728dfb3 View commit details
  14. add ls command examples

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    2ffd6a4 View commit details
  15. add genexample

    motdotla committed May 14, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    6100f9f View commit details
  16. place all the advanced usage on the readme

    motdotla committed May 14, 2024
    Copy the full SHA
    f3a3826 View commit details
  17. update README

    motdotla committed May 14, 2024
    Copy the full SHA
    65d2943 View commit details
  18. update changelog

    motdotla committed May 14, 2024
    Copy the full SHA
    5e23001 View commit details
  19. 0.39.0

    motdotla committed May 14, 2024
    Copy the full SHA
    8671fd6 View commit details
Showing with 604 additions and 35 deletions.
  1. +11 −1 CHANGELOG.md
  2. +567 −17 README.md
  3. +2 −2 package-lock.json
  4. +1 −1 package.json
  5. +11 −1 src/cli/actions/get.js
  6. +0 −2 src/cli/actions/run.js
  7. +1 −1 src/cli/commands/hub.js
  8. +11 −10 src/cli/dotenvx.js
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,17 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v0.38.0...main)
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v0.39.0...main)

## 0.39.0

### Added

* Add `--convention` flag to `get`

### Removed

* Removed help messages like 'in production' and 'in ci'. Too specific and could lead to confusion.

## 0.38.0

584 changes: 567 additions & 17 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.38.0",
"version": "0.39.0",
"name": "@dotenvx/dotenvx",
"description": "a better dotenv–from the creator of `dotenv`",
"author": "@motdotla",
12 changes: 11 additions & 1 deletion src/cli/actions/get.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const logger = require('./../../shared/logger')

const conventions = require('./../../lib/helpers/conventions')

const main = require('./../../lib/main')

function get (key) {
@@ -8,7 +10,15 @@ function get (key) {
const options = this.opts()
logger.debug(`options: ${JSON.stringify(options)}`)

const value = main.get(key, this.envs, options.overload, process.env.DOTENV_KEY, options.all)
let envs = []
// handle shorthand conventions - like --convention=nextjs
if (options.convention) {
envs = conventions(options.convention).concat(this.envs)
} else {
envs = this.envs
}

const value = main.get(key, envs, options.overload, process.env.DOTENV_KEY, options.all)

if (typeof value === 'object' && value !== null) {
if (options.prettyPrint) {
2 changes: 0 additions & 2 deletions src/cli/actions/run.js
Original file line number Diff line number Diff line change
@@ -138,8 +138,6 @@ async function run () {
if (processedEnv.error.code === 'MISSING_ENV_FILE') {
logger.warnv(processedEnv.error)
logger.help(`? in development: add one with [echo "HELLO=World" > ${processedEnv.filepath}] and re-run [dotenvx run -- ${commandArgs.join(' ')}]`)
logger.help('? for production: set [DOTENV_KEY] on your server and re-deploy')
logger.help('? for ci: set [DOTENV_KEY] on your ci and re-build')
} else {
logger.warnv(processedEnv.error)
}
2 changes: 1 addition & 1 deletion src/cli/commands/hub.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ const logger = require('./../../shared/logger')
const hub = new Command('hub')

hub
.description('interact with dotenvx hub')
.description('DEPRECATED: interact with dotenvx hub')

const loginAction = require('./../actions/hub/login')
hub
21 changes: 11 additions & 10 deletions src/cli/dotenvx.js
Original file line number Diff line number Diff line change
@@ -85,6 +85,7 @@ program.command('get')
.option('-f, --env-file <paths...>', 'path(s) to your env file(s)', collectEnvs('envFile'), [])
.option('-fv, --env-vault-file <paths...>', 'path(s) to your .env.vault file(s)', collectEnvs('envVaultFile'), [])
.option('-o, --overload', 'override existing env variables')
.option('--convention <name>', 'load a .env convention (available conventions: [\'nextjs\'])')
.option('-a, --all', 'include all machine envs as well')
.option('-pp, --pretty-print', 'pretty print output')
.action(function (...args) {
@@ -102,6 +103,13 @@ program.command('set')
.option('-c, --encrypt', 'encrypt value')
.action(require('./actions/set'))

// dotenvx ls
program.command('ls')
.description('print all .env files in a tree structure')
.argument('[directory]', 'directory to list .env files from', '.')
.option('-f, --env-file <filenames...>', 'path(s) to your env file(s)', '.env*')
.action(require('./actions/ls'))

// dotenvx genexample
program.command('genexample')
.description('generate .env.example')
@@ -133,20 +141,16 @@ program.command('scan')
.description('scan for leaked secrets')
.action(require('./actions/scan'))

// dotenvx ls
program.command('ls')
.description('print all .env files in a tree structure')
.argument('[directory]', 'directory to list .env files from', '.')
.option('-f, --env-file <filenames...>', 'path(s) to your env file(s)', '.env*')
.action(require('./actions/ls'))

// dotenvx settings
program.command('settings')
.description('print current dotenvx settings')
.argument('[key]', 'settings name')
.option('-pp, --pretty-print', 'pretty print output')
.action(require('./actions/settings'))

// dotenvx vault
program.addCommand(require('./commands/vault'))

// dotenvx encrypt
const encryptAction = require('./actions/vault/encrypt')
program.command('encrypt')
@@ -183,9 +187,6 @@ program.command('status')
statusAction.apply(this, args)
})

// dotenvx vault
program.addCommand(require('./commands/vault'))

// dotenvx hub
program.addCommand(require('./commands/hub'))