Skip to content

Commit 834f089

Browse files
author
Chris Brody
authored
use react-native@latest in example by default (#263)
* use react-native@latest in example by default * update test snapshots
1 parent 0ab7415 commit 834f089

File tree

17 files changed

+22
-22
lines changed

17 files changed

+22
-22
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Options:
108108
--use-apple-networking [iOS] Use `AFNetworking` dependency as a sample in the podspec & use it from the iOS code
109109
--generate-example Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally
110110
--example-name <exampleName> Name for the example project (default: `example`)
111-
--example-react-native-version <version> React Native version for the generated example project (default: `react-native@0.61`)
111+
--example-react-native-version <version> React Native version for the generated example project (default: `react-native@latest`)
112112
--write-example-podfile [iOS] EXPERIMENTAL FEATURE NOT SUPPORTED: write (or overwrite) example ios/Podfile
113113
-h, --help output usage information
114114
```
@@ -144,7 +144,7 @@ createLibraryModule({
144144
view: Boolean, /* Generate the module as a very simple native view component (Default: false) */
145145
generateExample: Boolean, /* Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally (Default: false) */
146146
exampleName: String, /* Name for the example project (Default: `example`) */
147-
exampleReactNativeVersion: String, /* React Native version for the generated example project (Default: `react-native@0.61`) */
147+
exampleReactNativeVersion: String, /* React Native version for the generated example project (Default: `react-native@latest`) */
148148
writeExamplePodfile: Boolean, /* [iOS] EXPERIMENTAL FEATURE NOT SUPPORTED: write (or overwrite) example ios/Podfile (Default: false) */
149149
}
150150
```

lib/cli-command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ ${postCreateInstructions(createOptions)}`);
124124
}, {
125125
command: '--example-react-native-version [exampleReactNativeVersion]',
126126
description: 'React Native version for the generated example project',
127-
default: 'react-native@0.61',
127+
default: 'react-native@latest',
128128
}, {
129129
command: '--write-example-podfile',
130130
description: '[iOS] EXPERIMENTAL FEATURE NOT SUPPORTED: write (or overwrite) example ios/Podfile',

lib/lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const DEFAULT_AUTHOR_EMAIL = '[email protected]';
3131
const DEFAULT_LICENSE = 'MIT';
3232
const DEFAULT_GENERATE_EXAMPLE = false;
3333
const DEFAULT_EXAMPLE_NAME = 'example';
34-
const DEFAULT_EXAMPLE_REACT_NATIVE_VERSION = 'react-native@0.61';
34+
const DEFAULT_EXAMPLE_REACT_NATIVE_VERSION = 'react-native@latest';
3535

3636
const renderTemplateIfValid = (fs, root, template, templateArgs) => {
3737
// avoid throwing an exception in case there is no valid template.name member

tests/integration/cli/help/__snapshots__/cli-help.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Options:
2121
--use-apple-networking [iOS] Use \`AFNetworking\` dependency as a sample in the podspec & use it from the iOS code
2222
--generate-example Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally
2323
--example-name [exampleName] Name for the example project (default: \\"example\\")
24-
--example-react-native-version [exampleReactNativeVersion] React Native version for the generated example project (default: \\"react-native@0.61\\")
24+
--example-react-native-version [exampleReactNativeVersion] React Native version for the generated example project (default: \\"react-native@latest\\")
2525
--write-example-podfile [iOS] EXPERIMENTAL FEATURE NOT SUPPORTED: write (or overwrite) example ios/Podfile
2626
-h, --help output usage information"
2727
`;

tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Options:
2121
--use-apple-networking [iOS] Use \`AFNetworking\` dependency as a sample in the podspec & use it from the iOS code
2222
--generate-example Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally
2323
--example-name [exampleName] Name for the example project (default: \\"example\\")
24-
--example-react-native-version [exampleReactNativeVersion] React Native version for the generated example project (default: \\"react-native@0.61\\")
24+
--example-react-native-version [exampleReactNativeVersion] React Native version for the generated example project (default: \\"react-native@latest\\")
2525
--write-example-podfile [iOS] EXPERIMENTAL FEATURE NOT SUPPORTED: write (or overwrite) example ios/Podfile
2626
-h, --help output usage information"
2727
`;

tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Object {
7373
},
7474
Object {
7575
"command": "--example-react-native-version [exampleReactNativeVersion]",
76-
"default": "react-native@0.61",
76+
"default": "react-native@latest",
7777
"description": "React Native version for the generated example project",
7878
},
7979
Object {

tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ content:
779779
780780
<<<<<<<< ======== >>>>>>>>
781781
",
782-
"* execa.commandSync command: react-native init example --version react-native@0.61 options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
782+
"* execa.commandSync command: react-native init example --version react-native@latest options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
783783
",
784784
"* ensureDir dir: react-native-alice-bobbi/scripts/
785785
",

tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ sdk.dir=/Users/{username}/Library/Android/sdk
391391
392392
<<<<<<<< ======== >>>>>>>>
393393
",
394-
"* execa.commandSync command: react-native init example --version react-native@0.61 options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
394+
"* execa.commandSync command: react-native init example --version react-native@latest options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
395395
",
396396
"* ensureDir dir: react-native-alice-bobbi/scripts/
397397
",

tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ content:
775775
776776
<<<<<<<< ======== >>>>>>>>
777777
",
778-
"* execa.commandSync command: react-native init example --version react-native@0.61 options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
778+
"* execa.commandSync command: react-native init example --version react-native@latest options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
779779
",
780780
"* ensureDir dir: react-native-alice-bobbi/scripts/
781781
",

tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ content:
775775
776776
<<<<<<<< ======== >>>>>>>>
777777
",
778-
"* execa.commandSync command: react-native init example --version react-native@0.61 options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
778+
"* execa.commandSync command: react-native init example --version react-native@latest options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
779779
",
780780
"* ensureDir dir: react-native-alice-bobbi/scripts/
781781
",

0 commit comments

Comments
 (0)