Huge News!Announcing our $40M Series B led by Abstract Ventures.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.38 to 0.15.39

15

lib/index.js

@@ -113,3 +113,3 @@ import path from 'path';

const { platform, format, sourcesContent, sourcemap } = build.initialOptions;
const { onTransform, emitFile, emitChunk, loaders: buildLoaders } = useRna(build);
const { onTransform, isEmittedPath, emitFile, emitChunk, loaders: buildLoaders } = useRna(build);

@@ -156,2 +156,6 @@ const usePlainScript = platform === 'browser' && format !== 'esm';

if (isEmittedPath(value)) {
return;
}
const tokens = getBlock(processor, TokenType.parenL, TokenType.parenR);

@@ -203,11 +207,12 @@ const startToken = tokens[0];

const entryLoader = buildLoaders[path.extname(resolvedPath)] || 'file';
const isChunk = entryLoader !== 'file' && entryLoader !== 'json';
let entryPoint;
if (emit) {
if (entryLoader !== 'file' && entryLoader !== 'json') {
if (isChunk) {
entryPoint = (await emitChunk({ entryPoint: resolvedPath })).path;
} else {
entryPoint = appendSearchParam((await emitFile(resolvedPath)).path, 'emit', 'file');
entryPoint = (await emitFile(resolvedPath)).path;
}
} else {
entryPoint = `./${path.relative(path.dirname(args.path), resolvedPath)}`;
entryPoint = appendSearchParam(`./${path.relative(path.dirname(args.path), resolvedPath)}`, 'emit', isChunk ? 'chunk' : 'file');
}

@@ -223,3 +228,3 @@

pluginName: 'meta-url',
text: `Unable to resolve '${requestName}' reference.`,
text: `Unable to resolve '${requestName}' file.`,
location: {

@@ -226,0 +231,0 @@ file: args.path,

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

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

"scripts": {
"types": "rimraf 'types' '*.tsbuildinfo' && tsc --declaration --emitDeclarationOnly --declarationDir ./types",
"types": "rimraf './{types,*.tsbuildinfo}' && tsc -b",
"prepack": "yarn types"

@@ -38,3 +38,3 @@ },

"dependencies": {
"@chialab/esbuild-rna": "^0.15.37",
"@chialab/esbuild-rna": "^0.15.38",
"@chialab/estransform": "^0.15.28",

@@ -41,0 +41,0 @@ "@chialab/node-resolve": "^0.15.28"

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