aboutsummaryrefslogtreecommitdiffstats
path: root/testing/yarn/remove-support-for-legacy-nodejs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/yarn/remove-support-for-legacy-nodejs.patch')
-rw-r--r--testing/yarn/remove-support-for-legacy-nodejs.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/yarn/remove-support-for-legacy-nodejs.patch b/testing/yarn/remove-support-for-legacy-nodejs.patch
new file mode 100644
index 0000000000..dbb7d9d71d
--- /dev/null
+++ b/testing/yarn/remove-support-for-legacy-nodejs.patch
@@ -0,0 +1,23 @@
+diff -urp dist/bin/yarn.js patched/bin/yarn.js
+--- dist/bin/yarn.js 2017-01-30 14:11:29.000000000 +0000
++++ patched/bin/yarn.js 2017-02-01 02:41:32.000000000 +0000
+@@ -16,17 +16,14 @@ var _err;
+ if (semver.satisfies(ver, '>=5.0.0')) {
+ possibles.push('../updates/current/lib/cli/index.js');
+ possibles.push('../lib/cli/index.js');
+-} else if (semver.satisfies(ver, '>=4.0.0')) {
+- possibles.push('../updates/current/lib-legacy/cli/index.js');
+- possibles.push('../lib-legacy/cli/index.js');
+ } else {
+- console.log(require('chalk').red('Node version ' + ver + ' is not supported, please use Node.js 4.0 or higher.'));
++ console.log(require('chalk').red('Node version ' + ver + ' is not supported, please use Node.js 5.0 or higher.'));
+ process.exit(1);
+ }
+
+ // ensure cache directory exists
+ var mkdirp = require('mkdirp');
+-var constants = require('../lib-legacy/constants');
++var constants = require('../lib/constants');
+ mkdirp.sync(constants.MODULE_CACHE_DIRECTORY);
+
+ // init roadrunner