Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rnx-kit/metro-serializer

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rnx-kit/metro-serializer - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

4

lib/index.d.ts
import type { MixedOutput, Module, ReadOnlyGraph, SerializerOptions } from "metro";
export type MetroPlugin<T = MixedOutput> = (entryPoint: string, preModules: ReadonlyArray<Module<T>>, graph: ReadOnlyGraph<T>, options: SerializerOptions<T>) => void;
export type MetroPlugin<T = MixedOutput> = (entryPoint: string, preModules: readonly Module<T>[], graph: ReadOnlyGraph<T>, options: SerializerOptions<T>) => void;
export type CustomSerializerResult = string | {

@@ -7,3 +7,3 @@ code: string;

};
export type CustomSerializer = (entryPoint: string, preModules: ReadonlyArray<Module>, graph: ReadOnlyGraph, options: SerializerOptions) => Promise<CustomSerializerResult> | CustomSerializerResult;
export type CustomSerializer = (entryPoint: string, preModules: readonly Module[], graph: ReadOnlyGraph, options: SerializerOptions) => Promise<CustomSerializerResult> | CustomSerializerResult;
/**

@@ -10,0 +10,0 @@ * Metro's default bundle serializer.

@@ -27,2 +27,3 @@ "use strict";

exports.MetroSerializer = void 0;
const metro_1 = require("@rnx-kit/tools-react-native/metro");
const semver = __importStar(require("semver"));

@@ -38,4 +39,5 @@ /**

function MetroSerializer(plugins) {
const baseJSBundle = require("metro/src/DeltaBundler/Serializers/baseJSBundle");
const bundleToString = require("metro/src/lib/bundleToString");
const metroPath = (0, metro_1.findMetroPath)() || "metro";
const baseJSBundle = require(`${metroPath}/src/DeltaBundler/Serializers/baseJSBundle`);
const bundleToString = require(`${metroPath}/src/lib/bundleToString`);
const { version } = require("metro/package.json");

@@ -42,0 +44,0 @@ const shouldReturnPromise = semver.satisfies(version, ">=0.60.0");

{
"name": "@rnx-kit/metro-serializer",
"version": "1.0.12",
"version": "1.0.13",
"description": "Metro's default JavaScript bundle serializer but with plugin support",

@@ -24,2 +24,3 @@ "homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-serializer#readme",

"dependencies": {
"@rnx-kit/tools-react-native": "^1.3.4",
"semver": "^7.0.0"

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

"@rnx-kit/scripts": "*",
"@types/metro": "^0.76.0",
"@types/semver": "^7.0.0",
"eslint": "^8.0.0",
"jest": "^29.2.1",
"metro": "^0.73.7",
"metro": "^0.76.5",
"prettier": "^3.0.0",

@@ -36,0 +36,0 @@ "typescript": "^5.0.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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