Comparing version 1.7.0 to 1.7.1
@@ -1264,9 +1264,9 @@ "use strict"; | ||
error(message) { | ||
errors.push(normalizeMessage(message)); | ||
errors.push(normalizeMessage2(message)); | ||
}, | ||
warn(message) { | ||
warnings.push(normalizeMessage(message)); | ||
warnings.push(normalizeMessage2(message)); | ||
} | ||
}; | ||
function normalizeMessage(message) { | ||
function normalizeMessage2(message) { | ||
if (typeof message === "string") | ||
@@ -1674,2 +1674,10 @@ message = { message }; | ||
} | ||
function normalizeMessage(error) { | ||
const err = new Error(typeof error === "string" ? error : error.message); | ||
if (typeof error === "object") { | ||
err.stack = error.stack; | ||
err.cause = error.meta; | ||
} | ||
return err; | ||
} | ||
@@ -1748,3 +1756,3 @@ // src/webpack/index.ts | ||
if (error == null) | ||
error = typeof msg === "string" ? new Error(msg) : msg; | ||
error = normalizeMessage(msg); | ||
else | ||
@@ -1751,0 +1759,0 @@ console.error(`unplugin/webpack: multiple errors returned from resolveId hook: ${msg}`); |
@@ -71,5 +71,2 @@ "use strict"; | ||
function createContext(loader) { | ||
function normalizeMessage(error) { | ||
return typeof error === "string" ? new Error(error) : error; | ||
} | ||
return { | ||
@@ -80,2 +77,10 @@ error: (error) => loader.emitError(normalizeMessage(error)), | ||
} | ||
function normalizeMessage(error) { | ||
const err = new Error(typeof error === "string" ? error : error.message); | ||
if (typeof error === "object") { | ||
err.stack = error.stack; | ||
err.cause = error.meta; | ||
} | ||
return err; | ||
} | ||
@@ -82,0 +87,0 @@ // src/utils.ts |
@@ -71,5 +71,2 @@ "use strict"; | ||
function createContext(loader) { | ||
function normalizeMessage(error) { | ||
return typeof error === "string" ? new Error(error) : error; | ||
} | ||
return { | ||
@@ -80,2 +77,10 @@ error: (error) => loader.emitError(normalizeMessage(error)), | ||
} | ||
function normalizeMessage(error) { | ||
const err = new Error(typeof error === "string" ? error : error.message); | ||
if (typeof error === "object") { | ||
err.stack = error.stack; | ||
err.cause = error.meta; | ||
} | ||
return err; | ||
} | ||
@@ -82,0 +87,0 @@ // src/rspack/loaders/transform.ts |
@@ -79,5 +79,2 @@ "use strict"; | ||
function createContext(loader) { | ||
function normalizeMessage(error) { | ||
return typeof error === "string" ? new Error(error) : error; | ||
} | ||
return { | ||
@@ -88,2 +85,10 @@ error: (error) => loader.emitError(normalizeMessage(error)), | ||
} | ||
function normalizeMessage(error) { | ||
const err = new Error(typeof error === "string" ? error : error.message); | ||
if (typeof error === "object") { | ||
err.stack = error.stack; | ||
err.cause = error.meta; | ||
} | ||
return err; | ||
} | ||
@@ -90,0 +95,0 @@ // src/utils.ts |
@@ -79,5 +79,2 @@ "use strict"; | ||
function createContext(loader) { | ||
function normalizeMessage(error) { | ||
return typeof error === "string" ? new Error(error) : error; | ||
} | ||
return { | ||
@@ -88,2 +85,10 @@ error: (error) => loader.emitError(normalizeMessage(error)), | ||
} | ||
function normalizeMessage(error) { | ||
const err = new Error(typeof error === "string" ? error : error.message); | ||
if (typeof error === "object") { | ||
err.stack = error.stack; | ||
err.cause = error.meta; | ||
} | ||
return err; | ||
} | ||
@@ -90,0 +95,0 @@ // src/webpack/loaders/transform.ts |
{ | ||
"name": "unplugin", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"packageManager": "pnpm@8.15.1", | ||
@@ -5,0 +5,0 @@ "description": "Unified plugin system for build tools", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168520
4702