Skip to content

Commit fa24990

Browse files
Merge branch 'main' into nitro-view
2 parents 6ffc282 + 7ac5d1a commit fa24990

File tree

21 files changed

+270
-166
lines changed

21 files changed

+270
-166
lines changed

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [0.6.0](https://github.com/callstack/react-native-builder-bob/compare/[email protected]@0.6.0) (2025-03-29)
7+
8+
### Features
9+
10+
- update eslint to v9 ([#794](https://github.com/callstack/react-native-builder-bob/issues/794)) ([d056559](https://github.com/callstack/react-native-builder-bob/commit/d056559559ed09d77779d95cb323572971b1dc75)) - by @Serchinastico
11+
612
## [0.5.4](https://github.com/callstack/react-native-builder-bob/compare/[email protected]@0.5.4) (2025-03-27)
713

814
**Note:** Version bump only for package docs

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs",
3-
"version": "0.5.4",
3+
"version": "0.6.0",
44
"private": true,
55
"description": "Documentation for react-native-builder-bob",
66
"scripts": {

docs/pages/esm.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ The `"esm": true` option enables ESM-compatible output by adding the `.js` exten
2020

2121
For TypeScript, it also generates 2 sets of type definitions if the [`commonjs`](build.md#commonjs) target is also enabled: one for the CommonJS build and one for the ES module build.
2222

23-
It's recommended to specify `"moduleResolution": "bundler"` and `"resolvePackageJsonImports": false` in your `tsconfig.json` file to match [Metro's behavior](https://reactnative.dev/blog/2023/06/21/package-exports-support#enabling-package-exports-beta):
23+
It's recommended to specify `"moduleResolution": "bundler"` in your `tsconfig.json` file to match Metro's behavior:
2424

2525
```json
2626
{
2727
"compilerOptions": {
28-
"moduleResolution": "bundler",
29-
"resolvePackageJsonImports": false
28+
"moduleResolution": "bundler"
3029
}
3130
}
3231
```
@@ -53,7 +52,7 @@ To make use of the output files, ensure that your `package.json` file contains t
5352
},
5453
```
5554

56-
The `main` field is for tools that don't support the `exports` field (e.g. [Metro](https://metrobundler.dev/)). The `module` field is a non-standard field that some tools use to determine the ESM entry point.
55+
The `main` field is for tools that don't support the `exports` field (e.g. [Jest](https://jestjs.io)). The `module` field is a non-standard field that some tools use to determine the ESM entry point.
5756

5857
The `exports` field is used by Node.js 12+, modern browsers and tools to determine the correct entry point. The entrypoint is specified in the `.` key and will be used when the library is imported or required directly (e.g. `import 'my-library'` or `require('my-library')`).
5958

@@ -71,6 +70,8 @@ You can also specify additional conditions for different scenarios, such as `rea
7170

7271
The `./package.json` field is used to point to the library's `package.json` file. It's necessary for tools that may need to read the `package.json` file directly (e.g. [React Native Codegen](https://reactnative.dev/docs/the-new-architecture/what-is-codegen)).
7372

73+
> Note: Metro enables support for `package.json` exports by default from version [0.82.0](https://github.com/facebook/metro/releases/tag/v0.82.0). In previous versions, experimental support can be enabled by setting the `unstable_enablePackageExports` option to `true` in the [Metro configuration](https://metrobundler.dev/docs/configuration/). If this is not enabled, Metro will use the entrypoint specified in the `main` field.
74+
7475
## Guidelines
7576

7677
There are still a few things to keep in mind if you want your library to be ESM-compatible:

eslint.config.mjs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
// eslint-disable-next-line import-x/extensions,import-x/no-unresolved
2-
import { defineConfig } from 'eslint/config';
2+
import { defineConfig, globalIgnores } from 'eslint/config';
33
import satya164 from 'eslint-config-satya164';
44

55
export default defineConfig([
6-
...satya164,
7-
{
8-
ignores: [
9-
'node_modules/',
10-
'**/coverage/',
11-
'**/lib/',
12-
'**/templates/',
13-
'**/__fixtures__/',
14-
],
15-
},
6+
satya164,
7+
8+
globalIgnores([
9+
'**/.next/',
10+
'**/.expo/',
11+
'**/.yarn/',
12+
'**/.vscode/',
13+
'**/node_modules/',
14+
'**/coverage/',
15+
'**/lib/',
16+
'**/templates/',
17+
'**/__fixtures__/',
18+
]),
1619
]);

packages/create-react-native-library/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [0.49.0](https://github.com/callstack/react-native-builder-bob/compare/[email protected]@0.49.0) (2025-03-29)
7+
8+
### Bug Fixes
9+
10+
- minimize usage of process.exit(1) ([8f969b2](https://github.com/callstack/react-native-builder-bob/commit/8f969b2737db221d8689600f79bd83b84391d4f9)) - by @satya164
11+
12+
### Features
13+
14+
- update eslint to v9 ([#794](https://github.com/callstack/react-native-builder-bob/issues/794)) ([d056559](https://github.com/callstack/react-native-builder-bob/commit/d056559559ed09d77779d95cb323572971b1dc75)) - by @Serchinastico
15+
616
## [0.48.9](https://github.com/callstack/react-native-builder-bob/compare/[email protected]@0.48.9) (2025-03-28)
717

818
### Bug Fixes

packages/create-react-native-library/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-native-library",
3-
"version": "0.48.9",
3+
"version": "0.49.0",
44
"description": "CLI to scaffold React Native libraries",
55
"keywords": [
66
"react-native",

packages/create-react-native-library/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,11 @@ async function promptPath(argv: Args, local: boolean) {
209209
}
210210

211211
if (await fs.pathExists(folder)) {
212-
console.log(
212+
throw new Error(
213213
`A folder already exists at ${kleur.blue(
214214
folder
215215
)}! Please specify another folder name or delete the existing one.`
216216
);
217-
218-
process.exit(1);
219217
}
220218

221219
return folder;

packages/create-react-native-library/src/utils/assert.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ export async function assertNpxExists() {
99
} catch (error) {
1010
// @ts-expect-error: TS doesn't know about `code`
1111
if (error != null && error.code === 'ENOENT') {
12-
console.log(
12+
throw new Error(
1313
`Couldn't find ${kleur.blue(
1414
'npx'
1515
)}! Please install it by running ${kleur.blue('npm install -g npx')}`
1616
);
17-
18-
process.exit(1);
1917
} else {
2018
throw error;
2119
}
@@ -76,9 +74,7 @@ export function assertUserInput(
7674
message += `: ${validation}`;
7775
}
7876

79-
console.log(message);
80-
81-
process.exit(1);
77+
throw new Error(message);
8278
}
8379
}
8480
}

packages/create-react-native-library/templates/common/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"noUnusedLocals": true,
2222
"noUnusedParameters": true,
2323
"resolveJsonModule": true,
24-
"resolvePackageJsonImports": false,
2524
"skipLibCheck": true,
2625
"strict": true,
2726
"target": "ESNext",

packages/react-native-builder-bob/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [0.39.0](https://github.com/callstack/react-native-builder-bob/compare/[email protected]@0.39.0) (2025-03-29)
7+
8+
### Bug Fixes
9+
10+
- fix typescript error message with missing tsconfig ([34af0d3](https://github.com/callstack/react-native-builder-bob/commit/34af0d3a9c135665197c0bd410266d9a52f58b9e)) - by @satya164
11+
- minimize usage of process.exit(1) ([8f969b2](https://github.com/callstack/react-native-builder-bob/commit/8f969b2737db221d8689600f79bd83b84391d4f9)) - by @satya164
12+
13+
### Features
14+
15+
- run tasks in parallel with workers ([#792](https://github.com/callstack/react-native-builder-bob/issues/792)) ([664525f](https://github.com/callstack/react-native-builder-bob/commit/664525f88ccfca23aff939ab6a8ceb25635f99b5)) - by @satya164
16+
- update eslint to v9 ([#794](https://github.com/callstack/react-native-builder-bob/issues/794)) ([d056559](https://github.com/callstack/react-native-builder-bob/commit/d056559559ed09d77779d95cb323572971b1dc75)) - by @Serchinastico
17+
618
## [0.38.4](https://github.com/callstack/react-native-builder-bob/compare/[email protected]@0.38.4) (2025-03-27)
719

820
### Bug Fixes

0 commit comments

Comments
 (0)