esbuild-node-externals
Advanced tools
Comparing version 1.3.0 to 1.4.0
# Changelog | ||
## [1.4.0](https://www.github.com/pradel/esbuild-node-externals/compare/v1.3.0...v1.4.0) (2021-11-17) | ||
### Features | ||
* allow allowList to target sub imports ([#20](https://www.github.com/pradel/esbuild-node-externals/issues/20)) ([d7eb235](https://www.github.com/pradel/esbuild-node-externals/commit/d7eb23522424e26fe849c0ce1b51985e358053fd)) | ||
* upgrade esbuild to ^0.13.0 ([#22](https://www.github.com/pradel/esbuild-node-externals/issues/22)) ([52bd661](https://www.github.com/pradel/esbuild-node-externals/commit/52bd661e54891cab5581028fdec51a7040bc2ac6)) | ||
### Miscellaneous | ||
* upgrade dependencies ([#24](https://www.github.com/pradel/esbuild-node-externals/issues/24)) ([ddac31f](https://www.github.com/pradel/esbuild-node-externals/commit/ddac31fef609d9ac41f9e084bb1202a50820c16c)) | ||
## [1.3.0](https://www.github.com/pradel/esbuild-node-externals/compare/v1.2.0...v1.3.0) (2021-06-22) | ||
@@ -4,0 +17,0 @@ |
@@ -9,6 +9,6 @@ "use strict"; | ||
: paramsOptions.packagePath }); | ||
const nodeModules = utils_1.findDependencies({ | ||
const nodeModules = (0, utils_1.findDependencies)({ | ||
packagePaths: options.packagePath | ||
? options.packagePath | ||
: utils_1.findPackagePaths(), | ||
: (0, utils_1.findPackagePaths)(), | ||
dependencies: options.dependencies, | ||
@@ -25,2 +25,6 @@ devDependencies: options.devDependencies, | ||
build.onResolve({ namespace: 'file', filter: /.*/ }, (args) => { | ||
// To allow allowList to target sub imports | ||
if (options.allowList.includes(args.path)) { | ||
return null; | ||
} | ||
// To allow sub imports from packages we take only the first path to deduct the name | ||
@@ -27,0 +31,0 @@ let moduleName = args.path.split('/')[0]; |
@@ -5,5 +5,5 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const fs_1 = tslib_1.__importDefault(require("fs")); | ||
const find_up_1 = tslib_1.__importDefault(require("find-up")); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
const fs_1 = (0, tslib_1.__importDefault)(require("fs")); | ||
const find_up_1 = (0, tslib_1.__importDefault)(require("find-up")); | ||
/** | ||
@@ -10,0 +10,0 @@ * Determines if the `child` path is under the `parent` path. |
{ | ||
"name": "esbuild-node-externals", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"main": "dist/index.js", | ||
@@ -24,13 +24,13 @@ "typings": "dist/index.d.ts", | ||
"peerDependencies": { | ||
"esbuild": "^0.12.0" | ||
"esbuild": "^0.13.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "14.14.35", | ||
"esbuild": "^0.12.0", | ||
"typescript": "4.2.3" | ||
"@types/node": "16.11.7", | ||
"esbuild": "^0.13.0", | ||
"typescript": "4.4.4" | ||
}, | ||
"dependencies": { | ||
"find-up": "5.0.0", | ||
"tslib": "2.1.0" | ||
"tslib": "2.3.1" | ||
} | ||
} |
@@ -19,3 +19,3 @@ import { Plugin } from 'esbuild'; | ||
optionalDependencies: true, | ||
allowList: [], | ||
allowList: [] as string[], | ||
...paramsOptions, | ||
@@ -44,2 +44,7 @@ packagePath: | ||
build.onResolve({ namespace: 'file', filter: /.*/ }, (args) => { | ||
// To allow allowList to target sub imports | ||
if (options.allowList.includes(args.path)) { | ||
return null; | ||
} | ||
// To allow sub imports from packages we take only the first path to deduct the name | ||
@@ -46,0 +51,0 @@ let moduleName = args.path.split('/')[0]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22076
274
+ Addedesbuild@0.13.15(transitive)
+ Addedesbuild-android-arm64@0.13.15(transitive)
+ Addedesbuild-darwin-64@0.13.15(transitive)
+ Addedesbuild-darwin-arm64@0.13.15(transitive)
+ Addedesbuild-freebsd-64@0.13.15(transitive)
+ Addedesbuild-freebsd-arm64@0.13.15(transitive)
+ Addedesbuild-linux-32@0.13.15(transitive)
+ Addedesbuild-linux-64@0.13.15(transitive)
+ Addedesbuild-linux-arm@0.13.15(transitive)
+ Addedesbuild-linux-arm64@0.13.15(transitive)
+ Addedesbuild-linux-mips64le@0.13.15(transitive)
+ Addedesbuild-linux-ppc64le@0.13.15(transitive)
+ Addedesbuild-netbsd-64@0.13.15(transitive)
+ Addedesbuild-openbsd-64@0.13.15(transitive)
+ Addedesbuild-sunos-64@0.13.15(transitive)
+ Addedesbuild-windows-32@0.13.15(transitive)
+ Addedesbuild-windows-64@0.13.15(transitive)
+ Addedesbuild-windows-arm64@0.13.15(transitive)
+ Addedtslib@2.3.1(transitive)
- Removedesbuild@0.12.29(transitive)
- Removedtslib@2.1.0(transitive)
Updatedtslib@2.3.1