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

@jsenv/module-resolution

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/module-resolution - npm Package Compare versions

Comparing version 2.0.0 to 2.3.0

5

dist/node/best/main.js

@@ -30,4 +30,5 @@ 'use strict';

const hrefToScheme = href => {
const dotIndex = href.indexOf(":");
return href.slice(0, dotIndex);
const colonIndex = href.indexOf(":");
if (colonIndex === -1) return "";
return href.slice(0, colonIndex);
};

@@ -34,0 +35,0 @@

@@ -31,4 +31,5 @@ 'use strict';

var hrefToScheme = function hrefToScheme(href) {
var dotIndex = href.indexOf(":");
return href.slice(0, dotIndex);
var colonIndex = href.indexOf(":");
if (colonIndex === -1) return "";
return href.slice(0, colonIndex);
};

@@ -35,0 +36,0 @@

2

package.json
{
"name": "@jsenv/module-resolution",
"version": "2.0.0",
"version": "2.3.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

export const hrefToScheme = (href) => {
const dotIndex = href.indexOf(":")
return href.slice(0, dotIndex)
const colonIndex = href.indexOf(":")
if (colonIndex === -1) return ""
return href.slice(0, colonIndex)
}
// when browser will start to provide native module
// we could statr to return true on some specifier
// it will allow eslint-plugin-import to consider these plugins as found
export const isNativeBrowserModuleBareSpecifier = () => false
const NATIVE_BROWSER_MODULE_SPECIFIER_ARRAY = ["global"]
export const isNativeBrowserModuleBareSpecifier = (specifier) =>
NATIVE_BROWSER_MODULE_SPECIFIER_ARRAY.includes(specifier)

@@ -8,5 +8,10 @@ import Module from "module"

export const isNativeNodeModuleBareSpecifier =
"builtinModules" in Module
? (bareSpecifier) => Module.builtinModules.includes(bareSpecifier)
: (bareSpecifier) => bareSpecifier === "module" || repl._builtinLibs.includes(bareSpecifier)
const NATIVE_NODE_MODULE_SPECIFIER_ARRAY = [
"global",
...("builtinModules" in Module
? Module.builtinModules
: ["module", "util", ...repl._builtinLibs]),
]
export const isNativeNodeModuleBareSpecifier = (specifier) =>
NATIVE_NODE_MODULE_SPECIFIER_ARRAY.includes(specifier)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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