Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop warning on every call to init #1

Closed
wants to merge 34 commits into from

Conversation

blakef
Copy link
Owner

@blakef blakef commented Jun 20, 2024

  • fix: only show warning about --template & --version when necessary

Summary:


When running npx @react-native-community/cli init, you now get a warning:

$ npx @react-native-community/cli@next init TestInit --version next
warn Use --template and --version only if you know what you're doing. Here be dragons 🐉.

It's clearly wrong and should only happen when --version and --template are used together.

Test Plan:

node scripts/build
...
$ node ./packages/cli/build/bin.js init --version next --skip-install --verbose TestInit2
debug Initializing new project
$ node ./packages/cli/build/bin.js init --version next  --template @react-native-community/template@next TestInit --skip-install --verbose
warn Use --template and --version only if you know what you're doing. Here be dragons 🐉.
debug Use the user provided --template=@react-native-community/template@next
debug Initializing new project

LGTM

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

blakef and others added 30 commits April 12, 2024 08:23
* Fixed cannot start Android emulator version 34.1.20.0

* Fixed lint error

* refactor: change logic for checking emulator name

* style: specific comment for why we change filter

Co-authored-by: Michał Pierzchała <[email protected]>

* fix: linter issue

---------

Co-authored-by: Sung Hwan Lee <[email protected]>
Co-authored-by: Sung Hwan Lee <[email protected]>
Co-authored-by: Michał Pierzchała <[email protected]>
* fix(e2e): sync with React Native 0.74

* ci: bump gradle

* fix: do not hardcode gradle version

* ci(win): try setting `shell: true`
* chore: change package executable `bin` path

* fix: apply feedback from review
* ci: skip windows e2e tests in specific scenario

* chore: log values

* chore: remove leftovers
…2389)

* chore: remove `@react-native-community/cli` from `bin` entrypoints

* chore: `rnccli` → `rnc-cli`
* perf(autolinking): get platform's specific properties

* fix: switch param order

* fix: accept object as param in `loadConfig` function
Bumps [semver](https://github.com/npm/node-semver) from 7.5.2 to 7.5.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.5.2...v7.5.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: upgrade from parcel-bundler to parcel, remove babel deps

* chore: remove babelrc from debugger-ui

* feat: make parcel use swc instead of babel

* chore: add .parcel-cache to ignored files

* fix: bundling errors

* fix: ignore main when building ui target

* update lockfile

* add --no-cache flag to avoid SIGSEGV error

---------

Co-authored-by: Michał Pierzchała <[email protected]>
…2388)

If you have a main activity that is not in package, and is fully specified,
it used to work, but it regressed after adding auto-activity detection

If your launcher / `MAIN` activity either specified by --main-activity or
in AndroidManifest.xml is fully specified for example like
"com.zoontek.rnbootsplash.RNBootSplashActivity" then it needs to launch
for example "com.kullki.kscore.dev/com.zoontek.rnbootsplash.RNBootSplashActivity"
not "com.kullki.kscore.dev/com.kullki.kscore.dev.com.zoontek.rnbootsplash.RNBootSplashActivity"
Bumps [jsdom](https://github.com/jsdom/jsdom) from 16.4.0 to 16.7.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](jsdom/jsdom@16.4.0...16.7.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2377)

* chore(run-android): deprecate `--deviceId` in favour of `--device`

* fix: option should accept only strings

* Update packages/cli-platform-android/src/commands/runAndroid/index.ts

Co-authored-by: Michał Pierzchała <[email protected]>

---------

Co-authored-by: Michał Pierzchała <[email protected]>
… in `getPackageClassName` (#2384)

* perf(autolinking)!: prioritise files with `*Package.java|*Package.kt` in `getPackageClassName`

* fix: get all files when getting files inside project

* test: add tests
* chore: remove node-fetch

* chore: update node types to newest version

* fix: vendor types for opentype to prevent polluting global namespace with dom types

* feat: use native fetch

* refactor: use absolute minimum of opentype.js typings
* feat: allow passing UDID inside `--device` option

* chore: explain device name condition
* fix(apple): parse `.xcworkspace` for schemes

* fixup! fix(apple): parse `.xcworkspace` for schemes

* fixup! fix(apple): parse `.xcworkspace` for schemes
Bumps [ws](https://github.com/websockets/ws) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@6.2.2...6.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
szymonrybczak and others added 4 commits June 19, 2024 16:28
#2417)

* fix: update react-native version in the template for versions >= 0.75.

The new template handling in @react-native-community/template means that
these are shipped with version 1000.0.0 for React Native. The CLI now
owns this.

* fix: --version & --template handling for 0.75

1. Allow using both of these, but only when the user specifies a version
   of react-native >= 0.75. Since templates are now detached there are
   valid use cases for developers and users to specify a template.
   Added a warning about this test(scope): title
2. Exit early for 0.75+ when we can't find a matching
   @react-native-community/template to the version of react-native.
   These should always be matching, but allow for users to remidy this
   by specifying a template. Clearly this should never happen though.

I've also gone to some effort to use concrete versions in the code when
tags are passed.  E.g. --version next, currently maps to 0.75.0-rc0. We
use the latter when looking up templates.

* fix: update @react-native/ scoped packages to match version

From 0.75 our @react-native/ dependencies must match the version of
react-native. Updated init to perform this on
@react-native-community/template.
This is showing at all times, instead of when it's needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants