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

@yarnpkg/shell

Package Overview
Dependencies
Maintainers
5
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/shell - npm Package Compare versions

Comparing version 2.0.0-rc.2 to 2.0.0-rc.4

22

lib/index.js

@@ -9,5 +9,5 @@ "use strict";

function cloneState(state, mergeWith = {}) {
const newState = Object.assign({}, state, mergeWith);
newState.environment = Object.assign({}, state.environment, mergeWith.environment);
newState.variables = Object.assign({}, state.variables, mergeWith.variables);
const newState = Object.assign(Object.assign({}, state), mergeWith);
newState.environment = Object.assign(Object.assign({}, state.environment), mergeWith.environment);
newState.variables = Object.assign(Object.assign({}, state.variables), mergeWith.variables);
return newState;

@@ -17,3 +17,3 @@ }

[`cd`, async ([target, ...rest], opts, state) => {
const resolvedTarget = fslib_1.ppath.resolve(state.cwd, fslib_1.NodeFS.toPortablePath(target));
const resolvedTarget = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(target));
const stat = await fslib_1.xfs.statPromise(resolvedTarget);

@@ -30,3 +30,3 @@ if (!stat.isDirectory()) {

[`pwd`, async (args, opts, state) => {
state.stdout.write(`${fslib_1.NodeFS.fromPortablePath(state.cwd)}\n`);
state.stdout.write(`${fslib_1.npath.fromPortablePath(state.cwd)}\n`);
return 0;

@@ -63,3 +63,3 @@ }],

inputs.push(() => {
return fslib_1.xfs.createReadStream(fslib_1.ppath.resolve(state.cwd, fslib_1.NodeFS.toPortablePath(args[u])));
return fslib_1.xfs.createReadStream(fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args[u])));
});

@@ -82,3 +82,3 @@ }

{
outputs.push(fslib_1.xfs.createWriteStream(fslib_1.ppath.resolve(state.cwd, fslib_1.NodeFS.toPortablePath(args[u]))));
outputs.push(fslib_1.xfs.createWriteStream(fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args[u]))));
}

@@ -88,3 +88,3 @@ break;

{
outputs.push(fslib_1.xfs.createWriteStream(fslib_1.ppath.resolve(state.cwd, fslib_1.NodeFS.toPortablePath(args[u])), { flags: `a` }));
outputs.push(fslib_1.xfs.createWriteStream(fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args[u])), { flags: `a` }));
}

@@ -309,3 +309,3 @@ break;

return pipe_2.makeProcess(rest[0], rest.slice(1), opts, {
cwd: fslib_1.NodeFS.fromPortablePath(state.cwd),
cwd: fslib_1.npath.fromPortablePath(state.cwd),
env: state.environment,

@@ -361,3 +361,3 @@ });

const environment = await applyEnvVariables(current.envs, opts, state);
activeState.environment = Object.assign({}, activeState.environment, environment);
activeState.environment = Object.assign(Object.assign({}, activeState.environment), environment);
action = makeCommandAction([`true`], opts, activeState);

@@ -531,3 +531,3 @@ }

}
async function execute(command, args = [], { builtins = {}, cwd = fslib_1.NodeFS.toPortablePath(process.cwd()), env = process.env, stdin = process.stdin, stdout = process.stdout, stderr = process.stderr, variables = {}, } = {}) {
async function execute(command, args = [], { builtins = {}, cwd = fslib_1.npath.toPortablePath(process.cwd()), env = process.env, stdin = process.stdin, stdout = process.stdout, stderr = process.stderr, variables = {}, } = {}) {
const normalizedEnv = {};

@@ -534,0 +534,0 @@ for (const [key, value] of Object.entries(env))

@@ -30,3 +30,3 @@ "use strict";

: stdio[2];
const child = cross_spawn_1.default(name, args, Object.assign({}, spawnOpts, { stdio: [
const child = cross_spawn_1.default(name, args, Object.assign(Object.assign({}, spawnOpts), { stdio: [
stdin,

@@ -33,0 +33,0 @@ stdout,

{
"name": "@yarnpkg/shell",
"version": "2.0.0-rc.2",
"version": "2.0.0-rc.4",
"main": "./lib/index.js",
"dependencies": {
"@yarnpkg/fslib": "2.0.0-rc.3",
"@yarnpkg/parsers": "2.0.0-rc.3",
"@yarnpkg/fslib": "2.0.0-rc.11",
"@yarnpkg/parsers": "2.0.0-rc.6",
"cross-spawn": "^6.0.5",

@@ -12,9 +12,7 @@ "stream-buffers": "^3.0.2"

"devDependencies": {
"@yarnpkg/pnpify": "2.0.0-rc.3",
"tmp": "^0.0.33",
"typescript": "^3.5.3"
"tmp": "^0.1.0"
},
"scripts": {
"postpack": "rm -rf lib",
"prepack": "mkdir -p lib && rsync -a --exclude '*.ts' sources/ lib/ && pnpify tsc",
"prepack": "run build:compile \"$(pwd)\"",
"release": "yarn npm publish",

@@ -21,0 +19,0 @@ "test:shell": "run test:unit packages/yarnpkg-shell"

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