@centralu/win32-x64 0.1.0-beta.45 → 0.1.0-beta.46

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.
@@ -14,6 +14,7 @@ import { createHash, randomBytes } from 'node:crypto'
14
14
  import { chmodSync, cpSync, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from 'node:fs'
15
15
  import { homedir } from 'node:os'
16
16
  import { basename, isAbsolute, join, win32 } from 'node:path'
17
+ import { createRequire } from 'node:module'
17
18
  import { pathToFileURL } from 'node:url'
18
19
 
19
20
  const WORD = /^[0-9A-Za-z][0-9A-Za-z.+-]{0,63}$/
@@ -532,7 +533,12 @@ export function devBuild(p, { dataDir = process.env.CC_DATA_DIR || join(homedir(
532
533
  if (protocol !== p.protocol) throw new Refusal('dev_protocol', `${protocol} ${p.protocol}`)
533
534
  const floor = /(\d+\.\d+\.\d+)/.exec(String(shim.engines?.node ?? ''))?.[1]
534
535
  if (floor && !atLeast(process.versions.node, floor)) throw new Refusal('dev_node', `${process.versions.node} ${floor}`)
535
- if (!existsSync(join(repo, 'node_modules', 'esbuild'))) throw new Refusal('dev_deps', repo)
536
+ // Found the way the bundler finds it (its own folder, then up), so a hoisted install passes too
537
+ try {
538
+ createRequire(join(repo, 'packages', 'agent-host', 'package.json')).resolve('esbuild')
539
+ } catch {
540
+ throw new Refusal('dev_deps', repo)
541
+ }
536
542
  // The next number after every dev build of this release still there, and any a pointer names
537
543
  const local = new RegExp(`^${base.replace(/[.+-]/g, '\\$&')}\\.local\\.([1-9]\\d*)$`)
538
544
  let names = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centralu/win32-x64",
3
- "version": "0.1.0-beta.45",
3
+ "version": "0.1.0-beta.46",
4
4
  "description": "Centralu app folder for Windows on x86-64",
5
5
  "license": "MIT",
6
6
  "author": "ijun17",