From 320aea8bcae3f838c5400ea2857ed4bea71d969a Mon Sep 17 00:00:00 2001 From: Eli White Date: Wed, 12 Jul 2017 15:56:46 -0700 Subject: [PATCH] shelljs/global -> shelljs Reviewed By: zertosh Differential Revision: D5407207 fbshipit-source-id: df5d1a38a35d27c9c429ea972acab58322441813 --- scripts/bump-oss-version.js | 11 ++++++++--- scripts/run-android-ci-instrumentation-tests.js | 15 +++++++++++---- website/publish-gh-pages.js | 14 ++++++++++++-- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/scripts/bump-oss-version.js b/scripts/bump-oss-version.js index 55d21285b..c1e3a38d3 100755 --- a/scripts/bump-oss-version.js +++ b/scripts/bump-oss-version.js @@ -15,8 +15,14 @@ * After changing the files it makes a commit and tags it. * All you have to do is push changes to remote and CI will make a new build. */ -/*eslint-disable no-undef */ -require(`shelljs/global`); + +const { + cat, + echo, + exec, + exit, + sed, +} = require('shelljs'); const minimist = require('minimist'); @@ -93,4 +99,3 @@ if (version.indexOf(`rc`) === -1) { exec(`git push ${remote} ${branch} --follow-tags`); exit(0); -/*eslint-enable no-undef */ diff --git a/scripts/run-android-ci-instrumentation-tests.js b/scripts/run-android-ci-instrumentation-tests.js index 4d60bf759..8517a965a 100644 --- a/scripts/run-android-ci-instrumentation-tests.js +++ b/scripts/run-android-ci-instrumentation-tests.js @@ -20,8 +20,17 @@ * --package - com.facebook.react.tests * --retries [num] - how many times to retry possible flaky commands: npm install and running tests, default 1 */ -/*eslint-disable no-undef */ -require('shelljs/global'); + +const { + echo, + exec, + exit, + ls, +} = require('shelljs'); + +console.log(echo, exec, exit, ls); + +exit(0); const argv = require('yargs').argv; const numberOfRetries = argv.retries || 1; @@ -62,5 +71,3 @@ testClasses.forEach((testClass) => { }); exit(exitCode); - -/*eslint-enable no-undef */ diff --git a/website/publish-gh-pages.js b/website/publish-gh-pages.js index 146b7a8dc..59ec37514 100644 --- a/website/publish-gh-pages.js +++ b/website/publish-gh-pages.js @@ -9,8 +9,18 @@ 'use strict'; var semverCmp = require('semver-compare'); -/*eslint-disable no-undef */ -require(`shelljs/global`); + +const { + cd, + cp, + echo, + exec, + exit, + ls, + mkdir, + rm, + which, +} = require('shelljs'); const CIRCLE_BRANCH = process.env.CIRCLE_BRANCH; const CIRCLE_PROJECT_USERNAME = process.env.CIRCLE_PROJECT_USERNAME;