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

esbuild-node-externals

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-node-externals - npm Package Compare versions

Comparing version 1.15.0 to 1.16.0

7

CHANGELOG.md
# Changelog
## [1.16.0](https://github.com/pradel/esbuild-node-externals/compare/v1.15.0...v1.16.0) (2024-12-17)
### Features
* add forceExternalList option ([555ca9b](https://github.com/pradel/esbuild-node-externals/commit/555ca9bebbe423884e8171bb3b69a7077cbf1219))
## [1.15.0](https://github.com/pradel/esbuild-node-externals/compare/v1.14.0...v1.15.0) (2024-09-26)

@@ -4,0 +11,0 @@

1

dist/index.d.ts

@@ -10,2 +10,3 @@ import type { Plugin } from 'esbuild';

allowList?: AllowList;
forceExternalList?: AllowList;
allowWorkspaces?: boolean;

@@ -12,0 +13,0 @@ cwd?: string;

@@ -26,2 +26,3 @@ "use strict";

const allowPredicate = options.allowList && (0, utils_1.createAllowPredicate)(options.allowList);
const externalPredicate = options.forceExternalList && (0, utils_1.createAllowPredicate)(options.forceExternalList);
return {

@@ -54,2 +55,5 @@ name: 'node-externals',

}
if (externalPredicate === null || externalPredicate === void 0 ? void 0 : externalPredicate(args.path)) {
return { path: args.path, external: true };
}
return null;

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

2

package.json
{
"name": "esbuild-node-externals",
"version": "1.15.0",
"version": "1.16.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts",

@@ -85,2 +85,6 @@ # esbuild-node-externals

#### `options.forceExternalList` (default to `[]`)
An array that forces packages to be treated as external, even if not in `package.json`, so they will be excluded from the bundle. Can accept exact strings ('module_name'), regex patterns (/^module_name/), or a function that accepts the module name and returns whether it should be externalized.
#### `options.allowWorkspaces` (default to `false`)

@@ -87,0 +91,0 @@

@@ -17,2 +17,3 @@ import type { Plugin } from 'esbuild';

allowList?: AllowList;
forceExternalList?: AllowList;
allowWorkspaces?: boolean;

@@ -48,4 +49,5 @@ cwd?: string;

options.allowList && createAllowPredicate(options.allowList);
const externalPredicate =
options.forceExternalList && createAllowPredicate(options.forceExternalList);
return {

@@ -87,2 +89,7 @@ name: 'node-externals',

// Allow one last override to force a path/package to be treated as external
if (externalPredicate?.(args.path)) {
return { path: args.path, external: true };
}
return null;

@@ -89,0 +96,0 @@ });

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