We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.1.31
Darwin 22.3.0 arm64 arm
With the following files:
// enum.ts export const enum Foo { foo = -1, bar = 1, }
// index.ts import { Foo } from './enum'; export const FooRecord = { [Foo.foo]: 'foo', [Foo.bar]: 'bar', }
// build.ts await Bun.build({ entrypoints: ['index.ts'], minify: true, outdir: '.' });
Run
bun run build.ts
The output should be:
var a={[-1]:"foo",[1]:"bar"};export{a as FooRecord};
The output is:
var a={-1:"foo",1:"bar"};export{a as FooRecord};
Which produces syntax errors due to the unwrapped -1 property key.
-1
It is important to note that this does not happen for either of the following conditions:
The same issue exists in v1.1.30, so it doesn't appear to be a regression.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
What version of Bun is running?
1.1.31
What platform is your computer?
Darwin 22.3.0 arm64 arm
What steps can reproduce the bug?
With the following files:
Run
What is the expected behavior?
The output should be:
What do you see instead?
The output is:
Which produces syntax errors due to the unwrapped
-1
property key.Additional information
It is important to note that this does not happen for either of the following conditions:
The same issue exists in v1.1.30, so it doesn't appear to be a regression.
The text was updated successfully, but these errors were encountered: