mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57490 See [**RFC0894: Removing deep imports from react-native**](https://github.com/react-native-community/discussions-and-proposals/pull/894) This is the **big switch** to enable the Strict TypeScript API (generated types + single index entry point) by default in React Native. **Opt-in → opt-out** After this change, the main `react-native` package resolves its `"types"` entry points only to `types_generated/index.d.ts` — with no other subpaths available. The new `"react-native-legacy-deep-imports"` condition maps to legacy `types/` and `Libraries/*.d.ts` sources. **Impact limitation**: For this stage of rollout, the `"default"` condition continues to resolve to source files. Only TypeScript is affected. **How to opt out** Opposite of today's opt-in, which we will update in [the docs](https://reactnative.dev/docs/strict-typescript-api). Again, the only impact area today is **TypeScript**. ```json5 // tsconfig.json { "extends": "react-native/typescript-config", "compilerOptions": { ... "customConditions": ["react-native-legacy-deep-imports"] } } ``` **Other changes** - Drop `react-native/typescript-config/strict` entry point, update README. - Update `__typetests__`. **Rollout plan** **Target release: 0.87**. This and the contributing stack will be cherry picked for RC1. - We've conducted testing against 100+ real Expo codebases, giving us the confidence that we've reduced breaking changes enough that the vast majority of RN codebases can migrate. - The Strict API includes a number of **intentional breaking changes**, and docs have been kept up to date. - We're shipping a `/migrate-to-strict-api` skill to migrate via agents, see https://github.com/react-native-community/skills/pull/3. **What's improved since 0.80?** Since the initial opt-in launch of the Strict API in 0.80, we've been making continuous improvements over the last year to get our generated types into a widely launchable state. Most notably: - 21+ new/updated root APIs and fixes due to community feedback ([discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/893), [PRs](https://github.com/react/react-native/pulls?q=is%3Apr%20label%3A%22JS%20API%20stabilization%20(1.0)%22%20is%3Aclosed)). - Upstream encapsulation blocker in TypeScript, fixed in 6.0 (https://github.com/react/react-native/issues/53565). - Tailwind/Uniwind compatibility (`interface` types for props). - `*Instance` ref type exports for all built-in components (https://github.com/react-native-community/discussions-and-proposals/pull/1003). - Fixes to previously mistyped, high impact APIs, such as `Appearance`. - New subpath entry points for `asset-registry`, `setup-env`, and others. - Refinements to doc comments/type translation build. **Rollback plan** Revert this diff. IMPORTANT: We'll adopt a policy of **super-eager rollback**, if there are any unsolvable issues during the RC phase. Changelog: [General][Breaking] - React Native's default JavaScript API is now the [Strict TypeScript API](https://reactnative.dev/docs/strict-typescript-api). Use `customConditions: ["react-native-legacy-deep-imports"]` to opt out. Reviewed By: cortinico Differential Revision: D110458670 fbshipit-source-id: 4b0e0b458a5f895f783d6d936e7b11ccff2df076
64 lines
1.4 KiB
JSON
64 lines
1.4 KiB
JSON
{
|
|
"name": "@react-native/virtualized-lists",
|
|
"version": "0.87.0-main",
|
|
"description": "Virtualized lists for React Native.",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/react/react-native.git",
|
|
"directory": "packages/virtualized-lists"
|
|
},
|
|
"homepage": "https://github.com/react/react-native/tree/HEAD/packages/virtualized-lists#readme",
|
|
"keywords": [
|
|
"lists",
|
|
"virtualized-lists",
|
|
"section-lists",
|
|
"react-native"
|
|
],
|
|
"bugs": "https://github.com/react/react-native/issues",
|
|
"engines": {
|
|
"node": "^22.13.0 || ^24.3.0 || >= 26.0.0"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"react-native-legacy-deep-imports": "./index.d.ts",
|
|
"types": "./types_generated/index.d.ts",
|
|
"default": "./index.js"
|
|
},
|
|
"./*": {
|
|
"types": null,
|
|
"default": "./*.js"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"index.js",
|
|
"index.d.ts",
|
|
"Lists",
|
|
"README.md",
|
|
"types_generated",
|
|
"Utilities",
|
|
"!**/__docs__/**",
|
|
"!**/__fixtures__/**",
|
|
"!**/__mocks__/**",
|
|
"!**/__tests__/**"
|
|
],
|
|
"dependencies": {
|
|
"invariant": "^2.2.4",
|
|
"nullthrows": "^1.1.1"
|
|
},
|
|
"devDependencies": {
|
|
"react-test-renderer": "19.2.3"
|
|
},
|
|
"peerDependencies": {
|
|
"@types/react": "^19.2.0",
|
|
"react": "*",
|
|
"react-native": "1000.0.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@types/react": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|