Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsimportlib

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

tsimportlib - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

index.js
const Module = require('module');
const {isAbsolute} = require('path');
const {pathToFileURL} = require('url');

@@ -9,3 +10,3 @@ exports.dynamicImport = importEsm;

if(isAbsolute(specifier)) {
return import(specifier);
return import(pathToFileURL(specifier).href);
}

@@ -20,2 +21,3 @@ let resolvedPath;

}
resolvedPath = pathToFileURL(resolvedPath).href;
} catch {

@@ -22,0 +24,0 @@ throw new Error(`Unable to locate module "${specifier}" relative to "${module?.filename}" using the CommonJS resolver. Consider passing an absolute path to the target module.`);

{
"name": "tsimportlib",
"version": "0.0.4",
"version": "0.0.5",
"author": {

@@ -5,0 +5,0 @@ "name": "Andrew Bradley",

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