rollup-plugin-esbuild
Advanced tools
Comparing version 3.0.4 to 4.0.0
@@ -104,3 +104,9 @@ 'use strict'; | ||
}); | ||
printWarnings(id, result, this); | ||
if (result.warnings.length > 0) { | ||
const warnings = await esbuild.formatMessages(result.warnings, { | ||
kind: "warning", | ||
color: true | ||
}); | ||
warnings.forEach((warning) => this.warn(warning)); | ||
} | ||
return result.code && { | ||
@@ -117,3 +123,4 @@ code: result.code, | ||
target, | ||
sourcemap: options.sourceMap !== false | ||
sourcemap: options.sourceMap !== false, | ||
logLevel: "warning" | ||
}); | ||
@@ -131,15 +138,3 @@ if (result.code) { | ||
}; | ||
function printWarnings(id, result, plugin) { | ||
if (result.warnings) { | ||
for (const warning of result.warnings) { | ||
let message = `[esbuild]`; | ||
if (warning.location) { | ||
message += ` (${path.relative(process.cwd(), id)}:${warning.location.line}:${warning.location.column})`; | ||
} | ||
message += ` ${warning.text}`; | ||
plugin.warn(message); | ||
} | ||
} | ||
} | ||
module.exports = index; |
{ | ||
"name": "rollup-plugin-esbuild", | ||
"version": "3.0.4", | ||
"version": "4.0.0", | ||
"main": "dist/index.js", | ||
@@ -22,3 +22,3 @@ "types": "dist/index.d.ts", | ||
"@types/node": "14.14.37", | ||
"esbuild": "^0.9.0", | ||
"esbuild": "^0.11.11", | ||
"jest": "^26.6.3", | ||
@@ -39,3 +39,3 @@ "mock-fs": "^4.13.0", | ||
"peerDependencies": { | ||
"esbuild": ">=0.9.0", | ||
"esbuild": ">=0.10.1", | ||
"rollup": "^1.20.0 || ^2.0.0" | ||
@@ -42,0 +42,0 @@ }, |
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
9660
161