Commit Graph

10832 Commits

Author SHA1 Message Date
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
a113603f10 Merge pull request #29 from alexkuz/patch-1 2021-09-25 18:03:23 -07:00
Alexander Kuznetsov
6f6d62d915 Check requirements for the build 2021-09-26 03:56:02 +03: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
a515a2d039 Add .git 2021-09-25 14:14:33 -07:00
Jarred Sumner
d0fec462c9 Snapshots & package.json 2021-09-25 02:12:01 -07:00
Jarred Sumner
20e2040e7e Add integration test that checks styled-components renders successfully and no incorrect unicode characters are present in the style tag bun-v0.0.24 2021-09-25 02:06:06 -07:00
Jarred Sumner
538f73b2fa Bump version 2021-09-25 02:05:15 -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
4737588aac Bump version bun-v0.0.23 2021-09-25 00:35:39 -07:00
Jarred Sumner
a5d3ce4e96 Add integration test for <JSX key="foo" {...spread} onClick={() => {}} /> 2021-09-25 00:34:30 -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 bun-v0.0.22 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
af306b523b Update README.md 2021-09-24 14:49:17 -07:00
Jarred Sumner
ba20fd7566 Update README.md 2021-09-24 14:28:12 -07:00
Jarred Sumner
6d1330d601 Update README.md 2021-09-24 14:26:54 -07:00
Jarred Sumner
f3be0c79c2 Update README.md 2021-09-24 14:26:05 -07:00
Jarred Sumner
10c01af692 Update README.md 2021-09-23 23:28:45 -07:00
Jarred Sumner
a68a1983cf Update README.md 2021-09-23 23:28:25 -07:00
Jarred Sumner
90a647fb72 Update README.md 2021-09-23 23:22:41 -07:00
Jarred Sumner
3cbf209d5b clarify 2021-09-23 23:18:38 -07:00
Jarred Sumner
bee45c4fdc add the other tests 2021-09-23 22:54:38 -07:00
Jarred Sumner
61202cb464 Update README.md 2021-09-23 22:46:43 -07:00
Jarred Sumner
0091944161 Elaborate on bun bun a little 2021-09-23 22:43:20 -07:00
Jarred Sumner
78cd857bf6 Add link to webpack doc 2021-09-23 22:09:41 -07:00
Jarred Sumner
4fe1b4df1c Bump version 2021-09-23 22:02:13 -07:00
Jarred Sumner
2a1235c9db 🏃 2021-09-23 22:01:43 -07:00
Jarred Sumner
4bb41b95a8 📷 2021-09-23 22:01:34 -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
Jarred Sumner
7b24042d5f Embed regeneratorRuntime so that things which expect it to be a global still work 2021-09-23 17:36:04 -07:00
Jarred Sumner
2177dda242 Fix bug when multiple-levels of nested exports when bundled have a boolean .default value 2021-09-23 17:34:54 -07:00
Jarred Sumner
0585c86390 Support alwaysBundle for workspace packages 2021-09-23 17:33:20 -07:00
Jarred Sumner
528caab47c Add a pointer to the parent package_json for a directory. This reduces pointer chasing 2021-09-23 17:33:01 -07:00