🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

esbuild-plugin-import-map

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-import-map - npm Package Compare versions

Comparing version
3.0.0-next.1
to
3.0.0-next.2
release/esbuild-plugin-import-map-3.0.0-next.2.tgz

Sorry, the diff of this file is not supported yet

+12
-0

@@ -0,1 +1,13 @@

# [3.0.0-next.2](https://github.com/trygve-lie/esbuild-plugin-import-map/compare/v3.0.0-next.1...v3.0.0-next.2) (2022-06-15)
### Features
* Make first argument to .load() the base URL ([789ead3](https://github.com/trygve-lie/esbuild-plugin-import-map/commit/789ead3115384ed0b7822b168a0ad073943e363b))
### BREAKING CHANGES
* The first argument to the `.load()` method now takes a base URL which the import map parser will use when parsing.
# [3.0.0-next.1](https://github.com/trygve-lie/esbuild-plugin-import-map/compare/v2.1.0...v3.0.0-next.1) (2022-06-13)

@@ -2,0 +14,0 @@

+8
-2

@@ -7,2 +7,3 @@ import { URL } from 'node:url';

const isNotString = (str) => typeof str !== 'string';
const isString = (str) => typeof str === 'string';

@@ -22,6 +23,10 @@

let BASE_URL = {};
let CACHE = {};
let BASE_URL = {};
export async function load(importMaps = [], baseURL = 'http://localhost/') {
export async function load(baseURL, importMaps = []) {
if (isNotString(baseURL)) {
throw new TypeError('First argument must be a URL string');
}
const maps = Array.isArray(importMaps) ? importMaps : [importMaps];

@@ -45,2 +50,3 @@

export function clear() {
BASE_URL = {};
CACHE = {};

@@ -47,0 +53,0 @@ }

+1
-1
{
"name": "esbuild-plugin-import-map",
"version": "3.0.0-next.1",
"version": "3.0.0-next.2",
"description": "ESbuild plugin to apply import map mappings to ESM a head of time.",

@@ -5,0 +5,0 @@ "main": "lib/plugin.js",

Sorry, the diff of this file is not supported yet