react-native-macos/scripts
Luna Wei 6b2a511cbb Move TypeScript declarations into react-native (#34614)
Summary:
## Changelog
[General] [Added] - Add `types` folder to house TypeScript types.

Release TypesScript types with react-native and eventually deprecate [types/react-native](https://www.npmjs.com/package/types/react-native).

The current plan is to release types/react-native for 0.70 and 0.71 while also maintaining types here. This will result in some double maintenance until 0.72 but will give community time to move off of types/react-native.

After this lands, there have been changes on `main` of types that we need to update. Then, when we release 0.71 from DefinitelyTyped, we can simply copy over the `types` folder from this repo.

Pull Request resolved: https://github.com/facebook/react-native/pull/34614

Test Plan:
`yarn run test-typescript` for linting types

* Created a new project using the TS template and my local clone of `react-native` on this branch.
`npx react-native init MyTSApp --version <path-to-my-local-rn-repo> --template react-native-template-typescript`
* Updated the `package.json` to remove `types/react-native`
* Deleted my node_modules and re-ran yarn
* Opened MyTSApp in VSCode and verified the type suggestions appeared and cmd+click to defnitions took me to the node_module dependency `react-native/types`

## Danger is failing on this PR and it's expected
 as it runs off the changes on `main`.  [This is expected](https://docs.github.com/en/github-ae@latest/actions/using-workflows/events-that-trigger-workflows?fbclid=IwAR2_AE0Jwndt8Gu-iTQnxGxLJq7nakbi7sz8jwZ6U62JWLSdcZuvjcQ6WvE#pull_request_target). However testing it locally passes. Once merged, and these changes are on `main`, danger will pass again.

```
$ react-native/packages/react-native-bots
❯ yarn danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ ..react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

  Done in 13.24s.
```

Reviewed By: mdvacca

Differential Revision: D39479137

Pulled By: lunaleaps

fbshipit-source-id: 1d506f812d566b783b6e79104cd6339b077a42a7
2022-09-19 12:26:00 -07:00
..
__tests__ Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00
circleci Fix missing renames from bots to react-native-bots (#34713) 2022-09-16 12:41:06 -07:00
cocoapods Simplify furthermore App migration 2022-09-14 04:21:02 -07:00
codegen @emails -> @oncall (remaining ones) 2022-09-15 15:54:10 -07:00
hermes Simplify logic to choose if we need to build hermes from source or not. (#34232) 2022-07-22 02:13:47 -07:00
react_native_pods_utils Run script phases tests in CI and Sandcastle (#33802) 2022-05-11 10:00:28 -07:00
versiontemplates Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
xcode Export REACT_NATIVE_PATH and fix find-node-for-xcode.sh fallback behavior (#33674) 2022-04-21 06:59:17 -07:00
.npmignore Move TypeScript declarations into react-native (#34614) 2022-09-19 12:26:00 -07:00
.packager.env Move YGStyle to seperate file and add constructors 2018-02-20 05:55:36 -08:00
.tests.env Bump OSS Android build to SDK 31 (#32606) 2021-11-24 12:27:26 -08:00
android-e2e-test.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
android-setup.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
bump-oss-version.js Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00
compose-source-maps.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
download-kotlin-compiler-with-buck.sh Download kotlin compiler JARs for Buck instead of checking them in (#33209) 2022-03-02 13:04:49 -08:00
find-node-for-xcode.sh Reintroduce `find-node.sh` as mitigation measure (#33538) 2022-04-04 02:43:07 -07:00
generate-api-docs.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-artifacts.js Refactor generate-artifacts to improve testability. 2022-05-04 04:04:10 -07:00
generate-provider-cli.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-specs-cli.js Update CodeGen to leverage the `outputDir` as suggested in diff review (#33729) 2022-05-04 04:04:10 -07:00
ios-configure-glog.sh fix (glog script): remove invalid param from sed (#33967) 2022-06-17 11:58:08 -07:00
launchPackager.bat Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
launchPackager.command Use `NODE_BINARY` from `.xcode.env` when running packager from Xcode (#34121) 2022-07-12 05:52:22 -07:00
lint-java.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
native_modules.rb Move cocoapods cli native_modules require from template to rn scripts (#34215) 2022-07-19 09:11:08 -07:00
node-binary.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
objc-test.sh fix: Make WebSocketTests work in CI (#33721) 2022-04-28 08:53:24 -07:00
packager-reporter.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
packager.sh Use readlink instead of realpath in packager.sh (#34145) 2022-07-20 07:06:18 -07:00
prepare-package-for-release.js Fix up lint errors under react-native-github (#33622) 2022-04-22 16:25:25 -07:00
process-podspecs.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
publish-npm.js Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00
react-native-xcode.sh Add matrix for Debug/Release, New/Legacy Architecture, (No)Hermes (#34469) 2022-08-31 08:54:06 -07:00
react_native_pods.rb Simplify furthermore App migration 2022-09-14 04:21:02 -07:00
run-android-ci-instrumentation-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-emulator.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
run-android-local-integration-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-local-unit-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-ci-e2e-tests.js Updating Yarn Cache path to fix broken CI (#32834) 2022-01-06 10:46:15 -08:00
run-ci-javascript-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-instrumentation-tests-via-adb-shell.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run_ruby_tests.sh Run script phases tests in CI and Sandcastle (#33802) 2022-05-11 10:00:28 -07:00
scm-utils.js Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00
set-rn-engine.js Test the Android Template with the JSC engine (#34664) 2022-09-12 12:33:07 -07:00
set-rn-template-version.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
set-rn-version.js Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00
sync-css-layout.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
test-manual-e2e.sh Fix test-manual-e2e on Android/Hermes for New App Template (#34294) 2022-07-28 06:23:11 -07:00
try-n-times.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
update-ruby.sh Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00
update_podfile_lock.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
validate-android-device-env.sh Update CONTRIBUTING.md, replace wiki links (#34035) 2022-06-21 19:30:23 -07:00
validate-android-sdk.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-android-test-env.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-ios-test-env.sh bump Node references from 12/14 to 14/16 (#32980) 2022-01-28 05:07:18 -08:00
version-utils.js Build the React Native NPM package when git is not available (#34694) 2022-09-16 02:58:36 -07:00