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

@jsenv/node-esm-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/node-esm-resolution - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "@jsenv/node-esm-resolution",
"version": "0.0.6",
"version": "0.0.7",
"license": "MIT",

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

@@ -38,10 +38,10 @@ import { statSync } from "node:fs"

return {
...result,
magicDirectoryIndex: true,
...result,
}
}
return {
isDirectory: true,
found: true,
url: fileUrl,
isDirectory: true,
}

@@ -60,5 +60,5 @@ }

return {
magicExtension: extensionLeadingToFile,
found: true,
url: `${fileUrl}${extensionLeadingToFile}`,
magicExtension: extensionLeadingToFile,
}

@@ -65,0 +65,0 @@ }

@@ -767,22 +767,32 @@ /*

const mainLegacyResolvers = {
import: ({ module, jsnext }) => {
if (typeof module === "string") {
return { type: "module", path: module }
import: (packageJson) => {
if (typeof packageJson.module === "string") {
return { type: "module", path: packageJson.module }
}
if (typeof jsnext === "string") {
return { type: "jsnext", path: jsnext }
if (typeof packageJson.jsnext === "string") {
return { type: "jsnext", path: packageJson.jsnext }
}
return null
},
browser: ({ browser, module }, packageUrl) => {
browser: (packageJson, packageUrl) => {
const browserMain =
typeof browser === "string"
? browser
: typeof browser === "object" && browser !== null
? browser["."]
typeof packageJson.browser === "string"
? packageJson.browser
: typeof packageJson.browser === "object" &&
packageJson.browser !== null
? packageJson.browser["."]
: ""
if (!browserMain) {
if (typeof packageJson.module === "string") {
return {
type: "module",
path: packageJson.module,
}
}
return null
}
if (typeof module !== "string" || module === browserMain) {
if (
typeof packageJson.module !== "string" ||
packageJson.module === browserMain
) {
return {

@@ -802,3 +812,3 @@ type: "browser",

type: "module",
path: module,
path: packageJson.module,
}

@@ -811,7 +821,7 @@ }

},
node: ({ main }) => {
if (typeof main === "string") {
node: (packageJson) => {
if (typeof packageJson.main === "string") {
return {
type: "main",
path: main,
path: packageJson.main,
}

@@ -818,0 +828,0 @@ }

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