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.
Files changed (3) hide show
  1. package/index.js +4 -5
  2. package/package.json +1 -1
  3. 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 { hideBin } from 'yargs/helpers'
6
+ import { fileURLToPath } from 'node:url'
6
7
  import yargs from 'yargs'
7
- import * as esbuild from 'esbuild'
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vendeps",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Uses esbuild to convert npm packages to ESM bundles for the browser.",
5
5
  "main": "index.js",
6
6
  "bin": {
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) => vendepsConfig && !SKIP_CONFIG_VALUES.includes(vendepsConfig?.[name]),
120
+ (name) => !SKIP_CONFIG_VALUES.includes(vendepsConfig?.[name]),
121
121
  )
122
122
 
123
123
  if (dependencyNames.length === 0) {