New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-native/assets-registry

Package Overview
Dependencies
Maintainers
2
Versions
526
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native/assets-registry - npm Package Compare versions

Comparing version 0.77.0-rc.6 to 0.77.0-rc.7

2

package.json
{
"name": "@react-native/assets-registry",
"version": "0.77.0-rc.6",
"version": "0.77.0-rc.7",
"description": "Asset support code for React Native.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,4 +7,4 @@ /**

*
* @flow strict
* @format
* @flow strict
*/

@@ -14,3 +14,3 @@

import type {PackagerAsset} from './registry.js';
/*:: import type {PackagerAsset} from './registry.js'; */

@@ -32,3 +32,3 @@ const androidScaleSuffix = {

*/
function getAndroidAssetSuffix(scale: number): string {
function getAndroidAssetSuffix(scale /*: number */) /*: string */ {
if (scale.toString() in androidScaleSuffix) {

@@ -59,5 +59,5 @@ // $FlowFixMe[invalid-computed-prop]

function getAndroidResourceFolderName(
asset: PackagerAsset,
scale: number,
): string {
asset /*: PackagerAsset */,
scale /*: number */,
) /*: string */ {
if (!drawableFileTypes.has(asset.type)) {

@@ -80,3 +80,5 @@ return 'raw';

function getAndroidResourceIdentifier(asset: PackagerAsset): string {
function getAndroidResourceIdentifier(
asset /*: PackagerAsset */,
) /*: string */ {
return (getBasePath(asset) + '/' + asset.name)

@@ -89,3 +91,3 @@ .toLowerCase()

function getBasePath(asset: PackagerAsset): string {
function getBasePath(asset /*: PackagerAsset */) /*: string */ {
const basePath = asset.httpServerLocation;

@@ -92,0 +94,0 @@ return basePath.startsWith('/') ? basePath.slice(1) : basePath;

@@ -13,2 +13,3 @@ /**

/*::
export type AssetDestPathResolver = 'android' | 'generic';

@@ -29,6 +30,7 @@

};
*/
const assets: Array<PackagerAsset> = [];
const assets /*: Array<PackagerAsset> */ = [];
function registerAsset(asset: PackagerAsset): number {
function registerAsset(asset /*: PackagerAsset */) /*: number */ {
// `push` returns new array length, so the first asset will

@@ -39,3 +41,3 @@ // get id 1 (not 0) to make the value truthy

function getAssetByID(assetId: number): PackagerAsset {
function getAssetByID(assetId /*: number */) /*: PackagerAsset */ {
return assets[assetId - 1];

@@ -42,0 +44,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc