From 0af6b58bcebfc32fb27317fea57fcc4f9081813f Mon Sep 17 00:00:00 2001 From: Danil Shashkov Date: Wed, 19 Jul 2017 19:23:22 +0500 Subject: [PATCH 1/2] CHANGELOG --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..682c33b6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +## 0.0.6 + +#### Bug Fix + +* There will be fix here + +#### Features + +* There will be features here + +#### Committers + +* There will be commiters here From 752862a0cfb56e2f8df59402959434f006702181 Mon Sep 17 00:00:00 2001 From: Danil Shashkov Date: Wed, 19 Jul 2017 19:36:53 +0500 Subject: [PATCH 2/2] Update prettier, run format and update fs-extra --- create-react-native-app/package.json | 2 +- create-react-native-app/src/index.js | 14 +- create-react-native-app/yarn.lock | 6 +- package.json | 2 +- react-native-scripts/package.json | 6 +- react-native-scripts/src/scripts/eject.js | 28 +-- react-native-scripts/src/scripts/ios.js | 4 +- react-native-scripts/src/util/expo.js | 4 +- react-native-scripts/yarn.lock | 6 +- yarn.lock | 206 +--------------------- 10 files changed, 44 insertions(+), 234 deletions(-) diff --git a/create-react-native-app/package.json b/create-react-native-app/package.json index 4930e769..1e6c5491 100644 --- a/create-react-native-app/package.json +++ b/create-react-native-app/package.json @@ -27,7 +27,7 @@ "babel-runtime": "^6.9.2", "chalk": "^2.0.1", "cross-spawn": "^5.1.0", - "fs-extra": "^3.0.1", + "fs-extra": "^4.0.0", "minimist": "^1.2.0", "path-exists": "^3.0.0", "semver": "^5.0.3", diff --git a/create-react-native-app/src/index.js b/create-react-native-app/src/index.js index 38cefc71..8107267e 100755 --- a/create-react-native-app/src/index.js +++ b/create-react-native-app/src/index.js @@ -55,7 +55,7 @@ function userHasYarn() { } // This decides the 'interface' of the package managing command. -// Ex: If it guesses the type of package manager as 'yarn', +// Ex: If it guesses the type of package manager as 'yarn', // then it executes '(yarn) add' command instead of '(npm) install'. function packageManagerType() { const defaultType = 'npm'; @@ -63,8 +63,8 @@ function packageManagerType() { if (packageManager) { let t = supportedTypes.find(type => { - return (packageManager.indexOf(type)>-1); - }) + return packageManager.indexOf(type) > -1; + }); return t ? t : defaultType; } @@ -72,7 +72,7 @@ function packageManagerType() { } function packageManagerCmd() { - if ( packageManager ) { + if (packageManager) { return packageManager; } else { return packageManagerType() === 'yarn' ? 'yarnpkg' : 'npm'; @@ -105,7 +105,9 @@ async function createApp(name: string, verbose: boolean, version: ?string): Prom await fse.writeFile(path.join(root, 'package.json'), JSON.stringify(packageJson, null, 2)); process.chdir(root); - console.log(`Using package manager as ${packageManagerCmd()} with ${packageManagerType()} interface.`) + console.log( + `Using package manager as ${packageManagerCmd()} with ${packageManagerType()} interface.` + ); console.log('Installing packages. This might take a couple minutes.'); console.log('Installing react-native-scripts...'); console.log(); @@ -122,7 +124,7 @@ function install( let args, result; let cmd = packageManagerCmd(); - if ( type === 'yarn' ) { + if (type === 'yarn') { args = ['add']; if (verbose) { diff --git a/create-react-native-app/yarn.lock b/create-react-native-app/yarn.lock index 62b5f02d..6477d202 100644 --- a/create-react-native-app/yarn.lock +++ b/create-react-native-app/yarn.lock @@ -1010,9 +1010,9 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" +fs-extra@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.0.tgz#414fb4ca2d2170ba0014159d3a8aec3303418d9e" dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" diff --git a/package.json b/package.json index ce8977d7..76a5d410 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,6 @@ "format": "prettier --single-quote --trailing-comma=es5 --print-width=100 --write '{create-react-native-app,react-native-scripts}/{src,template}/**/*.js'" }, "devDependencies": { - "prettier": "^0.21.0" + "prettier": "^1.5.3" } } diff --git a/react-native-scripts/package.json b/react-native-scripts/package.json index 3ffc2b77..482e4ca3 100644 --- a/react-native-scripts/package.json +++ b/react-native-scripts/package.json @@ -24,10 +24,11 @@ "build": "taskr build" }, "dependencies": { + "@expo/bunyan": "1.8.10", "babel-runtime": "^6.9.2", "chalk": "^2.0.1", "cross-spawn": "^5.0.1", - "fs-extra": "^3.0.1", + "fs-extra": "^4.0.0", "indent-string": "^3.0.0", "inquirer": "^3.0.1", "match-require": "^2.0.0", @@ -35,8 +36,7 @@ "path-exists": "^3.0.0", "progress": "^2.0.0", "qrcode-terminal": "^0.11.0", - "xdl": "42.4.0", - "@expo/bunyan": "1.8.10" + "xdl": "42.4.0" }, "devDependencies": { "@taskr/babel": "^1.0.6", diff --git a/react-native-scripts/src/scripts/eject.js b/react-native-scripts/src/scripts/eject.js index 38b77ff6..40518efb 100644 --- a/react-native-scripts/src/scripts/eject.js +++ b/react-native-scripts/src/scripts/eject.js @@ -17,7 +17,9 @@ async function eject() { let expoSdkWarning; if (usingExpo) { - expoSdkWarning = `${chalk.bold('Warning!')} We found at least one file where your project imports the Expo SDK: + expoSdkWarning = `${chalk.bold( + 'Warning!' + )} We found at least one file where your project imports the Expo SDK: `; for (let filename of filesWithExpo) { @@ -25,7 +27,9 @@ async function eject() { } expoSdkWarning += ` -${chalk.yellow.bold('If you choose the "plain" React Native option below, these imports will stop working.')}`; +${chalk.yellow.bold( + 'If you choose the "plain" React Native option below, these imports will stop working.' + )}`; } else { expoSdkWarning = `\ We didn't find any uses of the Expo SDK in your project, so you should be fine to eject to @@ -37,7 +41,9 @@ We didn't find any uses of the Expo SDK in your project, so you should be fine t ${expoSdkWarning} We ${chalk.italic('strongly')} recommend that you read this document before you proceed: - ${chalk.cyan('https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md')} + ${chalk.cyan( + 'https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md' + )} Ejecting is permanent! Please be careful with your selection. ` @@ -46,9 +52,10 @@ Ejecting is permanent! Please be careful with your selection. let reactNativeOptionMessage = "React Native: I'd like a regular React Native project."; if (usingExpo) { - reactNativeOptionMessage = chalk.italic( - "(WARNING: See above message for why this option may break your project's build)\n " - ) + reactNativeOptionMessage; + reactNativeOptionMessage = + chalk.italic( + "(WARNING: See above message for why this option may break your project's build)\n " + ) + reactNativeOptionMessage; } const questions = [ @@ -63,7 +70,8 @@ Ejecting is permanent! Please be careful with your selection. value: 'raw', }, { - name: "ExpoKit: I'll create or log in with an Expo account to use React Native and the Expo SDK.", + name: + "ExpoKit: I'll create or log in with an Expo account to use React Native and the Expo SDK.", value: 'expoKit', }, { @@ -80,11 +88,7 @@ Ejecting is permanent! Please be careful with your selection. const npmOrYarn = (await fse.exists(path.resolve('yarn.lock'))) ? 'yarnpkg' : 'npm'; const appJson = JSON.parse(await fse.readFile(path.resolve('app.json'))); const pkgJson = JSON.parse(await fse.readFile(path.resolve('package.json'))); - let { - name: newName, - displayName: newDisplayName, - expo: { name: expName }, - } = appJson; + let { name: newName, displayName: newDisplayName, expo: { name: expName } } = appJson; // we ask user to provide a project name (default is package name stripped of dashes) // but we want to infer some good default choices, especially if they've set them up in app.json diff --git a/react-native-scripts/src/scripts/ios.js b/react-native-scripts/src/scripts/ios.js index f353dc7a..c9e841bc 100644 --- a/react-native-scripts/src/scripts/ios.js +++ b/react-native-scripts/src/scripts/ios.js @@ -25,7 +25,9 @@ if (!Simulator.isPlatformSupported()) { ); log( chalk.yellow( - `If you run \`${chalk.cyan(command + ' start')}\` then you can view your app on a physical device.\n` + `If you run \`${chalk.cyan( + command + ' start' + )}\` then you can view your app on a physical device.\n` ) ); process.exit(1); diff --git a/react-native-scripts/src/util/expo.js b/react-native-scripts/src/util/expo.js index 7fb7c743..f1e73c25 100644 --- a/react-native-scripts/src/util/expo.js +++ b/react-native-scripts/src/util/expo.js @@ -23,7 +23,9 @@ export async function detach() { ` You'll need to specify an iOS bundle identifier. It must be unique on the App Store if you want to publish it there. See this StackOverflow question for more information: - ${chalk.cyan('https://stackoverflow.com/questions/11347470/what-does-bundle-identifier-mean-in-the-ios-project')} + ${chalk.cyan( + 'https://stackoverflow.com/questions/11347470/what-does-bundle-identifier-mean-in-the-ios-project' + )} ` ); const { iosBundleIdentifier } = await inquirer.prompt([ diff --git a/react-native-scripts/yarn.lock b/react-native-scripts/yarn.lock index f3c68091..cd37e555 100644 --- a/react-native-scripts/yarn.lock +++ b/react-native-scripts/yarn.lock @@ -1441,9 +1441,9 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" +fs-extra@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.0.tgz#414fb4ca2d2170ba0014159d3a8aec3303418d9e" dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" diff --git a/yarn.lock b/yarn.lock index 5e99b710..4774833a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,206 +2,6 @@ # yarn lockfile v1 -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.0.0.tgz#5404e93a544c4fec7f048262977bebfe3155e0c1" - dependencies: - color-convert "^1.0.0" - -ast-types@0.8.18: - version "0.8.18" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.18.tgz#c8b98574898e8914e9d8de74b947564a9fe929af" - -ast-types@0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.4.tgz#410d1f81890aeb8e0a38621558ba5869ae53c91b" - -babel-code-frame@6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -babylon@6.15.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" - -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -chalk@1.1.3, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -color-convert@^1.0.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" - dependencies: - color-name "^1.1.1" - -color-name@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" - -colors@>=0.6.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -esutils@2.0.2, esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -flow-parser@0.40.0: - version "0.40.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.40.0.tgz#b3444742189093323c4319c4fe9d35391f46bcbc" - dependencies: - ast-types "0.8.18" - colors ">=0.6.2" - minimist ">=0.2.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -get-stdin@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" - -glob@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -jest-matcher-utils@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" - dependencies: - chalk "^1.1.3" - pretty-format "^19.0.0" - -jest-validate@19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.0.tgz#8c6318a20ecfeaba0ba5378bfbb8277abded4173" - dependencies: - chalk "^1.1.1" - jest-matcher-utils "^19.0.0" - leven "^2.0.0" - pretty-format "^19.0.0" - -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" - -leven@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - -minimatch@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimist@1.2.0, minimist@>=0.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -prettier@^0.21.0: - version "0.21.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-0.21.0.tgz#5187ab95fdd9ca63dccf6217ed03b434d72771f8" - dependencies: - ast-types "0.9.4" - babel-code-frame "6.22.0" - babylon "6.15.0" - chalk "1.1.3" - esutils "2.0.2" - flow-parser "0.40.0" - get-stdin "5.0.1" - glob "7.1.1" - jest-validate "19.0.0" - minimist "1.2.0" - -pretty-format@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" - dependencies: - ansi-styles "^3.0.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +prettier@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.3.tgz#59dadc683345ec6b88f88b94ed4ae7e1da394bfe"