expo-asset
Advanced tools
Comparing version
/* eslint-env browser */ | ||
import { Platform } from 'expo-modules-core'; | ||
import { getFilename } from './AssetUris'; | ||
@@ -8,3 +7,3 @@ export function isImageType(type) { | ||
export function getImageInfoAsync(url) { | ||
if (!Platform.isDOMAvailable) { | ||
if (typeof window === 'undefined') { | ||
return Promise.resolve({ name: getFilename(url), width: 0, height: 0 }); | ||
@@ -11,0 +10,0 @@ } |
@@ -9,10 +9,12 @@ # Changelog | ||
- Add RSC support. ([#34213](https://github.com/expo/expo/pull/34213) by [@EvanBacon](https://github.com/EvanBacon)) | ||
### 🐛 Bug fixes | ||
- [macOS] Add macOS platform support ([#33505](https://github.com/expo/expo/pull/33505) by [@hassankhan](https://github.com/hassankhan)) | ||
### 💡 Others | ||
## 11.0.2 — 2025-01-10 | ||
- Deprecate `expo-asset/tools/hashAssetFiles` in favor of built-in hashing support in `expo/metro-config`. ([#34208](https://github.com/expo/expo/pull/34208) by [@EvanBacon](https://github.com/EvanBacon)) | ||
_This version does not introduce any user-facing changes._ | ||
## 11.0.1 — 2024-11-10 | ||
@@ -19,0 +21,0 @@ |
{ | ||
"platforms": ["ios", "android", "web", "tvos"], | ||
"ios": { | ||
"platforms": ["apple", "android", "web"], | ||
"apple": { | ||
"modules": ["AssetModule"] | ||
@@ -5,0 +5,0 @@ }, |
{ | ||
"name": "expo-asset", | ||
"version": "11.0.3-canary-20250114-804e26d", | ||
"version": "11.1.0-canary-20250122-166c2cb", | ||
"description": "An Expo universal module to download assets and pass them into other APIs", | ||
@@ -16,2 +16,3 @@ "main": "build/index.js", | ||
"test": "expo-module test", | ||
"test:rsc": "jest --config jest-rsc.config.js", | ||
"prepare": "expo-module prepare", | ||
@@ -26,2 +27,12 @@ "prepublishOnly": "expo-module prepublishOnly", | ||
], | ||
"exports": { | ||
"./app.plugin": "./app.plugin.js", | ||
"./app.plugin.js": "./app.plugin.js", | ||
"./tools/hashAssetFiles": "./tools/hashAssetFiles.js", | ||
"./package.json": "./package.json", | ||
".": { | ||
"react-server": "./build/index.server.js", | ||
"default": "./build/index.js" | ||
} | ||
}, | ||
"repository": { | ||
@@ -42,4 +53,4 @@ "type": "git", | ||
"dependencies": { | ||
"@expo/image-utils": "0.6.5-canary-20250114-804e26d", | ||
"expo-constants": "17.0.5-canary-20250114-804e26d", | ||
"@expo/image-utils": "0.6.5-canary-20250122-166c2cb", | ||
"expo-constants": "17.0.5-canary-20250122-166c2cb", | ||
"invariant": "^2.2.4", | ||
@@ -50,10 +61,9 @@ "md5-file": "^3.2.3" | ||
"@testing-library/react-native": "^12.5.2", | ||
"expo-module-scripts": "4.0.4-canary-20250114-804e26d" | ||
"expo-module-scripts": "4.0.4-canary-20250122-166c2cb" | ||
}, | ||
"peerDependencies": { | ||
"expo": "53.0.0-canary-20250114-804e26d", | ||
"expo": "53.0.0-canary-20250122-166c2cb", | ||
"react": "*", | ||
"react-native": "*" | ||
}, | ||
"gitHead": "804e26d8545f2b890dfa80eeb8122036f38d4d0c" | ||
} | ||
} |
/* eslint-env browser */ | ||
import { Platform } from 'expo-modules-core'; | ||
import { getFilename } from './AssetUris'; | ||
@@ -17,3 +15,3 @@ | ||
export function getImageInfoAsync(url: string): Promise<ImageInfo> { | ||
if (!Platform.isDOMAvailable) { | ||
if (typeof window === 'undefined') { | ||
return Promise.resolve({ name: getFilename(url), width: 0, height: 0 }); | ||
@@ -20,0 +18,0 @@ } |
@@ -0,1 +1,3 @@ | ||
// NOTE(Jan 17, 2025): This file is now deprecated in favor of `@expo/metro-config`. It should probably be removed for SDK 53. | ||
'use strict'; | ||
@@ -2,0 +4,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
187790
15.97%128
9.4%2456
16.01%5
25%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed