package Api; smol Loader { jsx = 1; js = 2; ts = 3; tsx = 4; css = 5; file = 6; json = 7; toml = 8; wasm = 9; } smol FrameworkEntryPointType { client = 1; server = 2; fallback = 3; } smol StackFrameScope { Eval = 1; Module = 2; Function = 3; Global = 4; Wasm = 5; Constructor = 6; } struct StackFrame { string function_name; string file; StackFramePosition position; StackFrameScope scope; } struct StackFramePosition { int32 source_offset; int32 line; int32 line_start; int32 line_stop; int32 column_start; int32 column_stop; int32 expression_start; int32 expression_stop; } struct SourceLine { int32 line; string text; } struct StackTrace { SourceLine[] source_lines; StackFrame[] frames; } message JSException { string name = 1; string message = 2; uint16 runtime_type = 3; uint8 code = 4; StackTrace stack = 5; } smol FallbackStep { ssr_disabled = 1; create_vm = 2; configure_router = 3; configure_defines = 4; resolve_entry_point = 5; load_entry_point = 6; eval_entry_point = 7; fetch_event_handler = 8; } struct Problems { uint16 code; string name; JSException[] exceptions; Log build; } struct Router { StringMap routes; int32 route; StringMap params; } message FallbackMessageContainer { string message = 1; Router router = 2; FallbackStep reason = 3; Problems problems = 4; string cwd = 5; } smol ResolveMode { disable = 1; lazy = 2; dev = 3; bundle = 4; } smol Platform { browser = 1; node = 2; bun = 3; bun_macro = 4; } smol CSSInJSBehavior { facade = 1; facade_onimportcss = 2; auto_onimportcss = 3; } smol JSXRuntime { automatic = 1; classic = 2; } struct JSX { string factory; JSXRuntime runtime; string fragment; bool development; // Probably react string import_source; bool react_fast_refresh; } struct StringPointer { uint32 offset; uint32 length; } struct JavascriptBundledModule { // package-relative path including file extension StringPointer path; // Source code StringPointer code; // index into JavascriptBundle.packages uint32 package_id; // The ESM export is this id ("$" + number.toString(16)) uint32 id; // This lets us efficiently compare strings ignoring the extension byte path_extname_length; } struct JavascriptBundledPackage { StringPointer name; StringPointer version; uint32 hash; uint32 modules_offset; uint32 modules_length; } struct JavascriptBundle { // These are sorted alphabetically so you can do binary search JavascriptBundledModule[] modules; JavascriptBundledPackage[] packages; // This is ASCII-encoded so you can send it directly over HTTP byte[] etag; uint32 generated_at; // generated by hashing all ${name}@${version} in sorted order byte[] app_package_json_dependencies_hash; byte[] import_from_name; // This is what StringPointer refers to byte[] manifest_string; } message JavascriptBundleContainer { uint32 bundle_format_version = 1; // These go first so if we change JavaScriptBundle we can still read these LoadedRouteConfig routes = 3; LoadedFramework framework = 2; JavascriptBundle bundle = 4; // Don't technically need to store this, but it may be helpful as a sanity check uint32 code_length = 5; } smol ScanDependencyMode { app = 1; all = 2; } smol ModuleImportType { import = 1; require = 2; } struct ModuleImportRecord { ModuleImportType kind; string path; bool dynamic; } struct Module { string path; ModuleImportRecord[] imports; } struct StringMap { string[] keys; string[] values; } struct LoaderMap { string[] extensions; Loader[] loaders; } enum DotEnvBehavior { disable = 1; prefix = 2; load_all = 3; } message EnvConfig { string prefix = 1; StringMap defaults = 2; } struct LoadedEnvConfig { DotEnvBehavior dotenv; StringMap defaults; string prefix; } message FrameworkConfig { string package = 1; FrameworkEntryPointMessage client = 2; FrameworkEntryPointMessage server = 3; FrameworkEntryPointMessage fallback = 4; bool development = 5; CSSInJSBehavior client_css_in_js = 6; string display_name = 7; StringMap overrideModules = 8; } struct FrameworkEntryPoint { FrameworkEntryPointType kind; string path; LoadedEnvConfig env; } message FrameworkEntryPointMap { FrameworkEntryPoint client = 1; FrameworkEntryPoint server = 2; FrameworkEntryPoint fallback = 3; } message FrameworkEntryPointMessage { string path = 1; EnvConfig env = 2; } struct LoadedFramework { string package; string display_name; bool development; FrameworkEntryPointMap entry_points; CSSInJSBehavior client_css_in_js; StringMap overrideModules; } struct LoadedRouteConfig { string dir; string[] extensions; string static_dir; string asset_prefix; } message RouteConfig { string[] dir = 1; string[] extensions = 2; string static_dir = 3; string asset_prefix = 4; } message TransformOptions { JSX jsx = 1; string tsconfig_override = 2; ResolveMode resolve = 3; string origin = 4; string absolute_working_dir = 5; StringMap define = 6; bool preserve_symlinks = 7; string[] entry_points = 8; bool write = 9; string[] inject = 10; string output_dir = 11; string[] external = 12; LoaderMap loaders = 13; string[] main_fields = 14; Platform platform = 15; bool serve = 16; string[] extension_order = 17; bool generate_node_module_bundle = 18; string node_modules_bundle_path = 19; string node_modules_bundle_path_server = 20; FrameworkConfig framework = 21; RouteConfig router = 22; bool no_summary = 23; bool disable_hmr = 24; uint16 port = 25; MessageLevel logLevel = 26; } struct FileHandle { string path; uint size; uint fd; } message Transform { FileHandle handle = 1; string path = 2; byte[] contents = 3; Loader loader = 4; TransformOptions options = 5; } enum TransformResponseStatus { success = 1; fail = 2; } struct OutputFile { byte[] data; string path; } struct TransformResponse { TransformResponseStatus status; OutputFile[] files; Message[] errors; } enum MessageLevel { err = 1; warn =2; note = 3; info = 4; debug = 5; } struct Location { string file; string namespace; int32 line; int32 column; string line_text; string suggestion; uint offset; } message MessageData { string text = 1; Location location = 2; } message MessageMeta { string resolve = 1; bool build = 2; } struct Message { MessageLevel level; MessageData data; MessageData[] notes; MessageMeta on; } struct Log { uint32 warnings; uint32 errors; Message[] msgs; } smol Reloader { disable = 1; // equivalent of CMD + R live = 2; // React Fast Refresh fast_refresh = 3; } // The WebSocket protocol // Server: "hey, this file changed. Does anyone want it?" // Browser: *checks array* "uhh yeah, ok. rebuild that for me" // Server: "here u go" // This makes the client responsible for tracking which files it needs to listen for. // From a server perspective, this means the filesystem watching thread can send the same WebSocket message // to every client, which is good for performance. It means if you have 5 tabs open it won't really be different than one tab // The clients can just ignore files they don't care about smol WebsocketMessageKind { welcome = 1; file_change_notification = 2; build_success = 3; build_fail = 4; manifest_success = 5; manifest_fail = 6; resolve_file = 7; file_change_notification_with_hint = 8; } smol WebsocketCommandKind { build = 1; manifest = 2; build_with_file_path = 3; } // Each websocket message has two messages in it! // This is the first. struct WebsocketMessage { uint32 timestamp; WebsocketMessageKind kind; } // This is the first. struct WebsocketMessageWelcome { uint32 epoch; Reloader javascriptReloader; string cwd; } struct WebsocketMessageFileChangeNotification { uint32 id; Loader loader; } struct WebsocketCommand { WebsocketCommandKind kind; uint32 timestamp; } // The timestamp is used for client-side deduping struct WebsocketCommandBuild { uint32 id; } struct WebsocketCommandManifest { uint32 id; } // We copy the module_path here incase they don't already have it struct WebsocketMessageBuildSuccess { uint32 id; uint32 from_timestamp; Loader loader; string module_path; // This is the length of the blob that immediately follows this message. uint32 blob_length; } struct WebsocketMessageBuildFailure { uint32 id; uint32 from_timestamp; Loader loader; string module_path; Log log; } struct WebsocketCommandBuildWithFilePath { uint32 id; string file_path; } struct WebsocketMessageResolveID { uint32 id; } struct NPMRegistry { string url; string username; string password; string token; } struct NPMRegistryMap { string[] scopes; NPMRegistry[] registries; } message BunInstall { NPMRegistry default_registry = 1; NPMRegistryMap scoped = 2; string lockfile_path = 3; string save_lockfile_path = 4; string cache_directory = 5; bool dry_run = 6; bool force = 7; bool save_dev = 8; bool save_optional = 9; bool save_peer = 10; bool save_lockfile = 11; bool production = 12; bool save_yarn_lockfile = 13; string[] native_bin_links = 14; bool disable_cache = 15; bool disable_manifest_cache = 16; string global_dir = 17; string global_bin_dir = 18; }epare-for-libuv Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/demos/react-fast-refresh-test/src/components/new-comp.tsx (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-18Adds macOS Keychain certs to default CA storeGravatar Anshul Gupta 2-2/+175
2023-10-18fix(node:buffer): fix the behavior of `totalLength` in `Buffer.concat` (#6574)Gravatar Ai Hoshino 2-3/+23
* fix(node:buffer): fix the behavior of `totalLength` in `Buffer.concat` Close: #6570 Close: #3639 * fix buffer totalLength type --------- Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
2023-10-18fix: change `--no-scripts` to `--ignore-scripts` (#6587)Gravatar Dawid Sowa 1-2/+2
2023-10-18fix: online docs moved (#6579)Gravatar Mountain/\Ash 1-1/+1
2023-10-18Fix minimum kernel version in docs (#6153)Gravatar Kevin Latka 1-1/+1
* Fix minimum kernel version in docs * Update install.md * Update install.md * Update install.md --------- Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
2023-10-18build-id++Gravatar Dylan Conway 1-1/+1
2023-10-18fix(web): stub `performance.getEntriesByName` (#6542)Gravatar Liz 1-0/+18
2023-10-17update root package variableGravatar Dylan Conway 1-8/+3
2023-10-17Fix missing `{port: 0}` causing flaky testGravatar Ashcon Partovi 1-0/+2
2023-10-17test changes in usockets in ciGravatar Dylan Conway 5-0/+9
2023-10-17fix #4766 (#6563)Gravatar Pierre CM 1-4/+4
2023-10-17Update ZigGeneratedClasses.cppGravatar Dylan Conway 1-2/+0
2023-10-17use npm alias in dependencies (#6545)Gravatar Dylan Conway 7-29/+271
* aliased package in dependencies * other buf * make sure version works * make sure overrides don't override alias * tests * update * comments
2023-10-17fix(node:http): fix `server.address()` (#6442)Gravatar Ai Hoshino 12-12/+453
Closes #6413, #5850
2023-10-17docs: fix ws.publish (#6558)Gravatar Aral Roca Gomez 1-1/+1
In this example there is no server variable in the context, and here it makes more sense to use ws.publish. It is explained below that once the serve is done, the server.publish can be used.
2023-10-17perf(bun-types): remove needless some call (#6550)Gravatar Mikhail 1-1/+1
2023-10-16fix(runtime): make some things more stable (partial jsc debug build) (#5881)Gravatar dave caruso 116-1446/+1830
* make our debug assertions work * install bun-webkit-debug * more progress * ok * progress... * more debug build stuff * ok * a * asdfghjkl * fix(runtime): fix bad assertion failure in JSBufferList * ok * stuff * upgrade webkit * Update src/bun.js/bindings/JSDOMWrapperCache.h Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * fix message for colin's changes * okay * fix cjs prototype * implement mainModule * i think this fixes it all --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-10-16fix(runtime): improve IPC reliability + organization pass on that code (#6475)Gravatar dave caruso 15-98/+266
* dfghj * Handle messages that did not finish * tidy * ok * a * Merge remote-tracking branch 'origin/main' into dave/ipc-fixes * test failures --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-10-16Simplify getting Set of extentions (#4975)Gravatar Mikhail 1-3/+3
2023-10-16Fix formattingGravatar Ashcon Partovi 1-3/+1
2023-10-16fix(test): when tests run with --only the nested describe blocks `.on… (#5616)Gravatar Igor Shapiro 2-13/+45
2023-10-16perf(node:events): optimize `emit(...)` function (#5485)Gravatar Yannik Schröder 3-11/+132
2023-10-16fix: don't remove content-encoding header from header table (#5743)Gravatar Liz 2-2/+25
Closes #5668
2023-10-16fix(sqlite) Insert .all() does not return an array #5872 (#5946)Gravatar Hugo Galan 2-7/+11
* fixing #5872 * removing useless comment
2023-10-16Fix formattingGravatar Ashcon Partovi 2-5/+4
2023-10-16Fix `Response.statusText` (#6151)Gravatar Chris Toshok 10-238/+269
2023-10-16fix-subprocess-argument-missing (#6407)Gravatar Nicolae-Rares Ailincai 4-2/+40
* fix-subprocess-argument-missing * fix-tests * nitpick, these should === not just be undefined --------- Co-authored-by: dave caruso <me@paperdave.net>
2023-10-16Add type parameter to `expect` (#6128)Gravatar Voldemat 1-3/+3
2023-10-16fix(node:worker_threads): ensure threadId property is exposed on ↵Gravatar Jérôme Benoit 6-15/+75
worker_threads instance (#6521) * fix: ensure threadId property is exposed on worker_threads instance Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> * fix: rename lazy worker_threads module properties Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> * fix: add getter for threadId Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> * test: improve worker_threads UTs Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> * test: fix lazy loading Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> * test: fix worker_threads test Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org> * fix: return the worker threadId Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> * test: refine worker_threads expectation on threadId Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org> --------- Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com> Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
2023-10-16Fix use before define bug in sqliteGravatar Ashcon Partovi 2-5/+5
Fixes #6481
2023-10-16fix(jest): fix toStrictEqual on same URLs (#6528)Gravatar João Alisson 2-13/+16
Fixes #6492
2023-10-16Fix `toHaveBeenCalled` having wrong error signatureGravatar Ashcon Partovi 1-2/+2
Fixes #6527
2023-10-16Fix formattingGravatar Ashcon Partovi 1-2/+1
2023-10-16Add `reusePort` to `Bun.serve` typesGravatar Ashcon Partovi 1-0/+9
2023-10-16Fix `request.url` having incorrect portGravatar Ashcon Partovi 4-1/+92
Fixes #6443
2023-10-16Remove uWebSockets header from Bun.serve responsesGravatar Ashcon Partovi 1-6/+6
2023-10-16Rename some testsGravatar Ashcon Partovi 3-0/+0
2023-10-16Fix #6467Gravatar Ashcon Partovi 2-3/+10
2023-10-16Update InternalModuleRegistryConstants.hGravatar Dylan Conway 1-3/+3
2023-10-16Development -> Contributing (#6538)Gravatar Colin McDonnell 2-1/+1
Co-authored-by: Colin McDonnell <colin@KennyM1.local>
2023-10-14fix(net/tls) fix pg hang on end + hanging on query (#6487)Gravatar Ciro Spaciari 3-8/+36
* fix pg hang on end + hanging on query * remove dummy function * fix node-stream * add test * fix test * return error in test * fix test use once instead of on * fix OOM * generated * 💅 * 💅
2023-10-13fix installing dependencies that match workspace versions (#6494)Gravatar Dylan Conway 4-2/+64
* check if dependency matches workspace version * test * Update lockfile.zig * set resolution to workspace package id
2023-10-13fix lockfile struct padding (#6495)Gravatar Dylan Conway 3-3/+18
* integrity padding * error message for bytes at end of struct