Skip to content

Demote electron to devDependency#53438

Closed
motiz88 wants to merge 4 commits into
facebook:mainfrom
motiz88:export-D78351934
Closed

Demote electron to devDependency#53438
motiz88 wants to merge 4 commits into
facebook:mainfrom
motiz88:export-D78351934

Conversation

@motiz88
Copy link
Copy Markdown
Contributor

@motiz88 motiz88 commented Aug 22, 2025

Summary:
Changelog: [Internal]

Makes flavor: 'prebuilt' the default mode of launching the RNDT standalone shell, and the only mode supported in the published version of the package. See D78351931 for more context.

With this, we can demote electron from dependencies to devDependencies. This makes it possible to make debugger-shell a dependency of dev-middleware (and thus of all major frameworks) without significantly impacting npm install times. We'll add this dependency on debugger-shell in an upcoming diff (D78351937).

We also stop publishing the dist/electron subdirectory (and src/electron for good measure) since the corresponding code will always be bundled into the prebuilt binary instead.

Differential Revision: D78351934

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 22, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78351934

…ebook#53436)

Summary:
Pull Request resolved: facebook#53436

Changelog: [Internal]

Adds a `flavor` option to `unstable_spawnDebuggerShellWithArgs` to select between two modes:

1. `flavor: 'dev'` (current behaviour) - launching a stock Electron binary (from the `electron` package) and pointing it directly at the shell code from the `src/electron` directory.
2. `flavor: 'prebuilt'` (new in this diff) - launching the prebuilt React Native DevTools binary included in the package (built continuously at Meta and committed as a DotSlash file in automated diffs e.g. D79836825). Note that this binary includes Electron *and* a frozen version of the shell code from `src/electron`.

Going forward, `'dev'` will only be used when developing the package (e.g. in D78351934 we will move `electron` to `devDependencies`). The published version of the package is only intended to work with `flavor: 'prebuilt'`.

Differential Revision: D78351931

Reviewed By: huntie
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78351934

…k#53434)

Summary:
Pull Request resolved: facebook#53434

Changelog: [Internal]

The React Native DevTools standalone shell is distributed as a DotSlash file that downloads the required binaries lazily. This diff gives integrations a mechanism for kicking off the download early (but without slowing down `npm install react-native`). This will be integrated into dev-middleware in an upcoming diff.

Differential Revision: D78413091

Reviewed By: huntie
…3437)

Summary:
Pull Request resolved: facebook#53437

Changelog: [Internal]

The React Native DevTools standalone shell is distributed as a DotSlash file that downloads the required binaries lazily. This diff adds support in dev-middleware for a new `BrowserLauncher.unstable_prepareFuseboxShell` method that integrations can use to kick off the download early. Integrations are expected to implement this by calling the `unstable_prepareDebuggerShell` function (added to the `debugger-shell` package in D78413091).

If `BrowserLauncher.unstable_prepareFuseboxShell` returns an error, dev-middleware will fall back to the browser-based launch flow, even for users opted into the `enableStandaloneFuseboxShell` experiment.

Differential Revision: D78413092

Reviewed By: huntie
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78351934

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78351934

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78351934

Summary:
Pull Request resolved: facebook#53438

Changelog: [Internal]

Makes `flavor: 'prebuilt'` the default mode of launching the RNDT standalone shell, and the *only* mode supported in the published version of the package. See D78351931 for more context.

With this, we can demote `electron` from `dependencies` to `devDependencies`. This makes it possible to make `debugger-shell` a dependency of `dev-middleware` (and thus of all major frameworks) without significantly impacting `npm install` times. We'll add this dependency on `debugger-shell` in an upcoming diff (D78351937).

We also stop publishing the `dist/electron` subdirectory (and `src/electron` for good measure) since the corresponding code will always be bundled into the prebuilt binary instead.

Reviewed By: huntie

Differential Revision: D78351934
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78351934

motiz88 added a commit to motiz88/react-native that referenced this pull request Aug 27, 2025
Summary:
Pull Request resolved: facebook#53438

Changelog: [Internal]

Makes `flavor: 'prebuilt'` the default mode of launching the RNDT standalone shell, and the *only* mode supported in the published version of the package. See D78351931 for more context.

With this, we can demote `electron` from `dependencies` to `devDependencies`. This makes it possible to make `debugger-shell` a dependency of `dev-middleware` (and thus of all major frameworks) without significantly impacting `npm install` times. We'll add this dependency on `debugger-shell` in an upcoming diff (D78351937).

We also stop publishing the `dist/electron` subdirectory (and `src/electron` for good measure) since the corresponding code will always be bundled into the prebuilt binary instead.

Differential Revision: D78351934

Reviewed By: huntie
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 27, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in ba24f5f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants