Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cross-env

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-env - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

dist/index.js

@@ -13,3 +13,3 @@ 'use strict';

var _child_process = require('child_process');
var _crossSpawn = require('cross-spawn');

@@ -34,3 +34,3 @@ var _addToPathDistGetPathVar = require('add-to-path/dist/get-path-var');

if (command) {
return (0, _child_process.spawn)(command, commandArgs, { stdio: 'inherit', env: env });
return (0, _crossSpawn.spawn)(command, commandArgs, { stdio: 'inherit', env: env });
}

@@ -37,0 +37,0 @@ }

{
"name": "cross-env",
"version": "1.0.1",
"version": "1.0.2",
"description": "Run commands that set environment variables across platforms",

@@ -42,2 +42,3 @@ "main": "src/index.js",

"commitizen": "1.0.5",
"cross-spawn": "2.0.0",
"cz-conventional-changelog": "1.1.2",

@@ -44,0 +45,0 @@ "eslint": "1.5.1",

@@ -1,2 +0,2 @@

import {spawn} from 'child_process';
import {spawn} from 'cross-spawn';
import getPathVar from 'add-to-path/dist/get-path-var';

@@ -3,0 +3,0 @@ export default crossEnv;

@@ -10,3 +10,3 @@ import chai from 'chai';

const proxied = {
child_process: { // eslint-disable-line camelcase
'cross-spawn': {
spawn: sinon.spy(() => 'spawn-returned')

@@ -21,3 +21,3 @@ }

beforeEach(() => {
proxied.child_process.spawn.reset();
proxied['cross-spawn'].spawn.reset();
});

@@ -35,3 +35,3 @@

crossEnv([]);
expect(proxied.child_process.spawn).to.have.not.been.called;
expect(proxied['cross-spawn'].spawn).to.have.not.been.called;
});

@@ -48,4 +48,4 @@

expect(ret, 'returns what spawn returns').to.equal('spawn-returned');
expect(proxied.child_process.spawn).to.have.been.calledOnce;
expect(proxied.child_process.spawn).to.have.been.calledWith(
expect(proxied['cross-spawn'].spawn).to.have.been.calledOnce;
expect(proxied['cross-spawn'].spawn).to.have.been.calledWith(
'echo', ['hello world'], {stdio: 'inherit', env}

@@ -52,0 +52,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc