Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/new-forks-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
16 changes: 7 additions & 9 deletions packages/metro-service/src/asset/write.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// https://github.com/react-native-community/cli/blob/716555851b442a83a1bf5e0db27b6226318c9a69/packages/cli-plugin-metro/src/commands/bundle/saveAssets.ts

import { info, warn } from "@rnx-kit/console";
import * as fs from "fs";
import * as path from "path";
import * as fs from "node:fs";
import * as path from "node:path";
import { filterPlatformAssetScales } from "./filter";
import type { AssetData, SaveAssetsPlugin } from "./types";

function copy(
src: string,
dest: string,
callback: (error: NodeJS.ErrnoException) => void
): void {
type CopyCallback = (error?: NodeJS.ErrnoException) => void;

function copy(src: string, dest: string, callback: CopyCallback): void {
const destDir = path.dirname(dest);
fs.mkdir(destDir, { recursive: true }, (err?) => {
fs.mkdir(destDir, { recursive: true }, (err) => {
if (err) {
callback(err);
return;
Expand All @@ -31,7 +29,7 @@ function copyAll(filesToCopy: Record<string, string>) {

info(`Copying ${queue.length} asset files`);
return new Promise<void>((resolve, reject) => {
const copyNext = (error?: NodeJS.ErrnoException) => {
const copyNext: CopyCallback = (error) => {
if (error) {
reject(error);
return;
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4976,11 +4976,11 @@ __metadata:
linkType: hard

"@types/node@npm:*":
version: 22.10.5
resolution: "@types/node@npm:22.10.5"
version: 22.10.10
resolution: "@types/node@npm:22.10.10"
dependencies:
undici-types: "npm:~6.20.0"
checksum: 10c0/6a0e7d1fe6a86ef6ee19c3c6af4c15542e61aea2f4cee655b6252efb356795f1f228bc8299921e82924e80ff8eca29b74d9dd0dd5cc1a90983f892f740b480df
checksum: 10c0/3425772d4513cd5dbdd87c00acda088113c03a97445f84f6a89744c60a66990b56c9d3a7213d09d57b6b944ae8ff45f985565e0c1846726112588e33a22dd12b
languageName: node
linkType: hard

Expand All @@ -4992,11 +4992,11 @@ __metadata:
linkType: hard

"@types/node@npm:^20.0.0":
version: 20.17.12
resolution: "@types/node@npm:20.17.12"
version: 20.17.16
resolution: "@types/node@npm:20.17.16"
dependencies:
undici-types: "npm:~6.19.2"
checksum: 10c0/340b65a11e4486e597163991532a08e525beee40f082cf73dc830c060426fa9ea8690a4e3931d91375e946816a884d6140d96e99ac048b51f280f21cc70d22ed
checksum: 10c0/50c589dd6a377238bc51b6fb5b8fc60ff6d688df0bde621d4a9fc59f480eb956cdf6d46052e1cb9536f150bc62e9194ddc733aa78b65e812155b4d3a32717de2
languageName: node
linkType: hard

Expand Down
Loading