From d75ef2ff05ed770afbe80416742c82e1000d0166 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 22 Feb 2019 13:02:31 -0800 Subject: [PATCH 1/4] Delete unused scriptsPrependNodePath config option. #6382 (e905f7479ef8ea5ecbc5ca115f0287be709c7d58) made this option obsolete. --- src/config.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/config.js b/src/config.js index 22dbadb0d0..61d6f32327 100644 --- a/src/config.js +++ b/src/config.js @@ -50,7 +50,6 @@ export type ConfigOptions = { nonInteractive?: boolean, enablePnp?: boolean, disablePnp?: boolean, - scriptsPrependNodePath?: boolean, offlineCacheFolder?: string, enableDefaultRc?: boolean, @@ -180,8 +179,6 @@ export default class Config { plugnplayUnplugged: Array; plugnplayPurgeUnpluggedPackages: boolean; - scriptsPrependNodePath: boolean; - workspacesEnabled: boolean; workspacesNohoistEnabled: boolean; @@ -488,8 +485,6 @@ export default class Config { // $FlowFixMe$ this.nonInteractive = !!opts.nonInteractive || isCi || !process.stdout.isTTY; - this.scriptsPrependNodePath = !!opts.scriptsPrependNodePath; - this.requestManager.setOptions({ offline: !!opts.offline && !opts.preferOffline, captureHar: !!opts.captureHar, From 6098224bd57b248e32a9a173354e2823860652d7 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 22 Feb 2019 13:03:59 -0800 Subject: [PATCH 2/4] Do not prepend the node exec path. #6382 (e905f7479ef8ea5ecbc5ca115f0287be709c7d58) made this unnecessary. --- src/util/execute-lifecycle-script.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/util/execute-lifecycle-script.js b/src/util/execute-lifecycle-script.js index 48b2051ae4..2a7b224d18 100644 --- a/src/util/execute-lifecycle-script.js +++ b/src/util/execute-lifecycle-script.js @@ -165,13 +165,6 @@ export async function makeEnv( const envPath = env[constants.ENV_PATH_KEY]; const pathParts = envPath ? envPath.split(path.delimiter) : []; - // Include the directory that contains node so that we can guarantee that the scripts - // will always run with the exact same Node release than the one use to run Yarn - const execBin = path.dirname(process.execPath); - if (pathParts.indexOf(execBin) === -1) { - pathParts.unshift(execBin); - } - // Include node-gyp version that was bundled with the current Node.js version, // if available. pathParts.unshift(path.join(path.dirname(process.execPath), 'node_modules', 'npm', 'bin', 'node-gyp-bin')); From 959c5c01bd5a88d0fe880fe257d8bd4744cb4aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Thu, 28 Feb 2019 16:54:33 +0000 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 052b960d0e..3851baa989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa ## Master +- Removes `--scripts-prepend-node-path` as Yarn has this behavior by default + + [#7057](https://github.com/yarnpkg/yarn/pull/7057/files) - [**Jason Grout**](https://github.com/jasongrout) + - Adds support for `yarn policies set-version berry` [#7041](https://github.com/yarnpkg/yarn/pull/7041/files) - [**Maƫl Nison**](https://twitter.com/arcanis) From 24d50ecc25111ca41900db4d60bf9c3f8c54e56c Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Mon, 4 Mar 2019 15:18:24 -0800 Subject: [PATCH 4/4] Clarify in changelog the --scripts-prepend-node-path is removed because it is obsolete The current behavior after this PR is not to make `--scripts-prepend-node-path` always on, but to have a better default behavior than the option provided. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf30e3b553..428e6c942d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa ## Master -- Removes `--scripts-prepend-node-path` as Yarn has this behavior by default +- Removes `--scripts-prepend-node-path` as Yarn's default behavior makes this obsolete [#7057](https://github.com/yarnpkg/yarn/pull/7057/files) - [**Jason Grout**](https://github.com/jasongrout)