From 441e29f489013727dbf8404cf7d90d2020908d67 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Sun, 22 Sep 2019 18:29:11 -0400 Subject: [PATCH 1/3] fix Android package identifier description text --- README.md | 4 ++-- lib/cli-command.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbddf347..422219ab 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Options: --prefix The prefix for the library module (Default: ``) --module-name The module library package name to be used in package.json. Default: react-native-(name in param-case) --module-prefix The module prefix for the library module, ignored if --module-name is specified (Default: `react-native`) - --package-identifier (Android only!) The package name for the Android module (Default: `com.reactlibrary`) + --package-identifier [Android] The package identifier for the Android module (Default: `com.reactlibrary`) --platforms Platforms the library module will be created for - comma separated (Default: `ios,android`) --github-account The github account where the library module is hosted (Default: `github_account`) --author-name The author's name (Default: `Your Name`) @@ -129,7 +129,7 @@ createLibraryModule({ moduleName: String, /* The module library package name to be used in package.json. Default: react-native-(name in param-case) */ modulePrefix: String, /* The module prefix for the library, ignored if moduleName is specified (Default: react-native) */ platforms: Array | String, /* Platforms the library will be created for. (Default: ['android', 'ios']) */ - packageIdentifier: String, /* (Android only!) The package name for the Android module (Default: com.reactlibrary) */ + packageIdentifier: String, /* [Android] The package identifier for the Android module (Default: com.reactlibrary) */ githubAccount: String, /* The github account where the library is hosted (Default: `github_account`) */ authorName: String, /* The author's name (Default: `Your Name`) */ authorEmail: String, /* The author's email (Default: `yourname@email.com`) */ diff --git a/lib/cli-command.js b/lib/cli-command.js index 197ee834..938ebc1a 100644 --- a/lib/cli-command.js +++ b/lib/cli-command.js @@ -69,7 +69,7 @@ ${postCreateInstructions(createOptions)}`); default: 'react-native', }, { command: '--package-identifier [packageIdentifier]', - description: '(Android only!) The package name for the Android module', + description: '[Android] The package identifier for the Android module', default: 'com.reactlibrary', }, { command: '--platforms ', From 214e5a79fd9784a7c9e41ac43d157520e293195f Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 25 Sep 2019 13:13:38 -0400 Subject: [PATCH 2/3] do `yarn jest -u` to update the tests --- tests/integration/cli/help/__snapshots__/cli-help.test.js.snap | 2 +- .../cli/noargs/__snapshots__/cli-noargs.test.js.snap | 2 +- .../__snapshots__/lib-cli-command-object-text.test.js.snap | 2 +- .../cli-program-with-defaults-for-android.test.js.snap | 2 +- .../__snapshots__/cli-program-with-missing-args.test.js.snap | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap b/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap index 06a5a5ae..f13aad65 100644 --- a/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap +++ b/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap @@ -10,7 +10,7 @@ Options: --prefix [prefix] The prefix for the library module (default: \\"\\") --module-name [moduleName] The module library package name to be used in package.json. Default: react-native-(name in param-case) --module-prefix [modulePrefix] The module prefix for the library module, ignored if --module-name is specified (default: \\"react-native\\") - --package-identifier [packageIdentifier] (Android only!) The package name for the Android module (default: \\"com.reactlibrary\\") + --package-identifier [packageIdentifier] [Android] The package identifier for the Android module (default: \\"com.reactlibrary\\") --platforms Platforms the library module will be created for - comma separated (default: \\"ios,android\\") --github-account [githubAccount] The github account where the library module is hosted (default: \\"github_account\\") --author-name [authorName] The author's name (default: \\"Your Name\\") diff --git a/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap b/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap index ea9d7660..bd1eef3a 100644 --- a/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap +++ b/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap @@ -10,7 +10,7 @@ Options: --prefix [prefix] The prefix for the library module (default: \\"\\") --module-name [moduleName] The module library package name to be used in package.json. Default: react-native-(name in param-case) --module-prefix [modulePrefix] The module prefix for the library module, ignored if --module-name is specified (default: \\"react-native\\") - --package-identifier [packageIdentifier] (Android only!) The package name for the Android module (default: \\"com.reactlibrary\\") + --package-identifier [packageIdentifier] [Android] The package identifier for the Android module (default: \\"com.reactlibrary\\") --platforms Platforms the library module will be created for - comma separated (default: \\"ios,android\\") --github-account [githubAccount] The github account where the library module is hosted (default: \\"github_account\\") --author-name [authorName] The author's name (default: \\"Your Name\\") diff --git a/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap b/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap index d193079f..7fb3e915 100644 --- a/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap +++ b/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap @@ -23,7 +23,7 @@ Object { Object { "command": "--package-identifier [packageIdentifier]", "default": "com.reactlibrary", - "description": "(Android only!) The package name for the Android module", + "description": "[Android] The package identifier for the Android module", }, Object { "command": "--platforms ", diff --git a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap index e3c3d17e..1686dc9a 100644 --- a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap +++ b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap @@ -53,7 +53,7 @@ Array [ "option": Object { "args": Array [ "--package-identifier [packageIdentifier]", - "(Android only!) The package name for the Android module", + "[Android] The package identifier for the Android module", [Function], "com.reactlibrary", ], diff --git a/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap b/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap index 35fba4c1..28de6d13 100644 --- a/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap +++ b/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap @@ -51,7 +51,7 @@ Array [ "option": Object { "args": Array [ "--package-identifier [packageIdentifier]", - "(Android only!) The package name for the Android module", + "[Android] The package identifier for the Android module", [Function], "com.reactlibrary", ], From 5764f0a526dad7c7c7a414902b6daa764db6810c Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Wed, 25 Sep 2019 13:37:00 -0400 Subject: [PATCH 3/3] Apply suggestions from code review - clarify that this is a _Java_ package identifier that is _used_ by the Android module --- README.md | 4 ++-- lib/cli-command.js | 2 +- .../integration/cli/help/__snapshots__/cli-help.test.js.snap | 2 +- .../cli/noargs/__snapshots__/cli-noargs.test.js.snap | 2 +- .../__snapshots__/lib-cli-command-object-text.test.js.snap | 2 +- .../cli-program-with-defaults-for-android.test.js.snap | 2 +- .../__snapshots__/cli-program-with-missing-args.test.js.snap | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 90e4db02..12c65169 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Options: --prefix The prefix for the library module (Default: ``) --module-name The module library package name to be used in package.json. Default: react-native-(name in param-case) --module-prefix The module prefix for the library module, ignored if --module-name is specified (Default: `react-native`) - --package-identifier [Android] The package identifier for the Android module (Default: `com.reactlibrary`) + --package-identifier [Android] The Java package identifier used by the Android module (Default: `com.reactlibrary`) --platforms Platforms the library module will be created for - comma separated (Default: `ios,android`) --github-account The github account where the library module is hosted (Default: `github_account`) --author-name The author's name (Default: `Your Name`) @@ -129,7 +129,7 @@ createLibraryModule({ moduleName: String, /* The module library package name to be used in package.json. Default: react-native-(name in param-case) */ modulePrefix: String, /* The module prefix for the library, ignored if moduleName is specified (Default: react-native) */ platforms: Array | String, /* Platforms the library will be created for. (Default: ['android', 'ios']) */ - packageIdentifier: String, /* [Android] The package identifier for the Android module (Default: com.reactlibrary) */ + packageIdentifier: String, /* [Android] The Java package identifier used by the Android module (Default: com.reactlibrary) */ githubAccount: String, /* The github account where the library is hosted (Default: `github_account`) */ authorName: String, /* The author's name (Default: `Your Name`) */ authorEmail: String, /* The author's email (Default: `yourname@email.com`) */ diff --git a/lib/cli-command.js b/lib/cli-command.js index de33f6d7..11ec020b 100644 --- a/lib/cli-command.js +++ b/lib/cli-command.js @@ -69,7 +69,7 @@ ${postCreateInstructions(createOptions)}`); default: 'react-native', }, { command: '--package-identifier [packageIdentifier]', - description: '[Android] The package identifier for the Android module', + description: '[Android] The Java package identifier used by the Android module', default: 'com.reactlibrary', }, { command: '--platforms ', diff --git a/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap b/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap index f13aad65..3e9737e8 100644 --- a/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap +++ b/tests/integration/cli/help/__snapshots__/cli-help.test.js.snap @@ -10,7 +10,7 @@ Options: --prefix [prefix] The prefix for the library module (default: \\"\\") --module-name [moduleName] The module library package name to be used in package.json. Default: react-native-(name in param-case) --module-prefix [modulePrefix] The module prefix for the library module, ignored if --module-name is specified (default: \\"react-native\\") - --package-identifier [packageIdentifier] [Android] The package identifier for the Android module (default: \\"com.reactlibrary\\") + --package-identifier [packageIdentifier] [Android] The Java package identifier used by the Android module (default: \\"com.reactlibrary\\") --platforms Platforms the library module will be created for - comma separated (default: \\"ios,android\\") --github-account [githubAccount] The github account where the library module is hosted (default: \\"github_account\\") --author-name [authorName] The author's name (default: \\"Your Name\\") diff --git a/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap b/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap index bd1eef3a..0a387b94 100644 --- a/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap +++ b/tests/integration/cli/noargs/__snapshots__/cli-noargs.test.js.snap @@ -10,7 +10,7 @@ Options: --prefix [prefix] The prefix for the library module (default: \\"\\") --module-name [moduleName] The module library package name to be used in package.json. Default: react-native-(name in param-case) --module-prefix [modulePrefix] The module prefix for the library module, ignored if --module-name is specified (default: \\"react-native\\") - --package-identifier [packageIdentifier] [Android] The package identifier for the Android module (default: \\"com.reactlibrary\\") + --package-identifier [packageIdentifier] [Android] The Java package identifier used by the Android module (default: \\"com.reactlibrary\\") --platforms Platforms the library module will be created for - comma separated (default: \\"ios,android\\") --github-account [githubAccount] The github account where the library module is hosted (default: \\"github_account\\") --author-name [authorName] The author's name (default: \\"Your Name\\") diff --git a/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap b/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap index 7fb3e915..2e9280b6 100644 --- a/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap +++ b/tests/with-injection/cli/command/object/__snapshots__/lib-cli-command-object-text.test.js.snap @@ -23,7 +23,7 @@ Object { Object { "command": "--package-identifier [packageIdentifier]", "default": "com.reactlibrary", - "description": "[Android] The package identifier for the Android module", + "description": "[Android] The Java package identifier used by the Android module", }, Object { "command": "--platforms ", diff --git a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap index 1686dc9a..2ba972eb 100644 --- a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap +++ b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap @@ -53,7 +53,7 @@ Array [ "option": Object { "args": Array [ "--package-identifier [packageIdentifier]", - "[Android] The package identifier for the Android module", + "[Android] The Java package identifier used by the Android module", [Function], "com.reactlibrary", ], diff --git a/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap b/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap index 28de6d13..daa8c7ae 100644 --- a/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap +++ b/tests/with-mocks/cli/program/with-missing-args/__snapshots__/cli-program-with-missing-args.test.js.snap @@ -51,7 +51,7 @@ Array [ "option": Object { "args": Array [ "--package-identifier [packageIdentifier]", - "[Android] The package identifier for the Android module", + "[Android] The Java package identifier used by the Android module", [Function], "com.reactlibrary", ],