New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

obuild

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obuild - npm Package Compare versions

Comparing version
0.4.30
to
0.4.31
+16
-3
dist/_chunks/build.mjs

@@ -369,3 +369,14 @@ import { builtinModules } from "node:module";

}
const writtenFiles = await Promise.all(promises);
const results = await Promise.allSettled(promises);
const errors = results.filter((result) => result.status === "rejected").map((result) => result.reason);
if (errors.length > 0) {
let isolatedErrors = [];
let otherErrors = [];
for (const error of errors.flatMap((err) => Array.isArray(err.cause) ? err.cause : [err])) if (error.message?.includes("--isolatedDeclarations")) isolatedErrors.push(error);
else otherErrors.push(error);
for (const error of otherErrors) consola.error(error);
for (const error of isolatedErrors) consola.warn(error);
if (otherErrors.length > 0) throw new Error(`Errors while transforming ${entry.input}`);
}
const writtenFiles = results.filter((result) => result.status === "fulfilled").map((result) => result.value);
consola.log(`\n${colors.magenta("[transform] ")}${colors.underline(fmtPath(entry.outDir) + "/")}${entry.stub ? colors.dim(" (stub)") : ""}\n${colors.dim(itemsTable(writtenFiles.map((f) => fmtPath(f))))}`);

@@ -431,2 +442,4 @@ }

sourceText = magicString.toString();
let emitDeclaration = entry.dts ?? true;
if (typeof emitDeclaration === "function") emitDeclaration = await emitDeclaration(entryPath);
const transformed = transformSync(entryPath, sourceText, {

@@ -437,3 +450,3 @@ ...entry.oxc,

typescript: {
declaration: { stripInternal: true },
declaration: emitDeclaration ? { stripInternal: true } : void 0,
...entry.oxc?.typescript

@@ -445,3 +458,3 @@ }

if (transformed.errors.length === 1) throw transformed.errors[0];
throw new Error(`Errors while transforming ${entryPath}: (hint: check build-dump.ts)`, { cause: transformed.errors });
throw new Error(`Errors while transforming ${entryPath}`, { cause: transformed.errors });
}

@@ -448,0 +461,0 @@ if (entry.minify) {

@@ -84,2 +84,6 @@ import { InputOptions, MinifyOptions, OutputOptions, RolldownBuild, RolldownPluginOption } from "rolldown";

filter?: (filePath: string) => boolean | Promise<boolean>;
/**
* If sets to `false`, or if the function returns `false`, declaration files won't be emitted for the module.
*/
dts?: boolean | ((filePath: string) => boolean | Promise<boolean>);
};

@@ -86,0 +90,0 @@ type BuildEntry = BundleEntry | TransformEntry;

+1
-1
{
"name": "obuild",
"version": "0.4.30",
"version": "0.4.31",
"description": "Zero-config ESM/TS package builder",

@@ -5,0 +5,0 @@ "license": "MIT",