Create @react-native/asset-utils package (#57368)#57368
Open
huntie wants to merge 1 commit into
Open
Conversation
|
@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110045272. |
f596b10 to
d69cef1
Compare
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 29, 2026
Summary: **Context** This stack intends to relocate `AssetRegistry` API from `react-native/assets-registry` into `react-native` — addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers). **This diff** Create a new `react-native/asset-utils` package, intended for internal/framework use (read: **will not be an end user concern**). This re-houses `react-native/assets-registry/path-support.js`. Stacked with the next two diffs, this contributes to the 0.87 objective to delete `react-native/assets-registry` towards install-layout-safe behaviour and JS deep import removal. - (Temporarily, this leaves two copies of `path-support.js` until I enact the package removal down the stack.) This change also enables us to de-duplicate `assetPathUtils.js` inside `community-cli-plugin` and use one source of truth. - Additionally, we have fbsource consumers of this util that cannot have a circular Buck dep on `react-native`, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here). **Changes** - Add `react-native/asset-utils` (`packages/asset-utils/`): `src/AssetPathUtils.js` containing Android path helpers and tests. - De-duplicate usages in `community-cli-plugin`: delete `src/commands/bundle/assetPathUtils.js`. Changelog: [General][Added] - Introduce `react-native/asset-utils` package (relocates Android path utils for libraries/frameworks) Differential Revision: D110045272
d69cef1 to
3cdbffa
Compare
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 30, 2026
Summary: **Context** This stack intends to relocate the `AssetRegistry` API from `react-native/assets-registry` into `react-native` — addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers). **This diff** Create a new `react-native/asset-utils` package, intended for internal/framework use (read: **will not be an end user concern**). This re-houses `react-native/assets-registry/path-support.js`. Stacked with the next two diffs, this contributes to the 0.87 objective to delete `react-native/assets-registry` towards install-layout-safe behaviour and JS deep import removal. - (Temporarily, this leaves two copies of `path-support.js` until I enact the package removal down the stack.) This change also enables us to de-duplicate `assetPathUtils.js` inside `community-cli-plugin` and use one source of truth. - Additionally, we have fbsource consumers of this util that cannot have a circular Buck dep on `react-native`, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here). **Changes** - Add `react-native/asset-utils` (`packages/asset-utils/`): `src/AssetPathUtils.js` containing Android path helpers and tests. - De-duplicate usages in `community-cli-plugin`: delete `src/commands/bundle/assetPathUtils.js`. Changelog: [General][Added] - Introduce `react-native/asset-utils` package (relocates Android path utils for libraries/frameworks) Differential Revision: D110045272
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 30, 2026
Summary: **Context** This stack intends to relocate the `AssetRegistry` API from `react-native/assets-registry` into `react-native` — addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers). **This diff** Create a new `react-native/asset-utils` package, intended for internal/framework use (read: **will not be an end user concern**). This re-houses `react-native/assets-registry/path-support.js`. Stacked with the next two diffs, this contributes to the 0.87 objective to delete `react-native/assets-registry` towards install-layout-safe behaviour and JS deep import removal. - (Temporarily, this leaves two copies of `path-support.js` until I enact the package removal down the stack.) This change also enables us to de-duplicate `assetPathUtils.js` inside `community-cli-plugin` and use one source of truth. - Additionally, we have fbsource consumers of this util that cannot have a circular Buck dep on `react-native`, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here). **Changes** - Add `react-native/asset-utils` (`packages/asset-utils/`): `src/AssetPathUtils.js` containing Android path helpers and tests. - De-duplicate usages in `community-cli-plugin`: delete `src/commands/bundle/assetPathUtils.js`. Changelog: [General][Added] - Introduce `react-native/asset-utils` package (relocates Android path utils for libraries/frameworks) Differential Revision: D110045272
3cdbffa to
4bbcf2f
Compare
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 30, 2026
Summary: Pull Request resolved: react#57368 **Context** This stack intends to relocate the `AssetRegistry` API from `react-native/assets-registry` into `react-native` — addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers). **This diff** Create a new `react-native/asset-utils` package, intended for internal/framework use (read: **will not be an end user concern**). This re-houses `react-native/assets-registry/path-support.js`. Stacked with the next two diffs, this contributes to the 0.87 objective to delete `react-native/assets-registry` towards install-layout-safe behaviour and JS deep import removal. - (Temporarily, this leaves two copies of `path-support.js` until I enact the package removal down the stack.) This change also enables us to de-duplicate `assetPathUtils.js` inside `community-cli-plugin` and use one source of truth. - Additionally, we have fbsource consumers of this util that cannot have a circular Buck dep on `react-native`, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here). **Changes** - Add `react-native/asset-utils` (`packages/asset-utils/`): `src/AssetPathUtils.js` containing Android path helpers and tests. - De-duplicate usages in `community-cli-plugin`: delete `src/commands/bundle/assetPathUtils.js`. Changelog: [General][Added] - Introduce `react-native/asset-utils` package (relocates Android path utils for libraries/frameworks) Differential Revision: D110045272
Summary: **Context** This stack intends to relocate the `AssetRegistry` API from `react-native/assets-registry` into `react-native` — addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers). **This diff** Create a new `react-native/asset-utils` package, intended for internal/framework use (read: **will not be an end user concern**). This re-houses `react-native/assets-registry/path-support.js`. Stacked with the next two diffs, this contributes to the 0.87 objective to delete `react-native/assets-registry` towards install-layout-safe behaviour and JS deep import removal. - (Temporarily, this leaves two copies of `path-support.js` until I enact the package removal down the stack.) This change also enables us to de-duplicate `assetPathUtils.js` inside `community-cli-plugin` and use one source of truth. - Additionally, we have fbsource consumers of this util that cannot have a circular Buck dep on `react-native`, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here). **Changes** - Add `react-native/asset-utils` (`packages/asset-utils/`): `src/AssetPathUtils.js` containing Android path helpers and tests. - De-duplicate usages in `community-cli-plugin`: delete `src/commands/bundle/assetPathUtils.js`. Changelog: [General][Added] - Introduce `react-native/asset-utils` package (relocates Android path utils for libraries/frameworks) Differential Revision: D110045272
4bbcf2f to
62b1335
Compare
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 30, 2026
Summary: Pull Request resolved: react#57368 **Context** This stack intends to relocate the `AssetRegistry` API from `react-native/assets-registry` into `react-native` — addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers). **This diff** Create a new `react-native/asset-utils` package, intended for internal/framework use (read: **will not be an end user concern**). This re-houses `react-native/assets-registry/path-support.js`. Stacked with the next two diffs, this contributes to the 0.87 objective to delete `react-native/assets-registry` towards install-layout-safe behaviour and JS deep import removal. - (Temporarily, this leaves two copies of `path-support.js` until I enact the package removal down the stack.) This change also enables us to de-duplicate `assetPathUtils.js` inside `community-cli-plugin` and use one source of truth. - Additionally, we have fbsource consumers of this util that cannot have a circular Buck dep on `react-native`, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here). **Changes** - Add `react-native/asset-utils` (`packages/asset-utils/`): `src/AssetPathUtils.js` containing Android path helpers and tests. - De-duplicate usages in `community-cli-plugin`: delete `src/commands/bundle/assetPathUtils.js`. Changelog: [General][Added] - Introduce `react-native/asset-utils` package (relocates Android path utils for libraries/frameworks) Differential Revision: D110045272
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Context
This stack intends to relocate the
AssetRegistryAPI fromreact-native/assets-registryintoreact-native— addressing runtime safety and public deep imports issues (1.0 and JS Stable API blockers).This diff
Create a new
react-native/asset-utilspackage, intended for internal/framework use (read: will not be an end user concern). This re-housesreact-native/assets-registry/path-support.js.Stacked with the next two diffs, this contributes to the 0.87 objective to delete
react-native/assets-registrytowards install-layout-safe behaviour and JS deep import removal.path-support.jsuntil I enact the package removal down the stack.)This change also enables us to de-duplicate
assetPathUtils.jsinsidecommunity-cli-pluginand use one source of truth.react-native, so the main package was not a suitable relocation point (secondarily to not adding an awkward new public API here).Changes
react-native/asset-utils(packages/asset-utils/):src/AssetPathUtils.jscontaining Android path helpers and tests.community-cli-plugin: deletesrc/commands/bundle/assetPathUtils.js.Changelog:
[General][Added] - Introduce
react-native/asset-utilspackage (relocates Android path utils for libraries/frameworks)Differential Revision: D110045272