-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Use of Subpath patterns in export maps seems to break ipjs bulid, which exits without reporting any errors and 0 exit code.
Some investigation uncovered that error is happening somewhere in file parse function
Lines 36 to 65 in 2fca839
| if (this.parsed) throw new Error(`Already parsed this file ${this.url}`) | |
| this.onParse(this) | |
| const data = await readFile(this.url) | |
| const program = parse(data, { sourceType: 'module', ecmaVersion: 2020 }) | |
| const imports = [] | |
| for (let i = 0; i < program.body.length; i++) { | |
| const node = program.body[i] | |
| if (node.type === 'ImportDeclaration') { | |
| imports.push(node.source.value) | |
| } | |
| } | |
| dynamicImports(program).forEach(name => imports.push(name)) | |
| this.esm = generate(program, stropts) | |
| this.imports = new Map() | |
| for (const value of imports) { | |
| if (value.startsWith('.')) { | |
| const url = new URL(value, this.url) | |
| this.imports.set(value, this.pkg.file(url)) | |
| } else { | |
| this.imports.set(value, null) | |
| } | |
| } | |
| await Promise.all([...this.imports.values()].filter(x => x)) | |
| this.onParsed(this) |
Which I am guessing is due to the following line which does not seems to await on file(this, url, this.hooks).
Lines 27 to 33 in 2fca839
| file (url) { | |
| const key = url.toString() | |
| if (!this.files.has(key)) { | |
| this.files.set(key, file(this, url, this.hooks)) | |
| } | |
| return this.files.get(key) | |
| } |
Metadata
Metadata
Assignees
Labels
No labels