Socket
Socket
Sign inDemoInstall

esm-resolve

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esm-resolve - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

index.d.ts

@@ -19,5 +19,7 @@ /*

import {ResolverOptions} from './types/index.js';
/**
* Builds an import resolver for the given importer file.
*/
export default function buildResolver(importer: string, options?: Partial<types.ResolverOptions>): (importer: string) => string|undefined;
export default function buildResolver(importer: string, options?: Partial<ResolverOptions>): (importer: string) => string|undefined;

@@ -23,2 +23,6 @@ /*

// TODO(samthor): This includes 'module' to work around a problem in a certain popular JS library.
const alwaysConstraints = ['module', 'import'];
/**

@@ -78,3 +82,3 @@ * @param {types.InternalPackageModuleNode} exports

for (const key in node) {
if (key === 'import' || constraints.includes(key)) {
if (alwaysConstraints.includes(key) || constraints.includes(key)) {
node = node[key];

@@ -81,0 +85,0 @@ continue restart;

{
"name": "esm-resolve",
"version": "1.0.3",
"version": "1.0.4",
"description": "Resolves ESM imports in JS",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -65,2 +65,4 @@ /*

* main field even if the package type is not "module". Defaults to true.
*
* @default true
*/

@@ -67,0 +69,0 @@ includeMainFallback: boolean,

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