Closed ansobolev closed 1 year ago
Well, whichever program is thinking that '\u000000'
is equivalent to '\000'
is the thing with the bug, because that is 100% wrong.
\u0000
is a unicode escape code for a null byte. \u000000
is that followed by two bytes of 0x30
, a literal '0'
character.
'\000'
is an octal escape, for a null byte. But your transpiler is throwing away the '00'
which is required for the ustar field.
> Buffer.from('\u000000')
<Buffer 00 30 30>
> Buffer.from('\000')
<Buffer 00>
Please report this bug to parcel. I'm sorry, there's nothing I can do to help you if you're using a tool that transforms my code into something broken. Good luck.
Is there an existing issue for this?
Current Behavior
I'm building a Web application using Babel and Parcel.js. After trying to import
tar
npm package to the app, I getUncaught SyntaxError: octal escape sequences can't be used in untagged template literals or in strict mode code
in the console. It comes from this line in the code, which gets transformed by Parcel toExpected Behavior
The package is built successfully; there should be no errors whatsoever.
Steps To Reproduce
package.json:
index.html:
app.js:
Run either
npm run build
, ornpm run dev
andnpm run start
. The first command fail to finish; the second two give te described behavior.Environment