Jarred Sumner
b631ea7d72
import everything from "bun" where possible
2022-11-29 02:42:56 -08:00
Jarred Sumner
1d9c982488
[console.log] Fix printing latin1 supplement characters at runtime
...
Fixes https://github.com/oven-sh/bun/issues/1031#issuecomment-1236092120
2022-11-27 07:28:30 -08:00
Jarred Sumner
ac36ea51cf
possibly more reliable Bun.spawn ( #1547 )
...
* wip
* wip
* Fix bug with stdin
* zig fmt
* seems to work!
* Update streams.test.js
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-23 07:14:33 -08:00
Jarred Sumner
fe33073f2e
Use const ptr
2022-11-21 18:33:55 -08:00
Jarred Sumner
9d167deb10
Credit: @Validark
2022-11-07 21:43:38 -08:00
Jarred Sumner
ec9787770e
Preserve trailing newline when updating package.json
...
Fixes https://github.com/oven-sh/bun/issues/1375
2022-10-23 21:53:54 -07:00
Jarred Sumner
c37d0be027
Fix import Foo, {bar} when from hardcoded builtin modules in runtime
2022-10-21 21:13:50 -07:00
Dylan Conway
8e1b2ba32e
add oniguruma for regex with variable length lookbehinds ( #1329 )
...
* added pcre2 submodule
* pcre2 regex boilerplate
* tests for pcre2 regex
* flag validation, getters, construct and compile mostly working
* string escaping for source and toString(), exec, more tests
* flag sorting, match, matchAll, search, split, replace
* remove lib link
* add destructor to PCRE2RegExp
* header include
* removed ternary
* switched to oniguruma for regex library
* revert sql changes
* fix indices flag, add tests
* revert settings
* working error messages
* more tests for lastIndex, fix logic for compile and lastIndex
* move oniguruma lib to deps out dir
2022-10-17 22:37:18 -07:00
zhiyuan
b542921f3d
Fix import alias ( #1313 )
2022-10-13 05:44:08 -07:00
Jarred Sumner
3a042cdb48
Add a comment
2022-10-12 18:09:04 -07:00
Jarred Sumner
a97914fff3
Fix require("bun") and import("bun") when statically known
2022-10-12 18:02:18 -07:00
Jarred Sumner
0ca42e81f3
Plugin API ( #1199 )
...
* Plugin API
* Fix the bugs
* Implement `"object"` loader
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-09-03 03:57:43 -07:00
Jarred Sumner
fd4a210b84
[bun.js] Fix non-ascii latin1 string handling in console.log
...
Closes https://github.com/oven-sh/bun/issues/738
Closes https://github.com/oven-sh/bun/issues/737
2022-07-15 21:07:41 -07:00
Jarred Sumner
eea02d9500
[misc] Make that test work
2022-07-04 06:03:19 -07:00
Jarred Sumner
a02f42f84c
Fix bug with printer
2022-06-29 04:29:32 -07:00
Jarred Sumner
8fbd92e37d
Cleanup some of the require code
2022-06-25 04:41:20 -07:00
Jarred Sumner
7bb75f5553
Add dynamic require support
2022-06-24 06:59:47 -07:00
Jarred Sumner
d450c4cdee
[JS Printer] Fix bug with printing re-exported functions that are from an object binding
2022-06-22 06:56:47 -07:00
Jarred Sumner
78bf1150ff
Fix defaultProps with JSX optimization
2022-06-09 05:09:00 -07:00
Jarred Sumner
a37f86e89d
bun:sqlite (#167 )
...
* ✂️
* Add the slow version
* draw the rest of the owl
* Fix crash when allocating lots of memory
* [Bun.Transipiler] Support passing objects
* [JS Parser] Support passing objects to macros via Bun.Transpiler
* Update JSSQLStatement.cpp
* Embed SQLite
* Add SQLite to Dockerfile
* [sqlite] Add quick one-off queries without creating a whole object
* [sqlite] Add `columnsCount`, rename raw() to `values()`, remove `rebind`
* Implement `bun:sqlite`
* return null
* Fix updating query
* Update bun.d.ts
* more tests
* Support variadic arguments, write tests and add types
* Update sqlite.d.ts
* Update sqlite.d.ts
* latest
* Implement `Database.loadExtension` and `Database.setCustomSQLite`
* Support `require.resolve`
* [napi] Improve string performance
* [bun.js] Support some of `node:module`
* another test
* [sqlite] Support serialize & deserialize
* [`bun:ffi`] Implement `CFunction` and `linkSymbols`
* [bun.js] Fix crash in `Buffer.from`
* Update sqlite.test.js
* Document linkSymbols
* docs
* Update README.md
2022-05-16 15:46:20 -07:00
Jarred Sumner
3c87fbfd37
[bun.js] Implement import.meta.require
...
This allows synchronous dynamic loading of `.node`, `.json`, and `.toml` files.
It is not a CommonJS require, but it can be used that way so long as the content is not JavaScript.
2022-05-11 00:56:35 -07:00
Jarred Sumner
01a0aee1e8
[napi] transpile require(*.node) into process.dlopen
2022-05-10 19:12:15 -07:00
Jarred Sumner
b3760cd723
Fix extra quote in bundled require errors
2022-05-09 23:01:05 -07:00
Jarred Sumner
d629cfafd6
E.String gets a Rope
2022-05-05 21:32:19 -07:00
Jarred Sumner
b1ebe54456
[bun.js] Support a "bun" import
2022-04-10 04:30:31 -07:00
Jarred Sumner
20cdb197e2
Fix Next.js stylesheet bug
2022-04-08 23:16:13 -07:00
Jarred Sumner
7b2ab994e5
Fix possible infinite loops
2022-03-31 04:29:40 -07:00
Jarred Sumner
3434b9ecf3
Implement error page for HTTP server
2022-03-24 19:08:20 -07:00
Jarred Sumner
b8c50936a6
[JS Printer] Fix bug with printing imports for bundled code
2022-03-19 00:45:17 -07:00
Jarred Sumner
8fad34a29b
[JS Transpiler] Always print escape unicode identifiers, for now
2022-03-17 18:29:02 -07:00
Jarred Sumner
44b0c8153a
Source Maps for client-side errors & columns
2022-03-11 00:03:09 -08:00
Jarred Sumner
1422055304
[bun.js] Support sourcemaps!
2022-03-10 05:39:46 -08:00
Jarred Sumner
3ca113059d
Update js_printer.zig
2022-03-10 00:46:00 -08:00
Jarred Sumner
01b1fee284
69% perf improvement for long string literals
2022-03-09 04:00:19 -08:00
Jarred Sumner
026657d83b
make the map slightly smaller
2022-03-09 03:58:32 -08:00
Jarred Sumner
e35895888e
[JS Printer] Add function for printing a string as JSON
2022-03-09 02:37:42 -08:00
Jarred Sumner
7c5c6cd519
source maps work for app code in bun dev!
2022-03-06 07:35:16 -08:00
Jarred Sumner
51fbbea1d3
upgrade zig
2022-03-04 00:20:22 -08:00
Jarred Sumner
8c271e5640
[JS Printer] Fix edgecase with optional chaining, class static block initialization and private identifiers
2022-02-27 01:52:56 -08:00
Jarred Sumner
2e1e50486f
misc cleanup
2022-02-24 00:12:40 -08:00
Jarred Sumner
e77a8db546
Fix assertion in JSPrinter
2022-02-22 15:27:09 -08:00
Jarred Sumner
3a0577ba96
Use an enum for Ref instead of a buggy packed struct
...
Fixes a printing bug with `Symbol`
2022-02-18 20:33:04 -08:00
Jarred Sumner
3db3413929
[JS Printer] fix edgecase with printing empty export
2022-02-18 02:32:57 -08:00
Jarred Sumner
83c0ad11ac
[JS Printer] Print {\n} instead of ; for empty blocks
2022-02-17 03:46:04 -08:00
Jarred Sumner
6db46c6d00
Update js_printer.zig
2022-02-16 20:34:00 -08:00
Jarred Sumner
4ba0e7b7d8
[JS Printer] Fix missing space at end of object bindings
...
See also https://github.com/evanw/esbuild/pull/2025
2022-02-16 20:15:35 -08:00
Jarred Sumner
68e5b0d842
[js printer] slightly optimize indent / unindent
2022-02-16 03:41:35 -08:00
Jarred Sumner
fa6bb0fc7c
[js printer] Remove symbol pool
2022-02-16 03:41:11 -08:00
Jarred Sumner
08e8eabc6f
Revert "Remove usage of packed struct in Ref because packed is buggy in zig"
...
This reverts commit 2578f426b6 .
2022-02-15 20:08:35 -08:00
Jarred Sumner
2578f426b6
Remove usage of packed struct in Ref because packed is buggy in zig
2022-02-15 13:47:18 -08:00