Skip to content

Commit

Permalink
Rename assets to assets-registry (#34572)
Browse files Browse the repository at this point in the history
Summary:
Part of the [monorepo RFC](https://github.com/react-native-community/discussions-and-proposals/blob/04671deebe4ef2af782e281bbd912a8597c5af96/proposals/0006-react-native-monorepo.md)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - Rename assets to assets-registry

Pull Request resolved: #34572

Reviewed By: cortinico

Differential Revision: D39235817

Pulled By: hoxyq

fbshipit-source-id: ff4d4a7ff980d3fc6e28b83ad3b36250eba79fc3
  • Loading branch information
fortmarek authored and facebook-github-bot committed Nov 30, 2022
1 parent 6003e70 commit 3c5a829
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Libraries/Image/AssetRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

'use strict';

module.exports = require('@react-native/assets/registry');
module.exports = require('@react-native/assets-registry/registry');
4 changes: 2 additions & 2 deletions Libraries/Image/AssetSourceResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type ResolvedAssetSource = {|
+scale: number,
|};

import type {PackagerAsset} from '@react-native/assets/registry';
import type {PackagerAsset} from '@react-native/assets-registry/registry';

const PixelRatio = require('../Utilities/PixelRatio');
const Platform = require('../Utilities/Platform');
Expand All @@ -27,7 +27,7 @@ const {
getAndroidResourceFolderName,
getAndroidResourceIdentifier,
getBasePath,
} = require('@react-native/assets/path-support');
} = require('@react-native/assets-registry/path-support');
const invariant = require('invariant');

/**
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/RelativeImageStub.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// This is a stub for flow to make it understand require('./icon.png')
// See metro/src/Bundler/index.js

const AssetRegistry = require('@react-native/assets/registry');
const AssetRegistry = require('@react-native/assets-registry/registry');

module.exports = (AssetRegistry.registerAsset({
__packager_asset: true,
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/__tests__/resolveAssetSource-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('resolveAssetSource', () => {
beforeEach(() => {
jest.resetModules();

AssetRegistry = require('@react-native/assets/registry');
AssetRegistry = require('@react-native/assets-registry/registry');
resolveAssetSource = require('../resolveAssetSource');
NativeSourceCode =
require('../../NativeModules/specs/NativeSourceCode').default;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/resolveAssetSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type {ResolvedAssetSource} from './AssetSourceResolver';

const AssetSourceResolver = require('./AssetSourceResolver');
const {pickScale} = require('./AssetUtils');
const AssetRegistry = require('@react-native/assets/registry');
const AssetRegistry = require('@react-native/assets-registry/registry');

let _customSourceTransformer, _serverURL, _scriptURL;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"@react-native-community/cli": "10.0.0-alpha.5",
"@react-native-community/cli-platform-android": "10.0.0-alpha.4",
"@react-native-community/cli-platform-ios": "10.0.0-alpha.3",
"@react-native/assets": "1.0.0",
"@react-native/assets-registry": "^0.72.0",
"@react-native/gradle-plugin": "^0.72.1",
"@react-native/normalize-color": "2.1.0",
"@react-native/polyfills": "2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets",
"version": "1.0.0",
"name": "@react-native/assets-registry",
"version": "0.72.0",
"description": "Asset support code for React Native.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 3c5a829

Please sign in to comment.