Jarred Sumner
4be8aaeab8
Pass MacroContext in more places
2021-09-30 22:35:20 -07:00
Jarred Sumner
5fdaad9a2f
Pass macro_context when appropriate. This needs to be refactored more.
2021-09-30 22:34:54 -07:00
Jarred Sumner
5855fb7cc6
Make sure VM initializes with BUN_* defines
2021-09-30 22:34:36 -07:00
Jarred Sumner
f226f52200
Fix edgecase with cjs -> esm interop runtime code when module.exports was marked as not extensible
2021-09-30 22:34:17 -07:00
Jarred Sumner
db24a27e61
Fix potential infinite loop on calling macros
2021-09-30 22:33:36 -07:00
Jarred Sumner
f8297aee4d
Fix jsxDEV transform bug that occurred when not including source and the component rendered an exception
2021-09-30 22:32:03 -07:00
Jarred Sumner
b267aace71
Fix dead-code elimination edgecase with call expressions
2021-09-30 22:30:32 -07:00
Jarred Sumner
b4bd8e4169
Fix edgecase with parsing .env
2021-09-30 22:29:33 -07:00
Jarred Sumner
fdda1078f8
Support remapping macro paths
2021-09-30 18:58:39 -07:00
Jarred Sumner
88e7e12a50
Fix all the compile errors
2021-09-30 14:20:45 -07:00
Jarred Sumner
4cdc8939ab
Wire up macro-injected imports and move some structs above the gigantic parser type to reduce bun compile time a little
2021-09-30 13:49:46 -07:00
Jarred Sumner
ec256209a8
flatten fragments
2021-09-30 01:54:53 -07:00
Jarred Sumner
74db7809eb
Most of the code & API changes necessary for supporting Relay (GraphQL)
2021-09-29 23:28:54 -07:00
Jarred Sumner
2f8be4f13f
()
2021-09-27 21:05:20 -07:00
Jarred Sumner
37ffe4501c
Ignore leading invalid unicode characters in response bodies in Response.text()
2021-09-27 21:03:00 -07:00
Jarred Sumner
13f6297312
Access object properties from macros
2021-09-27 21:01:34 -07:00
Jarred Sumner
f9dfa226a5
Fix bug in string eql check that was never used before
2021-09-27 20:53:57 -07:00
Jarred Sumner
0da19a25cf
u16 isn't big enough
2021-09-27 16:28:04 -07:00
Jarred Sumner
3b92a867e2
Pass User-Agent in fetch() by default (but allow overriding)
2021-09-27 16:09:17 -07:00
Jarred Sumner
1ada4a2c67
Fix bug in URL parser
2021-09-27 16:08:57 -07:00
Jarred Sumner
97ad21dc68
Fix typo in error
2021-09-27 16:08:34 -07:00
Jarred Sumner
62d51f7d2e
Set macros enabled
2021-09-27 01:33:53 -07:00
Jarred Sumner
4f9558dd71
Bundling ignores macros
2021-09-27 01:33:23 -07:00
Jarred Sumner
adf22db8b6
bounds checking
2021-09-27 00:40:44 -07:00
Jarred Sumner
eb3473125c
Allow nested arrays
2021-09-26 23:04:07 -07:00
Jarred Sumner
b3894994c0
Fix getting object properties
2021-09-26 21:21:51 -07:00
Jarred Sumner
e1306be4be
Update Bun.readFileAsBytes and Bun.readFile to also accept an array of filepaths to join
...
For example:
```
Bun.readFileAsString([Bun.main, "../pages/hi.tsx"]);
```
2021-09-26 20:06:10 -07:00
Jarred Sumner
002d46d0c4
Add JSArrayIterator, don't call JSC::Options after JSC already loaded once (that causes a crash)
2021-09-26 20:04:26 -07:00
Jarred Sumner
018ba2c83b
Most of macro implementation
2021-09-26 20:03:49 -07:00
Jarred Sumner
66ed7c1f30
Basic macro impl
2021-09-26 00:14:15 -07:00
Jarred Sumner
ff8393ce32
WIP
2021-09-25 14:16:05 -07:00
Jarred Sumner
8b209aecf9
fix incorrect comment
2021-09-25 14:16:05 -07:00
Jarred Sumner
a0fb04d6e5
Fix bug with resolving "browser" field in package.json
...
It was resolving from the parent directory of the result instead of the browser scope.
2021-09-25 02:05:01 -07:00
Jarred Sumner
44497ef384
Fix lexing bug with the \f form feed character (used in Emotion & Styled Components)
2021-09-25 02:03:59 -07:00
Jarred Sumner
5fb38b92d9
Fix crashing edgecase when both JSX automatic and JSX classic imports are necessary and unbundled
2021-09-25 02:03:27 -07:00
Jarred Sumner
66b29654c0
Fix visiting bug when using JSX with a spread prop and a key and one of the props is an anonymous function
...
More specifically, Bun shouldn't be visiting the same properties more than once. That was the cause.
2021-09-25 00:33:45 -07:00
Jarred Sumner
940570af59
skeleton code
2021-09-24 16:41:45 -07:00
Jarred Sumner
bdfb5a91b1
macro
2021-09-24 15:33:02 -07:00
Jarred Sumner
29b986684d
🍧
2021-09-24 15:28:30 -07:00
Jarred Sumner
e48a0877ef
@setCold
2021-09-24 15:26:55 -07:00
Jarred Sumner
22837d69b7
Remove cache_files since it's not used and causes slower Bun compilation times
2021-09-24 15:23:55 -07:00
Jarred Sumner
78cd857bf6
Add link to webpack doc
2021-09-23 22:09:41 -07:00
Jarred Sumner
2a1235c9db
🏃
2021-09-23 22:01:43 -07:00
Jarred Sumner
f78f4854a4
Handle more edgecases in our CJS2ESM conversion code
2021-09-23 21:45:15 -07:00
Jarred Sumner
ff01dfa03d
When bundling JSON, only use JSON.parse when the input is ASCII.
...
We don't want to add an extra pass over the input to convert it to UTF16. And JS engines storing strings as UTF-16 is more expensive anyway, so the runtime win here probably isn't as big (though open to evidence to the contrary!)
2021-09-23 21:43:37 -07:00
Jarred Sumner
638b204d1e
Add __exportValue and __exportDefault to runtime
2021-09-23 19:20:33 -07:00
Jarred Sumner
58e88c4aed
When bundling, parse the JSON to verify correctness, but print it as a string for better runtime performance
2021-09-23 19:20:07 -07:00
Jarred Sumner
8433919342
Safer export default transform for bundled code
2021-09-23 19:19:32 -07:00
Jarred Sumner
8150b9aeba
Fix crash when loading JS fails really quickly
2021-09-23 17:40:25 -07:00
Jarred Sumner
01601fc8a7
Globally define require() so that UMD modules which check for the existence of require() to determine if it's CommonJS use the CommonJS code path instead of the globalThis code path
2021-09-23 17:36:49 -07:00