62 Commits

Author SHA1 Message Date
Todd Bluhm
0846e5d6a5
fix(expand-envs): test more edge cases 2025-08-06 00:26:33 -08:00
Todd Bluhm
18e8a28148
fix(recursive): cleaned up after rebase 2025-08-06 00:09:16 -08:00
Nicholas Krul
53f4549001
feat: recursive embedding of env vars in env vars 2025-08-06 00:05:00 -08:00
Nicholas Krul
e5d3a27a54
feat: allow bracers when processing vars 2025-08-06 00:02:11 -08:00
Kyle Hensel
adf1934f01
chore: fix CI failing on the master branch 2025-08-05 20:00:00 +12:00
Kyℓe Hensel
35bee4087a
Merge pull request #399 from toddbluhm/kh/ts
feat: support loading TypeScript files
2025-08-05 19:46:27 +12:00
Kyle Hensel
b314da93c5
feat: support loading TypeScript files 2025-07-13 15:53:57 +10:00
Todd Bluhm
e2db12b878
fix(parse-args): add helpful -r flag deprecation error message 2025-07-12 01:23:30 -08:00
Todd Bluhm
592ad064fb
feat(flags)!: remove -r flag and use only -f flag 2025-07-12 01:22:06 -08:00
Todd Bluhm
33d0ac3461
feat(nodejs)!: remove v18 & < 20.10 support
added support for node 24
2025-07-12 00:34:59 -08:00
Todd Bluhm
1e7102607e
fix(dep): update for commander breaking changes 2025-07-01 23:52:55 -08:00
Kyle Hensel
99774970f4
chore: don't convert strings to numbers/booleans in the API
also added test cases for invalid files
2025-01-10 22:15:55 +11:00
Kyℓe Hensel
8c55ce619d
Merge pull request #155 from KilianKilmister/master
refactor: made adding a new loader easier
2024-12-17 11:20:44 +13:00
Kyℓe Hensel
bcd9f59c4d
Merge pull request #397 from toddbluhm/kh/inline-comments
feat: parse inline comments
2024-12-17 11:20:20 +13:00
Kyle Hensel
7166412acf
refactor: made adding a new loader easier
Co-authored-by: KilianKilmister <KilianKilmister@users.noreply.github.com>
2024-12-11 19:31:22 +11:00
Kyle Hensel
6fc9a4197e
feat: parse inline comments 2024-12-11 18:38:57 +11:00
Kyℓe Hensel
24e8d18f05
Merge pull request #396 from toddbluhm/kh/invoke-error
feat(cli): provide a more helpful error if there's no command
2024-12-11 18:37:20 +11:00
Kyle Hensel
865199591b
feat(cli): provide a more helpful error if there's no command 2024-12-10 18:13:29 +11:00
Kyle Hensel
48b36c45f9
fix(*): fix crash on node v18.0 caused by Import Attribute syntax 2024-12-10 09:23:01 +11:00
Todd Bluhm
8f5a956844
fix(parse-env-file): fix strip comments per PR #333 2024-12-03 05:59:31 -09:00
Todd Bluhm
9942f3c448
fix(commander)!: updated code for new version 2024-12-03 05:38:40 -09:00
Todd Bluhm
a3c908bf6b
fix(file-url): fix file path to conform to ES module requirements 2024-12-03 02:54:08 -09:00
Todd Bluhm
7eae0dae54
fix(tsc): fix tsc build process and file importing 2024-12-03 02:36:17 -09:00
Todd Bluhm
f8106ac44a
feat(esm): convert to using esm modules 2024-12-02 10:30:43 -09:00
Todd Bluhm
26f4dfb2f6
chore(pkg): new linter and updated typescript support 2024-11-30 04:42:45 -09:00
Ross Hill
fd86da6734 fix: resolve lint issue in src/parse-rc-file.ts
Corrected linting errors in src/parse-rc-file.ts to ensure compliance with code style guidelines. Also resolved other auto-fixable lint errors.
2024-11-23 22:38:41 -05:00
Todd Bluhm
d6404f1f01
Merge pull request #338 from NickDarvey/master
Throw on parse error
2024-11-23 05:50:22 -06:00
Bèr Kessels
33b3367cff fix: add an unreachable return, to test signal termination 2022-02-16 10:38:46 +01:00
Bèr Kessels
bc94223674 fix: returning "true" instead of "void"
Apparently process.kill() returns a Boolean, so the early return will
return a true||false rather than the void as per the func sig.

