New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@chialab/esbuild-plugin-meta-url

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chialab/esbuild-plugin-meta-url - npm Package Compare versions

Comparing version 0.15.14 to 0.15.15

12

lib/index.js

@@ -115,8 +115,10 @@ import path from 'path';

const usePlainScript = platform === 'browser' && format !== 'esm';
const isNode = platform === 'node' && format !== 'esm';
const baseUrl = (() => {
if (platform === 'browser' && format !== 'esm') {
return 'document.currentScript && document.currentScript.src || document.baseURI';
if (usePlainScript) {
return '__currentScriptUrl__';
}
if (platform === 'node' && format !== 'esm') {
if (isNode) {
return '\'file://\' + __filename';

@@ -187,2 +189,6 @@ }

if (usePlainScript) {
helpers.prepend('var __currentScriptUrl__ = document.currentScript && document.currentScript.src || document.baseURI;\n');
}
return helpers.generate({

@@ -189,0 +195,0 @@ sourcemap: !!sourcemap,

{
"name": "@chialab/esbuild-plugin-meta-url",
"type": "module",
"version": "0.15.14",
"version": "0.15.15",
"description": "A file loader plugin for esbuild for constructed URLs using import metadata.",

@@ -45,3 +45,3 @@ "main": "lib/index.js",

},
"gitHead": "a48a62a5bbec43f2cc45d260e8f5f4e2b2b52759"
"gitHead": "6e4a453cb0fcfaf02736a056698652ec7c38792b"
}
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