In @std/esm 0.17.3, given test.js:
export default ({...foo}) => {};
Running node -r @std/esm test produces the following stack:
TypeError: Cannot read property 'start' of undefined
at bt.module.exports._t.toAssignable (…/node_modules/@std/esm/index.js:1:94584)
at bt.module.exports._t.toAssignableList (…/node_modules/@std/esm/index.js:1:95534)
at bt.module.exports.wt.parseArrowExpression (…/node_modules/@std/esm/index.js:1:90889)
at bt.module.exports.wt.parseParenArrowList (…/node_modules/@std/esm/index.js:1:85672)
at bt.module.exports.wt.parseParenAndDistinguishExpression (…/node_modules/@std/esm/index.js:1:85110)
at bt.module.exports.wt.parseExprAtom (…/node_modules/@std/esm/index.js:1:83291)
at bt.x (…/node_modules/@std/esm/index.js:1:54977)
at bt.parseExprAtom (…/node_modules/@std/esm/index.js:1:19312)
at bt.module.exports.wt.parseExprSubscripts (…/node_modules/@std/esm/index.js:1:80378)
at bt.module.exports.wt.parseMaybeUnary (…/node_modules/@std/esm/index.js:1:79945)
Thanks @mbostock!
I'm just about to wrap up v0.18.0 so will include the fix in that.
Update:
Thanks for the failing test, I cherry-picked it in locally. I've located the problem. This bug is a regression that happened when I attempted to simplify the acorn plugin. So I just need to back in a bit more code to resolve it.
Update Update:
Patched locally.
v0.18.0 is released 🎉
Hooray! Thanks for the quick fix.
Most helpful comment
v0.18.0 is released 🎉