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
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
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
9ae35ec581
Slightly improve JSX decoding perf
2021-09-17 18:37:26 -07:00
Jarred Sumner
1176a07c93
Fix whitespace & emoji bug when parsing JSX
2021-09-17 17:40:30 -07:00
Jarred Sumner
af1061e47a
Update js_printer.zig
2021-09-17 16:09:59 -07:00
Jarred Sumner
e1ce0e8467
Fix lexer bug with UTF-16 strings
2021-09-17 16:09:26 -07:00
Jarred Sumner
bc65e40313
Fix multiple imports to CJS modules when referencing via module_id hash
2021-09-17 14:47:14 -07:00
Jarred Sumner
f2cccdd1fb
Merge branch 'main' of github.com:Jarred-Sumner/bun
2021-09-17 14:27:55 -07:00
Jarred Sumner
98e9b93b7e
global -> globalThis
2021-09-17 14:24:42 -07:00
Dov Alperin
c98e007ff7
Get bun ready for linux builds
...
Adds: conditional builds in makefile
Fixes: incorrect imports of 'JavaScriptCore.zig' (note the caps 's')
replaces with correct import of 'JavascriptCore.zig'
2021-09-17 08:43:15 -04:00
Jarred Sumner
872428de89
Fix bugs with ESM -> CJS when not bundled
2021-09-17 03:14:05 -07:00
Jarred Sumner
93441babd8
Do not attempt to HMR export {value} from, just assume it will be HMR'd (or not)
2021-09-16 22:37:11 -07:00
Jarred Sumner
1328285bbc
Update options.zig
2021-09-16 20:35:08 -07:00
Jarred Sumner
9912a4ce98
Fix export * as from
2021-09-16 20:34:48 -07:00
Jarred Sumner
d5186ee663
Add flag to dev server to disable HMR
2021-09-16 20:34:22 -07:00
Jarred Sumner
9e2910365a
Help output should print command names
2021-09-16 19:08:02 -07:00
Jarred Sumner
3be2571a31
Fix symbol name for cjs2esm
2021-09-16 18:46:27 -07:00
Jarred Sumner
6352e95d0f
When port is in use, auto-increment port number up to 10 times and then bail if all 10 are in use
2021-09-16 18:27:54 -07:00
Jarred Sumner
b6a72f7d72
Always bold ^
2021-09-16 17:49:17 -07:00
Jarred Sumner
b923134023
Delete some dead code
2021-09-16 17:38:05 -07:00
Jarred Sumner
6e82fa0dab
Print absolute paths in log errors so that ctrl+click to open file in editor works (depending on terminal)
2021-09-16 17:37:52 -07:00