Dylan Conway
5fa13625a1
upgrade zig to v0.11.0-dev.3737+9eb008717 ( #3374 )
...
* progress
* finish `@memset/@memcpy` update
* Update build.zig
* change `@enumToInt` to `@intFromEnum` and friends
* update zig versions
* it was 1
* add link to issue
* add `compileError` reminder
* fix merge
* format
* upgrade to llvm 16
* Revert "upgrade to llvm 16"
This reverts commit cc930ceb1c .
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-21 23:38:18 -07:00
Dylan Conway
6a1fbef8fd
record jsx factory symbols in classic mode ( #3360 )
...
* record jsx factory symbols
* merge factory/fragment when more than one part
* update test
* use existing functions, use, `memberListToComponentsIfDifferent`
* missing file
* fix defaults
2023-06-20 19:29:20 -07:00
Jarred Sumner
7d94a49ef4
Fix bug that breaks bunx prisma init when node is not installed ( #3362 )
...
* tweak cjs
* Handle more cases, add a test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-19 22:34:22 -07:00
Dylan Conway
9b8054ae11
don't remove const if referenced before declaration ( #3337 )
2023-06-16 21:11:57 -07:00
Jarred Sumner
dc06caccaa
Tweak CommonJS output ( #3320 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-15 01:18:23 -07:00
Jarred Sumner
7f535a20a2
Workaround issue with module.require =
2023-06-14 08:35:51 -07:00
Dylan Conway
067a0235e4
handle unwrapping require in any expression ( #3292 )
2023-06-12 21:43:45 -07:00
Jarred Sumner
0f018ea215
Fixes #3206 ( #3262 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-09 18:22:32 -07:00
Jarred Sumner
bf518222d4
Implement mocks in bun:test ( #3252 )
...
* wip
* wip
* most of the code for mocks in bun:test
* finishing up
* Implement `toHaveBeenCalled` and `toHaveBeenCalledTimes(1)`
* Test
* visit
* results, not returnValues
* exact
* Update jest.zig
* A couple more tests
* Add jest.fn
* support resetting mocks
* Implement spyOn
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-09 16:38:06 -07:00
Jarred Sumner
3e84f18cc0
Implement __dirname and __filename, allow direct eval in CommonJS ( #3164 )
...
* Implement `__dirname` and `__filename`, allow direct eval in CommonJS
* Fixup dirname and add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-01 18:04:09 -07:00
Dylan Conway
473b219a37
only add cjs export name if it is assigned ( #3159 )
2023-06-01 13:57:51 -07:00
Dylan Conway
689434e012
don't rewrite module.exports if assign target is update or replace ( #3147 )
...
* don't rewrite `module.exports` if assign target is `update` or `replace`
* missing `is_delete_target`, check de-opt before rewriting
2023-05-31 23:51:32 -07:00
Dylan Conway
611f1d0e24
set optional_chain instead of optional_start ( #3142 )
2023-05-31 16:13:24 -07:00
Jarred Sumner
7057cb1982
--no-macros flag, disable macros in node_modules
2023-05-31 15:05:49 -07:00
Jarred Sumner
10be26f011
[CommonJS] Handle this better
2023-05-30 02:51:50 -07:00
Jarred Sumner
e2de1f5c13
Natively support CommonJS at runtime ( #3104 )
...
* Natively support CommonJS at runtime
* cleanup how getters are handled, add fast path
* more consistent with node
* use * As
* Remove thrown modules on exception
* Handle exception better
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-29 11:23:10 -07:00
Jarred Sumner
2b04ef4fae
Convert module.exports = { foo: 'bar'} to ESM in bun build ( #3103 )
...
* Convert `module.exports = { foo: 'bar'}` to ESM in `bun build`
* De-opt for `module.exports = {}`
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-28 21:02:51 -07:00
Jarred Sumner
f870f97a94
Fixes #3091 ( #3092 )
...
* Fixes #3091
* Update build-id
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-27 00:21:54 -07:00
Dylan Conway
62f05ec103
avoid using null value
2023-05-25 23:07:18 -07:00
Jarred Sumner
88d9bac5ec
Support with { type: "macro"} in bun build ( #3059 )
...
* [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-24 19:37:57 -07:00
Jarred Sumner
63740a382b
Load .env.test, set NODE_ENV=test in bun test, load .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-24 18:52:50 -07:00
Dylan Conway
4972934189
fix setting jsxImportSource, jsxFactory, and jsxFragmentFactory ( #3057 )
...
* default automatic, merge jsx flags from multiple tsconfigs
* use entire package name
* some tests
* more tests
2023-05-24 18:33:28 -07:00
Dylan Conway
3de350b24d
only merge if kind is var
2023-05-22 11:33:01 -07:00
Dylan Conway
9306103949
make sure key is added to args ( #2968 )
2023-05-19 18:22:54 -07:00
Jarred Sumner
f3a1a3bb2b
Fixes #2946 ( #2949 )
...
* Fixes #2946
* Update string_mutable.zig
* Fixes #2948
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-18 13:27:05 -07:00
Dylan Conway
621232c197
use raw template contents for tagged templates ( #2937 )
...
* 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-18 10:52:34 -07:00
Dylan Conway
9c85483a81
handle printing missing expressions and add tests ( #2872 )
...
* handle missing expressions and add tests
* minify missing expression blocks in parser
2023-05-15 21:50:44 -07:00
Jarred Sumner
4d751db27a
More DCE
2023-05-15 02:36:43 -07:00
Jarred Sumner
d3a72a1254
Set more things to const
2023-05-15 00:00:13 -07:00
Jarred Sumner
8cce69e7c2
wip
2023-05-14 23:14:45 -07:00
Jarred Sumner
328d09129a
Fix scope chain bug
2023-05-14 20:56:06 -07:00
Jarred Sumner
8f3b648602
finish #2864
2023-05-12 08:53:23 -07:00
Dylan Conway
5f897589fc
disable sloppy mode block level functions when not bundling ( #2864 )
...
* enable only during bundling
* add `willUseNumberRenamer()`
2023-05-12 08:32:24 -07:00
Jarred Sumner
8340b98352
[bundler] Disable export star redirect code size optimization
2023-05-12 07:14:48 -07:00
Jarred Sumner
1e450dbcab
[bundler] Implement export * from code size optimization
2023-05-12 04:11:21 -07:00
Jarred Sumner
273ccbc241
[bundler] Fix bug with export default TypeScriptType
2023-05-12 02:02:35 -07:00
Jarred Sumner
5b3e18e028
Fix regression
2023-05-12 01:49:00 -07:00
Jarred Sumner
155110a03a
Fix our tree shaking optimization
2023-05-11 23:19:21 -07:00
Dylan Conway
8f4a5903ab
make sure vars can be hoisted in catch scope ( #2847 )
2023-05-10 23:55:27 -07:00
Jarred Sumner
5e0eedccb0
Fix test failure in scope order verification
2023-05-10 20:07:12 -07:00
Jarred Sumner
06a03df9a6
Fix assertion
2023-05-10 17:59:55 -07:00
Dylan Conway
e7d4f5fb16
use member from parent scope when hoisting ( #2840 )
2023-05-10 13:12:16 -07:00
Dylan Conway
1f8c60123d
fix catch scope var declarations ( #2839 )
...
* use `catch_binding` kind and report errors
* make hash optional
2023-05-09 23:52:40 -07:00
Dylan Conway
232a25b77f
add the class name to the current scope
2023-05-08 23:34:36 -07:00
Jarred Sumner
af1cd23b8c
Add tracy ( #2817 )
...
* 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-07 21:08:32 -07:00
Jarred Sumner
2aa4fba99d
💅
2023-05-06 19:09:14 -07:00
Jarred Sumner
cf4d13dcc0
Fixes #2811
2023-05-06 19:06:52 -07:00
Jarred Sumner
4708835ae6
[minifier] Rewrite equality check logic
2023-05-06 18:23:37 -07:00
Dylan Conway
8e18229d5d
parse and visit catch body scope ( #2796 )
2023-05-04 08:21:33 -07:00
Jarred Sumner
243dfc177a
Fix code splitting for server components
2023-05-03 23:48:18 -07:00