mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9bb71650c9
Summary: - Add a typescript project to test `CodegenSchema.d.ts`. More tests for other .d.ts files will be added in future pull requests. - The build script scans all snapshots from `react-native/codegen`'s typescript frontend and generates .ts files for each snapshot, but they are .gitignore-ed. - `npm run build` will build these .ts files against `CodegenSchema.d.ts` after generating them. - A failed jest case is included to ensure CI catch it, it will be removed before merged. bypass-github-export-checks ## Changelog: [General] [Added] - Add react-native/codegen-typescript-test to verify .d.ts files in react-native/codegen (1) Pull Request resolved: https://github.com/facebook/react-native/pull/36562 Test Plan: `npm run build` in `packages/react-native-codegen-typescript-test` and see all test files appear in `__generated__`. ## Screenshot  Reviewed By: rshest Differential Revision: D44292277 Pulled By: cipolleschi fbshipit-source-id: 8d79fe913f9563d64c92aae7c4f4e97a24ae9a21
39 lines
1.4 KiB
JSON
39 lines
1.4 KiB
JSON
{
|
|
"name": "@react-native/codegen-typescript-test",
|
|
"version": "0.0.1",
|
|
"description": "⚛️ TypeScript related unit test for @react-native/codegen",
|
|
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-typescript-test",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git@github.com:facebook/react-native.git",
|
|
"directory": "packages/react-native-codegen-typescript-test"
|
|
},
|
|
"scripts": {
|
|
"build": "yarn clean && node scripts/build.js --verbose && tsc",
|
|
"clean": "rimraf lib && rimraf __generated__/*.ts",
|
|
"prepare": "yarn run build"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@react-native/codegen": "*"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.20.0",
|
|
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
|
|
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
|
|
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
|
|
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
|
"@babel/plugin-transform-async-to-generator": "^7.0.0",
|
|
"@babel/plugin-transform-destructuring": "^7.0.0",
|
|
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
|
|
"@babel/preset-env": "^7.14.0",
|
|
"@types/jest": "^24.0.17",
|
|
"jest": "^24.0.17",
|
|
"rimraf": "^3.0.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@babel/preset-env": "^7.1.6"
|
|
}
|
|
}
|