vendeps 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -5
- package/package.json +1 -1
- package/parser.js +1 -1
package/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import * as esbuild from 'esbuild'
|
|
3
4
|
import { mkdir, readFile } from 'node:fs/promises'
|
|
4
5
|
import { dirname, resolve } from 'node:path'
|
|
5
|
-
import {
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
6
7
|
import yargs from 'yargs'
|
|
7
|
-
import
|
|
8
|
+
import { hideBin } from 'yargs/helpers'
|
|
9
|
+
import { packageJsonToEsbuildOptions } from './parser.js'
|
|
8
10
|
|
|
9
11
|
async function loadJson(filePath) {
|
|
10
12
|
try {
|
|
@@ -15,9 +17,6 @@ async function loadJson(filePath) {
|
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
import { fileURLToPath } from 'node:url'
|
|
19
|
-
import { packageJsonToEsbuildOptions } from './parser'
|
|
20
|
-
|
|
21
20
|
const vendepsPackageJson = await loadJson(resolve(dirname(fileURLToPath(import.meta.url)), 'package.json'))
|
|
22
21
|
|
|
23
22
|
const CONFIG_KEY = vendepsPackageJson.name
|
package/package.json
CHANGED
package/parser.js
CHANGED
|
@@ -117,7 +117,7 @@ export async function packageJsonToEsbuildOptions(packageJson, configKey, resolv
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
const dependencyNames = Object.keys(dependencies).filter(
|
|
120
|
-
(name) =>
|
|
120
|
+
(name) => !SKIP_CONFIG_VALUES.includes(vendepsConfig?.[name]),
|
|
121
121
|
)
|
|
122
122
|
|
|
123
123
|
if (dependencyNames.length === 0) {
|