aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-25avoid using null valueGravatar Dylan Conway 1-2/+4
2023-05-24Support `with { type: "macro"}` in `bun build` (#3059)Gravatar Jarred Sumner 1-6/+32
* [bun macro] Support `assert { type: "macro" }` and `with {type: "macro"}` * [bun macro] Pass through input as arguments instead of a JSNode * Fix hang when loading many entry points simultaneously with macros * do not clone --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-24Load `.env.test`, set NODE_ENV=test in `bun test`, load ↵Gravatar Jarred Sumner 1-7/+3
`.env.{test,production,development}.local` (#3037) * Support `.env.test` & `.env.{test,production,development}.local` * Fix bug preventing inlining of process.env.NODE_ENV by default * Update env_loader.zig * add env tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net>
2023-05-24fix setting `jsxImportSource`, `jsxFactory`, and `jsxFragmentFactory` (#3057)Gravatar Dylan Conway 1-70/+24
* default automatic, merge jsx flags from multiple tsconfigs * use entire package name * some tests * more tests
2023-05-22only merge if kind is `var`Gravatar Dylan Conway 1-1/+4
2023-05-19make sure `key` is added to args (#2968)Gravatar Dylan Conway 1-9/+7
2023-05-18Fixes #2946 (#2949)Gravatar Jarred Sumner 1-1/+4
* Fixes #2946 * Update string_mutable.zig * Fixes #2948 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-18use raw template contents for tagged templates (#2937)Gravatar Dylan Conway 1-8/+15
* use raw template contents when tagged * use union for template contents * pointer to cooked contents * raw if suffix * fix and don't skip test
2023-05-15handle printing missing expressions and add tests (#2872)Gravatar Dylan Conway 1-35/+87
* handle missing expressions and add tests * minify missing expression blocks in parser
2023-05-15More DCEGravatar Jarred Sumner 1-27/+34
2023-05-15Set more things to `const`Gravatar Jarred Sumner 1-13/+12
2023-05-14wipGravatar Jarred Sumner 1-3/+3
2023-05-14Fix scope chain bugGravatar Jarred Sumner 1-6/+5
2023-05-12finish #2864Gravatar Jarred Sumner 1-4/+3
2023-05-12disable sloppy mode block level functions when not bundling (#2864)Gravatar Dylan Conway 1-1/+6
* enable only during bundling * add `willUseNumberRenamer()`
2023-05-12[bundler] Disable export star redirect code size optimizationGravatar Jarred Sumner 1-30/+52
2023-05-12[bundler] Implement `export * from` code size optimizationGravatar Jarred Sumner 1-21/+36
2023-05-12[bundler] Fix bug with `export default TypeScriptType`Gravatar Jarred Sumner 1-0/+3
2023-05-12Fix regressionGravatar Jarred Sumner 1-5/+3
2023-05-11Fix our tree shaking optimizationGravatar Jarred Sumner 1-48/+90
2023-05-10make sure vars can be hoisted in catch scope (#2847)Gravatar Dylan Conway 1-23/+34
2023-05-10Fix test failure in scope order verificationGravatar Jarred Sumner 1-3/+6
2023-05-10Fix assertionGravatar Jarred Sumner 1-3/+5
2023-05-10use member from parent scope when hoisting (#2840)Gravatar Dylan Conway 1-1/+1
2023-05-09fix catch scope var declarations (#2839)Gravatar Dylan Conway 1-30/+26
* use `catch_binding` kind and report errors * make hash optional
2023-05-08add the class name to the current scopeGravatar Dylan Conway 1-0/+5
2023-05-07Add tracy (#2817)Gravatar Jarred Sumner 1-13/+16
* Add tracy * RTLD * Linux needs LD_PRELOAD * More tracing * Inline this --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-06:nail_care:Gravatar Jarred Sumner 1-8/+4
2023-05-06Fixes #2811Gravatar Jarred Sumner 1-2/+2
2023-05-06[minifier] Rewrite equality check logicGravatar Jarred Sumner 1-4/+4
2023-05-04parse and visit catch body scope (#2796)Gravatar Dylan Conway 1-10/+14
2023-05-03Fix code splitting for server componentsGravatar Jarred Sumner 1-1/+1
2023-05-03re-enable our CJS optimizationGravatar Jarred Sumner 1-1/+6
2023-05-02Use prettyGravatar Jarred Sumner 1-1/+1
2023-05-01Compress `let f; f=123` => `let f = 123;`Gravatar Jarred Sumner 1-0/+27
2023-05-01Small improvement to minifierGravatar Jarred Sumner 1-114/+114
2023-05-01Fix some splitting bugsGravatar Jarred Sumner 1-1/+2
2023-04-30FIx esm -> cjs require interop with converted CJSGravatar Jarred Sumner 1-1/+1
TODO: make `default` namespace object for these not load the entire wrapper
2023-04-30Implement source maps (#2770)Gravatar Dylan Conway 1-16/+18
* wip * Begin computing source map tables * source map progress * external source maps * fix merge * remove `@as` coercion * inline source maps and output source map shifts * fix `codeWithSourceMapShifts()` after merge * remove second call to `findReachableFiles()` * use `worker.allocator`, remove comment * don't reuse memory for source and sourceContents * don't reuse `quote_buf` * fix writing to stdout * Add comment * Don't include a sourcemap if the text was empty * Make the parser faster * +16% faster sourcemap generation @dylan-conway I'll need you to look this over to make sure I didn't mess anything up Though it currently doesn't generate the offsets in the right order... * 30% performance improvement to Bun.build() * Print `debugId` in source maps cc @mitsuhiko @notzeeg --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-29Fix a load order issueGravatar Jarred Sumner 1-4/+14
2023-04-27Add TODO noteGravatar Jarred Sumner 1-0/+2
2023-04-26Wrap some things in minify_syntax flagGravatar Jarred Sumner 1-31/+34
2023-04-26Inline spreads of array literalsGravatar Jarred Sumner 1-0/+11
2023-04-26ensure `super()` is not merged with adjacent statements (#2757)Gravatar Dylan Conway 1-5/+14
* ensure `super()` is not merged with adjacent statements * add TODO
2023-04-26Fixes #2746 (#2748)Gravatar Jarred Sumner 1-1/+1
* Fixes #2746 * add test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-26Implement `file` loader in `Bun.build` (#2745)Gravatar Jarred Sumner 1-3/+11
* Update bundle_v2.zig * Implement `file` loader * Hash in parallel * Implement `publicPath` * simplify * Update bundle_v2.zig * Implement `#!` * Remove unnecessary optional --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-25Fix error with --jsx-production in runtimeGravatar Jarred Sumner 1-23/+1
2023-04-25Fixes #2738Gravatar Jarred Sumner 1-2/+6
2023-04-22Make `Bun.build` more reliable (#2718)Gravatar Jarred Sumner 1-2/+4
* One possible implementation to make `Bun.build` work better * Pass allocator in * Make our temporary buffers a little safer * rename * Fix memory corruption in symbol table * Add support for deferred idle events in ThreadPool * Free more memory * Use a global allocator FS cache * more `inline` * Make duping keys optional in StringMap * Close file handles more often * Update router.zig * wip possibly delete this commit * Fix memory issues and reduce memory usage * > 0.8 * Switch to AsyncIO.Waker and fix memory leak in JSBundleCompletionTask * We don't need to clone this actually * Fix error * Format * Fixup * Fixup --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-20Fix bug with merging adjacent varsGravatar Jarred Sumner 1-1/+3