New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

esm-hook

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

esm-hook - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

7

lib/index.js

@@ -21,3 +21,2 @@ /* eslint-disable */

function register(options) {
var _a;
const transformOptions = {

@@ -38,3 +37,2 @@ target: `node${process.versions.node.split(".")[0]}`,

extensions[".js"] = function (module, filename) {
var _a;
try {

@@ -46,3 +44,4 @@ return js(module, filename);

(e.code === "ERR_REQUIRE_ESM" ||
((_a = e.message) === null || _a === void 0 ? void 0 : _a.includes("Cannot use import statement outside a module")))) {
e.message?.includes("Cannot use import statement outside a module") ||
e.message?.includes("Unexpected token 'export'"))) {
return esbuild$1(module, filename);

@@ -53,3 +52,3 @@ }

};
(_a = extensions[".mjs"]) !== null && _a !== void 0 ? _a : (extensions[".mjs"] = function (module, filename) {
extensions[".mjs"] ?? (extensions[".mjs"] = function (module, filename) {
return esbuild$1(module, filename);

@@ -56,0 +55,0 @@ });

{
"name": "esm-hook",
"version": "0.1.3",
"version": "0.1.4",
"main": "register.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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