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
Jarred Sumner
b150df34e0
Fix another simplification bug
2021-09-23 17:32:39 -07:00
Jarred Sumner
da80c3b309
Fix a simplification bug
2021-09-23 17:32:29 -07:00
Jarred Sumner
e8804bd80f
Use the package_json hash for matching bundled modules instead of searching strings (should improve perf a little)
2021-09-23 17:31:59 -07:00
Jarred Sumner
2300886008
Symlinks work
2021-09-23 13:29:51 -07:00
Jarred Sumner
57ed3c89a2
Add "bun": { "alwaysBundle": ["packageName"] }, to package.json
...
This is for monorepos that symlink directories into node_modules. For example, if you have a design system in your monorepo, you probably want to always bundle that.
2021-09-23 00:17:06 -07:00
Jarred Sumner
1a284a1c94
Extremely minor perf improvements
2021-09-22 18:12:18 -07:00
Jarred Sumner
f12dd51c00
Update query_string_map.zig
2021-09-22 16:19:25 -07:00
Jarred Sumner
e00c1e99d6
Allow URLs containing absolute filepaths in imports if they match specific file extensions
...
This is to support ../../ imports
Allowlisting to specific file extensions prevents common webserver security vulnerabilities like reading /etc/passwd
2021-09-22 16:19:16 -07:00
Jarred Sumner
39323b46ba
Fix edgecase with whether to wrap arrow expressions in parentheses when printing
2021-09-22 16:13:44 -07:00
Jarred Sumner
9dff80aeee
Fix edgecase with bare imports inside .bun
2021-09-22 16:13:14 -07:00
Jarred Sumner
9f7d05bab4
Print how many lines of code was parsed in bun bun
2021-09-22 04:08:40 -07:00
Jarred Sumner
53c0a4b568
Add disabled status to ESM resolution
2021-09-22 02:17:13 -07:00
Jarred Sumner
8f460a9be3
Fix parsing bug with arrays that have default values
2021-09-22 02:16:31 -07:00
Jarred Sumner
204b07f46b
package json exports seems to work now!!!
2021-09-22 01:03:06 -07:00
Jarred Sumner
a48a02bade
Switch to a single directory for storing snapshots and explicitly note whats a debug snapshot and a non-debug snapshot
2021-09-22 01:02:32 -07:00
Jarred Sumner
2326a1e105
Fix the compiler errors
2021-09-21 23:28:05 -07:00
Jarred Sumner
c4dc6d9bff
Resolve "exports" field in package.json (doesn't work yet)
2021-09-21 22:52:40 -07:00
Jarred Sumner
6213a73e6f
Add "exports" to PackageJSON
2021-09-21 21:53:38 -07:00
Jarred Sumner
9c109b744f
Most of the ESM resolution algorithm (still untested)
2021-09-21 21:49:32 -07:00
Jarred Sumner
42c1d54b3f
endsWithAny -> endsWithAnyComptime
2021-09-21 18:07:23 -07:00
Jarred Sumner
5e634cd612
Parse "exports" field from package.json (WIP)
2021-09-21 18:05:42 -07:00
Jarred Sumner
79c7fe0f7a
[Bun.js] Add Bun.readFileBytes() to get a Uint8Array of the file's contents without copying.
2021-09-21 15:39:52 -07:00
Jarred Sumner
8e86d2cf1d
Add comment explaining failed package.json parsing optimization
2021-09-21 14:40:19 -07:00
Jarred Sumner
4e12a4c013
[Bun.js] Add support for console.time, console.timeEnd
2021-09-21 00:58:55 -07:00
Jarred Sumner
e869cdca9f
Slightly improve .env loader string inference
2021-09-20 22:37:39 -07:00
Jarred Sumner
ab565f1a3c
Fix parsing/printing unicode identifiers, switch to UTF-8 for prefilled strings, remove eagerly loading identifier_name
2021-09-20 22:37:22 -07:00
Jarred Sumner
90cd3bf4cb
Fix how error lines with strings are highlighted
2021-09-20 18:04:45 -07:00
Jarred Sumner
9752ee8819
Always log errors when generating node_modules.server.bun
2021-09-20 17:40:09 -07:00
Jarred Sumner
9f1e0660dd
Fix handling when file metadata store stored exceeds statically allocated count (at time of writing, 16k)
2021-09-20 17:39:39 -07:00
Jarred Sumner
7c05bb7d1d
Merge pull request #27 from DAlperin/main
2021-09-17 20:33:48 -07:00
Dov Alperin
bb0faacf06
All deps now build on linux
...
Move CC and CXX into variables
Fix some capitalization
+A few other portability improvements
2021-09-17 23:21:06 -04:00
Jarred Sumner
9ae35ec581
Slightly improve JSX decoding perf
bun-v0.0.21
2021-09-17 18:37:26 -07:00
Jarred Sumner
b1ca1eb228
Package.json
2021-09-17 17:42:01 -07:00
Jarred Sumner
832502555c
Bump
bun-v0.0.20
2021-09-17 17:40:54 -07:00
Jarred Sumner
1176a07c93
Fix whitespace & emoji bug when parsing JSX
2021-09-17 17:40:30 -07:00
Jarred Sumner
3770102843
Snapshots
2021-09-17 16:22:53 -07:00