Skip to content

Error when transforming export * from relative module path. #17

@bcomnes

Description

@bcomnes
rimraf cjs/* && ascjs esm cjs

/Users/bret/littlstar/sdk-js/node_modules/ascjs/index.js:137
      }${specifier.local.name}${EOL}`;
                         ^

TypeError: Cannot read property 'name' of undefined
    at /Users/bret/littlstar/sdk-js/node_modules/ascjs/index.js:137:26
    at Array.forEach (<anonymous>)
    at Object.ExportNamedDeclaration (/Users/bret/littlstar/sdk-js/node_modules/ascjs/index.js:132:21)
    at /Users/bret/littlstar/sdk-js/node_modules/ascjs/index.js:171:37
    at Array.forEach (<anonymous>)
    at parse (/Users/bret/littlstar/sdk-js/node_modules/ascjs/index.js:169:23)
    at ascjs (/Users/bret/littlstar/sdk-js/node_modules/ascjs/bin.js:6:18)
    at /Users/bret/littlstar/sdk-js/node_modules/ascjs/bin.js:99:25

It throws when I try to transform this file:

export * as commands from './commands/index.js'

Reverting to 4.0.2 (and lower) and the transform continues to work. Not a show stopper on my end, work arounds aplenty.

Digging into what change might have caused this, and what that change changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions