NOTE: For the vast majority of users running supported versions of Node.js, this should not require any changes and you can update without issue.
BREAKING CHANGE: This is a major rewrite that changes the module format from CommonJS to ESM-only. The package now requires Node.js >=20 and only exports ESM modules (not relevant in most cases).
BREAKING CHANGE: The package.json exports have been updated to remove CommonJS support. Only ESM imports are now supported.
BREAKING CHANGE: All source files have been converted from JavaScript to TypeScript, requiring TypeScript-aware tooling for development.
- Replace Jest with Vitest for testing
- Convert all source files from .js to .ts with proper TypeScript types
- Use zshy for ESM-only builds (removes CJS support)
- Adopt @epic-web/config for TypeScript, ESLint, and Prettier
- Update to Node.js >=20 requirement
- Remove kcd-scripts dependency
- Add comprehensive e2e tests with GitHub Actions matrix testing
- Update GitHub workflow with caching and cross-platform testing
- Modernize documentation and remove outdated sections
- Update all dependencies to latest versions
- Add proper TypeScript declarations and exports
The tool maintains its original functionality while being completely modernized with the latest tooling and best practices
Co-authored-by: GitHub Action <[email protected]>
[CodeFund](https://codefund.io) provides ethical sponsorships to open source maintainers. This PR will place the "Sponsored by" image at the top of the README. The sponsoring companies are not paying per click nor impression. They are paying the maintainer(s) on a per-month basis to be the primary sponsor of this project.
* bumped cross-spawn to version 7.0.0 and added a warning about node.js 7 and lower
* package.json, engines node : ">=8.0"
BREAKING CHANGE: Drop support for Node.js < 7.
* Update Code Sponsor link position
@kentcdodds When the link is found at the bottom of the README, it is more effective in helping funding this project.
* Update README.md
* fix: Normalize command to handle relative path on windows
* test: Normalize command for embedded env variable conversion test
* docs(contributors): Add @sudo-suhas
Closes#127
Revert the default bin (cross-env) to its v3 behavior (not using the shell option). Add a new
(cross-env-shell) which uses the shell option.
BREAKING CHANGE: Scripts using quotes or escape sequences will see a difference in behavior.
Switching to the second bin should resolve any issue.
Closes#99.
* Add a whitelist for variables to : => ; ify
* Plumb the name through
* Write some tests
* Dox, linter fascism
* Much better!
* Contributors
BREAKING CHANGES: We no longer swap `:` for `;` on windows for any variables other than `PATH` and `NODE_PATH`.
* feat: Convert list delimiters for PATH-style env variables
In Windows, env variables that represent a list (such as PATH or NODE_PATH) separate their elements
using a semicolon(;), but in UNIX they're separated using a colon (:).
This commit adds a conversion layer, so regardless of how the delimiter is written when calling
cross-env, it will be converted to the correct platform delimiter at runtime. To interpret a colon/semicolon
literally instead, preced it with a backslash, like this: "cross-env VAR=semi\\;colon\\:"
BREAKING CHANGE: If an env variable has : or ; in its value, it will be converted to : on UNIX
systems or ; on Windows systems. To keep the old functionality, you will need to escape those
characters with a backslash.
#80
* chore: Add myself (DanReyLop) to the contributors list
* Simplified logic. Now only : (UNIX-style) are converted to ; (Windows-style), not the other way around
BREAKING CHANGE: You now must escape `:` to use it in a value of you don't want it to be swapped with `;` on Windows
* feat(spawn): add support for quoted scripts
Use the shell option of spawn introduced in Node.js 4.8 (see
https://github.com/nodejs/node/pull/4598) to pass the command to the OS shell.
Supersedes #77.
* docs(readme): add gotchas
Add Gotchas paragraph about passing variables to multiple scripts.
* docs(readme): add required node version badge
Replace the Prerequisite paragraph by a badge showing the require version of Node.js required to run
cross-env.
* test(spawn): add test for quoted scripts
See https://github.com/kentcdodds/cross-env/pull/89#pullrequestreview-27055572.
BREAKING CHANGE: Changes the behavior when passed quoted scripts or special characters interpreted by the shell.
* fix(module): Add export for commonjs
Add commonjs export, so it is possible to require crossEnv using `require('cross-env')` (needed to
use in js script without babel)
84
* fix(module): Only export crossEnv using commonjs
* Update README.md
Added how to use cross-env to run npm sub-scripts
* chore(Added danielo515 as contributor): Just added danielo515 as contributor following repo guidelin
Added danielo515 to the all-contributors file