Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Adding parallel build #84

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpodwysocki
Copy link
Contributor

Starting to create a parallel build, however, getting into some odd mocking issues such as the following:

2> test/build-esm.ts
node:internal/bootstrap/switches/does_own_process_state:144
    cachedCwd = rawMethods.cwd();
                           ^

Error: ENOENT: no such file or directory, uv_cwd
    at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:144:28)
    at
file:///Users/matthewp/git/tshy/node_modules/@tapjs/processinfo/dist/esm/canonical-source.js:7:21
    at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:475:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:104:9) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'uv_cwd'
}

Node.js v22.2.0
node:internal/bootstrap/switches/does_own_process_state:144
    cachedCwd = rawMethods.cwd();
                           ^

Error: ENOENT: no such file or directory, uv_cwd
    at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:144:28)
    at
file:///Users/matthewp/git/tshy/node_modules/@tapjs/processinfo/dist/esm/canonical-source.js:7:21
    at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:475:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:104:9) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'uv_cwd'
}

@@ -13,34 +13,57 @@ import tsc from './which-tsc.js'
const node = process.execPath
const { esmDialects = [] } = config

export const buildESM = () => {
const isBuildResult = (x: any): x is BuildResult => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit, I usually prefer to define isType methods in the same file as the type itself, to reduce the chances of having them go out of sync. (No need to change now, I'm fine moving it later, so this is more a note to myself.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants