@dry-software/cmake-js 7.3.1 → 7.3.3

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/bin/cmake-js CHANGED
@@ -1,13 +1,18 @@
1
1
  #!/usr/bin/env node
2
- 'use strict'
3
2
 
4
- const log = require('npmlog')
5
- const BuildSystem = require('../').BuildSystem
6
- const util = require('util')
7
- const version = require('../package').version
3
+ import log from 'npmlog'
4
+ import { BuildSystem } from '../lib/index.js'
5
+ import util from 'node:util'
6
+ import { createRequire } from 'node:module'
7
+ import rc from 'rc'
8
+ import yargs from 'yargs'
9
+ import { hideBin } from 'yargs/helpers'
10
+
11
+ const require = createRequire(import.meta.url)
12
+ const version = require('../package.json').version
8
13
  const logLevels = ['silly', 'verbose', 'info', 'http', 'warn', 'error']
9
14
 
10
- const npmConfigData = require('rc')('npm')
15
+ const npmConfigData = rc('npm')
11
16
  for (const [key, value] of Object.entries(npmConfigData)) {
12
17
  if (key.startsWith('cmake_js_')) {
13
18
  const option = key.substr(9)
@@ -22,7 +27,7 @@ for (const [key, value] of Object.entries(npmConfigData)) {
22
27
  }
23
28
  }
24
29
 
25
- const yargs = require('yargs')
30
+ const yargsInstance = yargs(hideBin(process.argv))
26
31
  .usage('CMake.js ' + version + '\n\nUsage: $0 [<command>] [options]')
27
32
  .version(version)
28
33
  .command('install', 'Install Node.js distribution files if needed')
@@ -173,12 +178,13 @@ const yargs = require('yargs')
173
178
  type: 'string',
174
179
  },
175
180
  })
176
- const argv = yargs.argv
181
+
182
+ const argv = await yargsInstance.argv
177
183
 
178
184
  // If help, then print and exit:
179
185
 
180
186
  if (argv.h) {
181
- console.info(yargs.help())
187
+ console.info(await yargsInstance.getHelp())
182
188
  process.exit(0)
183
189
  }
184
190
 
package/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v7.3.2 - 22/01/26
2
+
3
+ - chore: update dependencies
4
+
1
5
  # v7.3.1 - 23/03/25
2
6
 
3
7
  - feat(windows): support for arm64 node