Skip to content

Releases: callstack/react-native-builder-bob

docs@0.6.3

07 Apr 11:06
222ea60
Compare
Choose a tag to compare

0.6.3 (2025-04-07)

Note: Version bump only for package docs

create-react-native-library@0.49.5

07 Apr 11:20
1093e42
Compare
Choose a tag to compare

0.49.5 (2025-04-07)

Bug Fixes

  • require node 23.4.0 to avoid ESM warning (aa2a3f3) - by @

create-react-native-library@0.49.4

07 Apr 11:15
20645f3
Compare
Choose a tag to compare

0.49.4 (2025-04-07)

Bug Fixes

  • fix engines field (ef93d26) - by @

create-react-native-library@0.49.3

07 Apr 11:06
222ea60
Compare
Choose a tag to compare

0.49.3 (2025-04-07)

Bug Fixes

  • update engines field to compatible node versions (d803cfd) - by @
  • update template .nvmrc to require Node 20.19.0 (e7206d3) - by @satya164

react-native-builder-bob@0.40.0

04 Apr 21:25
f1db236
Compare
Choose a tag to compare

0.40.0 (2025-04-04)

Important

There's a possibility of dual package hazard with the default setup. Metro enables exports support from 0.82.0, so this can become a problem for some packages.

This release drops the dual package setup from the default template in favor of an ESM-only setup. To make a similar change in your package, apply the following change to your entrypoints:

- "main": "./lib/commonjs/index.js",
+ "main": "./lib/module/index.js",
- "types": "./lib/typescript/commonjs/src/index.d.ts",
+ "types": "./lib/typescript/src/index.d.ts",
  "exports": {
    ".": {
-     "import": {
-       "types": "./lib/typescript/module/src/index.d.ts",
-       "default": "./lib/module/index.js"
-     },
-     "require": {
-       "types": "./lib/typescript/commonjs/src/index.d.ts",
-       "default": "./lib/commonjs/index.js"
-     }
+     "types": "./lib/typescript/src/index.d.ts",
+     "default": "./lib/module/index.js"
    },
    "./package.json": "./package.json"
  },

If you don't need to support legacy setups that use moduleResolution: node10 or moduleResolution: node, you can also remove the types field:

  "main": "./lib/module/index.js",
- "types": "./lib/typescript/src/index.d.ts",

In addition, remove the commonjs target from the react-native-builder-bob field in your package.json or bob.config.js or bob.config.mjs:

"react-native-builder-bob": {
  "source": "src",
  "output": "lib",
  "targets": [
    ["module", { "esm": true }],
-   ["commonjs", { "esm": true }]
    "typescript",
  ]
}

You may also want to delete your output (e.g. lib) folder to cleanup the leftover commonjs build.

Alternatively, you can run npx react-native-builder-bob@latest init in your project and accept the default configuration to re-configure react-native-builder-bob with the above setup.

With this change, Jest will break for the consumers of your libraries due to the usage of ESM syntax. So they may need to update their Jest configuration to transform your library:

module.exports = {
  preset: 'react-native',
+ transformIgnorePatterns: [
+   "node_modules/(?!(@react-native|react-native|your-library)/)"
+ ]
};

If consumers of your library are using it in NodeJS in a CommonJS environment, they'll need to use at least NodeJS v20.19.0 to be able to synchronously require your library.

You can read more at our ESM support docs.

Node version requirements

The following versions of Node.js are compatible with this release:

  • v20.19.0 or higher (LTS)
  • v22.12.0 or higher (LTS)
  • v23.4.0 or higher

Features

docs@0.6.2

04 Apr 21:25
f1db236
Compare
Choose a tag to compare

0.6.2 (2025-04-04)

Note: Version bump only for package docs

create-react-native-library@0.49.2

04 Apr 21:25
f1db236
Compare
Choose a tag to compare

0.49.2 (2025-04-04)

Bug Fixes

  • crnl: certain versions of XCode can't resolve codegen headers (#810) (7c12d62) - by @atlj

react-native-builder-bob@0.39.1

02 Apr 12:46
23f5ac7
Compare
Choose a tag to compare

0.39.1 (2025-04-02)

Bug Fixes

docs@0.6.1

02 Apr 12:46
23f5ac7
Compare
Choose a tag to compare

0.6.1 (2025-04-02)

Bug Fixes

  • remove resolvePackageJsonImports: false since Metro supports it from 0.82.0 (7ac5d1a) - by @satya164

create-react-native-library@0.49.1

02 Apr 12:46
23f5ac7
Compare
Choose a tag to compare

0.49.1 (2025-04-02)

Bug Fixes

  • remove resolvePackageJsonImports: false since Metro supports it from 0.82.0 (7ac5d1a) - by @satya164