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

@rspack/core

Package Overview
Dependencies
Maintainers
1
Versions
1109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rspack/core - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2-canary-24b3f94-20240606091113

dist/util/AssetInfo.d.ts

8

dist/Compilation.d.ts

@@ -11,3 +11,3 @@ /// <reference types="node" />

*/
import type { ExternalObject, JsAssetInfo, JsCompilation, JsModule, JsPathData, JsRuntimeModule, JsStatsError, JsStatsWarning } from "@rspack/binding";
import type { ExternalObject, JsCompilation, JsModule, JsPathData, JsRuntimeModule, JsStatsError, JsStatsWarning } from "@rspack/binding";
import * as tapable from "tapable";

@@ -29,4 +29,5 @@ import { Source } from "webpack-sources";

import { StatsPrinter } from "./stats/StatsPrinter";
import { type AssetInfo } from "./util/AssetInfo";
import MergeCaller from "./util/MergeCaller";
export type AssetInfo = Partial<JsAssetInfo> & Record<string, any>;
export { type AssetInfo } from "./util/AssetInfo";
export type Assets = Record<string, Source>;

@@ -36,3 +37,3 @@ export interface Asset {

source: Source;
info: JsAssetInfo;
info: AssetInfo;
}

@@ -295,2 +296,1 @@ export type PathData = JsPathData;

}
export {};

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

const util_1 = require("./util");
const AssetInfo_1 = require("./util/AssetInfo");
const fake_1 = require("./util/fake");

@@ -314,4 +315,4 @@ const memoize_1 = require("./util/memoize");

: typeof assetInfoUpdateOrFunction === "function"
? jsAssetInfo => (0, util_1.toJsAssetInfo)(assetInfoUpdateOrFunction(jsAssetInfo))
: (0, util_1.toJsAssetInfo)(assetInfoUpdateOrFunction));
? jsAssetInfo => AssetInfo_1.JsAssetInfo.__to_binding(assetInfoUpdateOrFunction(jsAssetInfo))
: AssetInfo_1.JsAssetInfo.__to_binding(assetInfoUpdateOrFunction));
}

@@ -326,3 +327,3 @@ /**

emitAsset(filename, source, assetInfo) {
__classPrivateFieldGet(this, _Compilation_inner, "f").emitAsset(filename, source_1.JsSource.__to_binding(source), (0, util_1.toJsAssetInfo)(assetInfo));
__classPrivateFieldGet(this, _Compilation_inner, "f").emitAsset(filename, source_1.JsSource.__to_binding(source), AssetInfo_1.JsAssetInfo.__to_binding(assetInfo));
}

@@ -341,4 +342,9 @@ deleteAsset(filename) {

return assets.map(asset => {
return Object.defineProperty(asset, "source", {
get: () => this.__internal__getAssetSource(asset.name)
return Object.defineProperties(asset, {
info: {
value: AssetInfo_1.JsAssetInfo.__from_binding(asset.info)
},
source: {
get: () => this.__internal__getAssetSource(asset.name)
}
});

@@ -352,4 +358,9 @@ });

}
return Object.defineProperty(asset, "source", {
get: () => this.__internal__getAssetSource(asset.name)
return Object.defineProperties(asset, {
info: {
value: AssetInfo_1.JsAssetInfo.__from_binding(asset.info)
},
source: {
get: () => this.__internal__getAssetSource(asset.name)
}
});

@@ -356,0 +367,0 @@ }

@@ -222,2 +222,5 @@ "use strict";

}
if (res.cacheable === false) {
this.cacheable(false);
}
assetFilenames.push(...res.assets);

@@ -248,2 +251,5 @@ resolve(compiler.__internal__getModuleExecutionResult(res.id));

}
if (res.cacheable === false) {
this.cacheable(false);
}
assetFilenames.push(...res.assets);

@@ -250,0 +256,0 @@ callback(undefined, compiler.__internal__getModuleExecutionResult(res.id));

/// <reference types="node" />
import type { JsAssetInfo, JsStatsError } from "@rspack/binding";
import { AssetInfo } from "../Compilation";
import type { JsStatsError } from "@rspack/binding";
import { LoaderObject } from "../config/adapterRuleUse";

@@ -20,4 +19,3 @@ export declare function mapValues(record: Record<string, string>, fn: (key: string) => string): {

export declare function asArray<T>(item: T): T[];
export declare function toJsAssetInfo(info?: AssetInfo): JsAssetInfo;
export declare const deprecatedWarn: (content: string, enable?: boolean) => void;
export declare const unsupported: (name: string, issue?: string) => never;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unsupported = exports.deprecatedWarn = exports.toJsAssetInfo = exports.asArray = exports.stringifyLoaderObject = exports.indent = exports.concatErrorMsgAndStack = exports.isJsStatsError = exports.isPromiseLike = exports.serializeObject = exports.toObject = exports.toBuffer = exports.isNil = exports.mapValues = void 0;
exports.unsupported = exports.deprecatedWarn = exports.asArray = exports.stringifyLoaderObject = exports.indent = exports.concatErrorMsgAndStack = exports.isJsStatsError = exports.isPromiseLike = exports.serializeObject = exports.toObject = exports.toBuffer = exports.isNil = exports.mapValues = void 0;
function mapValues(record, fn) {

@@ -85,15 +85,2 @@ return Object.fromEntries(Object.entries(record).map(([key, value]) => [key, fn(value)]));

exports.asArray = asArray;
function toJsAssetInfo(info) {
return {
immutable: false,
minimized: false,
development: false,
hotModuleReplacement: false,
related: {},
chunkHash: [],
contentHash: [],
...info
};
}
exports.toJsAssetInfo = toJsAssetInfo;
const getDeprecationStatus = () => {

@@ -100,0 +87,0 @@ const defaultEnableDeprecatedWarning = true;

{
"name": "@rspack/core",
"version": "0.7.1",
"version": "0.7.2-canary-24b3f94-20240606091113",
"webpackVersion": "5.75.0",

@@ -75,4 +75,4 @@ "license": "MIT",

"zod-validation-error": "1.3.1",
"@rspack/core": "0.7.1",
"@rspack/plugin-minify": "^0.7.1"
"@rspack/core": "0.7.2-canary-24b3f94-20240606091113",
"@rspack/plugin-minify": "^0.7.2-canary-24b3f94-20240606091113"
},

@@ -84,3 +84,3 @@ "dependencies": {

"webpack-sources": "3.2.3",
"@rspack/binding": "0.7.1"
"@rspack/binding": "0.7.2-canary-24b3f94-20240606091113"
},

@@ -87,0 +87,0 @@ "peerDependencies": {

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