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.40 to 0.16.0

15

lib/index.js
import path from 'path';
import { isUrl } from '@chialab/node-resolve';
import { appendSearchParam, getSearchParam, isUrl } from '@chialab/node-resolve';
import { parse, walk, getIdentifierValue, getBlock, getLocation, TokenType } from '@chialab/estransform';

@@ -155,3 +155,4 @@ import { useRna } from '@chialab/esbuild-rna';

if (isEmittedPath(value)) {
const id = getSearchParam(value, 'hash');
if (id && isEmittedPath(id)) {
return;

@@ -210,11 +211,13 @@ }

if (isChunk) {
entryPoint = (await emitChunk({ entryPoint: resolvedPath })).path;
const chunk = await emitChunk({ path: resolvedPath });
entryPoint = appendSearchParam(chunk.path, 'hash', chunk.id);
} else {
entryPoint = (await emitFile(resolvedPath)).path;
const file = await emitFile(resolvedPath);
entryPoint = appendSearchParam(file.path, 'hash', file.id);
}
} else {
entryPoint = `./${path.relative(path.dirname(args.path), resolvedPath)}`;
entryPoint = path.relative(path.dirname(args.path), resolvedPath);
}
helpers.overwrite(startToken.start, endToken.end, `new URL('${entryPoint}', ${baseUrl})`);
helpers.overwrite(startToken.start, endToken.end, `new URL('./${entryPoint}', ${baseUrl})`);

@@ -221,0 +224,0 @@ return;

8

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

@@ -33,5 +33,5 @@ "main": "lib/index.js",

"dependencies": {
"@chialab/esbuild-rna": "^0.15.39",
"@chialab/estransform": "^0.15.28",
"@chialab/node-resolve": "^0.15.28"
"@chialab/esbuild-rna": "^0.16.0",
"@chialab/estransform": "^0.16.0",
"@chialab/node-resolve": "^0.16.0"
},

@@ -38,0 +38,0 @@ "devDependencies": {

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