You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@rolldown/pluginutils

Package Overview
Dependencies
Maintainers
3
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rolldown/pluginutils - npm Package Compare versions

Comparing version
1.0.0-beta.29-commit.fe1bea3
to
1.0.0-beta.31-commit.832324a
+5
-10
dist/index.cjs

@@ -145,11 +145,9 @@

for (const e of expr) switch (e.kind) {
case "include": {
case "include":
hasInclude = true;
if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, ctx)) return true;
break;
}
case "exclude": {
case "exclude":
if (exprInterpreter(e.expr, code$1, id$1, moduleType$1)) return false;
break;
}
}

@@ -163,15 +161,12 @@ return !hasInclude;

case "not": return !exprInterpreter(expr.expr, code$1, id$1, moduleType$1, ctx);
case "id": {
case "id":
if (id$1 === void 0) throw new Error("`id` is required for `id` expression");
if (expr.params.cleanUrl) id$1 = cleanUrl(id$1);
return typeof expr.pattern === "string" ? id$1 === expr.pattern : expr.pattern.test(id$1);
}
case "moduleType": {
case "moduleType":
if (moduleType$1 === void 0) throw new Error("`moduleType` is required for `moduleType` expression");
return moduleType$1 === expr.pattern;
}
case "code": {
case "code":
if (code$1 === void 0) throw new Error("`code` is required for `code` expression");
return typeof expr.pattern === "string" ? code$1.includes(expr.pattern) : expr.pattern.test(code$1);
}
case "query": {

@@ -178,0 +173,0 @@ if (id$1 === void 0) throw new Error("`id` is required for `Query` expression");

@@ -144,11 +144,9 @@ //#region src/utils.ts

for (const e of expr) switch (e.kind) {
case "include": {
case "include":
hasInclude = true;
if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, ctx)) return true;
break;
}
case "exclude": {
case "exclude":
if (exprInterpreter(e.expr, code$1, id$1, moduleType$1)) return false;
break;
}
}

@@ -162,15 +160,12 @@ return !hasInclude;

case "not": return !exprInterpreter(expr.expr, code$1, id$1, moduleType$1, ctx);
case "id": {
case "id":
if (id$1 === void 0) throw new Error("`id` is required for `id` expression");
if (expr.params.cleanUrl) id$1 = cleanUrl(id$1);
return typeof expr.pattern === "string" ? id$1 === expr.pattern : expr.pattern.test(id$1);
}
case "moduleType": {
case "moduleType":
if (moduleType$1 === void 0) throw new Error("`moduleType` is required for `moduleType` expression");
return moduleType$1 === expr.pattern;
}
case "code": {
case "code":
if (code$1 === void 0) throw new Error("`code` is required for `code` expression");
return typeof expr.pattern === "string" ? code$1.includes(expr.pattern) : expr.pattern.test(code$1);
}
case "query": {

@@ -177,0 +172,0 @@ if (id$1 === void 0) throw new Error("`id` is required for `Query` expression");

{
"name": "@rolldown/pluginutils",
"version": "1.0.0-beta.29-commit.fe1bea3",
"version": "1.0.0-beta.31-commit.832324a",
"license": "MIT",

@@ -29,3 +29,3 @@ "type": "module",

"picomatch": "^4.0.2",
"tsdown": "0.13.0",
"tsdown": "0.13.4",
"vitest": "^3.0.1"

@@ -32,0 +32,0 @@ },