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

@rspack/core

Package Overview
Dependencies
Maintainers
2
Versions
1097
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.6-canary-1a0d77d-20240627143904 to 0.7.6-canary-7121b83-20240709064601

24

dist/builtin-plugin/JavascriptModulesPlugin.d.ts

@@ -1,16 +0,10 @@

import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
import { Compilation } from "../Compilation";
import * as liteTapable from "../lite-tapable";
import { RspackBuiltinPlugin } from "./base";
import Hash = require("../util/hash");
import { Chunk } from "../Chunk";
export type CompilationHooks = {
chunkHash: liteTapable.SyncHook<[Chunk, Hash]>;
import { BuiltinPluginName } from "@rspack/binding";
export declare const JavascriptModulesPlugin: {
new (): {
name: BuiltinPluginName;
_options: void;
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
raw(): import("@rspack/binding").BuiltinPlugin;
apply(compiler: import("../Compiler").Compiler): void;
};
};
export declare class JavascriptModulesPlugin extends RspackBuiltinPlugin {
name: BuiltinPluginName;
affectedHooks: "compilation";
constructor();
raw(): BuiltinPlugin;
static getCompilationHooks(compilation: Compilation): CompilationHooks;
}
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.JavascriptModulesPlugin = void 0;
const binding_1 = require("@rspack/binding");
const Compilation_1 = require("../Compilation");
const liteTapable = __importStar(require("../lite-tapable"));
const base_1 = require("./base");
const compilationHooksMap = new WeakMap();
class JavascriptModulesPlugin extends base_1.RspackBuiltinPlugin {
constructor() {
super();
this.name = binding_1.BuiltinPluginName.JavascriptModulesPlugin;
this.affectedHooks = "compilation";
}
raw() {
return (0, base_1.createBuiltinPlugin)(this.name, undefined);
}
static getCompilationHooks(compilation) {
if (!(compilation instanceof Compilation_1.Compilation)) {
throw new TypeError("The 'compilation' argument must be an instance of Compilation");
}
let hooks = compilationHooksMap.get(compilation);
if (hooks === undefined) {
hooks = {
chunkHash: new liteTapable.SyncHook(["chunk", "hash"])
};
compilationHooksMap.set(compilation, hooks);
}
return hooks;
}
}
exports.JavascriptModulesPlugin = JavascriptModulesPlugin;
exports.JavascriptModulesPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.JavascriptModulesPlugin, () => { }, "compilation");

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

const bindingVersionCheck_1 = require("./util/bindingVersionCheck");
const createHash_1 = require("./util/createHash");
const identifier_1 = require("./util/identifier");

@@ -733,9 +732,2 @@ class Compiler {

return result;
}),
registerJavascriptModulesChunkHashTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createHookRegisterTaps).call(this, binding.RegisterJsTapKind.JavascriptModulesChunkHash, () => builtin_plugin_1.JavascriptModulesPlugin.getCompilationHooks(__classPrivateFieldGet(this, _Compiler_compilation, "f"))
.chunkHash, queried => (chunk) => {
const hash = (0, createHash_1.createHash)(this.options.output.hashFunction);
queried.call(Chunk_1.Chunk.__from_binding(chunk, __classPrivateFieldGet(this, _Compiler_compilation, "f")), hash);
const digestResult = hash.digest(this.options.output.hashDigest);
return Buffer.from(digestResult);
})

@@ -742,0 +734,0 @@ }, "f");

@@ -90,6 +90,5 @@ declare const rspackVersion: any, webpackVersion: any;

export declare const wasm: Wasm;
import { EnableChunkLoadingPlugin, JavascriptModulesPlugin } from "./builtin-plugin";
import { EnableChunkLoadingPlugin } from "./builtin-plugin";
interface JavaScript {
EnableChunkLoadingPlugin: typeof EnableChunkLoadingPlugin;
JavascriptModulesPlugin: typeof JavascriptModulesPlugin;
}

@@ -96,0 +95,0 @@ export declare const javascript: JavaScript;

@@ -120,6 +120,3 @@ "use strict";

const builtin_plugin_15 = require("./builtin-plugin");
exports.javascript = {
EnableChunkLoadingPlugin: builtin_plugin_15.EnableChunkLoadingPlugin,
JavascriptModulesPlugin: builtin_plugin_15.JavascriptModulesPlugin
};
exports.javascript = { EnableChunkLoadingPlugin: builtin_plugin_15.EnableChunkLoadingPlugin };
const builtin_plugin_16 = require("./builtin-plugin");

@@ -126,0 +123,0 @@ exports.webworker = { WebWorkerTemplatePlugin: builtin_plugin_16.WebWorkerTemplatePlugin };

{
"name": "@rspack/core",
"version": "0.7.6-canary-1a0d77d-20240627143904",
"version": "0.7.6-canary-7121b83-20240709064601",
"webpackVersion": "5.75.0",

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

"zod-validation-error": "1.3.1",
"@rspack/core": "0.7.6-canary-1a0d77d-20240627143904",
"@rspack/plugin-minify": "^0.7.6-canary-1a0d77d-20240627143904"
"@rspack/core": "0.7.6-canary-7121b83-20240709064601",
"@rspack/plugin-minify": "^0.7.6-canary-7121b83-20240709064601"
},

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

"webpack-sources": "3.2.3",
"@rspack/binding": "0.7.6-canary-1a0d77d-20240627143904"
"@rspack/binding": "0.7.6-canary-7121b83-20240709064601"
},

@@ -89,0 +89,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