This patch ensures we return void regardless of what process.kill() and
process.exit() return. What they return may be dependent on node version
and/or platform.
2022-02-15 17:40:57 +01:00
Nick Darvey
66f3fa3986
chore: Throw parse error instead of continuing 2022-01-20 16:40:00 +11:00
Nick Darvey
853c0006ad
chore: Include parse error message in error 2022-01-20 16:38:35 +11:00
p0rth01998
9da35b5277 fix: typo update in test & ts lint update in ts 2020-05-15 08:48:45 +05:30
ElenaTv
8d94925a44 fix: add type module support 2020-04-15 07:41:02 +03:00
Todd Bluhm
e66cfc10f1
chore(package): update dependencies 2020-03-20 17:20:18 -05:00
Todd Bluhm
c0ce28cb84
chore(package): updated ts-standard version
- improved code readability of options parsing
- added missing code coverage test cases
2020-02-17 17:43:08 -06:00
Todd Bluhm
020998a077
docs(readme): added expand env and silent docs
- Added some additional fun and helpful emoji to the docs
2020-02-10 00:43:27 -06:00
Todd Bluhm
27a2705706
feat(flags): add silent flag to ignore errors
- add silent flag to ignore env-cmd errors and missing file errors, but still terminate on signals and child process failures
2020-02-09 21:34:52 -06:00
Todd Bluhm
500cf6ab5f
chore: rebuild ts files 2020-02-09 21:03:24 -06:00
Todd Bluhm
9a6ff595d0
Merge pull request #110 from elliottsj/version-fix
fix: print correct package version
2020-02-09 20:43:58 -06:00
Todd Bluhm
a253a62232
chore(package): update devDependencies
- fix new lint errors
- fix missing code coverage
- update ignore files
2020-02-09 20:40:20 -06:00
Spencer Elliott
1b39ca114b fix: print correct package version 2020-01-22 14:15:22 -05:00
Todd Bluhm
f92f8b51ff
feat(signal-termination): handle error codes in the signal value
- fix improper test case termination due to signal termination listener leakage
2019-12-29 02:40:32 -06:00
omeid matten
8318637c48 feat: Support env vars expansion in cmd and args
This pull request adds support for expanding environment variable
expansion support. Closes #91

Since the user controls the call site of cmd-env, it only supports
basic UNIX style $var format. `%var%` (windows) or `${var}` is not
supported. However, you can escape variable expansion by escaping
the dollar sign like so `\$`.

Signed-off-by: omeid matten <public@omeid.me>
2019-11-28 16:20:42 +11:00
Todd Bluhm
5d685b67ff
feat(flags): add --verbose flag and option 2019-11-15 12:40:37 -06:00
Todd Bluhm
1cd2feb837
Fixed bug causing env-cmd to fail when no failure had occurred 2019-08-30 01:29:52 -05:00
Todd Bluhm
f5e2e33939
Updated typescript-eslint packages and fixed lint errors
- Updated commander
- Brought coverage back up to 100%
- Updated tsconfig to adhere to linter parser update
2019-08-28 03:13:50 -05:00
Gregory Waxman
ae7981691e Added Env default locations (#81)
* Added env default locations to match rc file locations

* Updated README to clarify all supported files and their formats

* Added new test to verify all env files are searched for
2019-08-28 02:25:15 -05:00
Gregory Waxman
29dcda819a Fixes #79 (#80)
* Fixes #79

* Updated tests to properly reject rather than throw and fixed another missing await
2019-08-28 02:21:53 -05:00
Todd Bluhm
5eaff2cb5a
Fix regex when parsing and preserving newline characters in env values 2019-06-05 16:05:32 -05:00
Todd Bluhm
012230dd8a
Exit with non-zero error code when an error occurs
- Added an `npm run watch` command auto-recompilation of typescript files
- Updated Changelog
2019-05-29 23:47:16 -05:00