Skip to content

Modernize Builder Bob and migrate package to ESM-only - #767

Open
NicooleT wants to merge 8 commits into
nicole/updateFormattingAndBuilderBobfrom
nicole/updateBobBuilderAndModernePackageJson
Open

NicooleT wants to merge 8 commits into
nicole/updateFormattingAndBuilderBobfrom
nicole/updateBobBuilderAndModernePackageJson

Conversation

@NicooleT

@NicooleT NicooleT commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade react-native-builder-bob from 0.23.2 to 0.43.0.
  • Publish ESM JavaScript and TypeScript declarations only.
  • Add modern package.json exports for: react-native-safe-area-context, react-native-safe-area-context/jest/mock, react-native-safe-area-context/package.json
  • Add a Metro source condition for developing the example app directly from src.
  • Add a dedicated TypeScript build configuration that excludes tests and development files.
  • Remove the legacy CommonJS build target and root Jest mock shims.
  • Exclude stale CommonJS and unnecessary build files from npm packages.
  • Rename native component specifications to the *NativeComponent.ts convention so Builder Bob preserves the Codegen type information.

BREAKING CHANGE: The package is now published as ESM only with an exports map. Deep imports outside of the exported entry points are no longer supported. Jest projects using the React Native preset must add react-native-safe-area-context to transformIgnorePatterns (see docs/docs/migrating-to-v6.mdx).

Package exports now provide ESM runtime and TypeScript declarations, including jest/mock.
Added an explicit !lib/commonjs publish exclusion.
Added [tsconfig.build.json](/Users/nicoolet/react-native-safe-area-context/tsconfig.build.json).
Updated [Metro’s source condition](/Users/nicoolet/react-native-safe-area-context/example/metro.config.js).
Removed legacy CommonJS Jest shims.
Regenerated yarn.lock.
@NicooleT NicooleT self-assigned this Aug 31, 2026
@NicooleT NicooleT changed the title Nicole/update bob builder and moderne package json Modernize Builder Bob and migrate package to ESM-only Sep 1, 2026
@NicooleT
NicooleT marked this pull request as ready for review September 1, 2026 17:57
This was referenced Sep 1, 2026
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
react-native-safe-area-context Ignored Ignored Preview Oct 27, 2026 9:57pm UTC

Request Review

@floco-af
floco-af changed the base branch from main to nicole/updateFormattingAndBuilderBob October 27, 2026 19:32
@floco-af
floco-af added this pull request to stack #799 October 27, 2026 19:32
BREAKING CHANGE: The package is now published as ESM only with an `exports` map. Deep imports outside of the exported entry points are no longer supported.

This branch was successfully deployed

1 active (outdated) deployment
Preview — ff8f7b0f Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants