File tree Expand file tree Collapse file tree 6 files changed +19
-14
lines changed
create-react-native-library
react-native-builder-bob/src Expand file tree Collapse file tree 6 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ If you have a reason to not ship Codegen generated scaffold code with your libra
150150 ]
151151 ```
152152
153- 3 . Add ` package.json ` to the ` exports ` field in your ` package.json ` :
153+ 3 . If you have an ` exports ` field in your ` package.json ` , ensure that it contains ` ./ package.json` :
154154
155155 ``` diff
156156 "exports": {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
2020import { getDependencyVersionsFromExampleApp } from './exampleApp/dependencies' ;
2121import { printErrorHelp , printNextSteps , printUsedRNVersion } from './inform' ;
2222
23- const FALLBACK_BOB_VERSION = '0.36.0 ' ;
23+ const FALLBACK_BOB_VERSION = '0.38.3 ' ;
2424const FALLBACK_NITRO_MODULES_VERSION = '0.22.1' ;
2525
2626yargs
Original file line number Diff line number Diff line change @@ -90,17 +90,17 @@ const TYPE_CHOICES: {
9090 value : 'turbo-module' ,
9191 description : 'integration for native APIs to JS' ,
9292 } ,
93+ {
94+ title : 'Fabric view' ,
95+ value : 'fabric-view' ,
96+ description : 'integration for native views to JS' ,
97+ } ,
9398 {
9499 title : 'Nitro module' ,
95100 value : 'nitro-module' ,
96101 description :
97102 'type-safe, fast integration for native APIs to JS (experimental)' ,
98103 } ,
99- {
100- title : 'Fabric view' ,
101- value : 'fabric-view' ,
102- description : 'integration for native views to JS' ,
103- } ,
104104 {
105105 title : 'Legacy Native module' ,
106106 value : 'legacy-module' ,
Original file line number Diff line number Diff line change 1515 "types" : " ./lib/typescript/commonjs/src/index.d.ts" ,
1616 "default" : " ./lib/commonjs/index.js"
1717 }
18- }
18+ },
19+ "./package.json" : " ./package.json"
1920 },
2021 "files" : [
2122 " src" ,
234235 "android" : {
235236 "javaPackageName" : " com.<%- project.package %>"
236237 <% if (example === 'vanilla') { -%>
238+ <% if (project.viewConfig === 'fabric-view') { -%>
239+ },
240+ "ios" : {
241+ "componentProvider" : {
242+ "<%- project.name -%>View" : " <%- project.name -%>View"
243+ }
244+ <% } -%>
237245 },
238246 "includesGeneratedCode" : true
239247 <% } else { -%>
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ exports[`initializes the configuration 1`] = `
1717 " types" : " ./lib/typescript/commonjs/src/index.d.ts" ,
1818 " default" : " ./lib/commonjs/index.js"
1919 }
20- }
20+ },
21+ " ./package.json" : " ./package.json"
2122 },
2223 " source" : " ./src/index.ts" ,
2324 " main" : " ./lib/commonjs/index.js" ,
Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ export async function init() {
242242
243243 const exportsField = {
244244 '.' : { } ,
245+ './package.json' : './package.json' ,
245246 } ;
246247
247248 const importField = {
@@ -265,11 +266,6 @@ export async function init() {
265266 exportsField [ '.' ] = importField ;
266267 }
267268
268- if ( pkg . codegenConfig && ! pkg . codegenConfig . includesGeneratedCode ) {
269- // @ts -expect-error The exports is not strictly types therefore it doesn't know about the package.json property
270- exportsField [ './package.json' ] = './package.json' ;
271- }
272-
273269 if (
274270 pkg . exports &&
275271 JSON . stringify ( pkg . exports ) !== JSON . stringify ( exportsField )
You can’t perform that action at this time.
0 commit comments