- Cloned original repository from github:ericclemmons/per-env.
- Added support for Windows with cross-spawn.
- Added support for Yarn by detecting
process.env.npm_execpath
.
- Fixed some typos.
- Updated README.
- Refactored some codes.
- Changed support of Yarn from
process.env.npm_execpath
to which-pm-runs which detectsprocess.env.npm_config_user_agent
, with additional pnpm support.
- Supported fallback to
process.env.npm_execpath
ifprocess.env.npm_config_user_agent
by which-pm-runs isundefined
.
- Defaulted
NODE_ENV
to definedNODE_ENV
in .env file if it is found inprocess.cwd()
..env
file is parsed using dotenv.
- Solved some testing issues on Windows.
- Restructured repository.
- Replaced Yarn with npm.
- Rewritten in TypeScript.
- Replaced npm with Yarn.
- Replaced cross-spawn with execa.
- Exported a default function for programmatic use.
- Parsed cli options using commander.
- Exposed optional
--env-file
and--package-manager
options via cli. - Breaking change:
.env
file is no longer parsed by default if present. It will only be parsed if provided along with--env-file
option via cli.
- Suppressed duplicated cli error thrown by execa.
- Replaced Yarn with npm.