Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
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: kentcdodds/cross-env
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2a1f44c9053702fdc3fffca38afc041cbf634a05
Choose a base ref
...
head repository: kentcdodds/cross-env
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bb0287b199c3e4cea5c0e1a20ef0c8d78db1aaa4
Choose a head ref
  • 12 commits
  • 7 files changed
  • 5 contributors

Commits on Mar 21, 2020

  1. Copy the full SHA
    dfefcab View commit details

Commits on Apr 23, 2020

  1. Copy the full SHA
    1394cc8 View commit details
  2. Copy the full SHA
    9a5a9bd View commit details

Commits on May 20, 2020

  1. Copy the full SHA
    bddb4d5 View commit details
  2. Copy the full SHA
    ed844af View commit details

Commits on Nov 5, 2020

  1. Copy the full SHA
    8edd827 View commit details

Commits on Nov 9, 2020

  1. Copy the full SHA
    54eec15 View commit details

Commits on Nov 13, 2020

  1. Copy the full SHA
    b2a610b View commit details

Commits on Nov 15, 2020

  1. Copy the full SHA
    07a91d6 View commit details

Commits on Dec 1, 2020

  1. fix: add maintenance mode notice

    Using `fix` so this gets shipped to npm.
    kentcdodds authored Dec 1, 2020
    Copy the full SHA
    fe80c84 View commit details
  2. docs: Update README.md (#259)

    Clarify feature requests section.
    dsbert authored Dec 1, 2020
    Copy the full SHA
    6f571e1 View commit details
  3. docs: add dsbert as a contributor (#260)

    * docs: update README.md [skip ci]
    
    * docs: update .all-contributorsrc [skip ci]
    
    Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
    allcontributors[bot] authored Dec 1, 2020
    Copy the full SHA
    bb0287b View commit details
Showing with 166 additions and 79 deletions.
  1. +18 −0 .all-contributorsrc
  2. +78 −0 .github/workflows/validate.yml
  3. +1 −0 .huskyrc.js
  4. +0 −22 .travis.yml
  5. +68 −36 README.md
  6. +0 −15 appveyor.yml
  7. +1 −6 package.json
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -229,6 +229,24 @@
"contributions": [
"doc"
]
},
{
"login": "devuxer",
"name": "devuxer",
"avatar_url": "https://avatars0.githubusercontent.com/u/1298521?v=4",
"profile": "https://github.com/devuxer",
"contributions": [
"doc"
]
},
{
"login": "dsbert",
"name": "Daniel",
"avatar_url": "https://avatars2.githubusercontent.com/u/1320090?v=4",
"profile": "https://github.com/dsbert",
"contributions": [
"doc"
]
}
],
"repoHost": "https://github.com",
78 changes: 78 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: validate
on:
push:
branches:
- '+([0-9])?(.{+([0-9]),x}).x'
- 'master'
- 'next'
- 'next-major'
- 'beta'
- 'alpha'
- '!all-contributors/**'
pull_request: {}
jobs:
main:
# ignore all-contributors PRs
if: ${{ !contains(github.head_ref, 'all-contributors') }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [10.14, 10, 12, 14, 15]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: ⎔ Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: ▶️ Run validate script
run: npm run validate

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v1

release:
needs: main
runs-on: ubuntu-latest
if:
${{ github.repository == 'kentcdodds/cross-env' &&
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: ⎔ Setup node
uses: actions/setup-node@v1
with:
node-version: 14

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('kcd-scripts/husky')
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

104 changes: 68 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<div align="center">
<h1>cross-env 🔀</h1>

Run scripts that set and use environment variables across platforms

<p>Run scripts that set and use environment variables across platforms</p>
</div>

<hr />
**🚨 NOTICE: cross-env still works well, but is in maintenance mode. No new
features will be added, only serious and common-case bugs will be fixed, and
it will only be kept up-to-date with Node.js over time.
[Learn more](https://github.com/kentcdodds/cross-env/issues/257)**

[![Travis Build Status][build-badge]][build]
[![AppVeyor Build Status][win-build-badge]][win-build]
[![Code Coverage][coverage-badge]][coverage]
[![version][version-badge]][package] [![MIT License][license-badge]][license]
---

[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc]
<!-- prettier-ignore-start -->
[![Build Status][build-badge]][build]
[![Code Coverage][coverage-badge]][coverage]
[![version][version-badge]][package]
[![downloads][downloads-badge]][npmtrends]
[![MIT License][license-badge]][license]
[![All Contributors][all-contributors-badge]](#contributors-)
[![PRs Welcome][prs-badge]][prs]
[![Code of Conduct][coc-badge]][coc]
<!-- prettier-ignore-end -->

## The problem

@@ -81,6 +87,16 @@ webpack --config build/webpack.config.js

The `NODE_ENV` environment variable will be set by `cross-env`

You can set multiple environment variables at a time:

```json
{
"scripts": {
"build": "cross-env FIRST_ENV=one SECOND_ENV=two node ./my-program"
}
}
```

You can also split a command into several ones, or separate the environment
variables declaration from the actual command execution. You can do it this way:

@@ -170,7 +186,24 @@ easier for Windows users.
- [`@naholyr/cross-env`](https://www.npmjs.com/package/@naholyr/cross-env) -
`cross-env` with support for setting default values

## Contributors
## Issues

_Looking to contribute? Look for the [Good First Issue][good-first-issue]
label._

### 🐛 Bugs

Please file an issue for bugs, missing documentation, or unexpected behavior.

[**See Bugs**][bugs]

### 💡 Feature Requests

This project is in maintenance mode and no new feature requests will be considered.

[**Learn more**](https://github.com/kentcdodds/cross-env/issues/257)

## Contributors ✨

Thanks goes to these people ([emoji key][emojis]):

@@ -207,6 +240,8 @@ Thanks goes to these people ([emoji key][emojis]):
</tr>
<tr>
<td align="center"><a href="https://github.com/lauriii"><img src="https://avatars0.githubusercontent.com/u/1845495?v=4" width="100px;" alt=""/><br /><sub><b>Lauri Eskola</b></sub></a><br /><a href="https://github.com/kentcdodds/cross-env/commits?author=lauriii" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/devuxer"><img src="https://avatars0.githubusercontent.com/u/1298521?v=4" width="100px;" alt=""/><br /><sub><b>devuxer</b></sub></a><br /><a href="https://github.com/kentcdodds/cross-env/commits?author=devuxer" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/dsbert"><img src="https://avatars2.githubusercontent.com/u/1320090?v=4" width="100px;" alt=""/><br /><sub><b>Daniel</b></sub></a><br /><a href="https://github.com/kentcdodds/cross-env/commits?author=dsbert" title="Documentation">📖</a></td>
</tr>
</table>

@@ -225,35 +260,32 @@ Contributions of any kind welcome!

MIT

[npm]: https://www.npmjs.com/
<!-- prettier-ignore-start -->
[npm]: https://npmjs.com
[node]: https://nodejs.org
[build-badge]:
https://img.shields.io/travis/kentcdodds/cross-env.svg?style=flat-square
[build]: https://travis-ci.org/kentcdodds/cross-env
[win-build-badge]:
https://img.shields.io/appveyor/ci/kentcdodds/cross-env.svg?style=flat-square
[win-build]: https://ci.appveyor.com/project/kentcdodds/cross-env
[coverage-badge]:
https://img.shields.io/codecov/c/github/kentcdodds/cross-env.svg?style=flat-square
[build-badge]: https://img.shields.io/github/workflow/status/kentcdodds/cross-env/validate?logo=github&style=flat-square
[build]: https://github.com/kentcdodds/cross-env/actions?query=workflow%3Avalidate
[coverage-badge]: https://img.shields.io/codecov/c/github/kentcdodds/cross-env.svg?style=flat-square
[coverage]: https://codecov.io/github/kentcdodds/cross-env
[version-badge]: https://img.shields.io/npm/v/cross-env.svg?style=flat-square
[package]: https://www.npmjs.com/package/cross-env
[downloads-badge]: https://img.shields.io/npm/dm/cross-env.svg?style=flat-square
[npmtrends]: https://www.npmtrends.com/cross-env
[license-badge]: https://img.shields.io/npm/l/cross-env.svg?style=flat-square
[license]: https://github.com/kentcdodds/cross-env/blob/master/other/LICENSE
[prs-badge]:
https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[version-badge]: https://img.shields.io/npm/v/gatsby-remark-embedder.svg?style=flat-square
[package]: https://www.npmjs.com/package/gatsby-remark-embedder
[downloads-badge]: https://img.shields.io/npm/dm/gatsby-remark-embedder.svg?style=flat-square
[npmtrends]: http://www.npmtrends.com/gatsby-remark-embedder
[license-badge]: https://img.shields.io/npm/l/gatsby-remark-embedder.svg?style=flat-square
[license]: https://github.com/kentcdodds/cross-env/blob/master/LICENSE
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs]: http://makeapullrequest.com
[coc-badge]:
https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
[coc]:
https://github.com/kentcdodds/cross-env/blob/master/other/CODE_OF_CONDUCT.md
[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key
[all-contributors]: https://github.com/kentcdodds/all-contributors
[win-bash]: https://msdn.microsoft.com/en-us/commandline/wsl/about
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
[coc]: https://github.com/kentcdodds/cross-env/blob/master/other/CODE_OF_CONDUCT.md
[emojis]: https://allcontributors.org/docs/en/emoji-key
[all-contributors]: https://github.com/all-contributors/all-contributors
[all-contributors-badge]: https://img.shields.io/github/all-contributors/kentcdodds/cross-env?color=orange&style=flat-square
[bugs]: https://github.com/kentcdodds/cross-env/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%90%9B+Bug%22+sort%3Acreated-desc
[good-first-issue]: https://github.com/kentcdodds/cross-env/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A%22good+first+issue%22

[angular-formly]: https://github.com/formly-js/angular-formly
[cross-spawn]: https://www.npmjs.com/package/cross-spawn
[malware]: http://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry
[ts-loader]: https://www.npmjs.com/package/ts-loader
[malware]:
http://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry
[win-bash]: https://msdn.microsoft.com/en-us/commandline/wsl/about
<!-- prettier-ignore-end -->
15 changes: 0 additions & 15 deletions appveyor.yml

This file was deleted.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -19,11 +19,6 @@
"test:update": "npm test -- --updateSnapshot --coverage",
"validate": "kcd-scripts validate"
},
"husky": {
"hooks": {
"pre-commit": "kcd-scripts pre-commit"
}
},
"files": [
"src",
"!__tests__"
@@ -39,7 +34,7 @@
"cross-spawn": "^7.0.1"
},
"devDependencies": {
"kcd-scripts": "^5.2.0"
"kcd-scripts": "^5.5.0"
},
"eslintConfig": {
"extends": "./node_modules/kcd-scripts/eslint.js"