Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

Release Major Version #87

Merged
merged 7 commits into from
Mar 31, 2017
Merged

Release Major Version #87

merged 7 commits into from
Mar 31, 2017

Conversation

kentcdodds
Copy link
Owner

@kentcdodds kentcdodds commented Mar 14, 2017

* feat(args): convert variables embedded in command args

* feat(args): convert braced variables in command args

* style(args): full test name on one line

* refactor(args): make commandConvert definitly stateless

BREAKING CHANGE: `echo $var2/$var1` would not be changed on windows, now it is. This is kind of a bug, but we're doing a major version bump to be safe.
@codecov-io
Copy link

codecov-io commented Mar 14, 2017

Codecov Report

Merging #87 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #87   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      3    +1     
  Lines          34     42    +8     
=====================================
+ Hits           34     42    +8
Impacted Files Coverage Δ
src/variable.js 100% <100%> (ø)
src/command.js 100% <100%> (ø) ⬆️
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1a9ed0...63352c2. Read the comment docs.

thomasthiebaud and others added 2 commits March 14, 2017 13:57
* 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
* feat(spawn): add support for quoted scripts

Use the shell option of spawn introduced in Node.js 4.8 (see
nodejs/node#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 #89 (review).


BREAKING CHANGE: Changes the behavior when passed quoted scripts or special characters interpreted by the shell.
@kentcdodds
Copy link
Owner Author

We've got the original two, but we're going to add #90 as well. Then we can get this released 👏

DanReyLop and others added 4 commits March 23, 2017 08:52
* 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
Before, Windows-style env variables (%test%) would be converted to UNIX-style format ($test) in UNIX
systems. That was an undocumented feature. I've removed that to simplify code a bit. Of course, UNIX
to Windows format still works, as that's the intended use of cross-env.

BREAKING CHANGE: %windows_style% env variables will no longer be converted to $unix_style in UNIX machines. To fix it, use always the UNIX syntax, cross-env will change the format in Windows machines as needed
* fix: Resolve value of env variables before invoking cross-spawn

#90

* Refactored the main parsing loop

BREAKING CHANGE: This is unlikely to break anyone, but now if you assign a variable to a variable (like `FOO=$BAR` with the value `$BAR` being assigned to `hello`, the command will be converted to `FOO=hello` whereas before it was `FOO=$BAR`).
@kentcdodds
Copy link
Owner Author

Alright friends! All the boxes are checked. Please npm install cross-env@beta to try things out! Let me know how things go! I think we'll give it ~24-48 hours to let people take it for a spin before releasing.

All that considered... Do we have any documentation updates we need to make? I feel like we should probably add docs for some things and maybe add some examples... Thoughts?

@kentcdodds
Copy link
Owner Author

Anyone who's tried it, please respond with 🎉

@kentcdodds
Copy link
Owner Author

Alrighty, I guess it's about time we do this thing!

@kentcdodds kentcdodds merged commit e8a1614 into master Mar 31, 2017
@kentcdodds kentcdodds deleted the next branch March 31, 2017 02:06
@kentcdodds
Copy link
Owner Author

kentcdodds commented Mar 31, 2017

And here it goes!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants