Skip to content

Commit

Permalink
fix: handle tsm load issue
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jan 12, 2023
1 parent 778580d commit a316514
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/main/js/goods.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * as tempy from 'tempy'
export { default as ip } from 'ip'
export { semver, SSRI, INI } from './reexport.mjs'
export { default as tcping } from 'is-reachable'
export { copy } from 'globby-cp'
export { semver, SSRI, INI } from './reexport.cjs'
18 changes: 18 additions & 0 deletions src/main/js/reexport.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { execSync } = require('node:child_process')
const { join } = require('node:path')

const reexport = (name) => require(join(
execSync('npm list -g --depth=0 --parseable npm', {shell: true}).toString().trim(),
'node_modules',
name
))

const semver = reexport('semver')
const SSRI = reexport('ssri')
const INI = reexport('ini')

module.exports = {
semver,
SSRI,
INI,
}
14 changes: 0 additions & 14 deletions src/main/js/reexport.mjs

This file was deleted.

0 comments on commit a316514

Please sign in to comment.