From 729d445b6885f69dd2c6355f38707bd42851c791 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:21:48 -0700 Subject: [PATCH] change the directory structure --- .docker/run-test.sh | 4 +- .dockerignore | 4 +- .gitattributes | 4 +- .github/workflows/bun.yml | 6 +- .gitmodules | 83 ++- .scripts/write-versions.sh | 2 +- .vscode/c_cpp_properties.json | 10 +- .vscode/launch.json | 18 +- .vscode/settings.json | 38 +- Dockerfile | 2 +- Dockerfile.musl | 6 +- Makefile | 152 ++--- README.md | 10 +- bench/{snippets => }/_fixture.txt | 0 bench/{snippets => }/buffer-read.js | 24 +- bench/{snippets => }/buffer.js | 0 bench/{snippets => }/callbacks-overhead.mjs | 0 bench/{snippets => }/cat.bun.js | 0 bench/{snippets => }/cat.mjs | 0 bench/{snippets => }/cat.node.js | 0 bench/{snippets => }/concat.js | 0 bench/{snippets => }/copy.bun.js | 0 bench/{snippets => }/copyfile.mjs | 0 bench/{snippets => }/escapeHTML.js | 0 bench/{snippets => }/exists.js | 0 bench/{snippets => }/gzip.js | 0 bench/{snippets => }/gzip.node.mjs | 0 bench/{snippets => }/jsx-entity-decoding.jsx | 0 bench/{snippets => }/noop.js | 0 bench/{snippets => }/package.json | 0 bench/{snippets => }/realpath.mjs | 0 bench/{snippets => }/render.js | 0 bench/{snippets => }/scanner/bun.lockb | Bin bench/{snippets => }/scanner/package.json | 0 bench/{snippets => }/scanner/remix-route.ts | 0 .../scanner/scan-imports-only.js | 0 bench/{snippets => }/scanner/scan.bun.js | 0 .../scanner/scan.node-esbuild.mjs | 0 bench/{snippets => }/transpiler.mjs | 0 bun.lockb | Bin 8001 -> 8590 bytes docs/upgrading-webkit.md | 4 +- .../bunjs-only-snippets/buffer.test.js | 305 ---------- integration/bunjs-only-snippets/ffi.test.js | 537 ----------------- misctools/headers-cleaner.zig | 2 +- misctools/http_bench.zig | 2 +- src/bindgen.zig | 2 +- src/{javascript/jsc => bun.js}/WebKit | 0 src/{javascript/jsc => bun.js}/api/FFI.h | 2 +- src/{javascript/jsc => bun.js}/api/bun.zig | 116 ++-- src/{javascript/jsc => bun.js}/api/ffi.zig | 110 ++-- .../jsc => bun.js}/api/html_rewriter.zig | 18 +- .../api/libtcc1.a.macos-aarch64 | Bin src/{javascript/jsc => bun.js}/api/libtcc1.c | 0 src/{javascript/jsc => bun.js}/api/router.zig | 22 +- src/{javascript/jsc => bun.js}/api/server.zig | 106 ++-- .../jsc => bun.js}/api/transpiler.zig | 42 +- src/{javascript/jsc => bun.js}/base.zig | 18 +- .../jsc => bun.js}/bindings/.clang-format | 0 .../bindings/ActiveDOMCallback.cpp | 0 .../bindings/ActiveDOMCallback.h | 0 .../jsc => bun.js}/bindings/Buffer.cpp | 0 .../jsc => bun.js}/bindings/Buffer.h | 0 .../bindings/BufferEncodingType.h | 0 .../jsc => bun.js}/bindings/BunClientData.cpp | 0 .../jsc => bun.js}/bindings/BunClientData.h | 0 .../bindings/BunGCOutputConstraint.cpp | 0 .../bindings/BunGCOutputConstraint.h | 0 .../jsc => bun.js}/bindings/BunJSCModule.cpp | 0 .../jsc => bun.js}/bindings/BunJSCModule.h | 0 .../jsc => bun.js}/bindings/BunStream.cpp | 0 .../jsc => bun.js}/bindings/BunStream.h | 0 .../jsc => bun.js}/bindings/CachedScript.h | 0 .../jsc => bun.js}/bindings/DOMException.cpp | 0 .../jsc => bun.js}/bindings/DOMException.h | 0 .../jsc => bun.js}/bindings/DOMURL.cpp | 0 .../jsc => bun.js}/bindings/DOMURL.h | 0 .../bindings/DOMWrapperWorld-class.h | 0 .../bindings/DOMWrapperWorld.cpp | 0 .../jsc => bun.js}/bindings/DOMWrapperWorld.h | 0 .../jsc => bun.js}/bindings/Exception.h | 0 .../jsc => bun.js}/bindings/ExceptionCode.h | 0 .../jsc => bun.js}/bindings/ExceptionOr.h | 0 .../jsc => bun.js}/bindings/FFI.zig | 2 +- .../bindings/GCDefferalContext.h | 0 .../jsc => bun.js}/bindings/IDLTypes.h | 0 .../jsc => bun.js}/bindings/JSBuffer.cpp | 0 .../jsc => bun.js}/bindings/JSBuffer.h | 0 .../bindings/JSBufferEncodingType.cpp | 0 .../bindings/JSBufferEncodingType.h | 0 .../jsc => bun.js}/bindings/JSCInlines.h | 0 .../jsc => bun.js}/bindings/JSDOMBinding.h | 0 .../JSDOMConvertBufferSource+JSBuffer.h | 0 .../bindings/JSDOMExceptionHandling.cpp | 0 .../bindings/JSDOMExceptionHandling.h | 0 .../bindings/JSDOMGlobalObject.cpp | 0 .../bindings/JSDOMGlobalObject.h | 0 .../jsc => bun.js}/bindings/JSDOMWrapper.cpp | 0 .../jsc => bun.js}/bindings/JSDOMWrapper.h | 0 .../bindings/JSDOMWrapperCache.cpp | 0 .../bindings/JSDOMWrapperCache.h | 0 .../jsc => bun.js}/bindings/JSFFIFunction.cpp | 0 .../jsc => bun.js}/bindings/JSFFIFunction.h | 0 .../jsc => bun.js}/bindings/JSSink+custom.h | 0 .../jsc => bun.js}/bindings/JSSink.cpp | 4 +- src/bun.js/bindings/JSSink.h | 165 ++++++ .../bindings/MarkingConstraint.cpp | 0 .../jsc => bun.js}/bindings/NodeConstants.h | 0 .../jsc => bun.js}/bindings/Path.cpp | 0 .../jsc => bun.js}/bindings/Path.h | 0 .../jsc => bun.js}/bindings/Process.cpp | 0 .../jsc => bun.js}/bindings/Process.h | 0 .../bindings/ScriptExecutionContext.cpp | 0 .../bindings/ScriptExecutionContext.h | 0 .../jsc => bun.js}/bindings/Sink.h | 0 .../jsc => bun.js}/bindings/StreamGlobals.h | 0 .../jsc => bun.js}/bindings/StringAdaptors.h | 0 .../bindings/URLDecomposition.cpp | 0 .../bindings/URLDecomposition.h | 0 .../bindings/URLSearchParams.cpp | 0 .../jsc => bun.js}/bindings/URLSearchParams.h | 0 .../bindings/ZigConsoleClient.cpp | 0 .../bindings/ZigConsoleClient.h | 0 .../bindings/ZigGlobalObject.cpp | 0 .../jsc => bun.js}/bindings/ZigGlobalObject.h | 0 .../bindings/ZigLazyStaticFunctions-inlines.h | 143 +++++ src/bun.js/bindings/ZigLazyStaticFunctions.h | 51 ++ .../bindings/ZigSourceProvider.cpp | 0 .../bindings/ZigSourceProvider.h | 0 .../bindings/bindings-generator.zig | 4 +- .../jsc => bun.js}/bindings/bindings.cpp | 0 .../jsc => bun.js}/bindings/bindings.zig | 12 +- .../bindings/bmalloc_heap_ref.h | 0 .../jsc => bun.js}/bindings/exports.zig | 28 +- .../jsc => bun.js}/bindings/header-gen.zig | 0 .../jsc => bun.js}/bindings/headers-cpp.h | 0 .../bindings/headers-handwritten.h | 0 .../bindings/headers-replacements.zig | 4 +- .../jsc => bun.js}/bindings/headers.h | 0 .../jsc => bun.js}/bindings/headers.zig | 4 +- .../jsc => bun.js}/bindings/helpers.h | 0 .../jsc => bun.js}/bindings/inlines.cpp | 0 .../jsc => bun.js}/bindings/napi.cpp | 0 .../jsc => bun.js}/bindings/napi.h | 0 .../jsc => bun.js}/bindings/napi_external.cpp | 0 .../jsc => bun.js}/bindings/napi_external.h | 0 .../jsc => bun.js}/bindings/objects.cpp | 0 .../jsc => bun.js}/bindings/objects.h | 0 .../jsc => bun.js}/bindings/process.d.ts | 0 .../jsc => bun.js}/bindings/root.h | 0 .../jsc => bun.js}/bindings/shimmer.zig | 0 .../jsc => bun.js}/bindings/sizes.zig | 2 +- .../bindings/sqlite/JSSQLStatement.cpp | 0 .../bindings/sqlite/JSSQLStatement.h | 0 .../bindings/sqlite/lazy_sqlite3.h | 0 .../bindings/sqlite/sqlite.exports.js | 0 .../jsc => bun.js}/bindings/sqlite/sqlite3.c | 0 .../bindings/sqlite/sqlite3_local.h | 0 .../jsc => bun.js}/bindings/static_export.zig | 0 .../bindings/webcore/AbortAlgorithm.h | 0 .../bindings/webcore/AbortAlgorithm.idl | 0 .../bindings/webcore/AbortController.cpp | 0 .../bindings/webcore/AbortController.h | 0 .../bindings/webcore/AbortController.idl | 0 .../bindings/webcore/AbortSignal.cpp | 0 .../bindings/webcore/AbortSignal.h | 0 .../bindings/webcore/AbortSignal.idl | 0 .../bindings/webcore/ActiveDOMObject.cpp | 0 .../bindings/webcore/ActiveDOMObject.h | 0 .../webcore/AddEventListenerOptions.h | 0 .../bindings/webcore/BufferSource.h | 0 .../bindings/webcore/CallbackResult.h | 0 .../bindings/webcore/CloseEvent.cpp | 0 .../bindings/webcore/CloseEvent.h | 0 .../bindings/webcore/CloseEvent.idl | 0 .../bindings/webcore/CommonAtomStrings.cpp | 0 .../bindings/webcore/CommonAtomStrings.h | 0 .../webcore/ContextDestructionObserver.h | 0 .../bindings/webcore/CustomEvent.cpp | 0 .../bindings/webcore/CustomEvent.h | 0 .../bindings/webcore/CustomEvent.idl | 0 .../bindings/webcore/CustomEventCustom.cpp | 0 .../bindings/webcore/DOMClientIsoSubspaces.h | 0 .../bindings/webcore/DOMConstructors.h | 0 .../bindings/webcore/DOMHighResTimeStamp.h | 0 .../bindings/webcore/DOMIsoSubspaces.h | 0 .../bindings/webcore/DOMPromiseProxy.h | 0 .../bindings/webcore/ErrorCallback.cpp | 0 .../bindings/webcore/ErrorCallback.h | 0 .../bindings/webcore/ErrorCallback.idl | 0 .../bindings/webcore/ErrorEvent.cpp | 0 .../bindings/webcore/ErrorEvent.h | 0 .../bindings/webcore/ErrorEvent.idl | 0 .../jsc => bun.js}/bindings/webcore/Event.cpp | 0 .../jsc => bun.js}/bindings/webcore/Event.h | 0 .../jsc => bun.js}/bindings/webcore/Event.idl | 0 .../bindings/webcore/EventContext.cpp | 0 .../bindings/webcore/EventContext.h | 0 .../bindings/webcore/EventDispatcher.cpp | 0 .../bindings/webcore/EventDispatcher.h | 0 .../bindings/webcore/EventFactory.cpp | 0 .../bindings/webcore/EventHeaders.h | 0 .../bindings/webcore/EventInit.h | 0 .../bindings/webcore/EventInit.idl | 0 .../bindings/webcore/EventInterfaces.h | 0 .../bindings/webcore/EventListener.h | 0 .../bindings/webcore/EventListener.idl | 0 .../bindings/webcore/EventListenerMap.cpp | 0 .../bindings/webcore/EventListenerMap.h | 0 .../bindings/webcore/EventListenerOptions.h | 0 .../bindings/webcore/EventListenerOptions.idl | 0 .../bindings/webcore/EventModifierInit.h | 0 .../bindings/webcore/EventNames.cpp | 0 .../bindings/webcore/EventNames.h | 0 .../bindings/webcore/EventNames.in | 0 .../bindings/webcore/EventOptions.h | 0 .../bindings/webcore/EventPath.cpp | 0 .../bindings/webcore/EventPath.h | 0 .../bindings/webcore/EventSender.h | 0 .../bindings/webcore/EventTarget.cpp | 0 .../bindings/webcore/EventTarget.h | 0 .../bindings/webcore/EventTarget.idl | 0 .../bindings/webcore/EventTargetConcrete.cpp | 0 .../bindings/webcore/EventTargetConcrete.h | 0 .../bindings/webcore/EventTargetFactory.cpp | 0 .../bindings/webcore/EventTargetHeaders.h | 0 .../bindings/webcore/EventTargetInterfaces.h | 0 .../bindings/webcore/ExceptionDetails.h | 0 .../webcore/ExtendedDOMClientIsoSubspaces.h | 0 .../webcore/ExtendedDOMIsoSubspaces.h | 0 .../bindings/webcore/FetchHeaders.cpp | 0 .../bindings/webcore/FetchHeaders.h | 0 .../bindings/webcore/FetchHeaders.idl | 0 .../bindings/webcore/HTTPHeaderField.cpp | 0 .../bindings/webcore/HTTPHeaderField.h | 0 .../bindings/webcore/HTTPHeaderMap.cpp | 0 .../bindings/webcore/HTTPHeaderMap.h | 0 .../bindings/webcore/HTTPHeaderNames.cpp | 0 .../bindings/webcore/HTTPHeaderNames.gperf | 0 .../bindings/webcore/HTTPHeaderNames.h | 0 .../bindings/webcore/HTTPHeaderNames.in | 0 .../bindings/webcore/HTTPHeaderValues.cpp | 0 .../bindings/webcore/HTTPHeaderValues.h | 0 .../bindings/webcore/HTTPParsers.cpp | 0 .../bindings/webcore/HTTPParsers.h | 0 .../webcore/InternalWritableStream.cpp | 0 .../bindings/webcore/InternalWritableStream.h | 0 .../bindings/webcore/JSAbortAlgorithm.cpp | 0 .../bindings/webcore/JSAbortAlgorithm.h | 0 .../bindings/webcore/JSAbortController.cpp | 0 .../bindings/webcore/JSAbortController.dep | 0 .../bindings/webcore/JSAbortController.h | 0 .../bindings/webcore/JSAbortSignal.cpp | 0 .../bindings/webcore/JSAbortSignal.dep | 0 .../bindings/webcore/JSAbortSignal.h | 0 .../bindings/webcore/JSAbortSignalCustom.cpp | 0 .../webcore/JSAddEventListenerOptions.cpp | 0 .../webcore/JSAddEventListenerOptions.dep | 0 .../webcore/JSAddEventListenerOptions.h | 0 .../webcore/JSByteLengthQueuingStrategy.cpp | 0 .../webcore/JSByteLengthQueuingStrategy.dep | 0 .../webcore/JSByteLengthQueuingStrategy.h | 0 .../bindings/webcore/JSCallbackData.cpp | 0 .../bindings/webcore/JSCallbackData.h | 0 .../bindings/webcore/JSCloseEvent.cpp | 0 .../bindings/webcore/JSCloseEvent.dep | 0 .../bindings/webcore/JSCloseEvent.h | 0 .../webcore/JSCountQueuingStrategy.cpp | 0 .../webcore/JSCountQueuingStrategy.dep | 0 .../bindings/webcore/JSCountQueuingStrategy.h | 0 .../bindings/webcore/JSCustomEvent.cpp | 0 .../bindings/webcore/JSCustomEvent.dep | 0 .../bindings/webcore/JSCustomEvent.h | 0 .../bindings/webcore/JSDOMAttribute.h | 0 .../bindings/webcore/JSDOMBinding.h | 0 .../webcore/JSDOMBindingInternalsBuiltins.cpp | 0 .../webcore/JSDOMBindingInternalsBuiltins.h | 0 .../webcore/JSDOMBuiltinConstructor.h | 0 .../webcore/JSDOMBuiltinConstructorBase.cpp | 0 .../webcore/JSDOMBuiltinConstructorBase.h | 0 .../bindings/webcore/JSDOMCastThisValue.h | 0 .../bindings/webcore/JSDOMConstructor.h | 0 .../bindings/webcore/JSDOMConstructorBase.cpp | 0 .../bindings/webcore/JSDOMConstructorBase.h | 0 .../webcore/JSDOMConstructorNotCallable.h | 0 .../JSDOMConstructorNotConstructable.h | 0 .../bindings/webcore/JSDOMConvert.h | 0 .../bindings/webcore/JSDOMConvertAny.h | 0 .../bindings/webcore/JSDOMConvertBase.h | 0 .../bindings/webcore/JSDOMConvertBoolean.h | 0 .../webcore/JSDOMConvertBufferSource.h | 0 .../bindings/webcore/JSDOMConvertCallbacks.h | 0 .../bindings/webcore/JSDOMConvertDate.cpp | 0 .../bindings/webcore/JSDOMConvertDate.h | 0 .../bindings/webcore/JSDOMConvertDictionary.h | 0 .../webcore/JSDOMConvertEnumeration.h | 0 .../webcore/JSDOMConvertEventListener.h | 0 .../bindings/webcore/JSDOMConvertInterface.h | 0 .../bindings/webcore/JSDOMConvertJSON.h | 0 .../bindings/webcore/JSDOMConvertNull.h | 0 .../bindings/webcore/JSDOMConvertNullable.h | 0 .../bindings/webcore/JSDOMConvertNumbers.cpp | 0 .../bindings/webcore/JSDOMConvertNumbers.h | 0 .../bindings/webcore/JSDOMConvertObject.h | 0 .../bindings/webcore/JSDOMConvertPromise.h | 0 .../bindings/webcore/JSDOMConvertRecord.h | 0 .../webcore/JSDOMConvertScheduledAction.h | 0 .../bindings/webcore/JSDOMConvertSequences.h | 0 .../JSDOMConvertSerializedScriptValue.h | 0 .../bindings/webcore/JSDOMConvertStrings.cpp | 0 .../bindings/webcore/JSDOMConvertStrings.h | 0 .../bindings/webcore/JSDOMConvertUnion.h | 0 .../bindings/webcore/JSDOMConvertVariadic.h | 0 .../bindings/webcore/JSDOMConvertWebGL.cpp | 0 .../bindings/webcore/JSDOMConvertWebGL.h | 0 .../webcore/JSDOMConvertXPathNSResolver.h | 0 .../bindings/webcore/JSDOMException.cpp | 0 .../bindings/webcore/JSDOMException.h | 0 .../webcore/JSDOMGlobalObjectInlines.h | 0 .../bindings/webcore/JSDOMGuardedObject.cpp | 0 .../bindings/webcore/JSDOMGuardedObject.h | 0 .../bindings/webcore/JSDOMIterator.cpp | 0 .../bindings/webcore/JSDOMIterator.h | 0 .../bindings/webcore/JSDOMOperation.h | 0 .../webcore/JSDOMOperationReturningPromise.h | 0 .../bindings/webcore/JSDOMPromise.cpp | 0 .../bindings/webcore/JSDOMPromise.h | 0 .../bindings/webcore/JSDOMPromiseDeferred.cpp | 0 .../bindings/webcore/JSDOMPromiseDeferred.h | 0 .../bindings/webcore/JSDOMURL.cpp | 0 .../bindings/webcore/JSDOMURL.h | 0 .../bindings/webcore/JSDOMWindow.h | 0 .../bindings/webcore/JSErrorCallback.cpp | 0 .../bindings/webcore/JSErrorCallback.h | 0 .../bindings/webcore/JSErrorEvent.cpp | 0 .../bindings/webcore/JSErrorEvent.dep | 0 .../bindings/webcore/JSErrorEvent.h | 0 .../bindings/webcore/JSErrorEventCustom.cpp | 0 .../bindings/webcore/JSErrorHandler.cpp | 0 .../bindings/webcore/JSErrorHandler.h | 0 .../bindings/webcore/JSEvent.cpp | 0 .../bindings/webcore/JSEvent.dep | 0 .../jsc => bun.js}/bindings/webcore/JSEvent.h | 0 .../bindings/webcore/JSEventCustom.cpp | 0 .../bindings/webcore/JSEventCustom.h | 0 .../bindings/webcore/JSEventInit.cpp | 0 .../bindings/webcore/JSEventInit.dep | 0 .../bindings/webcore/JSEventInit.h | 0 .../bindings/webcore/JSEventListener.cpp | 0 .../bindings/webcore/JSEventListener.h | 0 .../webcore/JSEventListenerOptions.cpp | 0 .../webcore/JSEventListenerOptions.dep | 0 .../bindings/webcore/JSEventListenerOptions.h | 0 .../bindings/webcore/JSEventModifierInit.cpp | 0 .../bindings/webcore/JSEventModifierInit.dep | 0 .../bindings/webcore/JSEventModifierInit.h | 0 .../bindings/webcore/JSEventTarget.cpp | 0 .../bindings/webcore/JSEventTarget.h | 0 .../bindings/webcore/JSEventTargetCustom.cpp | 0 .../bindings/webcore/JSEventTargetCustom.h | 0 .../bindings/webcore/JSFetchHeaders.cpp | 0 .../bindings/webcore/JSFetchHeaders.dep | 0 .../bindings/webcore/JSFetchHeaders.h | 0 .../bindings/webcore/JSMessageEvent.cpp | 0 .../bindings/webcore/JSMessageEvent.dep | 0 .../bindings/webcore/JSMessageEvent.h | 0 .../bindings/webcore/JSMessageEventCustom.cpp | 0 .../JSReadableByteStreamController.cpp | 0 .../JSReadableByteStreamController.dep | 0 .../webcore/JSReadableByteStreamController.h | 0 .../bindings/webcore/JSReadableStream.cpp | 0 .../bindings/webcore/JSReadableStream.dep | 0 .../bindings/webcore/JSReadableStream.h | 0 .../webcore/JSReadableStreamBYOBReader.cpp | 0 .../webcore/JSReadableStreamBYOBReader.dep | 0 .../webcore/JSReadableStreamBYOBReader.h | 0 .../webcore/JSReadableStreamBYOBRequest.cpp | 0 .../webcore/JSReadableStreamBYOBRequest.dep | 0 .../webcore/JSReadableStreamBYOBRequest.h | 0 .../JSReadableStreamDefaultController.cpp | 0 .../JSReadableStreamDefaultController.dep | 0 .../JSReadableStreamDefaultController.h | 0 .../webcore/JSReadableStreamDefaultReader.cpp | 0 .../webcore/JSReadableStreamDefaultReader.dep | 0 .../webcore/JSReadableStreamDefaultReader.h | 0 .../bindings/webcore/JSReadableStreamSink.cpp | 0 .../bindings/webcore/JSReadableStreamSink.dep | 0 .../bindings/webcore/JSReadableStreamSink.h | 0 .../webcore/JSReadableStreamSource.cpp | 0 .../webcore/JSReadableStreamSource.dep | 0 .../bindings/webcore/JSReadableStreamSource.h | 0 .../webcore/JSReadableStreamSourceCustom.cpp | 0 .../bindings/webcore/JSServiceWorker.h | 0 .../bindings/webcore/JSTextEncoder.cpp | 0 .../bindings/webcore/JSTextEncoder.dep | 0 .../bindings/webcore/JSTextEncoder.h | 0 .../bindings/webcore/JSTransformStream.cpp | 0 .../bindings/webcore/JSTransformStream.dep | 0 .../bindings/webcore/JSTransformStream.h | 0 .../JSTransformStreamDefaultController.cpp | 0 .../JSTransformStreamDefaultController.dep | 0 .../JSTransformStreamDefaultController.h | 0 .../bindings/webcore/JSURLSearchParams.cpp | 0 .../bindings/webcore/JSURLSearchParams.dep | 0 .../bindings/webcore/JSURLSearchParams.h | 0 .../bindings/webcore/JSValueInWrappedObject.h | 0 .../bindings/webcore/JSWebSocket.cpp | 0 .../bindings/webcore/JSWebSocket.dep | 0 .../bindings/webcore/JSWebSocket.h | 0 .../bindings/webcore/JSWindowProxy.h | 0 .../bindings/webcore/JSWritableStream.cpp | 0 .../bindings/webcore/JSWritableStream.dep | 0 .../bindings/webcore/JSWritableStream.h | 0 .../JSWritableStreamDefaultController.cpp | 0 .../JSWritableStreamDefaultController.dep | 0 .../JSWritableStreamDefaultController.h | 0 .../webcore/JSWritableStreamDefaultWriter.cpp | 0 .../webcore/JSWritableStreamDefaultWriter.dep | 0 .../webcore/JSWritableStreamDefaultWriter.h | 0 .../bindings/webcore/JSWritableStreamSink.cpp | 0 .../bindings/webcore/JSWritableStreamSink.dep | 0 .../bindings/webcore/JSWritableStreamSink.h | 0 .../bindings/webcore/MessageEvent.cpp | 0 .../bindings/webcore/MessageEvent.h | 0 .../bindings/webcore/MessageEvent.idl | 0 .../jsc => bun.js}/bindings/webcore/Node.h | 0 .../bindings/webcore/ParsedContentType.cpp | 0 .../bindings/webcore/ParsedContentType.h | 0 .../bindings/webcore/ReadableStream.cpp | 0 .../bindings/webcore/ReadableStream.h | 0 .../ReadableStreamDefaultController.cpp | 0 .../webcore/ReadableStreamDefaultController.h | 0 .../bindings/webcore/ReadableStreamSink.cpp | 0 .../bindings/webcore/ReadableStreamSink.h | 0 .../bindings/webcore/ReadableStreamSource.cpp | 0 .../bindings/webcore/ReadableStreamSource.h | 0 .../webcore/RegisteredEventListener.h | 0 .../bindings/webcore/ScriptWrappable.cpp | 0 .../bindings/webcore/ScriptWrappable.h | 0 .../bindings/webcore/ScriptWrappableInlines.h | 0 .../bindings/webcore/StructuredClone.cpp | 0 .../bindings/webcore/StructuredClone.h | 0 .../bindings/webcore/TaskSource.h | 0 .../bindings/webcore/TextEncoder.cpp | 0 .../bindings/webcore/TextEncoder.h | 0 .../bindings/webcore/UIEventInit.h | 0 .../bindings/webcore/WebCoreBuiltins.h | 0 .../bindings/webcore/WebCoreJSClientData.h | 0 .../webcore/WebCoreTypedArrayController.cpp | 0 .../webcore/WebCoreTypedArrayController.h | 0 .../bindings/webcore/WebSocket.cpp | 0 .../bindings/webcore/WebSocket.h | 0 .../bindings/webcore/WebSocket.idl | 0 .../bindings/webcore/WebSocketIdentifier.h | 0 .../bindings/webcore/WritableStream.cpp | 0 .../bindings/webcore/WritableStream.h | 0 .../bindings/webcore/WritableStream.idl | 0 .../bindings/webcore/WritableStreamSink.h | 0 .../jsc => bun.js}/bindings/webcore/config.h | 0 .../bindings/webcore/weak_handle.cpp | 0 .../bindings/webcore/weak_handle.h | 0 .../jsc => bun.js}/bindings/wtf-bindings.cpp | 0 .../jsc => bun.js}/bindings/wtf-bindings.h | 0 .../jsc => bun.js}/builtins/BunBuiltinNames.h | 0 .../jsc => bun.js}/builtins/README.md | 0 .../builtins/WebCoreJSBuiltinInternals.cpp | 0 .../builtins/WebCoreJSBuiltins.cpp | 0 .../cpp/ByteLengthQueuingStrategyBuiltins.cpp | 0 .../cpp/ByteLengthQueuingStrategyBuiltins.h | 0 .../cpp/CountQueuingStrategyBuiltins.cpp | 0 .../cpp/CountQueuingStrategyBuiltins.h | 0 .../cpp/JSBufferConstructorBuiltins.cpp | 0 .../cpp/JSBufferConstructorBuiltins.h | 0 .../cpp/JSBufferPrototypeBuiltins.cpp | 0 .../builtins/cpp/JSBufferPrototypeBuiltins.h | 0 .../cpp/JSZigGlobalObjectBuiltins.cpp | 0 .../builtins/cpp/JSZigGlobalObjectBuiltins.h | 0 .../ReadableByteStreamControllerBuiltins.cpp | 0 .../ReadableByteStreamControllerBuiltins.h | 0 .../ReadableByteStreamInternalsBuiltins.cpp | 0 .../cpp/ReadableByteStreamInternalsBuiltins.h | 0 .../cpp/ReadableStreamBYOBReaderBuiltins.cpp | 0 .../cpp/ReadableStreamBYOBReaderBuiltins.h | 0 .../cpp/ReadableStreamBYOBRequestBuiltins.cpp | 0 .../cpp/ReadableStreamBYOBRequestBuiltins.h | 0 .../builtins/cpp/ReadableStreamBuiltins.cpp | 0 .../builtins/cpp/ReadableStreamBuiltins.h | 0 ...eadableStreamDefaultControllerBuiltins.cpp | 0 .../ReadableStreamDefaultControllerBuiltins.h | 0 .../ReadableStreamDefaultReaderBuiltins.cpp | 0 .../cpp/ReadableStreamDefaultReaderBuiltins.h | 0 .../cpp/ReadableStreamInternalsBuiltins.cpp | 0 .../cpp/ReadableStreamInternalsBuiltins.h | 0 .../builtins/cpp/StreamInternalsBuiltins.cpp | 0 .../builtins/cpp/StreamInternalsBuiltins.h | 0 .../builtins/cpp/TransformStreamBuiltins.cpp | 0 .../builtins/cpp/TransformStreamBuiltins.h | 0 ...ansformStreamDefaultControllerBuiltins.cpp | 0 ...TransformStreamDefaultControllerBuiltins.h | 0 .../cpp/TransformStreamInternalsBuiltins.cpp | 0 .../cpp/TransformStreamInternalsBuiltins.h | 0 .../builtins/cpp/WebCoreJSBuiltinInternals.h | 0 .../builtins/cpp/WebCoreJSBuiltins.h | 0 ...ritableStreamDefaultControllerBuiltins.cpp | 0 .../WritableStreamDefaultControllerBuiltins.h | 0 .../WritableStreamDefaultWriterBuiltins.cpp | 0 .../cpp/WritableStreamDefaultWriterBuiltins.h | 0 .../cpp/WritableStreamInternalsBuiltins.cpp | 0 .../cpp/WritableStreamInternalsBuiltins.h | 0 .../builtins/js/ByteLengthQueuingStrategy.js | 0 .../builtins/js/CountQueuingStrategy.js | 0 .../builtins/js/JSBufferConstructor.js | 0 .../builtins/js/JSBufferPrototype.js | 0 .../builtins/js/JSZigGlobalObject.js | 0 .../js/ReadableByteStreamController.js | 0 .../js/ReadableByteStreamInternals.js | 0 .../builtins/js/ReadableStream.js | 0 .../builtins/js/ReadableStreamBYOBReader.js | 0 .../builtins/js/ReadableStreamBYOBRequest.js | 0 .../js/ReadableStreamDefaultController.js | 0 .../js/ReadableStreamDefaultReader.js | 0 .../builtins/js/ReadableStreamInternals.js | 0 .../builtins/js/StreamInternals.js | 0 .../builtins/js/TransformStream.js | 0 .../js/TransformStreamDefaultController.js | 0 .../builtins/js/TransformStreamInternals.js | 0 .../js/WritableStreamDefaultController.js | 0 .../js/WritableStreamDefaultWriter.js | 0 .../builtins/js/WritableStreamInternals.js | 0 .../jsc => bun.js}/bun-jsc.exports.js | 20 +- .../bun.js/child_process.exports.js | 0 src/{javascript/jsc => bun.js}/config.zig | 24 +- src/{javascript/jsc => bun.js}/detect-libc.js | 0 .../jsc => bun.js}/detect-libc.linux.js | 0 src/{javascript/jsc => bun.js}/event_loop.zig | 12 +- src/{javascript/jsc => bun.js}/ffi.exports.js | 0 src/{javascript/jsc => bun.js}/fs.exports.js | 0 .../jsc => bun.js}/fs_promises.exports.js | 0 .../jsc => bun.js}/generate-jssink.js | 2 +- .../jsc => bun.js}/headergen/sizegen.cpp | 4 +- src/{javascript/jsc => bun.js}/javascript.zig | 108 ++-- .../jsc => bun.js}/javascript_core_c_api.zig | 0 .../jsc => bun.js}/module.exports.js | 0 src/{javascript/jsc => bun.js}/node/buffer.js | 0 .../jsc => bun.js}/node/buffer.zig | 4 +- .../jsc => bun.js}/node/dir_iterator.zig | 4 +- .../jsc => bun.js}/node/node_fs.zig | 10 +- .../jsc => bun.js}/node/node_fs_binding.zig | 4 +- .../jsc => bun.js}/node/node_fs_constant.zig | 2 +- .../jsc => bun.js}/node/nodejs_error_code.zig | 0 .../jsc => bun.js}/node/syscall.zig | 12 +- src/{javascript/jsc => bun.js}/node/types.zig | 16 +- .../node_streams_consumer.exports.js | 0 .../node_streams_web.exports.js | 0 .../jsc => bun.js}/node_timers.exports.js | 0 .../node_timers_promises.exports.js | 0 .../jsc => bun.js}/path-posix.exports.js | 0 .../jsc => bun.js}/path-win32.exports.js | 0 .../jsc => bun.js}/path.exports.js | 0 .../jsc => bun.js}/perf_hooks.exports.js | 0 .../jsc => bun.js}/process.exports.js | 0 src/{javascript/jsc => bun.js}/rare_data.zig | 8 +- .../script_execution_context.zig | 2 +- src/{javascript/jsc => bun.js}/test/jest.zig | 34 +- src/{javascript/jsc => bun.js}/typescript.zig | 6 +- .../jsc => bun.js}/undici.exports.js | 0 src/{javascript/jsc => bun.js}/uuid.zig | 0 src/{javascript/jsc => bun.js}/webcore.zig | 2 +- .../jsc => bun.js}/webcore/base64.zig | 0 .../jsc => bun.js}/webcore/encoding.zig | 30 +- .../jsc => bun.js}/webcore/response.zig | 34 +- .../jsc => bun.js}/webcore/streams.zig | 36 +- src/{javascript/jsc => bun.js}/ws.exports.js | 0 src/bun_js.zig | 4 +- src/cli.zig | 2 +- src/cli/build_command.zig | 2 +- src/cli/bun_command.zig | 2 +- src/cli/create_command.zig | 2 +- src/cli/install_completions_command.zig | 2 +- src/cli/run_command.zig | 2 +- src/cli/test_command.zig | 2 +- src/cli/upgrade_command.zig | 2 +- src/http.zig | 2 +- src/install/install.zig | 2 +- src/install/lockfile.zig | 2 +- src/javascript/jsc/bindings/JSSink.h | 169 ------ src/js_ast.zig | 6 +- src/js_lexer.zig | 22 +- src/jsc.zig | 66 +-- src/main.zig | 4 +- src/router.zig | 2 +- src/runtime/hmr.ts | 55 +- src/typegen.zig | 2 +- src/work_pool.zig | 22 + {integration => test}/README.md | 6 +- {integration => test}/apps/bun-create-next.sh | 0 .../apps/bun-create-react.sh | 0 .../apps/bun-dev-index-html.sh | 0 {integration => test}/apps/bun-dev.sh | 0 .../apps/bun-install-lockfile-status.sh | 0 .../apps/bun-install-utf8.sh | 0 {integration => test}/apps/bun-install.sh | 0 .../apps/bun-run-check-package.json | 0 {integration => test}/apps/bun-run-check.sh | 0 .../bun.js}/atob.test.js | 0 .../bun.js}/baz.js | 0 test/bun.js/buffer.test.js | 304 ++++++++++ .../bun.js}/bun-jsc.test.js | 4 + .../bun.js}/bun.lockb | Bin .../always-bundled-module | 0 .../bundled/always-bundled-module/cjs.js | 0 .../bundled/always-bundled-module/esm.js | 0 .../always-bundled-module/package.json | 0 .../bun.js}/bundled/entrypoint.ts | 0 .../bun.js}/bundled/package.json | 0 .../i-am-bundled/cjs.js | 0 .../i-am-bundled/esm.js | 0 .../i-am-bundled/package.json | 0 .../bun.js}/bundled/tsconfig.json | 0 .../bun.js}/concat.test.js | 0 .../bun.js}/console-log.js | 0 .../bun.js}/crypto.test.js | 0 .../bun.js}/dirname.test.js | 0 .../bun.js}/escapeHTML.test.js | 0 .../bun.js}/esm/first.mjs | 0 .../bun.js}/esm/second-child.mjs | 0 .../bun.js}/esm/second.mjs | 0 .../bun.js}/esm/startEnd.mjs | 0 .../bun.js}/esm/third.mjs | 0 .../bun.js}/exit.js | 0 .../bun.js}/fetch.js.txt | 0 .../bun.js}/fetch.test.js | 0 .../bun.js}/ffi-test.c | 0 .../bun.js}/ffi.test.fixture.callback.c | 2 +- .../bun.js}/ffi.test.fixture.receiver.c | 2 +- test/bun.js/ffi.test.js | 543 ++++++++++++++++++ .../bun.js}/fs-stream.js | 0 .../bun.js}/fs.test.js | 0 .../bunjs-only-snippets => test/bun.js}/gc.js | 0 .../bun.js}/globals.test.js | 0 .../bun.js}/hash.test.js | 0 .../bun.js}/html-rewriter.test.js | 0 .../bun.js}/import-meta.test.js | 6 +- .../bun.js}/inline.macro.js | 0 .../bun.js}/inspect.test.js | 0 .../bun.js}/macro-check.js | 0 .../bun.js}/microtask.test.js | 0 .../bun.js}/mmap.test.js | 0 .../bun.js}/node-builtins.test.js | 0 .../bun.js}/path.test.js | 0 .../bun.js}/performance.test.js | 0 .../bun.js}/process-nexttick.js | 0 .../bun.js}/process-nexttick.test.js | 0 .../bun.js}/process.test.js | 0 .../bun.js}/readFileSync.txt | 0 .../bun.js}/readdir.js | 0 .../bun.js}/reportError.test.js | 0 .../bun.js}/require-json.json | 0 .../bun.js}/resolve-typescript-file.tsx | 0 .../bun.js}/resolve.test.js | 2 +- .../bun.js}/response.file.test.js | 0 .../bun.js}/serve.test.ts | 0 .../bun.js}/setInterval.test.js | 0 .../bun.js}/setTimeout.test.js | 0 .../bun.js}/shadow.test.js | 0 .../bun.js}/sleep.js | 0 .../bun.js}/solid-dom-fixtures/SVG/code.js | 0 .../solid-dom-fixtures/SVG/output.bun.js | 0 .../bun.js}/solid-dom-fixtures/SVG/output.js | 0 .../attributeExpressions/code.js | 0 .../attributeExpressions/output.bun.js | 0 .../attributeExpressions/output.js | 0 .../solid-dom-fixtures/components/code.js | 0 .../components/output.bun.js | 0 .../solid-dom-fixtures/components/output.js | 0 .../conditionalExpressions/code.js | 0 .../conditionalExpressions/output.bun.js | 0 .../conditionalExpressions/output.js | 0 .../solid-dom-fixtures/customElements/code.js | 0 .../customElements/output.bun.js | 0 .../customElements/output.js | 0 .../eventExpressions/code.js | 0 .../eventExpressions/output.bun.js | 0 .../eventExpressions/output.js | 0 .../solid-dom-fixtures/fragments/code.js | 0 .../fragments/output.bun.js | 0 .../solid-dom-fixtures/fragments/output.js | 0 .../solid-dom-fixtures/insertChildren/code.js | 0 .../insertChildren/output.js | 0 .../namespaceElements/code.js | 0 .../namespaceElements/output.js | 0 .../solid-dom-fixtures/simpleElements/code.js | 0 .../simpleElements/output.bun.js | 0 .../simpleElements/output.js | 0 .../textInterpolation/code.js | 0 .../textInterpolation/output.bun.js | 0 .../textInterpolation/output.js | 0 .../bun.js}/some-fs.js | 0 .../bun.js}/sql-raw.test.js | 0 .../bun.js}/sqlite.test.js | 0 .../bun.js}/streams.test.js | 0 .../bun.js}/text-encoder.test.js | 0 .../bun.js}/toml-fixture.toml | 0 .../bun.js}/toml.test.js | 0 .../bun.js}/transpiler.test.js | 0 .../bun.js}/tsconfig.json | 0 .../bun.js}/unsafe.test.js | 0 .../bun.js}/url.test.ts | 0 .../bun.js}/wasm-return-1-test.zig | 0 .../bun.js}/wasm.js | 0 .../bun.js}/wasm.test.js | 0 .../bun.js}/web-globals.test.js | 0 .../bun.js}/websocket.test.js | 0 .../bun.js}/writeFileSync.txt | 0 .../bun.js}/zlib.test.js | 0 {integration => test}/macro/assert.tsx | 0 {integration => test}/macro/fetchSync.tsx | 0 .../macro/hello-fetch-macro.tsx | 0 {integration => test}/macro/loadMocks.tsx | 0 {integration => test}/scripts/browser.js | 0 {integration => test}/scripts/bun.js | 0 {integration => test}/scripts/bun.lockb | Bin .../scripts/package-lock.json | 0 {integration => test}/scripts/package.json | 0 {integration => test}/scripts/snippets.json | 0 .../snapshots/.prettierignore | 0 .../array-args-with-default-values.debug.js | 0 ...rray-args-with-default-values.hmr.debug.js | 0 .../array-args-with-default-values.hmr.js | 0 .../array-args-with-default-values.js | 0 .../snapshots/bundled-entry-point.debug.js | 0 .../bundled-entry-point.hmr.debug.js | 0 .../snapshots/bundled-entry-point.hmr.js | 0 .../snapshots/bundled-entry-point.js | 0 .../snapshots/caught-require.debug.js | 0 .../snapshots/caught-require.hmr.debug.js | 0 .../snapshots/caught-require.hmr.js | 0 .../snapshots/caught-require.js | 0 ...ve-static-imports-in-cjs-function.debug.js | 0 ...tatic-imports-in-cjs-function.hmr.debug.js | 0 ...have-static-imports-in-cjs-function.hmr.js | 0 ...dnt-have-static-imports-in-cjs-function.js | 0 .../code-simplification-neql-define.debug.js | 0 ...de-simplification-neql-define.hmr.debug.js | 0 .../code-simplification-neql-define.hmr.js | 0 .../code-simplification-neql-define.js | 0 .../custom-emotion-jsx/file.debug.jsx | 0 .../custom-emotion-jsx/file.hmr.debug.jsx | 0 .../snapshots/custom-emotion-jsx/file.hmr.jsx | 0 .../snapshots/custom-emotion-jsx/file.jsx | 0 .../export-default-module-hot.debug.js | 0 .../export-default-module-hot.hmr.debug.js | 0 .../export-default-module-hot.hmr.js | 0 .../snapshots/export-default-module-hot.js | 0 .../snapshots/export.debug.js | 0 .../snapshots/export.hmr.debug.js | 0 {integration => test}/snapshots/export.hmr.js | 0 {integration => test}/snapshots/export.js | 0 .../snapshots/forbid-in-is-correct.debug.js | 0 .../forbid-in-is-correct.hmr.debug.js | 0 .../snapshots/forbid-in-is-correct.hmr.js | 0 .../snapshots/forbid-in-is-correct.js | 0 .../global-is-remapped-to-globalThis.debug.js | 0 ...bal-is-remapped-to-globalThis.hmr.debug.js | 0 .../global-is-remapped-to-globalThis.hmr.js | 0 .../global-is-remapped-to-globalThis.js | 0 .../snapshots/jsx-entities.debug.jsx | 0 .../snapshots/jsx-entities.hmr.debug.jsx | 0 .../snapshots/jsx-entities.hmr.jsx | 0 .../snapshots/jsx-entities.jsx | 0 .../snapshots/jsx-spacing.debug.jsx | 0 .../snapshots/jsx-spacing.hmr.debug.jsx | 0 .../snapshots/jsx-spacing.hmr.jsx | 0 .../snapshots/jsx-spacing.jsx | 0 .../snapshots/latin1-chars-in-regexp.debug.js | 0 .../latin1-chars-in-regexp.hmr.debug.js | 0 .../snapshots/latin1-chars-in-regexp.hmr.js | 0 .../snapshots/latin1-chars-in-regexp.js | 0 .../snapshots/lodash-regexp.debug.js | 0 .../snapshots/lodash-regexp.hmr.debug.js | 0 .../snapshots/lodash-regexp.hmr.js | 0 .../snapshots/lodash-regexp.js | 0 .../snapshots/multiple-imports.debug.js | 0 .../snapshots/multiple-imports.hmr.debug.js | 0 .../snapshots/multiple-imports.hmr.js | 0 .../snapshots/multiple-imports.js | 0 .../snapshots/multiple-var.debug.js | 0 .../snapshots/multiple-var.hmr.debug.js | 0 .../snapshots/multiple-var.hmr.js | 0 .../snapshots/multiple-var.js | 0 .../snapshots/number-literal-bug.debug.js | 0 .../snapshots/number-literal-bug.hmr.debug.js | 0 .../snapshots/number-literal-bug.hmr.js | 0 .../snapshots/number-literal-bug.js | 0 .../optional-chain-with-function.debug.js | 0 .../optional-chain-with-function.hmr.debug.js | 0 .../optional-chain-with-function.hmr.js | 0 .../snapshots/optional-chain-with-function.js | 0 .../package-json-exports/index.debug.js | 0 .../package-json-exports/index.hmr.debug.js | 0 .../package-json-exports/index.hmr.js | 0 .../snapshots/package-json-exports/index.js | 0 .../snapshots/package-json-utf8.debug.js | 0 .../snapshots/package-json-utf8.hmr.debug.js | 0 .../snapshots/package-json-utf8.hmr.js | 0 .../snapshots/package-json-utf8.js | 0 .../react-context-value-func.debug.tsx | 0 .../react-context-value-func.hmr.debug.tsx | 0 .../react-context-value-func.hmr.tsx | 0 .../snapshots/react-context-value-func.tsx | 0 .../snapshots/spread_with_key.debug.tsx | 0 .../snapshots/spread_with_key.hmr.debug.tsx | 0 .../snapshots/spread_with_key.hmr.tsx | 0 .../snapshots/spread_with_key.tsx | 0 .../snapshots/string-escapes.debug.js | 0 .../snapshots/string-escapes.hmr.debug.js | 0 .../snapshots/string-escapes.hmr.js | 0 .../snapshots/string-escapes.js | 0 .../snapshots/styled-components-output.hmr.js | 0 .../styledcomponents-output.debug.js | 0 .../styledcomponents-output.hmr.debug.js | 0 .../snapshots/styledcomponents-output.hmr.js | 0 .../snapshots/styledcomponents-output.js | 0 .../snapshots/template-literal.debug.js | 0 .../snapshots/template-literal.hmr.debug.js | 0 .../snapshots/template-literal.hmr.js | 0 .../snapshots/template-literal.js | 0 .../ts-fallback-rewrite-works.debug.js | 0 .../ts-fallback-rewrite-works.hmr.debug.js | 0 .../ts-fallback-rewrite-works.hmr.js | 0 .../snapshots/ts-fallback-rewrite-works.js | 0 .../tsx-fallback-rewrite-works.debug.js | 0 .../tsx-fallback-rewrite-works.hmr.debug.js | 0 .../tsx-fallback-rewrite-works.hmr.js | 0 .../snapshots/tsx-fallback-rewrite-works.js | 0 .../snapshots/type-only-imports.debug.ts | 0 .../snapshots/type-only-imports.hmr.debug.ts | 0 .../snapshots/type-only-imports.hmr.ts | 0 .../snapshots/type-only-imports.ts | 0 .../snapshots/unicode-identifiers.debug.js | 0 .../unicode-identifiers.hmr.debug.js | 0 .../snapshots/unicode-identifiers.hmr.js | 0 .../snapshots/unicode-identifiers.js | 0 ...-shouldnt-delete-call-expressions.debug.js | 0 ...uldnt-delete-call-expressions.hmr.debug.js | 0 ...id-shouldnt-delete-call-expressions.hmr.js | 0 .../void-shouldnt-delete-call-expressions.js | 0 {integration => test}/snippets/_auth.js | 0 {integration => test}/snippets/_bacon.js | 0 {integration => test}/snippets/_login.js | 0 .../array-args-with-default-values.js | 0 {integration => test}/snippets/bun.lockb | Bin .../snippets/bundled-entry-point.js | 0 .../snippets/caught-require.js | 0 ...dnt-have-static-imports-in-cjs-function.js | 0 .../code-simplification-neql-define.js | 0 .../snippets/custom-emotion-jsx/file.jsx | 0 .../snippets/custom-emotion-jsx/tsconfig.json | 0 .../snippets/export-default-module-hot.js | 0 {integration => test}/snippets/export.js | 0 .../snippets/forbid-in-is-correct.js | 0 .../global-is-remapped-to-globalThis.js | 0 .../snippets/jsx-entities.jsx | 0 {integration => test}/snippets/jsx-spacing.js | 0 .../snippets/jsx-spacing.jsx | 0 .../snippets/jsx-top-level.tsx | 0 .../snippets/latin1-chars-in-regexp.js | 0 .../snippets/lodash-regexp.js | 0 .../snippets/multiple-imports.js | 0 .../snippets/multiple-var.js | 0 .../snippets/number-literal-bug.js | 0 .../snippets/optional-chain-with-function.js | 0 .../_node_modules_copy/exact/im-exact.js | 0 .../_node_modules_copy/exact/package.json | 0 .../inexact/browser/dir/file.js | 0 .../inexact/browser/dir/foo.js | 0 .../_node_modules_copy/inexact/browser/foo.js | 0 .../inexact/browser/index.js | 0 .../inexact/default/dir/file.js | 0 .../inexact/default/dir/foo.js | 0 .../_node_modules_copy/inexact/default/foo.js | 0 .../inexact/default/index.js | 0 .../inexact/node/dir/file.js | 0 .../inexact/node/dir/foo.js | 0 .../_node_modules_copy/inexact/node/foo.js | 0 .../_node_modules_copy/inexact}/node/index.js | 0 .../_node_modules_copy/inexact/package.json | 0 .../js-only-exports/browser/dir/file.js | 0 .../js-only-exports/browser/dir/foo.js | 0 .../js-only-exports/browser/foo.js | 0 .../js-only-exports/browser/index.js | 0 .../js-only-exports/browser/js-file.js | 0 .../js-only-exports/browser/js-file.ts | 0 .../js-only-exports/default/dir/file.js | 0 .../js-only-exports/default/dir/foo.js | 0 .../js-only-exports/default/foo.js | 0 .../js-only-exports/default/index.js | 0 .../js-only-exports/node/dir/file.js | 0 .../js-only-exports/node/dir/foo.js | 0 .../js-only-exports/node/foo.js | 0 .../js-only-exports/node/index.js | 0 .../js-only-exports/package.json | 0 .../snippets/package-json-exports/index.js | 0 .../package-json-exports/package.json | 0 .../snippets/package-json-utf8.js | 0 {integration => test}/snippets/package.json | 0 .../snippets/public/index.html | 0 .../snippets/react-context-value-func.tsx | 0 {integration => test}/snippets/segfault.js | 0 .../snippets/spread_with_key.tsx | 0 .../snippets/string-escapes.js | 0 .../snippets/styledcomponents-output.js | 0 .../snippets/template-literal.js | 0 .../snippets/ts-fallback-rewrite-works.ts | 0 .../snippets/tsx-fallback-rewrite-works.tsx | 0 .../snippets/type-only-imports.ts | 0 .../snippets/unicode-identifiers.js | 0 .../snippets/utf8-package-json.json | 0 .../void-shouldnt-delete-call-expressions.js | 0 {integration => test}/snippets/zero.js | 0 919 files changed, 1958 insertions(+), 1727 deletions(-) rename bench/{snippets => }/_fixture.txt (100%) rename bench/{snippets => }/buffer-read.js (84%) rename bench/{snippets => }/buffer.js (100%) rename bench/{snippets => }/callbacks-overhead.mjs (100%) rename bench/{snippets => }/cat.bun.js (100%) rename bench/{snippets => }/cat.mjs (100%) rename bench/{snippets => }/cat.node.js (100%) rename bench/{snippets => }/concat.js (100%) rename bench/{snippets => }/copy.bun.js (100%) rename bench/{snippets => }/copyfile.mjs (100%) rename bench/{snippets => }/escapeHTML.js (100%) rename bench/{snippets => }/exists.js (100%) rename bench/{snippets => }/gzip.js (100%) rename bench/{snippets => }/gzip.node.mjs (100%) rename bench/{snippets => }/jsx-entity-decoding.jsx (100%) rename bench/{snippets => }/noop.js (100%) rename bench/{snippets => }/package.json (100%) rename bench/{snippets => }/realpath.mjs (100%) rename bench/{snippets => }/render.js (100%) rename bench/{snippets => }/scanner/bun.lockb (100%) rename bench/{snippets => }/scanner/package.json (100%) rename bench/{snippets => }/scanner/remix-route.ts (100%) rename bench/{snippets => }/scanner/scan-imports-only.js (100%) rename bench/{snippets => }/scanner/scan.bun.js (100%) rename bench/{snippets => }/scanner/scan.node-esbuild.mjs (100%) rename bench/{snippets => }/transpiler.mjs (100%) delete mode 100644 integration/bunjs-only-snippets/buffer.test.js delete mode 100644 integration/bunjs-only-snippets/ffi.test.js rename src/{javascript/jsc => bun.js}/WebKit (100%) rename src/{javascript/jsc => bun.js}/api/FFI.h (98%) rename src/{javascript/jsc => bun.js}/api/bun.zig (96%) rename src/{javascript/jsc => bun.js}/api/ffi.zig (94%) rename src/{javascript/jsc => bun.js}/api/html_rewriter.zig (99%) rename src/{javascript/jsc => bun.js}/api/libtcc1.a.macos-aarch64 (100%) rename src/{javascript/jsc => bun.js}/api/libtcc1.c (100%) rename src/{javascript/jsc => bun.js}/api/router.zig (96%) rename src/{javascript/jsc => bun.js}/api/server.zig (95%) rename src/{javascript/jsc => bun.js}/api/transpiler.zig (97%) rename src/{javascript/jsc => bun.js}/base.zig (99%) rename src/{javascript/jsc => bun.js}/bindings/.clang-format (100%) rename src/{javascript/jsc => bun.js}/bindings/ActiveDOMCallback.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/ActiveDOMCallback.h (100%) rename src/{javascript/jsc => bun.js}/bindings/Buffer.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/Buffer.h (100%) rename src/{javascript/jsc => bun.js}/bindings/BufferEncodingType.h (100%) rename src/{javascript/jsc => bun.js}/bindings/BunClientData.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/BunClientData.h (100%) rename src/{javascript/jsc => bun.js}/bindings/BunGCOutputConstraint.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/BunGCOutputConstraint.h (100%) rename src/{javascript/jsc => bun.js}/bindings/BunJSCModule.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/BunJSCModule.h (100%) rename src/{javascript/jsc => bun.js}/bindings/BunStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/BunStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/CachedScript.h (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMException.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMException.h (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMURL.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMURL.h (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMWrapperWorld-class.h (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMWrapperWorld.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/DOMWrapperWorld.h (100%) rename src/{javascript/jsc => bun.js}/bindings/Exception.h (100%) rename src/{javascript/jsc => bun.js}/bindings/ExceptionCode.h (100%) rename src/{javascript/jsc => bun.js}/bindings/ExceptionOr.h (100%) rename src/{javascript/jsc => bun.js}/bindings/FFI.zig (99%) rename src/{javascript/jsc => bun.js}/bindings/GCDefferalContext.h (100%) rename src/{javascript/jsc => bun.js}/bindings/IDLTypes.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSBuffer.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSBuffer.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSBufferEncodingType.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSBufferEncodingType.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSCInlines.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMBinding.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMConvertBufferSource+JSBuffer.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMExceptionHandling.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMExceptionHandling.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMGlobalObject.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMGlobalObject.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMWrapper.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMWrapper.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMWrapperCache.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSDOMWrapperCache.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSFFIFunction.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/JSFFIFunction.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSSink+custom.h (100%) rename src/{javascript/jsc => bun.js}/bindings/JSSink.cpp (99%) create mode 100644 src/bun.js/bindings/JSSink.h rename src/{javascript/jsc => bun.js}/bindings/MarkingConstraint.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/NodeConstants.h (100%) rename src/{javascript/jsc => bun.js}/bindings/Path.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/Path.h (100%) rename src/{javascript/jsc => bun.js}/bindings/Process.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/Process.h (100%) rename src/{javascript/jsc => bun.js}/bindings/ScriptExecutionContext.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/ScriptExecutionContext.h (100%) rename src/{javascript/jsc => bun.js}/bindings/Sink.h (100%) rename src/{javascript/jsc => bun.js}/bindings/StreamGlobals.h (100%) rename src/{javascript/jsc => bun.js}/bindings/StringAdaptors.h (100%) rename src/{javascript/jsc => bun.js}/bindings/URLDecomposition.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/URLDecomposition.h (100%) rename src/{javascript/jsc => bun.js}/bindings/URLSearchParams.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/URLSearchParams.h (100%) rename src/{javascript/jsc => bun.js}/bindings/ZigConsoleClient.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/ZigConsoleClient.h (100%) rename src/{javascript/jsc => bun.js}/bindings/ZigGlobalObject.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/ZigGlobalObject.h (100%) create mode 100644 src/bun.js/bindings/ZigLazyStaticFunctions-inlines.h create mode 100644 src/bun.js/bindings/ZigLazyStaticFunctions.h rename src/{javascript/jsc => bun.js}/bindings/ZigSourceProvider.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/ZigSourceProvider.h (100%) rename src/{javascript/jsc => bun.js}/bindings/bindings-generator.zig (96%) rename src/{javascript/jsc => bun.js}/bindings/bindings.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/bindings.zig (99%) rename src/{javascript/jsc => bun.js}/bindings/bmalloc_heap_ref.h (100%) rename src/{javascript/jsc => bun.js}/bindings/exports.zig (99%) rename src/{javascript/jsc => bun.js}/bindings/header-gen.zig (100%) rename src/{javascript/jsc => bun.js}/bindings/headers-cpp.h (100%) rename src/{javascript/jsc => bun.js}/bindings/headers-handwritten.h (100%) rename src/{javascript/jsc => bun.js}/bindings/headers-replacements.zig (96%) rename src/{javascript/jsc => bun.js}/bindings/headers.h (100%) rename src/{javascript/jsc => bun.js}/bindings/headers.zig (99%) rename src/{javascript/jsc => bun.js}/bindings/helpers.h (100%) rename src/{javascript/jsc => bun.js}/bindings/inlines.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/napi.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/napi.h (100%) rename src/{javascript/jsc => bun.js}/bindings/napi_external.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/napi_external.h (100%) rename src/{javascript/jsc => bun.js}/bindings/objects.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/objects.h (100%) rename src/{javascript/jsc => bun.js}/bindings/process.d.ts (100%) rename src/{javascript/jsc => bun.js}/bindings/root.h (100%) rename src/{javascript/jsc => bun.js}/bindings/shimmer.zig (100%) rename src/{javascript/jsc => bun.js}/bindings/sizes.zig (97%) rename src/{javascript/jsc => bun.js}/bindings/sqlite/JSSQLStatement.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/sqlite/JSSQLStatement.h (100%) rename src/{javascript/jsc => bun.js}/bindings/sqlite/lazy_sqlite3.h (100%) rename src/{javascript/jsc => bun.js}/bindings/sqlite/sqlite.exports.js (100%) rename src/{javascript/jsc => bun.js}/bindings/sqlite/sqlite3.c (100%) rename src/{javascript/jsc => bun.js}/bindings/sqlite/sqlite3_local.h (100%) rename src/{javascript/jsc => bun.js}/bindings/static_export.zig (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortAlgorithm.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortAlgorithm.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortController.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortSignal.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortSignal.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AbortSignal.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ActiveDOMObject.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ActiveDOMObject.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/AddEventListenerOptions.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/BufferSource.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CallbackResult.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CloseEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CloseEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CloseEvent.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CommonAtomStrings.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CommonAtomStrings.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ContextDestructionObserver.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CustomEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CustomEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CustomEvent.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/CustomEventCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/DOMClientIsoSubspaces.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/DOMConstructors.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/DOMHighResTimeStamp.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/DOMIsoSubspaces.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/DOMPromiseProxy.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ErrorCallback.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ErrorCallback.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ErrorCallback.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ErrorEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ErrorEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ErrorEvent.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/Event.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/Event.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/Event.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventContext.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventContext.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventDispatcher.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventDispatcher.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventFactory.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventHeaders.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventInit.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventInit.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventInterfaces.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventListener.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventListener.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventListenerMap.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventListenerMap.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventListenerOptions.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventListenerOptions.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventModifierInit.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventNames.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventNames.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventNames.in (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventOptions.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventPath.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventPath.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventSender.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTarget.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTarget.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTarget.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTargetConcrete.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTargetConcrete.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTargetFactory.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTargetHeaders.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/EventTargetInterfaces.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ExceptionDetails.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ExtendedDOMClientIsoSubspaces.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ExtendedDOMIsoSubspaces.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/FetchHeaders.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/FetchHeaders.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/FetchHeaders.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderField.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderField.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderMap.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderMap.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderNames.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderNames.gperf (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderNames.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderNames.in (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderValues.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPHeaderValues.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPParsers.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/HTTPParsers.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/InternalWritableStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/InternalWritableStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortAlgorithm.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortAlgorithm.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortController.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortSignal.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortSignal.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortSignal.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAbortSignalCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAddEventListenerOptions.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAddEventListenerOptions.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSAddEventListenerOptions.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSByteLengthQueuingStrategy.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSByteLengthQueuingStrategy.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSByteLengthQueuingStrategy.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCallbackData.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCallbackData.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCloseEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCloseEvent.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCloseEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCountQueuingStrategy.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCountQueuingStrategy.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCountQueuingStrategy.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCustomEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCustomEvent.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSCustomEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMAttribute.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMBinding.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMBindingInternalsBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMBindingInternalsBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMBuiltinConstructor.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMBuiltinConstructorBase.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMBuiltinConstructorBase.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMCastThisValue.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConstructor.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConstructorBase.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConstructorBase.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConstructorNotCallable.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConstructorNotConstructable.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvert.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertAny.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertBase.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertBoolean.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertBufferSource.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertCallbacks.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertDate.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertDate.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertDictionary.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertEnumeration.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertEventListener.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertInterface.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertJSON.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertNull.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertNullable.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertNumbers.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertNumbers.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertObject.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertPromise.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertRecord.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertScheduledAction.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertSequences.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertSerializedScriptValue.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertStrings.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertStrings.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertUnion.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertVariadic.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertWebGL.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertWebGL.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMConvertXPathNSResolver.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMException.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMException.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMGlobalObjectInlines.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMGuardedObject.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMGuardedObject.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMIterator.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMIterator.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMOperation.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMOperationReturningPromise.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMPromise.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMPromise.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMPromiseDeferred.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMPromiseDeferred.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMURL.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMURL.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSDOMWindow.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorCallback.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorCallback.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorEvent.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorEventCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorHandler.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSErrorHandler.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEvent.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventCustom.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventInit.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventInit.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventInit.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventListener.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventListener.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventListenerOptions.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventListenerOptions.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventListenerOptions.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventModifierInit.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventModifierInit.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventModifierInit.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventTarget.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventTarget.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventTargetCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSEventTargetCustom.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSFetchHeaders.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSFetchHeaders.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSFetchHeaders.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSMessageEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSMessageEvent.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSMessageEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSMessageEventCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableByteStreamController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableByteStreamController.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableByteStreamController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStream.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamBYOBReader.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamBYOBReader.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamBYOBReader.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamBYOBRequest.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamBYOBRequest.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamBYOBRequest.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamDefaultController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamDefaultController.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamDefaultController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamDefaultReader.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamDefaultReader.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamDefaultReader.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSink.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSink.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSink.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSource.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSource.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSource.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSReadableStreamSourceCustom.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSServiceWorker.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTextEncoder.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTextEncoder.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTextEncoder.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTransformStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTransformStream.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTransformStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTransformStreamDefaultController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTransformStreamDefaultController.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSTransformStreamDefaultController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSURLSearchParams.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSURLSearchParams.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSURLSearchParams.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSValueInWrappedObject.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWebSocket.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWebSocket.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWebSocket.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWindowProxy.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStream.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamDefaultController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamDefaultController.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamDefaultController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamDefaultWriter.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamDefaultWriter.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamDefaultWriter.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamSink.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamSink.dep (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/JSWritableStreamSink.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/MessageEvent.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/MessageEvent.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/MessageEvent.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/Node.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ParsedContentType.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ParsedContentType.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStreamDefaultController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStreamDefaultController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStreamSink.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStreamSink.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStreamSource.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ReadableStreamSource.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/RegisteredEventListener.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ScriptWrappable.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ScriptWrappable.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/ScriptWrappableInlines.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/StructuredClone.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/StructuredClone.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/TaskSource.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/TextEncoder.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/TextEncoder.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/UIEventInit.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebCoreBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebCoreJSClientData.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebCoreTypedArrayController.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebCoreTypedArrayController.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebSocket.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebSocket.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebSocket.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WebSocketIdentifier.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WritableStream.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WritableStream.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WritableStream.idl (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/WritableStreamSink.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/config.h (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/weak_handle.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/webcore/weak_handle.h (100%) rename src/{javascript/jsc => bun.js}/bindings/wtf-bindings.cpp (100%) rename src/{javascript/jsc => bun.js}/bindings/wtf-bindings.h (100%) rename src/{javascript/jsc => bun.js}/builtins/BunBuiltinNames.h (100%) rename src/{javascript/jsc => bun.js}/builtins/README.md (100%) rename src/{javascript/jsc => bun.js}/builtins/WebCoreJSBuiltinInternals.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/WebCoreJSBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ByteLengthQueuingStrategyBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ByteLengthQueuingStrategyBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/CountQueuingStrategyBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/CountQueuingStrategyBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/JSBufferConstructorBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/JSBufferConstructorBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/JSBufferPrototypeBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/JSBufferPrototypeBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/JSZigGlobalObjectBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/JSZigGlobalObjectBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableByteStreamControllerBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableByteStreamControllerBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableByteStreamInternalsBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableByteStreamInternalsBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamBYOBReaderBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamBYOBReaderBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamBYOBRequestBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamBYOBRequestBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamDefaultControllerBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamDefaultControllerBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamDefaultReaderBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamInternalsBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/ReadableStreamInternalsBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/StreamInternalsBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/StreamInternalsBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/TransformStreamBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/TransformStreamBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/TransformStreamDefaultControllerBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/TransformStreamDefaultControllerBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/TransformStreamInternalsBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/TransformStreamInternalsBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WebCoreJSBuiltinInternals.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WebCoreJSBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WritableStreamDefaultControllerBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WritableStreamDefaultControllerBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WritableStreamDefaultWriterBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WritableStreamDefaultWriterBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WritableStreamInternalsBuiltins.cpp (100%) rename src/{javascript/jsc => bun.js}/builtins/cpp/WritableStreamInternalsBuiltins.h (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ByteLengthQueuingStrategy.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/CountQueuingStrategy.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/JSBufferConstructor.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/JSBufferPrototype.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/JSZigGlobalObject.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableByteStreamController.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableByteStreamInternals.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableStream.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableStreamBYOBReader.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableStreamBYOBRequest.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableStreamDefaultController.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableStreamDefaultReader.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/ReadableStreamInternals.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/StreamInternals.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/TransformStream.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/TransformStreamDefaultController.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/TransformStreamInternals.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/WritableStreamDefaultController.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/WritableStreamDefaultWriter.js (100%) rename src/{javascript/jsc => bun.js}/builtins/js/WritableStreamInternals.js (100%) rename src/{javascript/jsc => bun.js}/bun-jsc.exports.js (94%) rename integration/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js => src/bun.js/child_process.exports.js (100%) rename src/{javascript/jsc => bun.js}/config.zig (63%) rename src/{javascript/jsc => bun.js}/detect-libc.js (100%) rename src/{javascript/jsc => bun.js}/detect-libc.linux.js (100%) rename src/{javascript/jsc => bun.js}/event_loop.zig (98%) rename src/{javascript/jsc => bun.js}/ffi.exports.js (100%) rename src/{javascript/jsc => bun.js}/fs.exports.js (100%) rename src/{javascript/jsc => bun.js}/fs_promises.exports.js (100%) rename src/{javascript/jsc => bun.js}/generate-jssink.js (99%) rename src/{javascript/jsc => bun.js}/headergen/sizegen.cpp (95%) rename src/{javascript/jsc => bun.js}/javascript.zig (97%) rename src/{javascript/jsc => bun.js}/javascript_core_c_api.zig (100%) rename src/{javascript/jsc => bun.js}/module.exports.js (100%) rename src/{javascript/jsc => bun.js}/node/buffer.js (100%) rename src/{javascript/jsc => bun.js}/node/buffer.zig (97%) rename src/{javascript/jsc => bun.js}/node/dir_iterator.zig (99%) rename src/{javascript/jsc => bun.js}/node/node_fs.zig (99%) rename src/{javascript/jsc => bun.js}/node/node_fs_binding.zig (99%) rename src/{javascript/jsc => bun.js}/node/node_fs_constant.zig (99%) rename src/{javascript/jsc => bun.js}/node/nodejs_error_code.zig (100%) rename src/{javascript/jsc => bun.js}/node/syscall.zig (98%) rename src/{javascript/jsc => bun.js}/node/types.zig (99%) rename src/{javascript/jsc => bun.js}/node_streams_consumer.exports.js (100%) rename src/{javascript/jsc => bun.js}/node_streams_web.exports.js (100%) rename src/{javascript/jsc => bun.js}/node_timers.exports.js (100%) rename src/{javascript/jsc => bun.js}/node_timers_promises.exports.js (100%) rename src/{javascript/jsc => bun.js}/path-posix.exports.js (100%) rename src/{javascript/jsc => bun.js}/path-win32.exports.js (100%) rename src/{javascript/jsc => bun.js}/path.exports.js (100%) rename src/{javascript/jsc => bun.js}/perf_hooks.exports.js (100%) rename src/{javascript/jsc => bun.js}/process.exports.js (100%) rename src/{javascript/jsc => bun.js}/rare_data.zig (94%) rename src/{javascript/jsc => bun.js}/script_execution_context.zig (80%) rename src/{javascript/jsc => bun.js}/test/jest.zig (97%) rename src/{javascript/jsc => bun.js}/typescript.zig (96%) rename src/{javascript/jsc => bun.js}/undici.exports.js (100%) rename src/{javascript/jsc => bun.js}/uuid.zig (100%) rename src/{javascript/jsc => bun.js}/webcore.zig (98%) rename src/{javascript/jsc => bun.js}/webcore/base64.zig (100%) rename src/{javascript/jsc => bun.js}/webcore/encoding.zig (98%) rename src/{javascript/jsc => bun.js}/webcore/response.zig (99%) rename src/{javascript/jsc => bun.js}/webcore/streams.zig (98%) rename src/{javascript/jsc => bun.js}/ws.exports.js (100%) delete mode 100644 src/javascript/jsc/bindings/JSSink.h rename {integration => test}/README.md (92%) rename {integration => test}/apps/bun-create-next.sh (100%) rename {integration => test}/apps/bun-create-react.sh (100%) rename {integration => test}/apps/bun-dev-index-html.sh (100%) rename {integration => test}/apps/bun-dev.sh (100%) rename {integration => test}/apps/bun-install-lockfile-status.sh (100%) rename {integration => test}/apps/bun-install-utf8.sh (100%) rename {integration => test}/apps/bun-install.sh (100%) rename {integration => test}/apps/bun-run-check-package.json (100%) rename {integration => test}/apps/bun-run-check.sh (100%) rename {integration/bunjs-only-snippets => test/bun.js}/atob.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/baz.js (100%) create mode 100644 test/bun.js/buffer.test.js rename {integration/bunjs-only-snippets => test/bun.js}/bun-jsc.test.js (95%) rename {integration/bunjs-only-snippets => test/bun.js}/bun.lockb (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/always-bundled-module/always-bundled-module (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/always-bundled-module/cjs.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/always-bundled-module/esm.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/always-bundled-module/package.json (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/entrypoint.ts (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/package.json (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/to_bundle_node_modules/i-am-bundled/cjs.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/to_bundle_node_modules/i-am-bundled/esm.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/to_bundle_node_modules/i-am-bundled/package.json (100%) rename {integration/bunjs-only-snippets => test/bun.js}/bundled/tsconfig.json (100%) rename {integration/bunjs-only-snippets => test/bun.js}/concat.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/console-log.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/crypto.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/dirname.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/escapeHTML.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/esm/first.mjs (100%) rename {integration/bunjs-only-snippets => test/bun.js}/esm/second-child.mjs (100%) rename {integration/bunjs-only-snippets => test/bun.js}/esm/second.mjs (100%) rename {integration/bunjs-only-snippets => test/bun.js}/esm/startEnd.mjs (100%) rename {integration/bunjs-only-snippets => test/bun.js}/esm/third.mjs (100%) rename {integration/bunjs-only-snippets => test/bun.js}/exit.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/fetch.js.txt (100%) rename {integration/bunjs-only-snippets => test/bun.js}/fetch.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/ffi-test.c (100%) rename {integration/bunjs-only-snippets => test/bun.js}/ffi.test.fixture.callback.c (98%) rename {integration/bunjs-only-snippets => test/bun.js}/ffi.test.fixture.receiver.c (98%) create mode 100644 test/bun.js/ffi.test.js rename {integration/bunjs-only-snippets => test/bun.js}/fs-stream.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/fs.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/gc.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/globals.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/hash.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/html-rewriter.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/import-meta.test.js (83%) rename {integration/bunjs-only-snippets => test/bun.js}/inline.macro.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/inspect.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/macro-check.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/microtask.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/mmap.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/node-builtins.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/path.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/performance.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/process-nexttick.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/process-nexttick.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/process.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/readFileSync.txt (100%) rename {integration/bunjs-only-snippets => test/bun.js}/readdir.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/reportError.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/require-json.json (100%) rename {integration/bunjs-only-snippets => test/bun.js}/resolve-typescript-file.tsx (100%) rename {integration/bunjs-only-snippets => test/bun.js}/resolve.test.js (98%) rename {integration/bunjs-only-snippets => test/bun.js}/response.file.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/serve.test.ts (100%) rename {integration/bunjs-only-snippets => test/bun.js}/setInterval.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/setTimeout.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/shadow.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/sleep.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/SVG/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/SVG/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/SVG/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/attributeExpressions/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/attributeExpressions/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/attributeExpressions/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/components/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/components/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/components/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/conditionalExpressions/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/conditionalExpressions/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/conditionalExpressions/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/customElements/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/customElements/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/customElements/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/eventExpressions/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/eventExpressions/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/eventExpressions/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/fragments/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/fragments/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/fragments/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/insertChildren/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/insertChildren/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/namespaceElements/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/namespaceElements/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/simpleElements/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/simpleElements/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/simpleElements/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/textInterpolation/code.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/textInterpolation/output.bun.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/solid-dom-fixtures/textInterpolation/output.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/some-fs.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/sql-raw.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/sqlite.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/streams.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/text-encoder.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/toml-fixture.toml (100%) rename {integration/bunjs-only-snippets => test/bun.js}/toml.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/transpiler.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/tsconfig.json (100%) rename {integration/bunjs-only-snippets => test/bun.js}/unsafe.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/url.test.ts (100%) rename {integration/bunjs-only-snippets => test/bun.js}/wasm-return-1-test.zig (100%) rename {integration/bunjs-only-snippets => test/bun.js}/wasm.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/wasm.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/web-globals.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/websocket.test.js (100%) rename {integration/bunjs-only-snippets => test/bun.js}/writeFileSync.txt (100%) rename {integration/bunjs-only-snippets => test/bun.js}/zlib.test.js (100%) rename {integration => test}/macro/assert.tsx (100%) rename {integration => test}/macro/fetchSync.tsx (100%) rename {integration => test}/macro/hello-fetch-macro.tsx (100%) rename {integration => test}/macro/loadMocks.tsx (100%) rename {integration => test}/scripts/browser.js (100%) rename {integration => test}/scripts/bun.js (100%) rename {integration => test}/scripts/bun.lockb (100%) rename {integration => test}/scripts/package-lock.json (100%) rename {integration => test}/scripts/package.json (100%) rename {integration => test}/scripts/snippets.json (100%) rename {integration => test}/snapshots/.prettierignore (100%) rename {integration => test}/snapshots/array-args-with-default-values.debug.js (100%) rename {integration => test}/snapshots/array-args-with-default-values.hmr.debug.js (100%) rename {integration => test}/snapshots/array-args-with-default-values.hmr.js (100%) rename {integration => test}/snapshots/array-args-with-default-values.js (100%) rename {integration => test}/snapshots/bundled-entry-point.debug.js (100%) rename {integration => test}/snapshots/bundled-entry-point.hmr.debug.js (100%) rename {integration => test}/snapshots/bundled-entry-point.hmr.js (100%) rename {integration => test}/snapshots/bundled-entry-point.js (100%) rename {integration => test}/snapshots/caught-require.debug.js (100%) rename {integration => test}/snapshots/caught-require.hmr.debug.js (100%) rename {integration => test}/snapshots/caught-require.hmr.js (100%) rename {integration => test}/snapshots/caught-require.js (100%) rename {integration => test}/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js (100%) rename {integration => test}/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js (100%) rename {integration => test}/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js (100%) rename {integration => test}/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js (100%) rename {integration => test}/snapshots/code-simplification-neql-define.debug.js (100%) rename {integration => test}/snapshots/code-simplification-neql-define.hmr.debug.js (100%) rename {integration => test}/snapshots/code-simplification-neql-define.hmr.js (100%) rename {integration => test}/snapshots/code-simplification-neql-define.js (100%) rename {integration => test}/snapshots/custom-emotion-jsx/file.debug.jsx (100%) rename {integration => test}/snapshots/custom-emotion-jsx/file.hmr.debug.jsx (100%) rename {integration => test}/snapshots/custom-emotion-jsx/file.hmr.jsx (100%) rename {integration => test}/snapshots/custom-emotion-jsx/file.jsx (100%) rename {integration => test}/snapshots/export-default-module-hot.debug.js (100%) rename {integration => test}/snapshots/export-default-module-hot.hmr.debug.js (100%) rename {integration => test}/snapshots/export-default-module-hot.hmr.js (100%) rename {integration => test}/snapshots/export-default-module-hot.js (100%) rename {integration => test}/snapshots/export.debug.js (100%) rename {integration => test}/snapshots/export.hmr.debug.js (100%) rename {integration => test}/snapshots/export.hmr.js (100%) rename {integration => test}/snapshots/export.js (100%) rename {integration => test}/snapshots/forbid-in-is-correct.debug.js (100%) rename {integration => test}/snapshots/forbid-in-is-correct.hmr.debug.js (100%) rename {integration => test}/snapshots/forbid-in-is-correct.hmr.js (100%) rename {integration => test}/snapshots/forbid-in-is-correct.js (100%) rename {integration => test}/snapshots/global-is-remapped-to-globalThis.debug.js (100%) rename {integration => test}/snapshots/global-is-remapped-to-globalThis.hmr.debug.js (100%) rename {integration => test}/snapshots/global-is-remapped-to-globalThis.hmr.js (100%) rename {integration => test}/snapshots/global-is-remapped-to-globalThis.js (100%) rename {integration => test}/snapshots/jsx-entities.debug.jsx (100%) rename {integration => test}/snapshots/jsx-entities.hmr.debug.jsx (100%) rename {integration => test}/snapshots/jsx-entities.hmr.jsx (100%) rename {integration => test}/snapshots/jsx-entities.jsx (100%) rename {integration => test}/snapshots/jsx-spacing.debug.jsx (100%) rename {integration => test}/snapshots/jsx-spacing.hmr.debug.jsx (100%) rename {integration => test}/snapshots/jsx-spacing.hmr.jsx (100%) rename {integration => test}/snapshots/jsx-spacing.jsx (100%) rename {integration => test}/snapshots/latin1-chars-in-regexp.debug.js (100%) rename {integration => test}/snapshots/latin1-chars-in-regexp.hmr.debug.js (100%) rename {integration => test}/snapshots/latin1-chars-in-regexp.hmr.js (100%) rename {integration => test}/snapshots/latin1-chars-in-regexp.js (100%) rename {integration => test}/snapshots/lodash-regexp.debug.js (100%) rename {integration => test}/snapshots/lodash-regexp.hmr.debug.js (100%) rename {integration => test}/snapshots/lodash-regexp.hmr.js (100%) rename {integration => test}/snapshots/lodash-regexp.js (100%) rename {integration => test}/snapshots/multiple-imports.debug.js (100%) rename {integration => test}/snapshots/multiple-imports.hmr.debug.js (100%) rename {integration => test}/snapshots/multiple-imports.hmr.js (100%) rename {integration => test}/snapshots/multiple-imports.js (100%) rename {integration => test}/snapshots/multiple-var.debug.js (100%) rename {integration => test}/snapshots/multiple-var.hmr.debug.js (100%) rename {integration => test}/snapshots/multiple-var.hmr.js (100%) rename {integration => test}/snapshots/multiple-var.js (100%) rename {integration => test}/snapshots/number-literal-bug.debug.js (100%) rename {integration => test}/snapshots/number-literal-bug.hmr.debug.js (100%) rename {integration => test}/snapshots/number-literal-bug.hmr.js (100%) rename {integration => test}/snapshots/number-literal-bug.js (100%) rename {integration => test}/snapshots/optional-chain-with-function.debug.js (100%) rename {integration => test}/snapshots/optional-chain-with-function.hmr.debug.js (100%) rename {integration => test}/snapshots/optional-chain-with-function.hmr.js (100%) rename {integration => test}/snapshots/optional-chain-with-function.js (100%) rename {integration => test}/snapshots/package-json-exports/index.debug.js (100%) rename {integration => test}/snapshots/package-json-exports/index.hmr.debug.js (100%) rename {integration => test}/snapshots/package-json-exports/index.hmr.js (100%) rename {integration => test}/snapshots/package-json-exports/index.js (100%) rename {integration => test}/snapshots/package-json-utf8.debug.js (100%) rename {integration => test}/snapshots/package-json-utf8.hmr.debug.js (100%) rename {integration => test}/snapshots/package-json-utf8.hmr.js (100%) rename {integration => test}/snapshots/package-json-utf8.js (100%) rename {integration => test}/snapshots/react-context-value-func.debug.tsx (100%) rename {integration => test}/snapshots/react-context-value-func.hmr.debug.tsx (100%) rename {integration => test}/snapshots/react-context-value-func.hmr.tsx (100%) rename {integration => test}/snapshots/react-context-value-func.tsx (100%) rename {integration => test}/snapshots/spread_with_key.debug.tsx (100%) rename {integration => test}/snapshots/spread_with_key.hmr.debug.tsx (100%) rename {integration => test}/snapshots/spread_with_key.hmr.tsx (100%) rename {integration => test}/snapshots/spread_with_key.tsx (100%) rename {integration => test}/snapshots/string-escapes.debug.js (100%) rename {integration => test}/snapshots/string-escapes.hmr.debug.js (100%) rename {integration => test}/snapshots/string-escapes.hmr.js (100%) rename {integration => test}/snapshots/string-escapes.js (100%) rename {integration => test}/snapshots/styled-components-output.hmr.js (100%) rename {integration => test}/snapshots/styledcomponents-output.debug.js (100%) rename {integration => test}/snapshots/styledcomponents-output.hmr.debug.js (100%) rename {integration => test}/snapshots/styledcomponents-output.hmr.js (100%) rename {integration => test}/snapshots/styledcomponents-output.js (100%) rename {integration => test}/snapshots/template-literal.debug.js (100%) rename {integration => test}/snapshots/template-literal.hmr.debug.js (100%) rename {integration => test}/snapshots/template-literal.hmr.js (100%) rename {integration => test}/snapshots/template-literal.js (100%) rename {integration => test}/snapshots/ts-fallback-rewrite-works.debug.js (100%) rename {integration => test}/snapshots/ts-fallback-rewrite-works.hmr.debug.js (100%) rename {integration => test}/snapshots/ts-fallback-rewrite-works.hmr.js (100%) rename {integration => test}/snapshots/ts-fallback-rewrite-works.js (100%) rename {integration => test}/snapshots/tsx-fallback-rewrite-works.debug.js (100%) rename {integration => test}/snapshots/tsx-fallback-rewrite-works.hmr.debug.js (100%) rename {integration => test}/snapshots/tsx-fallback-rewrite-works.hmr.js (100%) rename {integration => test}/snapshots/tsx-fallback-rewrite-works.js (100%) rename {integration => test}/snapshots/type-only-imports.debug.ts (100%) rename {integration => test}/snapshots/type-only-imports.hmr.debug.ts (100%) rename {integration => test}/snapshots/type-only-imports.hmr.ts (100%) rename {integration => test}/snapshots/type-only-imports.ts (100%) rename {integration => test}/snapshots/unicode-identifiers.debug.js (100%) rename {integration => test}/snapshots/unicode-identifiers.hmr.debug.js (100%) rename {integration => test}/snapshots/unicode-identifiers.hmr.js (100%) rename {integration => test}/snapshots/unicode-identifiers.js (100%) rename {integration => test}/snapshots/void-shouldnt-delete-call-expressions.debug.js (100%) rename {integration => test}/snapshots/void-shouldnt-delete-call-expressions.hmr.debug.js (100%) rename {integration => test}/snapshots/void-shouldnt-delete-call-expressions.hmr.js (100%) rename {integration => test}/snapshots/void-shouldnt-delete-call-expressions.js (100%) rename {integration => test}/snippets/_auth.js (100%) rename {integration => test}/snippets/_bacon.js (100%) rename {integration => test}/snippets/_login.js (100%) rename {integration => test}/snippets/array-args-with-default-values.js (100%) rename {integration => test}/snippets/bun.lockb (100%) rename {integration => test}/snippets/bundled-entry-point.js (100%) rename {integration => test}/snippets/caught-require.js (100%) rename {integration => test}/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js (100%) rename {integration => test}/snippets/code-simplification-neql-define.js (100%) rename {integration => test}/snippets/custom-emotion-jsx/file.jsx (100%) rename {integration => test}/snippets/custom-emotion-jsx/tsconfig.json (100%) rename {integration => test}/snippets/export-default-module-hot.js (100%) rename {integration => test}/snippets/export.js (100%) rename {integration => test}/snippets/forbid-in-is-correct.js (100%) rename {integration => test}/snippets/global-is-remapped-to-globalThis.js (100%) rename {integration => test}/snippets/jsx-entities.jsx (100%) rename {integration => test}/snippets/jsx-spacing.js (100%) rename {integration => test}/snippets/jsx-spacing.jsx (100%) rename {integration => test}/snippets/jsx-top-level.tsx (100%) rename {integration => test}/snippets/latin1-chars-in-regexp.js (100%) rename {integration => test}/snippets/lodash-regexp.js (100%) rename {integration => test}/snippets/multiple-imports.js (100%) rename {integration => test}/snippets/multiple-var.js (100%) rename {integration => test}/snippets/number-literal-bug.js (100%) rename {integration => test}/snippets/optional-chain-with-function.js (100%) rename integration/snippets/package-json-exports/_node_modules_copy/exact/package.json => test/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js (100%) rename integration/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js => test/snippets/package-json-exports/_node_modules_copy/exact/package.json (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js (100%) rename {integration/snippets/package-json-exports/_node_modules_copy/js-only-exports => test/snippets/package-json-exports/_node_modules_copy/inexact}/node/index.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/inexact/package.json (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js (100%) rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js (100%) create mode 100644 test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js rename {integration => test}/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json (100%) rename {integration => test}/snippets/package-json-exports/index.js (100%) rename {integration => test}/snippets/package-json-exports/package.json (100%) rename {integration => test}/snippets/package-json-utf8.js (100%) rename {integration => test}/snippets/package.json (100%) rename {integration => test}/snippets/public/index.html (100%) rename {integration => test}/snippets/react-context-value-func.tsx (100%) rename {integration => test}/snippets/segfault.js (100%) rename {integration => test}/snippets/spread_with_key.tsx (100%) rename {integration => test}/snippets/string-escapes.js (100%) rename {integration => test}/snippets/styledcomponents-output.js (100%) rename {integration => test}/snippets/template-literal.js (100%) rename {integration => test}/snippets/ts-fallback-rewrite-works.ts (100%) rename {integration => test}/snippets/tsx-fallback-rewrite-works.tsx (100%) rename {integration => test}/snippets/type-only-imports.ts (100%) rename {integration => test}/snippets/unicode-identifiers.js (100%) rename {integration => test}/snippets/utf8-package-json.json (100%) rename {integration => test}/snippets/void-shouldnt-delete-call-expressions.js (100%) rename {integration => test}/snippets/zero.js (100%) diff --git a/.docker/run-test.sh b/.docker/run-test.sh index 74d9017538..c088adf5ae 100755 --- a/.docker/run-test.sh +++ b/.docker/run-test.sh @@ -3,7 +3,7 @@ set -euxo pipefail bun install -bun install --cwd ./integration/snippets -bun install --cwd ./integration/scripts +bun install --cwd ./test/snippets +bun install --cwd ./test/scripts make $BUN_TEST_NAME diff --git a/.dockerignore b/.dockerignore index 22bc44d457..25ea26522f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ node_modules **/node_modules -src/javascript/jsc/WebKit/LayoutTests +src/bun.js/WebKit/LayoutTests zig-out zig-build **/*.o @@ -10,7 +10,7 @@ examples **/.next .git -src/javascript/jsc/WebKit +src/bun.js/WebKit **/CMakeCache.txt packages/**/bun packages/**/bun-profile diff --git a/.gitattributes b/.gitattributes index ef212175fd..4aa7a62d6c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ .vscode/launch.json linguist-generated src/api/schema.d.ts linguist-generated src/api/schema.js linguist-generated -src/javascript/jsc/bindings/sqlite/sqlite3.c linguist-vendored -src/javascript/jsc/bindings/sqlite/sqlite3_local.h linguist-vendored +src/bun.js/bindings/sqlite/sqlite3.c linguist-vendored +src/bun.js/bindings/sqlite/sqlite3_local.h linguist-vendored *.lockb binary diff=lockb *.zig text eol=lf diff --git a/.github/workflows/bun.yml b/.github/workflows/bun.yml index af71c6f7f4..dffab549c4 100644 --- a/.github/workflows/bun.yml +++ b/.github/workflows/bun.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Checkout submodules - run: git -c submodule."src/javascript/jsc/WebKit".update=none submodule update --init --recursive --depth=1 --progress -j 8 + run: git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress -j 8 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to Dockerhub @@ -94,7 +94,7 @@ jobs: # - name: Checkout # uses: actions/checkout@v2 # - name: Checkout submodules - # run: git -c submodule."src/javascript/jsc/WebKit".update=none submodule update --init --recursive --depth=1 --progress -j 8 + # run: git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress -j 8 # - name: Set up Docker Buildx # uses: docker/setup-buildx-action@v1 # - name: Login to Dockerhub @@ -127,7 +127,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Checkout submodules - run: git -c submodule."src/javascript/jsc/WebKit".update=none submodule update --init --recursive --depth=1 --progress -j 8 + run: git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress -j 8 - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: diff --git a/.gitmodules b/.gitmodules index 2620e2dd70..138c5d05f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,53 +1,50 @@ -# [submodule "src/deps/zig-clap"] -# path = src/deps/zig-clap -# url = https://github.com/Hejsil/zig-clap [submodule "src/deps/picohttpparser"] - path = src/deps/picohttpparser - url = https://github.com/h2o/picohttpparser.git - ignore = dirty - depth = 1 +path = src/deps/picohttpparser +url = https://github.com/h2o/picohttpparser.git +ignore = dirty +depth = 1 [submodule "src/javascript/jsc/WebKit"] - path = src/javascript/jsc/WebKit - url = https://github.com/Jarred-Sumner/WebKit.git - ignore = dirty - depth = 1 + path = src/bun.js/WebKit +url = https://github.com/Jarred-Sumner/WebKit.git +ignore = dirty +depth = 1 [submodule "src/deps/mimalloc"] - path = src/deps/mimalloc - url = https://github.com/Jarred-Sumner/mimalloc.git - ignore = dirty - depth = 1 +path = src/deps/mimalloc +url = https://github.com/Jarred-Sumner/mimalloc.git +ignore = dirty +depth = 1 [submodule "src/deps/zlib"] - path = src/deps/zlib - url = https://github.com/cloudflare/zlib.git - ignore = dirty - depth = 1 +path = src/deps/zlib +url = https://github.com/cloudflare/zlib.git +ignore = dirty +depth = 1 [submodule "src/deps/libarchive"] - path = src/deps/libarchive - url = https://github.com/libarchive/libarchive.git - ignore = dirty - depth = 1 +path = src/deps/libarchive +url = https://github.com/libarchive/libarchive.git +ignore = dirty +depth = 1 [submodule "src/deps/boringssl"] - path = src/deps/boringssl - url = https://github.com/google/boringssl.git - ignore = dirty - depth = 1 +path = src/deps/boringssl +url = https://github.com/google/boringssl.git +ignore = dirty +depth = 1 [submodule "src/deps/libbacktrace"] - path = src/deps/libbacktrace - url = https://github.com/ianlancetaylor/libbacktrace - ignore = dirty - depth = 1 +path = src/deps/libbacktrace +url = https://github.com/ianlancetaylor/libbacktrace +ignore = dirty +depth = 1 [submodule "src/deps/lol-html"] - path = src/deps/lol-html - url = https://github.com/cloudflare/lol-html - ignore = dirty - depth = 1 +path = src/deps/lol-html +url = https://github.com/cloudflare/lol-html +ignore = dirty +depth = 1 [submodule "src/deps/uws"] - path = src/deps/uws - url = https://github.com/Jarred-Sumner/uWebSockets - ignore = dirty - depth = 1 +path = src/deps/uws +url = https://github.com/Jarred-Sumner/uWebSockets +ignore = dirty +depth = 1 [submodule "src/deps/tinycc"] - path = src/deps/tinycc - url = https://github.com/Jarred-Sumner/tinycc.git - ignore = dirty - depth = 1 +path = src/deps/tinycc +url = https://github.com/Jarred-Sumner/tinycc.git +ignore = dirty +depth = 1 diff --git a/.scripts/write-versions.sh b/.scripts/write-versions.sh index 5fed3ee187..cad659b89a 100644 --- a/.scripts/write-versions.sh +++ b/.scripts/write-versions.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euxo pipefail -WEBKIT_VERSION=$(git rev-parse HEAD:./src/javascript/jsc/WebKit) +WEBKIT_VERSION=$(git rev-parse HEAD:./src/bun.js/WebKit) MIMALLOC_VERSION=$(git rev-parse HEAD:./src/deps/mimalloc) LIBARCHIVE_VERSION=$(git rev-parse HEAD:./src/deps/libarchive) PICOHTTPPARSER_VERSION=$(git rev-parse HEAD:./src/deps/picohttpparser) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 55a36b9e9a..35928d4e70 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -2,26 +2,24 @@ "configurations": [ { "name": "Mac", - "forcedInclude": [ - "${workspaceFolder}/src/javascript/jsc/bindings/root.h" - ], + "forcedInclude": ["${workspaceFolder}/src/bun.js/bindings/root.h"], "includePath": [ "${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/", "${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/WTF/Headers", "${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/*", "${workspaceFolder}/src/JavaScript/jsc/bindings/", "${workspaceFolder}/src/JavaScript/jsc/WebKit/Source/bmalloc/", - "${workspaceFolder}/src/javascript/jsc/WebKit/WebKitBuild/Release/ICU/Headers/" + "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers/" ], "browse": { "path": [ - "${workspaceFolder}/src/javascript/jsc/bindings/*", + "${workspaceFolder}/src/bun.js/bindings/*", "${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/", "${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/WTF/Headers/**", "${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/*", "${workspaceFolder}/src/JavaScript/jsc/bindings/**", "${workspaceFolder}/src/JavaScript/jsc/WebKit/Source/bmalloc/**", - "${workspaceFolder}/src/javascript/jsc/WebKit/WebKitBuild/Release/ICU/Headers/" + "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers/" ], "limitSymbolsToIncludedHeaders": true, "databaseFilename": ".vscode/cppdb" diff --git a/.vscode/launch.json b/.vscode/launch.json index 650d7c454e..b8a42377a7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -125,7 +125,7 @@ "name": "bun routes", "program": "bun-debug", "args": [], - "cwd": "${workspaceFolder}/integration/apps/routing", + "cwd": "${workspaceFolder}/test/apps/routing", "console": "internalConsole" }, { @@ -239,7 +239,7 @@ "name": "wiptest", "program": "bun-debug", "args": ["wiptest", "transpiler"], - "cwd": "${workspaceFolder}/integration", + "cwd": "${workspaceFolder}/test", "console": "internalConsole" }, { @@ -293,7 +293,7 @@ "name": "bun test", "program": "bun-debug", "args": ["wiptest"], - "cwd": "${workspaceFolder}/integration", + "cwd": "${workspaceFolder}", "env": { "FORCE_COLOR": "1" }, @@ -304,8 +304,8 @@ "request": "launch", "name": "bun test current", "program": "bun-debug", - "args": ["wiptest", "mmap"], - "cwd": "${workspaceFolder}/integration", + "args": ["wiptest", "websocket"], + "cwd": "${workspaceFolder}/test", "env": { "FORCE_COLOR": "1" }, @@ -352,8 +352,8 @@ "request": "launch", "name": "bun tes2t", "program": "bun-debug", - "args": ["add", "imagemin-webpack-plugin"], - "cwd": "/tmp/testfoo", + "args": ["/Users/jarred/Code/bun-invite/server.ts"], + "cwd": "/Users/jarred/Code/bun-invite", "env": { "FORCE_COLOR": "1" }, @@ -473,7 +473,7 @@ "name": "Integration Test Dev", "program": "bun-debug", "args": [], - "cwd": "${workspaceFolder}/integration/snippets", + "cwd": "${workspaceFolder}/test/snippets", "console": "internalConsole" }, { @@ -563,7 +563,7 @@ "name": "Integration Test Dev (no hmr)", "program": "bun-debug", "args": ["--disable-hmr"], - "cwd": "${workspaceFolder}/integration/snippets", + "cwd": "${workspaceFolder}/test/snippets", "console": "internalConsole" }, { diff --git a/.vscode/settings.json b/.vscode/settings.json index e59f7a5595..d0d9a341dc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -44,9 +44,9 @@ "**/*.xcodeproj": true, "packages/bun-types/*.d.ts": true, - "integration/snapshots": true, - "integration/snapshots-no-hmr": true, - "src/javascript/jsc/WebKit": true, + "test/snapshots": true, + "test/snapshots-no-hmr": true, + "src/bun.js/WebKit": true, "src/deps/libarchive": true, "src/deps/mimalloc": true, "src/deps/s2n-tls": true, @@ -55,25 +55,25 @@ "src/deps/uws": true, "src/deps/zlib": true, "src/deps/lol-html": true, - "integration/snippets/package-json-exports/_node_modules_copy": true + "test/snippets/package-json-exports/_node_modules_copy": true }, "C_Cpp.files.exclude": { "**/.vscode": true, - "src/javascript/jsc/WebKit/JSTests": true, - "src/javascript/jsc/WebKit/Tools": true, - "src/javascript/jsc/WebKit/WebDriverTests": true, - "src/javascript/jsc/WebKit/WebKit.xcworkspace": true, - "src/javascript/jsc/WebKit/WebKitLibraries": true, - "src/javascript/jsc/WebKit/Websites": true, - "src/javascript/jsc/WebKit/resources": true, - "src/javascript/jsc/WebKit/LayoutTests": true, - "src/javascript/jsc/WebKit/ManualTests": true, - "src/javascript/jsc/WebKit/PerformanceTests": true, - "src/javascript/jsc/WebKit/WebKitLegacy": true, - "src/javascript/jsc/WebKit/WebCore": true, - "src/javascript/jsc/WebKit/WebDriver": true, - "src/javascript/jsc/WebKit/WebKitBuild": true, - "src/javascript/jsc/WebKit/WebInspectorUI": true + "src/bun.js/WebKit/JSTests": true, + "src/bun.js/WebKit/Tools": true, + "src/bun.js/WebKit/WebDriverTests": true, + "src/bun.js/WebKit/WebKit.xcworkspace": true, + "src/bun.js/WebKit/WebKitLibraries": true, + "src/bun.js/WebKit/Websites": true, + "src/bun.js/WebKit/resources": true, + "src/bun.js/WebKit/LayoutTests": true, + "src/bun.js/WebKit/ManualTests": true, + "src/bun.js/WebKit/PerformanceTests": true, + "src/bun.js/WebKit/WebKitLegacy": true, + "src/bun.js/WebKit/WebCore": true, + "src/bun.js/WebKit/WebDriver": true, + "src/bun.js/WebKit/WebKitBuild": true, + "src/bun.js/WebKit/WebInspectorUI": true }, "[cpp]": { "editor.defaultFormatter": "xaver.clang-format" diff --git a/Dockerfile b/Dockerfile index bd7c1a3675..0683a40f1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -428,7 +428,7 @@ ENV PATH "${BUN_DIR}/packages/bun-linux-x64:${BUN_DIR}/packages/bun-linux-aarch6 ENV CI 1 ENV BROWSER_EXECUTABLE /usr/bin/chromium -COPY ./integration ${BUN_DIR}/integration +COPY ./test ${BUN_DIR}/test COPY Makefile ${BUN_DIR}/Makefile COPY package.json ${BUN_DIR}/package.json COPY .docker/run-test.sh ${BUN_DIR}/run-test.sh diff --git a/Dockerfile.musl b/Dockerfile.musl index ce198eaa64..ffdca55380 100644 --- a/Dockerfile.musl +++ b/Dockerfile.musl @@ -130,9 +130,9 @@ # WORKDIR /bun -# COPY ./integration /bun/integration -# COPY ./integration/snippets/package-json-exports/_node_modules_copy /bun/integration/snippets/package-json-exports/_node_modules_copy -# CMD [ "bash", "-c", "npm install && cd /bun/integration/snippets && npm install && cd /bun && make copy-test-node-modules test-all"] +# COPY ./test /bun/test +# COPY ./test/snippets/package-json-exports/_node_modules_copy /bun/test/snippets/package-json-exports/_node_modules_copy +# CMD [ "bash", "-c", "npm install && cd /bun/test/snippets && npm install && cd /bun && make copy-test-node-modules test-all"] # # FROM bun diff --git a/Makefile b/Makefile index f315a01aa5..75060cab36 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ BUN_BUILD_TAG = bun-v$(PACKAGE_JSON_VERSION) BUN_RELEASE_BIN = $(PACKAGE_DIR)/bun PRETTIER ?= $(shell which prettier || echo "./node_modules/.bin/prettier") DSYMUTIL ?= $(shell which dsymutil || which dsymutil-13) -WEBKIT_DIR ?= $(realpath src/javascript/jsc/WebKit) +WEBKIT_DIR ?= $(realpath src/bun.js/WebKit) WEBKIT_RELEASE_DIR ?= $(WEBKIT_DIR)/WebKitBuild/Release WEBKIT_DEBUG_DIR ?= $(WEBKIT_DIR)/WebKitBuild/Debug WEBKIT_RELEASE_DIR_LTO ?= $(WEBKIT_DIR)/WebKitBuild/ReleaseLTO @@ -200,36 +200,36 @@ endif HOMEBREW_PREFIX ?= $(BREW_PREFIX_PATH) -SRC_DIR := src/javascript/jsc/bindings -OBJ_DIR := src/javascript/jsc/bindings-obj +SRC_DIR := src/bun.js/bindings +OBJ_DIR := src/bun.js/bindings-obj SRC_PATH := $(realpath $(SRC_DIR)) SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp) SRC_WEBCORE_FILES := $(wildcard $(SRC_DIR)/webcore/*.cpp) SRC_SQLITE_FILES := $(wildcard $(SRC_DIR)/sqlite/*.cpp) -SRC_BUILTINS_FILES := $(wildcard src/javascript/jsc/builtins/*.cpp) +SRC_BUILTINS_FILES := $(wildcard src/bun.js/builtins/*.cpp) OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC_FILES)) WEBCORE_OBJ_FILES := $(patsubst $(SRC_DIR)/webcore/%.cpp,$(OBJ_DIR)/%.o,$(SRC_WEBCORE_FILES)) SQLITE_OBJ_FILES := $(patsubst $(SRC_DIR)/sqlite/%.cpp,$(OBJ_DIR)/%.o,$(SRC_SQLITE_FILES)) -BUILTINS_OBJ_FILES := $(patsubst src/javascript/jsc/builtins/%.cpp,$(OBJ_DIR)/%.o,$(SRC_BUILTINS_FILES)) +BUILTINS_OBJ_FILES := $(patsubst src/bun.js/builtins/%.cpp,$(OBJ_DIR)/%.o,$(SRC_BUILTINS_FILES)) BINDINGS_OBJ := $(OBJ_FILES) $(WEBCORE_OBJ_FILES) $(SQLITE_OBJ_FILES) $(BUILTINS_OBJ_FILES) MAC_INCLUDE_DIRS := -I$(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders \ -I$(WEBKIT_RELEASE_DIR)/WTF/Headers \ -I$(WEBKIT_RELEASE_DIR)/ICU/Headers \ -I$(WEBKIT_RELEASE_DIR)/ \ - -Isrc/javascript/jsc/bindings/ \ - -Isrc/javascript/jsc/builtins/ \ - -Isrc/javascript/jsc/bindings/webcore \ - -Isrc/javascript/jsc/bindings/sqlite \ - -Isrc/javascript/jsc/builtins/cpp \ + -Isrc/bun.js/bindings/ \ + -Isrc/bun.js/builtins/ \ + -Isrc/bun.js/bindings/webcore \ + -Isrc/bun.js/bindings/sqlite \ + -Isrc/bun.js/builtins/cpp \ -I$(WEBKIT_DIR)/Source/bmalloc \ -I$(WEBKIT_DIR)/Source LINUX_INCLUDE_DIRS := -I$(JSC_INCLUDE_DIR) \ - -Isrc/javascript/jsc/builtins/ \ - -Isrc/javascript/jsc/bindings/ \ - -Isrc/javascript/jsc/bindings/webcore \ - -Isrc/javascript/jsc/bindings/sqlite \ - -Isrc/javascript/jsc/builtins/cpp \ + -Isrc/bun.js/builtins/ \ + -Isrc/bun.js/bindings/ \ + -Isrc/bun.js/bindings/webcore \ + -Isrc/bun.js/bindings/sqlite \ + -Isrc/bun.js/builtins/cpp \ -I$(ZLIB_INCLUDE_DIR) @@ -401,17 +401,17 @@ tinycc: cp $(TINYCC_DIR)/*.a $(BUN_DEPS_OUT_DIR) generate-builtins: - rm -f src/javascript/jsc/bindings/*Builtin*.cpp src/javascript/jsc/bindings/*Builtin*.h src/javascript/jsc/bindings/*Builtin*.cpp - rm -rf src/javascript/jsc/builtins/cpp - mkdir -p src/javascript/jsc/builtins/cpp - $(shell which python || which python2) $(realpath $(WEBKIT_DIR)/Source/JavaScriptCore/Scripts/generate-js-builtins.py) -i $(realpath src)/javascript/jsc/builtins/js -o $(realpath src)/javascript/jsc/builtins/cpp --framework WebCore --force - $(shell which python || which python2) $(realpath $(WEBKIT_DIR)/Source/JavaScriptCore/Scripts/generate-js-builtins.py) -i $(realpath src)/javascript/jsc/builtins/js -o $(realpath src)/javascript/jsc/builtins/cpp --framework WebCore --wrappers-only + rm -f src/bun.js/bindings/*Builtin*.cpp src/bun.js/bindings/*Builtin*.h src/bun.js/bindings/*Builtin*.cpp + rm -rf src/bun.js/builtins/cpp + mkdir -p src/bun.js/builtins/cpp + $(shell which python || which python2) $(realpath $(WEBKIT_DIR)/Source/JavaScriptCore/Scripts/generate-js-builtins.py) -i $(realpath src)/bun.js/builtins/js -o $(realpath src)/bun.js/builtins/cpp --framework WebCore --force + $(shell which python || which python2) $(realpath $(WEBKIT_DIR)/Source/JavaScriptCore/Scripts/generate-js-builtins.py) -i $(realpath src)/bun.js/builtins/js -o $(realpath src)/bun.js/builtins/cpp --framework WebCore --wrappers-only echo 'namespace Zig { class GlobalObject; }' >> /tmp/1.h - cat /tmp/1.h src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h > src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h.1 - mv src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h.1 src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h - $(SED) -i -e 's/class JSDOMGlobalObject/using JSDOMGlobalObject = Zig::GlobalObject/' src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h + cat /tmp/1.h src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h > src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h.1 + mv src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h.1 src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h + $(SED) -i -e 's/class JSDOMGlobalObject/using JSDOMGlobalObject = Zig::GlobalObject/' src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h # this is the one we actually build - mv src/javascript/jsc/builtins/cpp/*JSBuiltin*.cpp src/javascript/jsc/builtins + mv src/bun.js/builtins/cpp/*JSBuiltin*.cpp src/bun.js/builtins vendor-without-check: api analytics node-fallbacks runtime_js fallback_decoder bun_error mimalloc picohttp zlib boringssl libarchive libbacktrace lolhtml usockets uws base64 tinycc @@ -423,8 +423,8 @@ release-types: cd packages/bun-types && npm publish format: - $(PRETTIER) --write integration/bunjs-only-snippets/*.js - $(PRETTIER) --write integration/bunjs-only-snippets/solid-dom-fixtures/**/*.js + $(PRETTIER) --write test/bun.js/*.js + $(PRETTIER) --write test/bun.js/solid-dom-fixtures/**/*.js lolhtml: cd $(BUN_DEPS_DIR)/lol-html/ && cd $(BUN_DEPS_DIR)/lol-html/c-api && cargo build --release && cp target/release/liblolhtml.a $(BUN_DEPS_OUT_DIR) @@ -443,7 +443,7 @@ boringssl: boringssl-build boringssl-copy boringssl-debug: boringssl-build-debug boringssl-copy compile-ffi-test: - clang $(OPTIMIZATION_LEVEL) -shared -undefined dynamic_lookup -o /tmp/bun-ffi-test.dylib -fPIC ./integration/bunjs-only-snippets/ffi-test.c + clang $(OPTIMIZATION_LEVEL) -shared -undefined dynamic_lookup -o /tmp/bun-ffi-test.dylib -fPIC ./test/bun.js/ffi-test.c libbacktrace: cd $(BUN_DEPS_DIR)/libbacktrace && \ @@ -592,14 +592,14 @@ release: all-js jsc-bindings-mac build-obj cls bun-link-lld-release bun-link-lld release-safe: all-js jsc-bindings-mac build-obj-safe cls bun-link-lld-release bun-link-lld-release-dsym release-bin-entitlements jsc-check: - @ls $(JSC_BASE_DIR) >/dev/null 2>&1 || (echo "Failed to access WebKit build. Please compile the WebKit submodule using the Dockerfile at $(shell pwd)/src/javascript/WebKit/Dockerfile and then copy from /output in the Docker container to $(JSC_BASE_DIR). You can override the directory via JSC_BASE_DIR. \n\n DOCKER_BUILDKIT=1 docker build -t bun-webkit $(shell pwd)/src/javascript/jsc/WebKit -f $(shell pwd)/src/javascript/jsc/WebKit/Dockerfile --progress=plain\n\n docker container create bun-webkit\n\n # Get the container ID\n docker container ls\n\n docker cp DOCKER_CONTAINER_ID_YOU_JUST_FOUND:/output $(JSC_BASE_DIR)" && exit 1) + @ls $(JSC_BASE_DIR) >/dev/null 2>&1 || (echo "Failed to access WebKit build. Please compile the WebKit submodule using the Dockerfile at $(shell pwd)/src/javascript/WebKit/Dockerfile and then copy from /output in the Docker container to $(JSC_BASE_DIR). You can override the directory via JSC_BASE_DIR. \n\n DOCKER_BUILDKIT=1 docker build -t bun-webkit $(shell pwd)/src/bun.js/WebKit -f $(shell pwd)/src/bun.js/WebKit/Dockerfile --progress=plain\n\n docker container create bun-webkit\n\n # Get the container ID\n docker container ls\n\n docker cp DOCKER_CONTAINER_ID_YOU_JUST_FOUND:/output $(JSC_BASE_DIR)" && exit 1) @ls $(JSC_INCLUDE_DIR) >/dev/null 2>&1 || (echo "Failed to access WebKit include directory at $(JSC_INCLUDE_DIR)." && exit 1) @ls $(JSC_LIB) >/dev/null 2>&1 || (echo "Failed to access WebKit lib directory at $(JSC_LIB)." && exit 1) all-js: runtime_js fallback_decoder bun_error node-fallbacks fmt-cpp: - cd src/javascript/jsc/bindings && clang-format *.cpp *.h -i + cd src/bun.js/bindings && clang-format *.cpp *.h -i fmt-zig: cd src && zig fmt **/*.zig @@ -699,7 +699,7 @@ jsc-build: $(JSC_BUILD_STEPS) jsc-bindings: jsc-bindings-headers jsc-bindings-mac clone-submodules: - git -c submodule."src/javascript/jsc/WebKit".update=none submodule update --init --recursive --depth=1 --progress + git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress devcontainer: clone-submodules mimalloc zlib libarchive boringssl picohttp identifier-cache node-fallbacks jsc-bindings-headers api analytics bun_error fallback_decoder jsc-bindings-mac dev runtime_js_dev @@ -707,26 +707,26 @@ CLANG_FORMAT := $(shell command -v clang-format 2> /dev/null) jsc-bindings-headers: - rm -f /tmp/build-jsc-headers src/javascript/jsc/bindings/headers.zig - touch src/javascript/jsc/bindings/headers.zig - mkdir -p src/javascript/jsc/bindings-obj/ + rm -f /tmp/build-jsc-headers src/bun.js/bindings/headers.zig + touch src/bun.js/bindings/headers.zig + mkdir -p src/bun.js/bindings-obj/ $(ZIG) build headers-obj $(CXX) $(PLATFORM_LINKER_FLAGS) $(JSC_FILES_DEBUG) ${ICU_FLAGS} $(BUN_LLD_FLAGS_WITHOUT_JSC) -g $(DEBUG_BIN)/headers.o -W -o /tmp/build-jsc-headers -lc; /tmp/build-jsc-headers - $(ZIG) translate-c src/javascript/jsc/bindings/headers.h > src/javascript/jsc/bindings/headers.zig + $(ZIG) translate-c src/bun.js/bindings/headers.h > src/bun.js/bindings/headers.zig $(ZIG) run misctools/headers-cleaner.zig -lc - $(SED) -i '/pub const __darwin/d' src/javascript/jsc/bindings/headers.zig || echo ""; - $(SED) -i '/pub const __builtin/d' src/javascript/jsc/bindings/headers.zig || echo ""; - $(SED) -i '/pub const int/d' src/javascript/jsc/bindings/headers.zig || echo ""; - $(SED) -i '/pub const uint/d' src/javascript/jsc/bindings/headers.zig || echo ""; - $(SED) -i '/pub const intmax/d' src/javascript/jsc/bindings/headers.zig || echo ""; - $(SED) -i '/pub const uintmax/d' src/javascript/jsc/bindings/headers.zig || echo ""; - $(SED) -i '/pub const max_align_t/{N;N;N;d;}' src/javascript/jsc/bindings/headers.zig - $(SED) -i '/pub const ZigErrorCode/d' src/javascript/jsc/bindings/headers.zig - $(SED) -i '/pub const JSClassRef/d' src/javascript/jsc/bindings/headers.zig - cat src/javascript/jsc/bindings/headers.zig > /tmp/headers.zig - cat src/javascript/jsc/bindings/headers-replacements.zig /tmp/headers.zig > src/javascript/jsc/bindings/headers.zig - $(ZIG) fmt src/javascript/jsc/bindings/headers.zig + $(SED) -i '/pub const __darwin/d' src/bun.js/bindings/headers.zig || echo ""; + $(SED) -i '/pub const __builtin/d' src/bun.js/bindings/headers.zig || echo ""; + $(SED) -i '/pub const int/d' src/bun.js/bindings/headers.zig || echo ""; + $(SED) -i '/pub const uint/d' src/bun.js/bindings/headers.zig || echo ""; + $(SED) -i '/pub const intmax/d' src/bun.js/bindings/headers.zig || echo ""; + $(SED) -i '/pub const uintmax/d' src/bun.js/bindings/headers.zig || echo ""; + $(SED) -i '/pub const max_align_t/{N;N;N;d;}' src/bun.js/bindings/headers.zig + $(SED) -i '/pub const ZigErrorCode/d' src/bun.js/bindings/headers.zig + $(SED) -i '/pub const JSClassRef/d' src/bun.js/bindings/headers.zig + cat src/bun.js/bindings/headers.zig > /tmp/headers.zig + cat src/bun.js/bindings/headers-replacements.zig /tmp/headers.zig > src/bun.js/bindings/headers.zig + $(ZIG) fmt src/bun.js/bindings/headers.zig MIMALLOC_OVERRIDE_FLAG ?= @@ -863,70 +863,70 @@ mkdir-dev: mkdir -p $(DEBUG_PACKAGE_DIR)/bin test-install: - cd integration/scripts && $(NPM_CLIENT) install + cd test/scripts && $(NPM_CLIENT) install test-bun-dev: - BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-dev.sh - BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-dev-index-html.sh + BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-dev.sh + BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-dev-index-html.sh test-dev-bun-dev: - BUN_BIN=$(DEBUG_BUN) bash integration/apps/bun-dev.sh - BUN_BIN=$(DEBUG_BUN) bash integration/apps/bun-dev-index-html.sh + BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-dev.sh + BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-dev-index-html.sh test-all: test-install test-with-hmr test-no-hmr test-create-next test-create-react test-bun-run test-bun-install test-bun-dev copy-test-node-modules: - rm -rf integration/snippets/package-json-exports/node_modules || echo ""; - cp -r integration/snippets/package-json-exports/_node_modules_copy integration/snippets/package-json-exports/node_modules || echo ""; + rm -rf test/snippets/package-json-exports/node_modules || echo ""; + cp -r test/snippets/package-json-exports/_node_modules_copy test/snippets/package-json-exports/node_modules || echo ""; kill-bun: -killall -9 bun bun-debug test-dev-create-next: - BUN_BIN=$(DEBUG_BUN) bash integration/apps/bun-create-next.sh + BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-create-next.sh test-dev-create-react: - BUN_BIN=$(DEBUG_BUN) bash integration/apps/bun-create-react.sh + BUN_BIN=$(DEBUG_BUN) bash test/apps/bun-create-react.sh test-create-next: - BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-create-next.sh + BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-create-next.sh test-bun-run: - cd integration/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-run-check.sh + cd test/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-run-check.sh test-bun-install: test-bun-install-git-status - cd integration/apps && JS_RUNTIME=$(RELEASE_BUN) NPM_CLIENT=$(RELEASE_BUN) bash ./bun-install.sh - cd integration/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-install-utf8.sh + cd test/apps && JS_RUNTIME=$(RELEASE_BUN) NPM_CLIENT=$(RELEASE_BUN) bash ./bun-install.sh + cd test/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-install-utf8.sh test-bun-install-git-status: - cd integration/apps && JS_RUNTIME=$(RELEASE_BUN) BUN_BIN=$(RELEASE_BUN) bash ./bun-install-lockfile-status.sh + cd test/apps && JS_RUNTIME=$(RELEASE_BUN) BUN_BIN=$(RELEASE_BUN) bash ./bun-install-lockfile-status.sh test-dev-bun-install: test-dev-bun-install-git-status - cd integration/apps && JS_RUNTIME=$(DEBUG_BUN) NPM_CLIENT=$(DEBUG_BUN) bash ./bun-install.sh - cd integration/apps && BUN_BIN=$(DEBUG_BUN) bash ./bun-install-utf8.sh + cd test/apps && JS_RUNTIME=$(DEBUG_BUN) NPM_CLIENT=$(DEBUG_BUN) bash ./bun-install.sh + cd test/apps && BUN_BIN=$(DEBUG_BUN) bash ./bun-install-utf8.sh test-dev-bun-install-git-status: - cd integration/apps && BUN_BIN=$(DEBUG_BUN) bash ./bun-install-lockfile-status.sh + cd test/apps && BUN_BIN=$(DEBUG_BUN) bash ./bun-install-lockfile-status.sh test-create-react: - BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-create-react.sh + BUN_BIN=$(RELEASE_BUN) bash test/apps/bun-create-react.sh test-with-hmr: kill-bun copy-test-node-modules - BUN_BIN=$(RELEASE_BUN) node integration/scripts/browser.js + BUN_BIN=$(RELEASE_BUN) node test/scripts/browser.js test-no-hmr: kill-bun copy-test-node-modules -killall bun -9; - DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(RELEASE_BUN) node integration/scripts/browser.js + DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(RELEASE_BUN) node test/scripts/browser.js test-dev-with-hmr: copy-test-node-modules -killall bun-debug -9; - BUN_BIN=$(DEBUG_BUN) node integration/scripts/browser.js + BUN_BIN=$(DEBUG_BUN) node test/scripts/browser.js test-dev-no-hmr: copy-test-node-modules -killall bun-debug -9; - DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(DEBUG_BUN) node integration/scripts/browser.js + DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(DEBUG_BUN) node test/scripts/browser.js test-dev-bun-run: - cd integration/apps && BUN_BIN=$(DEBUG_BUN) bash bun-run-check.sh + cd test/apps && BUN_BIN=$(DEBUG_BUN) bash bun-run-check.sh test-dev-all: test-dev-with-hmr test-dev-no-hmr test-dev-create-next test-dev-create-react test-dev-bun-run test-dev-bun-install test-dev-bun-dev test-dev-bunjs: @@ -1065,7 +1065,7 @@ jsc-build-linux-compile-config: $(WEBKIT_RELEASE_DIR) # If you get "Error: could not load cache" -# run rm -rf src/javascript/jsc/WebKit/CMakeCache.txt +# run rm -rf src/bun.js/WebKit/CMakeCache.txt jsc-build-linux-compile-build: mkdir -p $(WEBKIT_RELEASE_DIR) && \ cd $(WEBKIT_RELEASE_DIR) && \ @@ -1084,7 +1084,7 @@ jsc-build-mac-copy: cp $(WEBKIT_RELEASE_DIR)/lib/libbmalloc.a $(BUN_DEPS_OUT_DIR)/libbmalloc.a clean-jsc: - cd src/javascript/jsc/WebKit && rm -rf **/CMakeCache.txt **/CMakeFiles && rm -rf src/javascript/jsc/WebKit/WebKitBuild + cd src/bun.js/WebKit && rm -rf **/CMakeCache.txt **/CMakeFiles && rm -rf src/bun.js/WebKit/WebKitBuild clean-bindings: rm -rf $(OBJ_DIR)/*.o rm -rf $(OBJ_DIR)/webcore/*.o @@ -1207,7 +1207,7 @@ endif bun-relink: bun-relink-copy bun-link-lld-release bun-link-lld-release-dsym wasm-return1: - zig build-lib -OReleaseSmall integration/bunjs-only-snippets/wasm-return-1-test.zig -femit-bin=integration/bunjs-only-snippets/wasm-return-1-test.wasm -target wasm32-freestanding + zig build-lib -OReleaseSmall test/bun.js/wasm-return-1-test.zig -femit-bin=test/bun.js/wasm-return-1-test.wasm -target wasm32-freestanding @@ -1247,7 +1247,7 @@ $(OBJ_DIR)/%.o: $(SRC_DIR)/sqlite/%.cpp $(EMIT_LLVM) \ -g3 -c -o $@ $< -$(OBJ_DIR)/%.o: src/javascript/jsc/builtins/%.cpp +$(OBJ_DIR)/%.o: src/bun.js/builtins/%.cpp $(CXX) $(CLANG_FLAGS) \ $(MACOS_MIN_FLAG) \ $(OPTIMIZATION_LEVEL) \ @@ -1258,8 +1258,8 @@ $(OBJ_DIR)/%.o: src/javascript/jsc/builtins/%.cpp -g3 -c -o $@ $< sizegen: - $(CXX) src/javascript/jsc/headergen/sizegen.cpp -o $(BUN_TMP_DIR)/sizegen $(CLANG_FLAGS) -O1 - $(BUN_TMP_DIR)/sizegen > src/javascript/jsc/bindings/sizes.zig + $(CXX) src/bun.js/headergen/sizegen.cpp -o $(BUN_TMP_DIR)/sizegen $(CLANG_FLAGS) -O1 + $(BUN_TMP_DIR)/sizegen > src/bun.js/bindings/sizes.zig # Linux uses bundled SQLite3 @@ -1401,7 +1401,7 @@ run-unit: test: build-unit run-unit integration-test-dev: - USE_EXISTING_PROCESS=true TEST_SERVER_URL=http://localhost:3000 node integration/scripts/browser.js + USE_EXISTING_PROCESS=true TEST_SERVER_URL=http://localhost:3000 node test/scripts/browser.js copy-install: cp src/cli/install.sh ../bun.sh/docs/install.html diff --git a/README.md b/README.md index f151e83a39..4f7739df59 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ bun.js prefers Web API compatibility or node API compatibility instead of design - `.env` files automatically load into `process.env` and `Bun.env` - top level await -The runtime uses JavaScriptCore, the JavaScript engine powering WebKit and Safari. Some web APIs like [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) and [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) directly use [Safari's implementation](https://github.com/Jarred-Sumner/bun/blob/e0011fd6baf2fe2b12d1b2a909981da1a183cdad/src/javascript/jsc/bindings/webcore/JSFetchHeaders.cpp#L1). +The runtime uses JavaScriptCore, the JavaScript engine powering WebKit and Safari. Some web APIs like [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) and [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) directly use [Safari's implementation](https://github.com/Jarred-Sumner/bun/blob/e0011fd6baf2fe2b12d1b2a909981da1a183cdad/src/bun.js/bindings/webcore/JSFetchHeaders.cpp#L1). `cat` clone that runs [2x faster than GNU cat](https://twitter.com/jarredsumner/status/1511707890708586496) for large files on Linux @@ -2667,7 +2667,7 @@ const out = encode_png( ); ``` -The [auto-generated wrapper](https://github.com/Jarred-Sumner/bun/blob/c6d732eee2721cd6191672cbe2c57fb17c3fffe4/src/javascript/jsc/ffi.exports.js#L146-L148) converts the pointer to a TypedArray +The [auto-generated wrapper](https://github.com/Jarred-Sumner/bun/blob/c6d732eee2721cd6191672cbe2c57fb17c3fffe4/src/bun.js/ffi.exports.js#L146-L148) converts the pointer to a TypedArray
@@ -2766,7 +2766,7 @@ require("./my-node-module.node"); import.meta.require("./my-node-module.node"); ``` -Bun doesn't currently support dynamic requires, but `import.meta.require` is an escape hatch for that. It uses a [JavaScriptCore builtin function](https://github.com/Jarred-Sumner/bun/blob/aa87d40f4b7fdfb52575f44d151906ddba6a82d0/src/javascript/jsc/bindings/builtins/js/JSZigGlobalObject.js#L26). +Bun doesn't currently support dynamic requires, but `import.meta.require` is an escape hatch for that. It uses a [JavaScriptCore builtin function](https://github.com/Jarred-Sumner/bun/blob/aa87d40f4b7fdfb52575f44d151906ddba6a82d0/src/bun.js/bindings/builtins/js/JSZigGlobalObject.js#L26). ### `Bun.Transpiler` @@ -3092,7 +3092,7 @@ gh auth login gh repo clone Jarred-Sumner/bun . -- --depth=1 --progress -j8 # update all submodules except webkit because webkit takes awhile and it's already compiled for you. -git -c submodule."src/javascript/jsc/WebKit".update=none submodule update --init --recursive --depth=1 --progress +git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress # Compile bun dependencies (zig is already compiled) make devcontainer @@ -3153,7 +3153,7 @@ make vendor jsc identifier-cache dev First ensure the node dependencies are installed ```bash -cd integration/snippets +cd test/snippets npm i ``` diff --git a/bench/snippets/_fixture.txt b/bench/_fixture.txt similarity index 100% rename from bench/snippets/_fixture.txt rename to bench/_fixture.txt diff --git a/bench/snippets/buffer-read.js b/bench/buffer-read.js similarity index 84% rename from bench/snippets/buffer-read.js rename to bench/buffer-read.js index 314f1d69e0..5da645153d 100644 --- a/bench/snippets/buffer-read.js +++ b/bench/buffer-read.js @@ -4,24 +4,28 @@ var buf = new Buffer(1024); var view = new DataView(buf.buffer); var INTERVAL = 9999999; var time = (name, fn) => { - for (let i = 0; i < INTERVAL; i++) fn(); + console.log(name, fn()); + // for (let i = 0; i < INTERVAL; i++) fn(); - console.time(name.padEnd("DataView.readBigUInt64 (LE)".length)); - for (let i = 0; i < INTERVAL; i++) fn(); - console.timeEnd(name.padEnd("DataView.readBigUInt64 (LE)".length)); + // console.time(name.padEnd("DataView.readBigUInt64 (LE)".length)); + // for (let i = 0; i < INTERVAL; i++) fn(); + // console.timeEnd(name.padEnd("DataView.readBigUInt64 (LE)".length)); + // }; + + // console.log( + // `Run ${new Intl.NumberFormat().format(INTERVAL)} times with a warmup:`, + // "\n" }; - -console.log( - `Run ${new Intl.NumberFormat().format(INTERVAL)} times with a warmup:`, - "\n" -); var array = new Uint8Array(1024); +new Uint8Array(buf.buffer).fill(255); time("Buffer[] ", () => buf[0]); time("Uint8Array[]", () => array[0]); console.log(""); time("Buffer.getBigInt64BE ", () => buf.readBigInt64BE(0)); -time("DataView.getBigInt64 (BE)", () => view.getBigInt64(0, false)); +time("DataView.getBigInt64 (BE)", () => + view.getBigInt64(0, false).toString(10) +); console.log(""); time("Buffer.readBigInt64LE ", () => buf.readBigInt64LE(0)); diff --git a/bench/snippets/buffer.js b/bench/buffer.js similarity index 100% rename from bench/snippets/buffer.js rename to bench/buffer.js diff --git a/bench/snippets/callbacks-overhead.mjs b/bench/callbacks-overhead.mjs similarity index 100% rename from bench/snippets/callbacks-overhead.mjs rename to bench/callbacks-overhead.mjs diff --git a/bench/snippets/cat.bun.js b/bench/cat.bun.js similarity index 100% rename from bench/snippets/cat.bun.js rename to bench/cat.bun.js diff --git a/bench/snippets/cat.mjs b/bench/cat.mjs similarity index 100% rename from bench/snippets/cat.mjs rename to bench/cat.mjs diff --git a/bench/snippets/cat.node.js b/bench/cat.node.js similarity index 100% rename from bench/snippets/cat.node.js rename to bench/cat.node.js diff --git a/bench/snippets/concat.js b/bench/concat.js similarity index 100% rename from bench/snippets/concat.js rename to bench/concat.js diff --git a/bench/snippets/copy.bun.js b/bench/copy.bun.js similarity index 100% rename from bench/snippets/copy.bun.js rename to bench/copy.bun.js diff --git a/bench/snippets/copyfile.mjs b/bench/copyfile.mjs similarity index 100% rename from bench/snippets/copyfile.mjs rename to bench/copyfile.mjs diff --git a/bench/snippets/escapeHTML.js b/bench/escapeHTML.js similarity index 100% rename from bench/snippets/escapeHTML.js rename to bench/escapeHTML.js diff --git a/bench/snippets/exists.js b/bench/exists.js similarity index 100% rename from bench/snippets/exists.js rename to bench/exists.js diff --git a/bench/snippets/gzip.js b/bench/gzip.js similarity index 100% rename from bench/snippets/gzip.js rename to bench/gzip.js diff --git a/bench/snippets/gzip.node.mjs b/bench/gzip.node.mjs similarity index 100% rename from bench/snippets/gzip.node.mjs rename to bench/gzip.node.mjs diff --git a/bench/snippets/jsx-entity-decoding.jsx b/bench/jsx-entity-decoding.jsx similarity index 100% rename from bench/snippets/jsx-entity-decoding.jsx rename to bench/jsx-entity-decoding.jsx diff --git a/bench/snippets/noop.js b/bench/noop.js similarity index 100% rename from bench/snippets/noop.js rename to bench/noop.js diff --git a/bench/snippets/package.json b/bench/package.json similarity index 100% rename from bench/snippets/package.json rename to bench/package.json diff --git a/bench/snippets/realpath.mjs b/bench/realpath.mjs similarity index 100% rename from bench/snippets/realpath.mjs rename to bench/realpath.mjs diff --git a/bench/snippets/render.js b/bench/render.js similarity index 100% rename from bench/snippets/render.js rename to bench/render.js diff --git a/bench/snippets/scanner/bun.lockb b/bench/scanner/bun.lockb similarity index 100% rename from bench/snippets/scanner/bun.lockb rename to bench/scanner/bun.lockb diff --git a/bench/snippets/scanner/package.json b/bench/scanner/package.json similarity index 100% rename from bench/snippets/scanner/package.json rename to bench/scanner/package.json diff --git a/bench/snippets/scanner/remix-route.ts b/bench/scanner/remix-route.ts similarity index 100% rename from bench/snippets/scanner/remix-route.ts rename to bench/scanner/remix-route.ts diff --git a/bench/snippets/scanner/scan-imports-only.js b/bench/scanner/scan-imports-only.js similarity index 100% rename from bench/snippets/scanner/scan-imports-only.js rename to bench/scanner/scan-imports-only.js diff --git a/bench/snippets/scanner/scan.bun.js b/bench/scanner/scan.bun.js similarity index 100% rename from bench/snippets/scanner/scan.bun.js rename to bench/scanner/scan.bun.js diff --git a/bench/snippets/scanner/scan.node-esbuild.mjs b/bench/scanner/scan.node-esbuild.mjs similarity index 100% rename from bench/snippets/scanner/scan.node-esbuild.mjs rename to bench/scanner/scan.node-esbuild.mjs diff --git a/bench/snippets/transpiler.mjs b/bench/transpiler.mjs similarity index 100% rename from bench/snippets/transpiler.mjs rename to bench/transpiler.mjs diff --git a/bun.lockb b/bun.lockb index b4fe117478ee1118262168a35b0440a1d4b1d48b..cee4b7721fafc92430874888f257270ce2c39117 100755 GIT binary patch delta 1816 zcmb_ddrVtp6u)0b3v^>VO51x|N{f{}U|c8{6y}@|Vx*#Mnk_EIk@2WdUe?kK79X(T z5@g8M9kc2f5r^}lO?9h649xEnc&ofk@(IwH?yb_$2{k9uj~BBEb%1g{=W14 z&i6Rq4X^Jl*(a{fyuP_LU}tGt_qOdB3fFX7^Pl+W>TE6B@Lla(rTggQZw^i-Yw!_! z*&5@baO3OuR8|L2bRx%bT!$HP8DbG)ETYfjsjl0>ac-2Cq8w;x^j6_`Bp5cgpTL10 zl>>+r97aq)3?Wi*4ufHaX7c_XGl7j~~sl zf1QU$9OIyrjT;Ro#o>|4L+6h=51-Ue>_}h_l}0g0izQq1{uqiiIAeOY?%m2#^q4y9PJYapGKPnin1Y-H5Hk%r;!ZT zqV4Tu%}}&i3g(a%*@aAY37P1>kbG{jR{gCMd++~J>{w##aP&P_FPy#eb^YnN7u?4_ zJ6PtQEYukaj)$f0U;Kk-=i^>%T2(Px2w%Kf?S6@~+~3=`?d7N6{$}0m#h-rFeG z2c_w64|I?CxHtU0e&2XO=UtzjUsvEsxeG4ok>X>;Yxh)HGaFNTVeAux!Z87N* zk$G?#4e9blCzV15M3X8gm<(5v4O*I#!A^|%XVHqCa!^}D5)Z{jgO-jq38pZH@{cTc$4;aaG4CL z>8PXTkEAYsQM$}Sm1(`a7z^~9%JdH9%3cuAutG~aE`ZVeq28fvez_gKH)rIk$EH4A zF|5KR=8E({AkovPK5l5q6(v!E<$MZ@gG^qGa)}ZLTlsvedTlf_Pj-Zgb2BxR#YI`1 zFv1JgBFsh4@sC5@@zc{fpN7!{xOp9JnBxVu3Fh%z0T-fh2V@JSO?IHD*bc&rG59k_RN|aUL$Z_=wm0K&$5$+ z!DgM1=ctv(0yL-Ou_+i#k(itfE~i-ZU37v-<90~4p@=y&T73zcbJDXWur3m5&XTE#R zx#!HCGv}VJwIik7<|msfHa4yMZT!)>zq<}@8yxA|=JMVyonQK5>erJ6;-?#p7knZP zy=SAbE~?Hbub(ZU+O1)zPRLv#A_{m8I0$xtn?s?kb$f+a34J#7aO;lxEm)uG8F97s zV}XDOfjM{>oCWR#b8s7&gLZ*=UxTGrg83!YV2&HL{N)xm)`x4uwNNa*xg``1*N0kW zEJAco#{Sg1M`^pfvQ*xiyedW3rGlxuDH0n#|MuTV%eY;vc^YeE{S_>|YVxnEGE(gr zs|F%mcLpGgx0!7pd^Y582|+2-92+x z_Wj&7aXa=s4P+0OiOmo2BaP2aX-(W<;@J+gj)m`5%ueM(Y16UB|Fd!N6slBJsSJhG zUYRovLnb;aW;J}3lNRSLmm2NN{e2bZ)e>ne=3j~OyaBXk{9Ys*Gw6v^wIj8V)Z!aP&;B0Et}YrhXsFAGJF)!R3EqL>uS&VJ9s1jQ%-uWEuaofqw`vYqFGg%aK+6Z z>!V7RRZJz1p6Lai#BH6Z@qam3c;)ykSyN;do7~jY6w`R>Qv<7Bp!+%uJmC&6 YEx9K5WW4y%+H~4SH;n~D_IbzTe{wwl2><{9 diff --git a/docs/upgrading-webkit.md b/docs/upgrading-webkit.md index 39b5c3efc5..dc67e9e09f 100644 --- a/docs/upgrading-webkit.md +++ b/docs/upgrading-webkit.md @@ -12,7 +12,7 @@ It's important to periodically update WebKit for many reasons: To upgrade, first find the commit in **bun's WebKit fork** (not bun!) between when we last upgraded and now. ```bash -cd src/javascript/jsc/WebKit # In the WebKit directory! not bun +cd src/bun.js/WebKit # In the WebKit directory! not bun git checkout $COMMIT ``` @@ -38,7 +38,7 @@ Make sure that JSC's CLI is able to load successfully. This verifies that the bu You know this worked when it printed help options. If it complains about symbols, crashes, or anything else that looks wrong, something is wrong. ```bash -src/javascript/jsc/WebKit/WebKitBuild/Release/bin/jsc --help +src/bun.js/WebKit/WebKitBuild/Release/bin/jsc --help ``` Then, clear out our bindings and regenerate the C++<>Zig headers: diff --git a/integration/bunjs-only-snippets/buffer.test.js b/integration/bunjs-only-snippets/buffer.test.js deleted file mode 100644 index dd5327ca33..0000000000 --- a/integration/bunjs-only-snippets/buffer.test.js +++ /dev/null @@ -1,305 +0,0 @@ -import { gc } from "bun"; -import { describe, it, expect, beforeEach, afterEach } from "bun:test"; -import { gc } from "./gc"; - -beforeEach(() => gc()); -afterEach(() => gc()); - -it("buffer", () => { - var buf = new Buffer(20); - gc(); - // if this fails or infinitely loops, it means there is a memory issue with the JSC::Structure object - expect(Object.keys(buf).length > 0).toBe(true); - gc(); - expect(buf.write("hello world ")).toBe(12); - expect(buf.write("hello world ", "utf8")).toBe(12); - - gc(); - expect(buf.toString("utf8", 0, "hello world ".length)).toBe("hello world "); - gc(); - expect(buf.toString("base64url", 0, "hello world ".length)).toBe( - btoa("hello world ") - ); - gc(); - expect(buf instanceof Uint8Array).toBe(true); - gc(); - expect(buf instanceof Buffer).toBe(true); - gc(); - expect(buf.slice() instanceof Uint8Array).toBe(true); - gc(); - expect(buf.slice(0, 1) instanceof Buffer).toBe(true); - gc(); - expect(buf.slice(0, 1) instanceof Uint8Array).toBe(true); - gc(); - expect(buf.slice(0, 1) instanceof Buffer).toBe(true); - gc(); -}); - -it("Buffer", () => { - var inputs = [ - "hello world", - "hello world".repeat(100), - `😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`, - ]; - var good = inputs.map((a) => new TextEncoder().encode(a)); - for (let i = 0; i < inputs.length; i++) { - var input = inputs[i]; - expect(new Buffer(input).toString("utf8")).toBe(inputs[i]); - gc(); - expect(Array.from(new Buffer(input)).join(",")).toBe(good[i].join(",")); - gc(); - expect(Buffer.byteLength(input)).toBe(good[i].length); - gc(); - expect(Buffer.from(input).byteLength).toBe(Buffer.byteLength(input)); - } -}); - -it("Buffer.byteLength", () => { - expect(Buffer.byteLength("😀😃😄😁😆😅😂🤣☺️😊😊😇")).toBe( - new TextEncoder().encode("😀😃😄😁😆😅😂🤣☺️😊😊😇").byteLength - ); -}); - -it("Buffer.isBuffer", () => { - expect(Buffer.isBuffer(new Buffer(1))).toBe(true); - gc(); - expect(Buffer.isBuffer(new Buffer(0))).toBe(true); - gc(); - expect(Buffer.isBuffer(new Uint8Array(0))).toBe(false); - gc(); - expect(Buffer.isBuffer(new Uint8Array(1))).toBe(false); - gc(); - var a = new Uint8Array(1); - gc(); - expect(Buffer.isBuffer(a)).toBe(false); - gc(); - Buffer.toBuffer(a); - gc(); - expect(Buffer.isBuffer(a)).toBe(true); - gc(); -}); - -it("Buffer.toBuffer throws", () => { - const checks = [ - [], - {}, - "foo", - new Uint16Array(), - new DataView(new Uint8Array(14).buffer), - ]; - for (let i = 0; i < checks.length; i++) { - try { - Buffer.toBuffer(checks[i]); - expect(false).toBe(true); - } catch (exception) { - expect(exception.message).toBe("Expected Uint8Array"); - } - } - expect(true).toBe(true); -}); - -it("Buffer.toBuffer works", () => { - var array = new Uint8Array(20); - expect(array instanceof Buffer).toBe(false); - var buf = Buffer.toBuffer(array); - expect(array instanceof Buffer).toBe(true); - // if this fails or infinitely loops, it means there is a memory issue with the JSC::Structure object - expect(Object.keys(buf).length > 0).toBe(true); - - expect(buf.write("hello world ")).toBe(12); - gc(); - expect(buf.toString("utf8", 0, "hello world ".length)).toBe("hello world "); - gc(); - expect(buf.toString("base64url", 0, "hello world ".length)).toBe( - btoa("hello world ") - ); - gc(); - - expect(buf instanceof Uint8Array).toBe(true); - expect(buf instanceof Buffer).toBe(true); - expect(buf.slice() instanceof Uint8Array).toBe(true); - expect(buf.slice(0, 1) instanceof Buffer).toBe(true); - expect(buf.slice(0, 1) instanceof Uint8Array).toBe(true); - expect(buf.slice(0, 1) instanceof Buffer).toBe(true); - expect(new Buffer(buf) instanceof Buffer).toBe(true); - expect(new Buffer(buf.buffer) instanceof Buffer).toBe(true); -}); - -it("writeInt", () => { - var buf = new Buffer(1024); - var data = new DataView(buf.buffer); - buf.writeInt32BE(100); - expect(data.getInt32(0, false)).toBe(100); - buf.writeInt32BE(100); - expect(data.getInt32(0, false)).toBe(100); - var childBuf = buf.subarray(0, 4); - expect(data.getInt32(0, false)).toBe(100); - expect(childBuf.readInt32BE(0, false)).toBe(100); -}); - -it("Buffer.from", () => { - expect(Buffer.from("hello world").toString("utf8")).toBe("hello world"); - expect(Buffer.from("hello world", "ascii").toString("utf8")).toBe( - "hello world" - ); - expect(Buffer.from("hello world", "latin1").toString("utf8")).toBe( - "hello world" - ); - gc(); - expect(Buffer.from([254]).join(",")).toBe("254"); - expect(Buffer.from(123).join(",")).toBe(Uint8Array.from(123).join(",")); - expect(Buffer.from({ length: 124 }).join(",")).toBe( - Uint8Array.from({ length: 124 }).join(",") - ); - - expect(Buffer.from(new ArrayBuffer(1024), 0, 512).join(",")).toBe( - new Uint8Array(512).join(",") - ); - - expect(Buffer.from(new Buffer(new ArrayBuffer(1024), 0, 512)).join(",")).toBe( - new Uint8Array(512).join(",") - ); - gc(); -}); - -it("Buffer.equals", () => { - var a = new Uint8Array(10); - a[2] = 1; - var b = new Uint8Array(10); - b[2] = 1; - Buffer.toBuffer(a); - Buffer.toBuffer(b); - expect(a.equals(b)).toBe(true); - b[2] = 0; - expect(a.equals(b)).toBe(false); -}); - -it("Buffer.compare", () => { - var a = new Uint8Array(10); - a[2] = 1; - var b = new Uint8Array(10); - b[2] = 1; - Buffer.toBuffer(a); - Buffer.toBuffer(b); - expect(a.compare(b)).toBe(0); - b[2] = 0; - expect(a.compare(b)).toBe(1); - expect(b.compare(a)).toBe(-1); -}); - -it("Buffer.copy", () => { - var array1 = new Uint8Array(128); - array1.fill(100); - Buffer.toBuffer(array1); - var array2 = new Uint8Array(128); - array2.fill(200); - Buffer.toBuffer(array2); - var array3 = new Uint8Array(128); - Buffer.toBuffer(array3); - gc(); - expect(array1.copy(array2)).toBe(128); - expect(array1.join("")).toBe(array2.join("")); -}); - -it("Buffer.concat", () => { - var array1 = new Uint8Array(128); - array1.fill(100); - var array2 = new Uint8Array(128); - array2.fill(200); - var array3 = new Uint8Array(128); - array3.fill(300); - gc(); - expect(Buffer.concat([array1, array2, array3]).join("")).toBe( - array1.join("") + array2.join("") + array3.join("") - ); - expect(Buffer.concat([array1, array2, array3], 222).length).toBe(222); - expect( - Buffer.concat([array1, array2, array3], 222).subarray(0, 128).join("") - ).toBe("100".repeat(128)); - expect( - Buffer.concat([array1, array2, array3], 222).subarray(129, 222).join("") - ).toBe("200".repeat(222 - 129)); -}); - -it("read", () => { - var buf = new Buffer(1024); - var data = new DataView(buf.buffer); - function reset() { - new Uint8Array(buf.buffer).fill(0); - } - data.setBigInt64(0, BigInt(1000), false); - expect(buf.readBigInt64BE(0)).toBe(BigInt(1000)); - reset(); - - data.setBigInt64(0, BigInt(1000), false); - expect(buf.readBigInt64LE(0)).toBe(BigInt(1000)); - reset(); - - data.setBigUint64(0, BigInt(1000), false); - expect(buf.readBigUInt64BE(0)).toBe(BigInt(1000)); - reset(); - - data.setBigUint64(0, BigInt(1000), false); - expect(buf.readBigUInt64LE(0)).toBe(BigInt(1000)); - reset(); - - data.setFloat64(0, 1000, false); - expect(buf.readDoubleBE(0)).toBe(1000); - reset(); - - data.setFloat64(0, 1000, true); - expect(buf.readDoubleLE(0)).toBe(1000); - reset(); - - data.setFloat32(0, 1000, false); - expect(buf.readFloatBE(0)).toBe(1000); - reset(); - - data.setFloat32(0, 1000, true); - expect(buf.readFloatLE(0)).toBe(1000); - reset(); - - data.setInt16(0, 1000, false); - expect(buf.readInt16BE(0)).toBe(1000); - reset(); - - data.setInt16(0, 1000, true); - expect(buf.readInt16LE(0)).toBe(1000); - reset(); - - data.setInt32(0, 1000, false); - expect(buf.readInt32BE(0)).toBe(1000); - reset(); - - data.setInt32(0, 1000, true); - expect(buf.readInt32LE(0)).toBe(1000); - reset(); - - data.setInt8(0, 100, false); - expect(buf.readInt8(0)).toBe(100); - reset(); - - data.setUint16(0, 1000, false); - expect(buf.readUInt16BE(0)).toBe(1000); - reset(); - - data.setUint16(0, 1000, true); - expect(buf.readUInt16LE(0)).toBe(1000); - reset(); - - data.setUint32(0, 1000, false); - expect(buf.readUInt32BE(0)).toBe(1000); - reset(); - - data.setUint32(0, 1000, true); - expect(buf.readUInt32LE(0)).toBe(1000); - reset(); - - data.setUint8(0, 255, false); - expect(buf.readUInt8(0)).toBe(255); - reset(); - - data.setUint8(0, 255, false); - expect(buf.readUInt8(0)).toBe(255); - reset(); -}); diff --git a/integration/bunjs-only-snippets/ffi.test.js b/integration/bunjs-only-snippets/ffi.test.js deleted file mode 100644 index b8d79887b7..0000000000 --- a/integration/bunjs-only-snippets/ffi.test.js +++ /dev/null @@ -1,537 +0,0 @@ -import { describe, it, expect } from "bun:test"; -import { unsafe } from "bun"; -// -import { - native, - viewSource, - dlopen, - CString, - ptr, - toBuffer, - toArrayBuffer, - FFIType, - callback, - CFunction, -} from "bun:ffi"; - -it("ffi print", async () => { - await Bun.write( - import.meta.dir + "/ffi.test.fixture.callback.c", - viewSource( - { - returns: "bool", - args: ["ptr"], - }, - true - ) - ); - await Bun.write( - import.meta.dir + "/ffi.test.fixture.receiver.c", - viewSource( - { - not_a_callback: { - returns: "float", - args: ["float"], - }, - }, - false - )[0] - ); - expect( - viewSource( - { - returns: "int8_t", - args: [], - }, - true - ).length > 0 - ).toBe(true); - expect( - viewSource( - { - a: { - returns: "int8_t", - args: [], - }, - }, - false - ).length > 0 - ).toBe(true); -}); - -function getTypes(fast) { - const int64_t = fast ? "i64_fast" : "int64_t"; - const uint64_t = fast ? "u64_fast" : "uint64_t"; - return { - returns_true: { - returns: "bool", - args: [], - }, - returns_false: { - returns: "bool", - args: [], - }, - returns_42_char: { - returns: "char", - args: [], - }, - returns_42_float: { - returns: "float", - args: [], - }, - returns_42_double: { - returns: "double", - args: [], - }, - returns_42_uint8_t: { - returns: "uint8_t", - args: [], - }, - returns_neg_42_int8_t: { - returns: "int8_t", - args: [], - }, - returns_42_uint16_t: { - returns: "uint16_t", - args: [], - }, - returns_42_uint32_t: { - returns: "uint32_t", - args: [], - }, - returns_42_uint64_t: { - returns: uint64_t, - args: [], - }, - returns_neg_42_int16_t: { - returns: "int16_t", - args: [], - }, - returns_neg_42_int32_t: { - returns: "int32_t", - args: [], - }, - returns_neg_42_int64_t: { - returns: int64_t, - args: [], - }, - - identity_char: { - returns: "char", - args: ["char"], - }, - identity_float: { - returns: "float", - args: ["float"], - }, - identity_bool: { - returns: "bool", - args: ["bool"], - }, - identity_double: { - returns: "double", - args: ["double"], - }, - identity_int8_t: { - returns: "int8_t", - args: ["int8_t"], - }, - identity_int16_t: { - returns: "int16_t", - args: ["int16_t"], - }, - identity_int32_t: { - returns: "int32_t", - args: ["int32_t"], - }, - identity_int64_t: { - returns: int64_t, - args: [int64_t], - }, - identity_uint8_t: { - returns: "uint8_t", - args: ["uint8_t"], - }, - identity_uint16_t: { - returns: "uint16_t", - args: ["uint16_t"], - }, - identity_uint32_t: { - returns: "uint32_t", - args: ["uint32_t"], - }, - identity_uint64_t: { - returns: uint64_t, - args: [uint64_t], - }, - - add_char: { - returns: "char", - args: ["char", "char"], - }, - add_float: { - returns: "float", - args: ["float", "float"], - }, - add_double: { - returns: "double", - args: ["double", "double"], - }, - add_int8_t: { - returns: "int8_t", - args: ["int8_t", "int8_t"], - }, - add_int16_t: { - returns: "int16_t", - args: ["int16_t", "int16_t"], - }, - add_int32_t: { - returns: "int32_t", - args: ["int32_t", "int32_t"], - }, - add_int64_t: { - returns: int64_t, - args: [int64_t, int64_t], - }, - add_uint8_t: { - returns: "uint8_t", - args: ["uint8_t", "uint8_t"], - }, - add_uint16_t: { - returns: "uint16_t", - args: ["uint16_t", "uint16_t"], - }, - add_uint32_t: { - returns: "uint32_t", - args: ["uint32_t", "uint32_t"], - }, - - does_pointer_equal_42_as_int32_t: { - returns: "bool", - args: ["ptr"], - }, - - ptr_should_point_to_42_as_int32_t: { - returns: "ptr", - args: [], - }, - identity_ptr: { - returns: "ptr", - args: ["ptr"], - }, - add_uint64_t: { - returns: uint64_t, - args: [uint64_t, uint64_t], - }, - - cb_identity_true: { - returns: "bool", - args: ["ptr"], - }, - cb_identity_false: { - returns: "bool", - args: ["ptr"], - }, - cb_identity_42_char: { - returns: "char", - args: ["ptr"], - }, - cb_identity_42_float: { - returns: "float", - args: ["ptr"], - }, - cb_identity_42_double: { - returns: "double", - args: ["ptr"], - }, - cb_identity_42_uint8_t: { - returns: "uint8_t", - args: ["ptr"], - }, - cb_identity_neg_42_int8_t: { - returns: "int8_t", - args: ["ptr"], - }, - cb_identity_42_uint16_t: { - returns: "uint16_t", - args: ["ptr"], - }, - cb_identity_42_uint32_t: { - returns: "uint32_t", - args: ["ptr"], - }, - cb_identity_42_uint64_t: { - returns: uint64_t, - args: ["ptr"], - }, - cb_identity_neg_42_int16_t: { - returns: "int16_t", - args: ["ptr"], - }, - cb_identity_neg_42_int32_t: { - returns: "int32_t", - args: ["ptr"], - }, - cb_identity_neg_42_int64_t: { - returns: int64_t, - args: ["ptr"], - }, - - return_a_function_ptr_to_function_that_returns_true: { - returns: "ptr", - args: [], - }, - }; -} - -function ffiRunner(types) { - const { - symbols: { - returns_true, - returns_false, - return_a_function_ptr_to_function_that_returns_true, - returns_42_char, - returns_42_float, - returns_42_double, - returns_42_uint8_t, - returns_neg_42_int8_t, - returns_42_uint16_t, - returns_42_uint32_t, - returns_42_uint64_t, - returns_neg_42_int16_t, - returns_neg_42_int32_t, - returns_neg_42_int64_t, - identity_char, - identity_float, - identity_bool, - identity_double, - identity_int8_t, - identity_int16_t, - identity_int32_t, - identity_int64_t, - identity_uint8_t, - identity_uint16_t, - identity_uint32_t, - identity_uint64_t, - add_char, - add_float, - add_double, - add_int8_t, - add_int16_t, - add_int32_t, - add_int64_t, - add_uint8_t, - add_uint16_t, - identity_ptr, - add_uint32_t, - add_uint64_t, - does_pointer_equal_42_as_int32_t, - ptr_should_point_to_42_as_int32_t, - cb_identity_true, - cb_identity_false, - cb_identity_42_char, - cb_identity_42_float, - cb_identity_42_double, - cb_identity_42_uint8_t, - cb_identity_neg_42_int8_t, - cb_identity_42_uint16_t, - cb_identity_42_uint32_t, - cb_identity_42_uint64_t, - cb_identity_neg_42_int16_t, - cb_identity_neg_42_int32_t, - cb_identity_neg_42_int64_t, - }, - close, - } = dlopen("/tmp/bun-ffi-test.dylib", types); - - expect(returns_true()).toBe(true); - - expect(returns_false()).toBe(false); - - expect(returns_42_char()).toBe(42); - expect(returns_42_uint64_t().valueOf()).toBe(42); - - expect(Math.fround(returns_42_float())).toBe(Math.fround(42.41999804973602)); - expect(returns_42_double()).toBe(42.42); - expect(returns_42_uint8_t()).toBe(42); - expect(returns_neg_42_int8_t()).toBe(-42); - expect(returns_42_uint16_t()).toBe(42); - expect(returns_42_uint32_t()).toBe(42); - expect(returns_42_uint64_t()).toBe(42); - expect(returns_neg_42_int16_t()).toBe(-42); - expect(returns_neg_42_int32_t()).toBe(-42); - expect(identity_int32_t(10)).toBe(10); - expect(returns_neg_42_int64_t()).toBe(-42); - - expect(identity_char(10)).toBe(10); - - expect(identity_float(10.199999809265137)).toBe(10.199999809265137); - - expect(identity_bool(true)).toBe(true); - - expect(identity_bool(false)).toBe(false); - expect(identity_double(10.100000000000364)).toBe(10.100000000000364); - - expect(identity_int8_t(10)).toBe(10); - expect(identity_int16_t(10)).toBe(10); - expect(identity_int64_t(10)).toBe(10); - expect(identity_uint8_t(10)).toBe(10); - expect(identity_uint16_t(10)).toBe(10); - expect(identity_uint32_t(10)).toBe(10); - expect(identity_uint64_t(10)).toBe(10); - - var bigArray = new BigUint64Array(8); - new Uint8Array(bigArray.buffer).fill(255); - var bigIntArray = new BigInt64Array(bigArray.buffer); - expect(identity_uint64_t(bigArray[0])).toBe(bigArray[0]); - expect(identity_uint64_t(bigArray[0] - BigInt(1))).toBe( - bigArray[0] - BigInt(1) - ); - expect(add_uint64_t(BigInt(-1) * bigArray[0], bigArray[0])).toBe(0); - expect(add_uint64_t(BigInt(-1) * bigArray[0] + BigInt(10), bigArray[0])).toBe( - 10 - ); - expect(identity_uint64_t(0)).toBe(0); - expect(identity_uint64_t(100)).toBe(100); - expect(identity_uint64_t(BigInt(100))).toBe(100); - expect(identity_int64_t(bigIntArray[0])).toBe(bigIntArray[0]); - expect(identity_int64_t(bigIntArray[0] - BigInt(1))).toBe( - bigIntArray[0] - BigInt(1) - ); - - expect(add_char(1, 1)).toBe(2); - expect(add_float(2.4, 2.8)).toBe(Math.fround(5.2)); - expect(add_double(4.2, 0.1)).toBe(4.3); - expect(add_int8_t(1, 1)).toBe(2); - expect(add_int16_t(1, 1)).toBe(2); - expect(add_int32_t(1, 1)).toBe(2); - expect(add_int64_t(1, 1)).toBe(2); - expect(add_uint8_t(1, 1)).toBe(2); - expect(add_uint16_t(1, 1)).toBe(2); - expect(add_uint32_t(1, 1)).toBe(2); - - const cptr = ptr_should_point_to_42_as_int32_t(); - expect(cptr != 0).toBe(true); - expect(typeof cptr === "number").toBe(true); - expect(does_pointer_equal_42_as_int32_t(cptr)).toBe(true); - const buffer = toBuffer(cptr, 0, 4); - expect(buffer.readInt32(0)).toBe(42); - expect(new DataView(toArrayBuffer(cptr, 0, 4), 0, 4).getInt32(0, true)).toBe( - 42 - ); - expect(ptr(buffer)).toBe(cptr); - expect(new CString(cptr, 0, 1).toString()).toBe("*"); - expect(identity_ptr(cptr)).toBe(cptr); - const second_ptr = ptr(new Buffer(8)); - expect(identity_ptr(second_ptr)).toBe(second_ptr); - - var myCFunction = new CFunction({ - ptr: return_a_function_ptr_to_function_that_returns_true(), - returns: "bool", - }); - expect(myCFunction()).toBe(true); - - // function identityBool() { - // return true; - // } - // globalThis.identityBool = identityBool; - - // const first = native.callback( - // { - // returns: "bool", - // }, - // identityBool - // ); - // expect( - // cb_identity_true() - // ).toBe(true); - - // expect(cb_identity_true(first)).toBe(true); - - // expect( - // cb_identity_false( - // callback( - // { - // returns: "bool", - // }, - // () => false - // ) - // ) - // ).toBe(false); - - // expect( - // cb_identity_42_char( - // callback( - // { - // returns: "char", - // }, - // () => 42 - // ) - // ) - // ).toBe(42); - // expect( - // cb_identity_42_uint8_t( - // callback( - // { - // returns: "uint8_t", - // }, - // () => 42 - // ) - // ) - // ).toBe(42); - - // cb_identity_neg_42_int8_t( - // callback( - // { - // returns: "int8_t", - // }, - // () => -42 - // ) - // ).toBe(-42); - - // cb_identity_42_uint16_t( - // callback( - // { - // returns: "uint16_t", - // }, - // () => 42 - // ) - // ).toBe(42); - - // cb_identity_42_uint32_t( - // callback( - // { - // returns: "uint32_t", - // }, - // () => 42 - // ) - // ).toBe(42); - - // cb_identity_neg_42_int16_t( - // callback( - // { - // returns: "int16_t", - // }, - // () => -42 - // ) - // ).toBe(-42); - - // cb_identity_neg_42_int32_t( - // callback( - // { - // returns: "int32_t", - // }, - // () => -42 - // ) - // ).toBe(-42); - - close(); -} - -it("run ffi fast", () => { - ffiRunner(getTypes(true)); -}); - -it("run ffi", () => { - ffiRunner(getTypes(false)); -}); diff --git a/misctools/headers-cleaner.zig b/misctools/headers-cleaner.zig index 1615739383..4715a2c970 100644 --- a/misctools/headers-cleaner.zig +++ b/misctools/headers-cleaner.zig @@ -2,7 +2,7 @@ const std = @import("std"); pub fn main() anyerror!void { const headers_zig_file_src: std.builtin.SourceLocation = @src(); - var paths = [_][]const u8{ std.mem.span(headers_zig_file_src.file), "../../src/javascript/jsc/bindings/headers.zig" }; + var paths = [_][]const u8{ std.mem.span(headers_zig_file_src.file), "../../src/bun.js/bindings/headers.zig" }; const headers_zig_file = try std.fs.path.resolve(std.heap.c_allocator, &paths); std.debug.print("Writing to {s}", .{headers_zig_file}); var headers_zig: std.fs.File = try std.fs.openFileAbsolute(headers_zig_file, .{ .mode = .read_write }); diff --git a/misctools/http_bench.zig b/misctools/http_bench.zig index 2884fdd289..40938b1727 100644 --- a/misctools/http_bench.zig +++ b/misctools/http_bench.zig @@ -12,7 +12,7 @@ const C = bun.C; const clap = @import("../src/deps/zig-clap/clap.zig"); const URL = @import("../src/url.zig").URL; -const Headers = @import("../src/javascript/jsc/webcore/response.zig").Headers; +const Headers = @import("../src/bun.js/webcore/response.zig").Headers; const Method = @import("../src/http/method.zig").Method; const ColonListType = @import("../src/cli/colon_list_type.zig").ColonListType; const HeadersTuple = ColonListType(string, noop_resolver); diff --git a/src/bindgen.zig b/src/bindgen.zig index adca783319..919ae4eaac 100644 --- a/src/bindgen.zig +++ b/src/bindgen.zig @@ -1,5 +1,5 @@ pub const bindgen = true; -pub const main = @import("./javascript/jsc/bindings/bindings-generator.zig").main; +pub const main = @import("./bun.js/bindings/bindings-generator.zig").main; pub export fn PLCrashReportHandler(_: ?*anyopaque) void {} pub export fn mkdirp(_: ?*anyopaque) void {} diff --git a/src/javascript/jsc/WebKit b/src/bun.js/WebKit similarity index 100% rename from src/javascript/jsc/WebKit rename to src/bun.js/WebKit diff --git a/src/javascript/jsc/api/FFI.h b/src/bun.js/api/FFI.h similarity index 98% rename from src/javascript/jsc/api/FFI.h rename to src/bun.js/api/FFI.h index 75ac3171d9..e17e15d305 100644 --- a/src/javascript/jsc/api/FFI.h +++ b/src/bun.js/api/FFI.h @@ -1,6 +1,6 @@ // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/javascript/jsc/api/FFI.h#L2 +// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/src/javascript/jsc/api/bun.zig b/src/bun.js/api/bun.zig similarity index 96% rename from src/javascript/jsc/api/bun.zig rename to src/bun.js/api/bun.zig index f062a5130b..c5831ed59c 100644 --- a/src/javascript/jsc/api/bun.zig +++ b/src/bun.js/api/bun.zig @@ -1,81 +1,81 @@ const Bun = @This(); -const default_allocator = @import("../../../global.zig").default_allocator; -const bun = @import("../../../global.zig"); +const default_allocator = @import("../../global.zig").default_allocator; +const bun = @import("../../global.zig"); const Environment = bun.Environment; const NetworkThread = @import("http").NetworkThread; const Global = bun.Global; const strings = bun.strings; const string = bun.string; -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; const std = @import("std"); const Allocator = std.mem.Allocator; -const IdentityContext = @import("../../../identity_context.zig").IdentityContext; -const Fs = @import("../../../fs.zig"); -const Resolver = @import("../../../resolver/resolver.zig"); -const ast = @import("../../../import_record.zig"); -const NodeModuleBundle = @import("../../../node_module_bundle.zig").NodeModuleBundle; -const MacroEntryPoint = @import("../../../bundler.zig").MacroEntryPoint; -const logger = @import("../../../logger.zig"); -const Api = @import("../../../api/schema.zig").Api; -const options = @import("../../../options.zig"); -const Bundler = @import("../../../bundler.zig").Bundler; -const ServerEntryPoint = @import("../../../bundler.zig").ServerEntryPoint; -const js_printer = @import("../../../js_printer.zig"); -const js_parser = @import("../../../js_parser.zig"); -const js_ast = @import("../../../js_ast.zig"); -const hash_map = @import("../../../hash_map.zig"); -const http = @import("../../../http.zig"); -const NodeFallbackModules = @import("../../../node_fallbacks.zig"); +const IdentityContext = @import("../../identity_context.zig").IdentityContext; +const Fs = @import("../../fs.zig"); +const Resolver = @import("../../resolver/resolver.zig"); +const ast = @import("../../import_record.zig"); +const NodeModuleBundle = @import("../../node_module_bundle.zig").NodeModuleBundle; +const MacroEntryPoint = @import("../../bundler.zig").MacroEntryPoint; +const logger = @import("../../logger.zig"); +const Api = @import("../../api/schema.zig").Api; +const options = @import("../../options.zig"); +const Bundler = @import("../../bundler.zig").Bundler; +const ServerEntryPoint = @import("../../bundler.zig").ServerEntryPoint; +const js_printer = @import("../../js_printer.zig"); +const js_parser = @import("../../js_parser.zig"); +const js_ast = @import("../../js_ast.zig"); +const hash_map = @import("../../hash_map.zig"); +const http = @import("../../http.zig"); +const NodeFallbackModules = @import("../../node_fallbacks.zig"); const ImportKind = ast.ImportKind; -const Analytics = @import("../../../analytics/analytics_thread.zig"); -const ZigString = @import("../../../jsc.zig").ZigString; -const Runtime = @import("../../../runtime.zig"); +const Analytics = @import("../../analytics/analytics_thread.zig"); +const ZigString = @import("../../jsc.zig").ZigString; +const Runtime = @import("../../runtime.zig"); const Router = @import("./router.zig"); const ImportRecord = ast.ImportRecord; -const DotEnv = @import("../../../env_loader.zig"); -const ParseResult = @import("../../../bundler.zig").ParseResult; -const PackageJSON = @import("../../../resolver/package_json.zig").PackageJSON; -const MacroRemap = @import("../../../resolver/package_json.zig").MacroMap; -const WebCore = @import("../../../jsc.zig").WebCore; +const DotEnv = @import("../../env_loader.zig"); +const ParseResult = @import("../../bundler.zig").ParseResult; +const PackageJSON = @import("../../resolver/package_json.zig").PackageJSON; +const MacroRemap = @import("../../resolver/package_json.zig").MacroMap; +const WebCore = @import("../../jsc.zig").WebCore; const Request = WebCore.Request; const Response = WebCore.Response; const Headers = WebCore.Headers; const Fetch = WebCore.Fetch; const FetchEvent = WebCore.FetchEvent; -const js = @import("../../../jsc.zig").C; -const JSC = @import("../../../jsc.zig"); +const js = @import("../../jsc.zig").C; +const JSC = @import("../../jsc.zig"); const JSError = @import("../base.zig").JSError; const d = @import("../base.zig").d; const MarkedArrayBuffer = @import("../base.zig").MarkedArrayBuffer; const getAllocator = @import("../base.zig").getAllocator; -const JSValue = @import("../../../jsc.zig").JSValue; +const JSValue = @import("../../jsc.zig").JSValue; const NewClass = @import("../base.zig").NewClass; -const Microtask = @import("../../../jsc.zig").Microtask; -const JSGlobalObject = @import("../../../jsc.zig").JSGlobalObject; -const ExceptionValueRef = @import("../../../jsc.zig").ExceptionValueRef; -const JSPrivateDataPtr = @import("../../../jsc.zig").JSPrivateDataPtr; -const ZigConsoleClient = @import("../../../jsc.zig").ZigConsoleClient; -const Node = @import("../../../jsc.zig").Node; -const ZigException = @import("../../../jsc.zig").ZigException; -const ZigStackTrace = @import("../../../jsc.zig").ZigStackTrace; -const ErrorableResolvedSource = @import("../../../jsc.zig").ErrorableResolvedSource; -const ResolvedSource = @import("../../../jsc.zig").ResolvedSource; -const JSPromise = @import("../../../jsc.zig").JSPromise; -const JSInternalPromise = @import("../../../jsc.zig").JSInternalPromise; -const JSModuleLoader = @import("../../../jsc.zig").JSModuleLoader; -const JSPromiseRejectionOperation = @import("../../../jsc.zig").JSPromiseRejectionOperation; -const Exception = @import("../../../jsc.zig").Exception; -const ErrorableZigString = @import("../../../jsc.zig").ErrorableZigString; -const ZigGlobalObject = @import("../../../jsc.zig").ZigGlobalObject; -const VM = @import("../../../jsc.zig").VM; -const JSFunction = @import("../../../jsc.zig").JSFunction; +const Microtask = @import("../../jsc.zig").Microtask; +const JSGlobalObject = @import("../../jsc.zig").JSGlobalObject; +const ExceptionValueRef = @import("../../jsc.zig").ExceptionValueRef; +const JSPrivateDataPtr = @import("../../jsc.zig").JSPrivateDataPtr; +const ZigConsoleClient = @import("../../jsc.zig").ZigConsoleClient; +const Node = @import("../../jsc.zig").Node; +const ZigException = @import("../../jsc.zig").ZigException; +const ZigStackTrace = @import("../../jsc.zig").ZigStackTrace; +const ErrorableResolvedSource = @import("../../jsc.zig").ErrorableResolvedSource; +const ResolvedSource = @import("../../jsc.zig").ResolvedSource; +const JSPromise = @import("../../jsc.zig").JSPromise; +const JSInternalPromise = @import("../../jsc.zig").JSInternalPromise; +const JSModuleLoader = @import("../../jsc.zig").JSModuleLoader; +const JSPromiseRejectionOperation = @import("../../jsc.zig").JSPromiseRejectionOperation; +const Exception = @import("../../jsc.zig").Exception; +const ErrorableZigString = @import("../../jsc.zig").ErrorableZigString; +const ZigGlobalObject = @import("../../jsc.zig").ZigGlobalObject; +const VM = @import("../../jsc.zig").VM; +const JSFunction = @import("../../jsc.zig").JSFunction; const Config = @import("../config.zig"); -const URL = @import("../../../url.zig").URL; +const URL = @import("../../url.zig").URL; const Transpiler = @import("./transpiler.zig"); const VirtualMachine = @import("../javascript.zig").VirtualMachine; const IOTask = JSC.IOTask; -const zlib = @import("../../../zlib.zig"); +const zlib = @import("../../zlib.zig"); const is_bindgen = JSC.is_bindgen; const max_addressible_memory = std.math.maxInt(u56); @@ -622,7 +622,7 @@ pub fn getRouteNames( return ref; } -const Editor = @import("../../../open.zig").Editor; +const Editor = @import("../../open.zig").Editor; pub fn openInEditor( _: void, ctx: js.JSContextRef, @@ -1242,7 +1242,7 @@ pub const Class = NewClass( ); pub const Crypto = struct { - const Hashers = @import("../../../sha.zig"); + const Hashers = @import("../../sha.zig"); fn CryptoHasher(comptime Hasher: type, comptime name: [:0]const u8, cached_constructor_name: []const u8) type { return struct { @@ -2010,7 +2010,7 @@ pub const Unsafe = struct { _: js.ExceptionRef, ) js.JSValueRef { _ = ctx; - const Reporter = @import("../../../report.zig"); + const Reporter = @import("../../report.zig"); Reporter.globalError(error.SegfaultTest); } @@ -2043,7 +2043,7 @@ pub const Unsafe = struct { }; // pub const Lockfile = struct { -// const BunLockfile = @import("../../../install/install.zig").Lockfile; +// const BunLockfile = @import("../../install/install.zig").Lockfile; // lockfile: *BunLockfile, // pub const RefCountedLockfile = bun.RefCount(Lockfile, true); @@ -2151,7 +2151,7 @@ pub const Unsafe = struct { // }; pub const TOML = struct { - const TOMLParser = @import("../../../toml/toml_parser.zig").TOML; + const TOMLParser = @import("../../toml/toml_parser.zig").TOML; pub const Class = NewClass( void, .{ diff --git a/src/javascript/jsc/api/ffi.zig b/src/bun.js/api/ffi.zig similarity index 94% rename from src/javascript/jsc/api/ffi.zig rename to src/bun.js/api/ffi.zig index 864a5d889f..b4db32e4a3 100644 --- a/src/javascript/jsc/api/ffi.zig +++ b/src/bun.js/api/ffi.zig @@ -1,83 +1,83 @@ const Bun = @This(); -const default_allocator = @import("../../../global.zig").default_allocator; -const bun = @import("../../../global.zig"); +const default_allocator = @import("../../global.zig").default_allocator; +const bun = @import("../../global.zig"); const Environment = bun.Environment; const NetworkThread = @import("http").NetworkThread; const Global = bun.Global; const strings = bun.strings; const string = bun.string; -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; const std = @import("std"); const Allocator = std.mem.Allocator; -const IdentityContext = @import("../../../identity_context.zig").IdentityContext; -const Fs = @import("../../../fs.zig"); -const Resolver = @import("../../../resolver/resolver.zig"); -const ast = @import("../../../import_record.zig"); -const NodeModuleBundle = @import("../../../node_module_bundle.zig").NodeModuleBundle; -const MacroEntryPoint = @import("../../../bundler.zig").MacroEntryPoint; -const logger = @import("../../../logger.zig"); -const Api = @import("../../../api/schema.zig").Api; -const options = @import("../../../options.zig"); -const Bundler = @import("../../../bundler.zig").Bundler; -const ServerEntryPoint = @import("../../../bundler.zig").ServerEntryPoint; -const js_printer = @import("../../../js_printer.zig"); -const js_parser = @import("../../../js_parser.zig"); -const js_ast = @import("../../../js_ast.zig"); -const hash_map = @import("../../../hash_map.zig"); -const http = @import("../../../http.zig"); -const NodeFallbackModules = @import("../../../node_fallbacks.zig"); +const IdentityContext = @import("../../identity_context.zig").IdentityContext; +const Fs = @import("../../fs.zig"); +const Resolver = @import("../../resolver/resolver.zig"); +const ast = @import("../../import_record.zig"); +const NodeModuleBundle = @import("../../node_module_bundle.zig").NodeModuleBundle; +const MacroEntryPoint = @import("../../bundler.zig").MacroEntryPoint; +const logger = @import("../../logger.zig"); +const Api = @import("../../api/schema.zig").Api; +const options = @import("../../options.zig"); +const Bundler = @import("../../bundler.zig").Bundler; +const ServerEntryPoint = @import("../../bundler.zig").ServerEntryPoint; +const js_printer = @import("../../js_printer.zig"); +const js_parser = @import("../../js_parser.zig"); +const js_ast = @import("../../js_ast.zig"); +const hash_map = @import("../../hash_map.zig"); +const http = @import("../../http.zig"); +const NodeFallbackModules = @import("../../node_fallbacks.zig"); const ImportKind = ast.ImportKind; -const Analytics = @import("../../../analytics/analytics_thread.zig"); -const ZigString = @import("../../../jsc.zig").ZigString; -const Runtime = @import("../../../runtime.zig"); +const Analytics = @import("../../analytics/analytics_thread.zig"); +const ZigString = @import("../../jsc.zig").ZigString; +const Runtime = @import("../../runtime.zig"); const Router = @import("./router.zig"); const ImportRecord = ast.ImportRecord; -const DotEnv = @import("../../../env_loader.zig"); -const ParseResult = @import("../../../bundler.zig").ParseResult; -const PackageJSON = @import("../../../resolver/package_json.zig").PackageJSON; -const MacroRemap = @import("../../../resolver/package_json.zig").MacroMap; -const WebCore = @import("../../../jsc.zig").WebCore; +const DotEnv = @import("../../env_loader.zig"); +const ParseResult = @import("../../bundler.zig").ParseResult; +const PackageJSON = @import("../../resolver/package_json.zig").PackageJSON; +const MacroRemap = @import("../../resolver/package_json.zig").MacroMap; +const WebCore = @import("../../jsc.zig").WebCore; const Request = WebCore.Request; const Response = WebCore.Response; const Headers = WebCore.Headers; const Fetch = WebCore.Fetch; const FetchEvent = WebCore.FetchEvent; -const js = @import("../../../jsc.zig").C; -const JSC = @import("../../../jsc.zig"); +const js = @import("../../jsc.zig").C; +const JSC = @import("../../jsc.zig"); const JSError = @import("../base.zig").JSError; const d = @import("../base.zig").d; const MarkedArrayBuffer = @import("../base.zig").MarkedArrayBuffer; const getAllocator = @import("../base.zig").getAllocator; -const JSValue = @import("../../../jsc.zig").JSValue; +const JSValue = @import("../../jsc.zig").JSValue; const NewClass = @import("../base.zig").NewClass; -const Microtask = @import("../../../jsc.zig").Microtask; -const JSGlobalObject = @import("../../../jsc.zig").JSGlobalObject; -const ExceptionValueRef = @import("../../../jsc.zig").ExceptionValueRef; -const JSPrivateDataPtr = @import("../../../jsc.zig").JSPrivateDataPtr; -const ZigConsoleClient = @import("../../../jsc.zig").ZigConsoleClient; -const Node = @import("../../../jsc.zig").Node; -const ZigException = @import("../../../jsc.zig").ZigException; -const ZigStackTrace = @import("../../../jsc.zig").ZigStackTrace; -const ErrorableResolvedSource = @import("../../../jsc.zig").ErrorableResolvedSource; -const ResolvedSource = @import("../../../jsc.zig").ResolvedSource; -const JSPromise = @import("../../../jsc.zig").JSPromise; -const JSInternalPromise = @import("../../../jsc.zig").JSInternalPromise; -const JSModuleLoader = @import("../../../jsc.zig").JSModuleLoader; -const JSPromiseRejectionOperation = @import("../../../jsc.zig").JSPromiseRejectionOperation; -const Exception = @import("../../../jsc.zig").Exception; -const ErrorableZigString = @import("../../../jsc.zig").ErrorableZigString; -const ZigGlobalObject = @import("../../../jsc.zig").ZigGlobalObject; -const VM = @import("../../../jsc.zig").VM; -const JSFunction = @import("../../../jsc.zig").JSFunction; +const Microtask = @import("../../jsc.zig").Microtask; +const JSGlobalObject = @import("../../jsc.zig").JSGlobalObject; +const ExceptionValueRef = @import("../../jsc.zig").ExceptionValueRef; +const JSPrivateDataPtr = @import("../../jsc.zig").JSPrivateDataPtr; +const ZigConsoleClient = @import("../../jsc.zig").ZigConsoleClient; +const Node = @import("../../jsc.zig").Node; +const ZigException = @import("../../jsc.zig").ZigException; +const ZigStackTrace = @import("../../jsc.zig").ZigStackTrace; +const ErrorableResolvedSource = @import("../../jsc.zig").ErrorableResolvedSource; +const ResolvedSource = @import("../../jsc.zig").ResolvedSource; +const JSPromise = @import("../../jsc.zig").JSPromise; +const JSInternalPromise = @import("../../jsc.zig").JSInternalPromise; +const JSModuleLoader = @import("../../jsc.zig").JSModuleLoader; +const JSPromiseRejectionOperation = @import("../../jsc.zig").JSPromiseRejectionOperation; +const Exception = @import("../../jsc.zig").Exception; +const ErrorableZigString = @import("../../jsc.zig").ErrorableZigString; +const ZigGlobalObject = @import("../../jsc.zig").ZigGlobalObject; +const VM = @import("../../jsc.zig").VM; +const JSFunction = @import("../../jsc.zig").JSFunction; const Config = @import("../config.zig"); -const URL = @import("../../../url.zig").URL; +const URL = @import("../../url.zig").URL; const Transpiler = @import("./transpiler.zig"); const VirtualMachine = @import("../javascript.zig").VirtualMachine; const IOTask = JSC.IOTask; -const ComptimeStringMap = @import("../../../comptime_string_map.zig").ComptimeStringMap; +const ComptimeStringMap = @import("../../comptime_string_map.zig").ComptimeStringMap; -const TCC = @import("../../../tcc.zig"); +const TCC = @import("../../tcc.zig"); pub const FFI = struct { dylib: ?std.DynLib = null, @@ -655,7 +655,7 @@ pub const FFI = struct { env.get("USER").?, ) catch unreachable; var runtime_path = std.fs.path.join(default_allocator, &[_]string{ dir, "FFI.h" }) catch unreachable; - const file = std.fs.openFileAbsolute(runtime_path, .{}) catch @panic("Missing bun/src/javascript/jsc/api/FFI.h."); + const file = std.fs.openFileAbsolute(runtime_path, .{}) catch @panic("Missing bun/src/bun.js/api/FFI.h."); defer file.close(); return file.readToEndAlloc(default_allocator, (file.stat() catch unreachable).size) catch unreachable; } else { diff --git a/src/javascript/jsc/api/html_rewriter.zig b/src/bun.js/api/html_rewriter.zig similarity index 99% rename from src/javascript/jsc/api/html_rewriter.zig rename to src/bun.js/api/html_rewriter.zig index 302af6aace..fc91c76ad2 100644 --- a/src/javascript/jsc/api/html_rewriter.zig +++ b/src/bun.js/api/html_rewriter.zig @@ -1,21 +1,21 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const FilesystemRouter = @import("../../../router.zig"); -const http = @import("../../../http.zig"); +const Api = @import("../../api/schema.zig").Api; +const FilesystemRouter = @import("../../router.zig"); +const http = @import("../../http.zig"); const JavaScript = @import("../javascript.zig"); -const QueryStringMap = @import("../../../url.zig").QueryStringMap; -const CombinedScanner = @import("../../../url.zig").CombinedScanner; -const bun = @import("../../../global.zig"); +const QueryStringMap = @import("../../url.zig").QueryStringMap; +const CombinedScanner = @import("../../url.zig").CombinedScanner; +const bun = @import("../../global.zig"); const string = bun.string; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const js = JSC.C; const WebCore = @import("../webcore/response.zig"); const Router = @This(); -const Bundler = @import("../../../bundler.zig"); +const Bundler = @import("../../bundler.zig"); const VirtualMachine = JavaScript.VirtualMachine; const ScriptSrcStream = std.io.FixedBufferStream([]u8); const ZigString = JSC.ZigString; -const Fs = @import("../../../fs.zig"); +const Fs = @import("../../fs.zig"); const Base = @import("../base.zig"); const getAllocator = Base.getAllocator; const JSObject = JSC.JSObject; diff --git a/src/javascript/jsc/api/libtcc1.a.macos-aarch64 b/src/bun.js/api/libtcc1.a.macos-aarch64 similarity index 100% rename from src/javascript/jsc/api/libtcc1.a.macos-aarch64 rename to src/bun.js/api/libtcc1.a.macos-aarch64 diff --git a/src/javascript/jsc/api/libtcc1.c b/src/bun.js/api/libtcc1.c similarity index 100% rename from src/javascript/jsc/api/libtcc1.c rename to src/bun.js/api/libtcc1.c diff --git a/src/javascript/jsc/api/router.zig b/src/bun.js/api/router.zig similarity index 96% rename from src/javascript/jsc/api/router.zig rename to src/bun.js/api/router.zig index 8bf1ab7e0a..847e7a756a 100644 --- a/src/javascript/jsc/api/router.zig +++ b/src/bun.js/api/router.zig @@ -1,21 +1,21 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const FilesystemRouter = @import("../../../router.zig"); -const http = @import("../../../http.zig"); +const Api = @import("../../api/schema.zig").Api; +const FilesystemRouter = @import("../../router.zig"); +const http = @import("../../http.zig"); const JavaScript = @import("../javascript.zig"); -const QueryStringMap = @import("../../../url.zig").QueryStringMap; -const CombinedScanner = @import("../../../url.zig").CombinedScanner; -const bun = @import("../../../global.zig"); +const QueryStringMap = @import("../../url.zig").QueryStringMap; +const CombinedScanner = @import("../../url.zig").CombinedScanner; +const bun = @import("../../global.zig"); const string = bun.string; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const js = JSC.C; const WebCore = @import("../webcore/response.zig"); const Router = @This(); -const Bundler = @import("../../../bundler.zig"); +const Bundler = @import("../../bundler.zig"); const VirtualMachine = JavaScript.VirtualMachine; const ScriptSrcStream = std.io.FixedBufferStream([]u8); const ZigString = JSC.ZigString; -const Fs = @import("../../../fs.zig"); +const Fs = @import("../../fs.zig"); const Base = @import("../base.zig"); const getAllocator = Base.getAllocator; const JSObject = JSC.JSObject; @@ -28,8 +28,8 @@ const To = Base.To; const Request = WebCore.Request; const d = Base.d; const FetchEvent = WebCore.FetchEvent; -const URLPath = @import("../../../http/url_path.zig"); -const URL = @import("../../../url.zig").URL; +const URLPath = @import("../../http/url_path.zig"); +const URL = @import("../../url.zig").URL; route: *const FilesystemRouter.Match, route_holder: FilesystemRouter.Match = undefined, needs_deinit: bool = false, diff --git a/src/javascript/jsc/api/server.zig b/src/bun.js/api/server.zig similarity index 95% rename from src/javascript/jsc/api/server.zig rename to src/bun.js/api/server.zig index 711329a95b..cb3c4387ac 100644 --- a/src/javascript/jsc/api/server.zig +++ b/src/bun.js/api/server.zig @@ -1,77 +1,77 @@ const Bun = @This(); -const default_allocator = @import("../../../global.zig").default_allocator; -const bun = @import("../../../global.zig"); +const default_allocator = @import("../../global.zig").default_allocator; +const bun = @import("../../global.zig"); const Environment = bun.Environment; const NetworkThread = @import("http").NetworkThread; const Global = bun.Global; const strings = bun.strings; const string = bun.string; -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; const std = @import("std"); const Allocator = std.mem.Allocator; -const IdentityContext = @import("../../../identity_context.zig").IdentityContext; -const Fs = @import("../../../fs.zig"); -const Resolver = @import("../../../resolver/resolver.zig"); -const ast = @import("../../../import_record.zig"); -const NodeModuleBundle = @import("../../../node_module_bundle.zig").NodeModuleBundle; -const MacroEntryPoint = @import("../../../bundler.zig").MacroEntryPoint; -const logger = @import("../../../logger.zig"); -const Api = @import("../../../api/schema.zig").Api; -const options = @import("../../../options.zig"); -const Bundler = @import("../../../bundler.zig").Bundler; -const ServerEntryPoint = @import("../../../bundler.zig").ServerEntryPoint; -const js_printer = @import("../../../js_printer.zig"); -const js_parser = @import("../../../js_parser.zig"); -const js_ast = @import("../../../js_ast.zig"); -const hash_map = @import("../../../hash_map.zig"); -const http = @import("../../../http.zig"); -const NodeFallbackModules = @import("../../../node_fallbacks.zig"); +const IdentityContext = @import("../../identity_context.zig").IdentityContext; +const Fs = @import("../../fs.zig"); +const Resolver = @import("../../resolver/resolver.zig"); +const ast = @import("../../import_record.zig"); +const NodeModuleBundle = @import("../../node_module_bundle.zig").NodeModuleBundle; +const MacroEntryPoint = @import("../../bundler.zig").MacroEntryPoint; +const logger = @import("../../logger.zig"); +const Api = @import("../../api/schema.zig").Api; +const options = @import("../../options.zig"); +const Bundler = @import("../../bundler.zig").Bundler; +const ServerEntryPoint = @import("../../bundler.zig").ServerEntryPoint; +const js_printer = @import("../../js_printer.zig"); +const js_parser = @import("../../js_parser.zig"); +const js_ast = @import("../../js_ast.zig"); +const hash_map = @import("../../hash_map.zig"); +const http = @import("../../http.zig"); +const NodeFallbackModules = @import("../../node_fallbacks.zig"); const ImportKind = ast.ImportKind; -const Analytics = @import("../../../analytics/analytics_thread.zig"); -const ZigString = @import("../../../jsc.zig").ZigString; -const Runtime = @import("../../../runtime.zig"); +const Analytics = @import("../../analytics/analytics_thread.zig"); +const ZigString = @import("../../jsc.zig").ZigString; +const Runtime = @import("../../runtime.zig"); const Router = @import("./router.zig"); const ImportRecord = ast.ImportRecord; -const DotEnv = @import("../../../env_loader.zig"); -const ParseResult = @import("../../../bundler.zig").ParseResult; -const PackageJSON = @import("../../../resolver/package_json.zig").PackageJSON; -const MacroRemap = @import("../../../resolver/package_json.zig").MacroMap; -const WebCore = @import("../../../jsc.zig").WebCore; +const DotEnv = @import("../../env_loader.zig"); +const ParseResult = @import("../../bundler.zig").ParseResult; +const PackageJSON = @import("../../resolver/package_json.zig").PackageJSON; +const MacroRemap = @import("../../resolver/package_json.zig").MacroMap; +const WebCore = @import("../../jsc.zig").WebCore; const Request = WebCore.Request; const Response = WebCore.Response; const Headers = WebCore.Headers; const Fetch = WebCore.Fetch; const HTTP = @import("http"); const FetchEvent = WebCore.FetchEvent; -const js = @import("../../../jsc.zig").C; -const JSC = @import("../../../jsc.zig"); +const js = @import("../../jsc.zig").C; +const JSC = @import("../../jsc.zig"); const JSError = @import("../base.zig").JSError; const MarkedArrayBuffer = @import("../base.zig").MarkedArrayBuffer; const getAllocator = @import("../base.zig").getAllocator; -const JSValue = @import("../../../jsc.zig").JSValue; +const JSValue = @import("../../jsc.zig").JSValue; const NewClass = @import("../base.zig").NewClass; -const Microtask = @import("../../../jsc.zig").Microtask; -const JSGlobalObject = @import("../../../jsc.zig").JSGlobalObject; -const ExceptionValueRef = @import("../../../jsc.zig").ExceptionValueRef; -const JSPrivateDataPtr = @import("../../../jsc.zig").JSPrivateDataPtr; -const ZigConsoleClient = @import("../../../jsc.zig").ZigConsoleClient; -const Node = @import("../../../jsc.zig").Node; -const ZigException = @import("../../../jsc.zig").ZigException; -const ZigStackTrace = @import("../../../jsc.zig").ZigStackTrace; -const ErrorableResolvedSource = @import("../../../jsc.zig").ErrorableResolvedSource; -const ResolvedSource = @import("../../../jsc.zig").ResolvedSource; -const JSPromise = @import("../../../jsc.zig").JSPromise; -const JSInternalPromise = @import("../../../jsc.zig").JSInternalPromise; -const JSModuleLoader = @import("../../../jsc.zig").JSModuleLoader; -const JSPromiseRejectionOperation = @import("../../../jsc.zig").JSPromiseRejectionOperation; -const Exception = @import("../../../jsc.zig").Exception; -const ErrorableZigString = @import("../../../jsc.zig").ErrorableZigString; -const ZigGlobalObject = @import("../../../jsc.zig").ZigGlobalObject; -const VM = @import("../../../jsc.zig").VM; -const JSFunction = @import("../../../jsc.zig").JSFunction; +const Microtask = @import("../../jsc.zig").Microtask; +const JSGlobalObject = @import("../../jsc.zig").JSGlobalObject; +const ExceptionValueRef = @import("../../jsc.zig").ExceptionValueRef; +const JSPrivateDataPtr = @import("../../jsc.zig").JSPrivateDataPtr; +const ZigConsoleClient = @import("../../jsc.zig").ZigConsoleClient; +const Node = @import("../../jsc.zig").Node; +const ZigException = @import("../../jsc.zig").ZigException; +const ZigStackTrace = @import("../../jsc.zig").ZigStackTrace; +const ErrorableResolvedSource = @import("../../jsc.zig").ErrorableResolvedSource; +const ResolvedSource = @import("../../jsc.zig").ResolvedSource; +const JSPromise = @import("../../jsc.zig").JSPromise; +const JSInternalPromise = @import("../../jsc.zig").JSInternalPromise; +const JSModuleLoader = @import("../../jsc.zig").JSModuleLoader; +const JSPromiseRejectionOperation = @import("../../jsc.zig").JSPromiseRejectionOperation; +const Exception = @import("../../jsc.zig").Exception; +const ErrorableZigString = @import("../../jsc.zig").ErrorableZigString; +const ZigGlobalObject = @import("../../jsc.zig").ZigGlobalObject; +const VM = @import("../../jsc.zig").VM; +const JSFunction = @import("../../jsc.zig").JSFunction; const Config = @import("../config.zig"); -const URL = @import("../../../url.zig").URL; +const URL = @import("../../url.zig").URL; const Transpiler = @import("./transpiler.zig"); const VirtualMachine = @import("../javascript.zig").VirtualMachine; const IOTask = JSC.IOTask; @@ -81,7 +81,7 @@ const Fallback = Runtime.Fallback; const MimeType = HTTP.MimeType; const Blob = JSC.WebCore.Blob; const BoringSSL = @import("boringssl"); -const Arena = @import("../../../mimalloc_arena.zig").Arena; +const Arena = @import("../../mimalloc_arena.zig").Arena; const SendfileContext = struct { fd: i32, socket_fd: i32 = 0, diff --git a/src/javascript/jsc/api/transpiler.zig b/src/bun.js/api/transpiler.zig similarity index 97% rename from src/javascript/jsc/api/transpiler.zig rename to src/bun.js/api/transpiler.zig index 69732c643c..6d3f3f6fd5 100644 --- a/src/javascript/jsc/api/transpiler.zig +++ b/src/bun.js/api/transpiler.zig @@ -1,21 +1,21 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const FilesystemRouter = @import("../../../router.zig"); -const http = @import("../../../http.zig"); +const Api = @import("../../api/schema.zig").Api; +const FilesystemRouter = @import("../../router.zig"); +const http = @import("../../http.zig"); const JavaScript = @import("../javascript.zig"); -const QueryStringMap = @import("../../../url.zig").QueryStringMap; -const CombinedScanner = @import("../../../url.zig").CombinedScanner; -const bun = @import("../../../global.zig"); +const QueryStringMap = @import("../../url.zig").QueryStringMap; +const CombinedScanner = @import("../../url.zig").CombinedScanner; +const bun = @import("../../global.zig"); const string = bun.string; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const js = JSC.C; const WebCore = @import("../webcore/response.zig"); -const Bundler = @import("../../../bundler.zig"); -const options = @import("../../../options.zig"); +const Bundler = @import("../../bundler.zig"); +const options = @import("../../options.zig"); const VirtualMachine = JavaScript.VirtualMachine; const ScriptSrcStream = std.io.FixedBufferStream([]u8); const ZigString = JSC.ZigString; -const Fs = @import("../../../fs.zig"); +const Fs = @import("../../fs.zig"); const Base = @import("../base.zig"); const getAllocator = Base.getAllocator; const JSObject = JSC.JSObject; @@ -28,20 +28,20 @@ const To = Base.To; const Request = WebCore.Request; const d = Base.d; const FetchEvent = WebCore.FetchEvent; -const MacroMap = @import("../../../resolver/package_json.zig").MacroMap; -const TSConfigJSON = @import("../../../resolver/tsconfig_json.zig").TSConfigJSON; -const PackageJSON = @import("../../../resolver/package_json.zig").PackageJSON; -const logger = @import("../../../logger.zig"); +const MacroMap = @import("../../resolver/package_json.zig").MacroMap; +const TSConfigJSON = @import("../../resolver/tsconfig_json.zig").TSConfigJSON; +const PackageJSON = @import("../../resolver/package_json.zig").PackageJSON; +const logger = @import("../../logger.zig"); const Loader = options.Loader; const Platform = options.Platform; -const JSAst = @import("../../../js_ast.zig"); +const JSAst = @import("../../js_ast.zig"); const Transpiler = @This(); -const JSParser = @import("../../../js_parser.zig"); -const JSPrinter = @import("../../../js_printer.zig"); +const JSParser = @import("../../js_parser.zig"); +const JSPrinter = @import("../../js_printer.zig"); const ScanPassResult = JSParser.ScanPassResult; -const Mimalloc = @import("../../../mimalloc_arena.zig"); -const Runtime = @import("../../../runtime.zig").Runtime; -const JSLexer = @import("../../../js_lexer.zig"); +const Mimalloc = @import("../../mimalloc_arena.zig"); +const Runtime = @import("../../runtime.zig").Runtime; +const JSLexer = @import("../../js_lexer.zig"); const Expr = JSAst.Expr; bundler: Bundler.Bundler, @@ -1167,7 +1167,7 @@ fn namedExportsToJS(global: *JSGlobalObject, named_exports: JSAst.Ast.NamedExpor return JSC.JSValue.createStringArray(global, names.ptr, names.len, true); } -const ImportRecord = @import("../../../import_record.zig").ImportRecord; +const ImportRecord = @import("../../import_record.zig").ImportRecord; fn namedImportsToJS( global: *JSGlobalObject, diff --git a/src/javascript/jsc/base.zig b/src/bun.js/base.zig similarity index 99% rename from src/javascript/jsc/base.zig rename to src/bun.js/base.zig index eaf15bebab..1271deb19b 100644 --- a/src/javascript/jsc/base.zig +++ b/src/bun.js/base.zig @@ -1,6 +1,6 @@ -pub const js = @import("../../jsc.zig").C; +pub const js = @import("../jsc.zig").C; const std = @import("std"); -const bun = @import("../../global.zig"); +const bun = @import("../global.zig"); const string = bun.string; const Output = bun.Output; const Global = bun.Global; @@ -13,7 +13,7 @@ const C = bun.C; const JavaScript = @import("./javascript.zig"); const ResolveError = JavaScript.ResolveError; const BuildError = JavaScript.BuildError; -const JSC = @import("../../jsc.zig"); +const JSC = @import("../jsc.zig"); const WebCore = @import("./webcore.zig"); const Test = @import("./test/jest.zig"); const Fetch = WebCore.Fetch; @@ -21,10 +21,10 @@ const Response = WebCore.Response; const Request = WebCore.Request; const Router = @import("./api/router.zig"); const FetchEvent = WebCore.FetchEvent; -const IdentityContext = @import("../../identity_context.zig").IdentityContext; +const IdentityContext = @import("../identity_context.zig").IdentityContext; const Body = WebCore.Body; -const TaggedPointerTypes = @import("../../tagged_pointer.zig"); +const TaggedPointerTypes = @import("../tagged_pointer.zig"); const TaggedPointerUnion = TaggedPointerTypes.TaggedPointerUnion; pub const ExceptionValueRef = [*c]js.JSValueRef; @@ -2564,7 +2564,7 @@ pub export fn ExternalBuffer_deallocator(bytes_: *anyopaque, ctx: *anyopaque) ca } pub export fn MarkedArrayBuffer_deallocator(bytes_: *anyopaque, _: *anyopaque) void { - const mimalloc = @import("../../allocators/mimalloc.zig"); + const mimalloc = @import("../allocators/mimalloc.zig"); // zig's memory allocator interface won't work here // mimalloc knows the size of things // but we don't @@ -2583,9 +2583,9 @@ pub fn castObj(obj: js.JSObjectRef, comptime Type: type) *Type { return JSPrivateDataPtr.from(js.JSObjectGetPrivate(obj)).as(Type); } -const JSNode = @import("../../js_ast.zig").Macro.JSNode; -const LazyPropertiesObject = @import("../../js_ast.zig").Macro.LazyPropertiesObject; -const ModuleNamespace = @import("../../js_ast.zig").Macro.ModuleNamespace; +const JSNode = @import("../js_ast.zig").Macro.JSNode; +const LazyPropertiesObject = @import("../js_ast.zig").Macro.LazyPropertiesObject; +const ModuleNamespace = @import("../js_ast.zig").Macro.ModuleNamespace; const FetchTaskletContext = Fetch.FetchTasklet.FetchTaskletContext; const Expect = Test.Expect; const DescribeScope = Test.DescribeScope; diff --git a/src/javascript/jsc/bindings/.clang-format b/src/bun.js/bindings/.clang-format similarity index 100% rename from src/javascript/jsc/bindings/.clang-format rename to src/bun.js/bindings/.clang-format diff --git a/src/javascript/jsc/bindings/ActiveDOMCallback.cpp b/src/bun.js/bindings/ActiveDOMCallback.cpp similarity index 100% rename from src/javascript/jsc/bindings/ActiveDOMCallback.cpp rename to src/bun.js/bindings/ActiveDOMCallback.cpp diff --git a/src/javascript/jsc/bindings/ActiveDOMCallback.h b/src/bun.js/bindings/ActiveDOMCallback.h similarity index 100% rename from src/javascript/jsc/bindings/ActiveDOMCallback.h rename to src/bun.js/bindings/ActiveDOMCallback.h diff --git a/src/javascript/jsc/bindings/Buffer.cpp b/src/bun.js/bindings/Buffer.cpp similarity index 100% rename from src/javascript/jsc/bindings/Buffer.cpp rename to src/bun.js/bindings/Buffer.cpp diff --git a/src/javascript/jsc/bindings/Buffer.h b/src/bun.js/bindings/Buffer.h similarity index 100% rename from src/javascript/jsc/bindings/Buffer.h rename to src/bun.js/bindings/Buffer.h diff --git a/src/javascript/jsc/bindings/BufferEncodingType.h b/src/bun.js/bindings/BufferEncodingType.h similarity index 100% rename from src/javascript/jsc/bindings/BufferEncodingType.h rename to src/bun.js/bindings/BufferEncodingType.h diff --git a/src/javascript/jsc/bindings/BunClientData.cpp b/src/bun.js/bindings/BunClientData.cpp similarity index 100% rename from src/javascript/jsc/bindings/BunClientData.cpp rename to src/bun.js/bindings/BunClientData.cpp diff --git a/src/javascript/jsc/bindings/BunClientData.h b/src/bun.js/bindings/BunClientData.h similarity index 100% rename from src/javascript/jsc/bindings/BunClientData.h rename to src/bun.js/bindings/BunClientData.h diff --git a/src/javascript/jsc/bindings/BunGCOutputConstraint.cpp b/src/bun.js/bindings/BunGCOutputConstraint.cpp similarity index 100% rename from src/javascript/jsc/bindings/BunGCOutputConstraint.cpp rename to src/bun.js/bindings/BunGCOutputConstraint.cpp diff --git a/src/javascript/jsc/bindings/BunGCOutputConstraint.h b/src/bun.js/bindings/BunGCOutputConstraint.h similarity index 100% rename from src/javascript/jsc/bindings/BunGCOutputConstraint.h rename to src/bun.js/bindings/BunGCOutputConstraint.h diff --git a/src/javascript/jsc/bindings/BunJSCModule.cpp b/src/bun.js/bindings/BunJSCModule.cpp similarity index 100% rename from src/javascript/jsc/bindings/BunJSCModule.cpp rename to src/bun.js/bindings/BunJSCModule.cpp diff --git a/src/javascript/jsc/bindings/BunJSCModule.h b/src/bun.js/bindings/BunJSCModule.h similarity index 100% rename from src/javascript/jsc/bindings/BunJSCModule.h rename to src/bun.js/bindings/BunJSCModule.h diff --git a/src/javascript/jsc/bindings/BunStream.cpp b/src/bun.js/bindings/BunStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/BunStream.cpp rename to src/bun.js/bindings/BunStream.cpp diff --git a/src/javascript/jsc/bindings/BunStream.h b/src/bun.js/bindings/BunStream.h similarity index 100% rename from src/javascript/jsc/bindings/BunStream.h rename to src/bun.js/bindings/BunStream.h diff --git a/src/javascript/jsc/bindings/CachedScript.h b/src/bun.js/bindings/CachedScript.h similarity index 100% rename from src/javascript/jsc/bindings/CachedScript.h rename to src/bun.js/bindings/CachedScript.h diff --git a/src/javascript/jsc/bindings/DOMException.cpp b/src/bun.js/bindings/DOMException.cpp similarity index 100% rename from src/javascript/jsc/bindings/DOMException.cpp rename to src/bun.js/bindings/DOMException.cpp diff --git a/src/javascript/jsc/bindings/DOMException.h b/src/bun.js/bindings/DOMException.h similarity index 100% rename from src/javascript/jsc/bindings/DOMException.h rename to src/bun.js/bindings/DOMException.h diff --git a/src/javascript/jsc/bindings/DOMURL.cpp b/src/bun.js/bindings/DOMURL.cpp similarity index 100% rename from src/javascript/jsc/bindings/DOMURL.cpp rename to src/bun.js/bindings/DOMURL.cpp diff --git a/src/javascript/jsc/bindings/DOMURL.h b/src/bun.js/bindings/DOMURL.h similarity index 100% rename from src/javascript/jsc/bindings/DOMURL.h rename to src/bun.js/bindings/DOMURL.h diff --git a/src/javascript/jsc/bindings/DOMWrapperWorld-class.h b/src/bun.js/bindings/DOMWrapperWorld-class.h similarity index 100% rename from src/javascript/jsc/bindings/DOMWrapperWorld-class.h rename to src/bun.js/bindings/DOMWrapperWorld-class.h diff --git a/src/javascript/jsc/bindings/DOMWrapperWorld.cpp b/src/bun.js/bindings/DOMWrapperWorld.cpp similarity index 100% rename from src/javascript/jsc/bindings/DOMWrapperWorld.cpp rename to src/bun.js/bindings/DOMWrapperWorld.cpp diff --git a/src/javascript/jsc/bindings/DOMWrapperWorld.h b/src/bun.js/bindings/DOMWrapperWorld.h similarity index 100% rename from src/javascript/jsc/bindings/DOMWrapperWorld.h rename to src/bun.js/bindings/DOMWrapperWorld.h diff --git a/src/javascript/jsc/bindings/Exception.h b/src/bun.js/bindings/Exception.h similarity index 100% rename from src/javascript/jsc/bindings/Exception.h rename to src/bun.js/bindings/Exception.h diff --git a/src/javascript/jsc/bindings/ExceptionCode.h b/src/bun.js/bindings/ExceptionCode.h similarity index 100% rename from src/javascript/jsc/bindings/ExceptionCode.h rename to src/bun.js/bindings/ExceptionCode.h diff --git a/src/javascript/jsc/bindings/ExceptionOr.h b/src/bun.js/bindings/ExceptionOr.h similarity index 100% rename from src/javascript/jsc/bindings/ExceptionOr.h rename to src/bun.js/bindings/ExceptionOr.h diff --git a/src/javascript/jsc/bindings/FFI.zig b/src/bun.js/bindings/FFI.zig similarity index 99% rename from src/javascript/jsc/bindings/FFI.zig rename to src/bun.js/bindings/FFI.zig index 5a4a618626..433772f81e 100644 --- a/src/javascript/jsc/bindings/FFI.zig +++ b/src/bun.js/bindings/FFI.zig @@ -144,7 +144,7 @@ pub const __nonnull = @compileError("unable to translate macro: undefined identi pub const __null_unspecified = @compileError("unable to translate macro: undefined identifier `_Null_unspecified`"); // (no file):323:9 pub const __nullable = @compileError("unable to translate macro: undefined identifier `_Nullable`"); // (no file):324:9 pub const __weak = @compileError("unable to translate macro: undefined identifier `__attribute__`"); // (no file):382:9 -pub const LOAD_ARGUMENTS_FROM_CALL_FRAME = @compileError("unable to translate macro: undefined identifier `argsPtr`"); // /Users/jarred/Code/bun/src/javascript/jsc/api/FFI.h:95:9 +pub const LOAD_ARGUMENTS_FROM_CALL_FRAME = @compileError("unable to translate macro: undefined identifier `argsPtr`"); // /Users/jarred/Code/bun/src/bun.js/api/FFI.h:95:9 pub const __llvm__ = @as(c_int, 1); pub const __clang__ = @as(c_int, 1); pub const __clang_major__ = @as(c_int, 13); diff --git a/src/javascript/jsc/bindings/GCDefferalContext.h b/src/bun.js/bindings/GCDefferalContext.h similarity index 100% rename from src/javascript/jsc/bindings/GCDefferalContext.h rename to src/bun.js/bindings/GCDefferalContext.h diff --git a/src/javascript/jsc/bindings/IDLTypes.h b/src/bun.js/bindings/IDLTypes.h similarity index 100% rename from src/javascript/jsc/bindings/IDLTypes.h rename to src/bun.js/bindings/IDLTypes.h diff --git a/src/javascript/jsc/bindings/JSBuffer.cpp b/src/bun.js/bindings/JSBuffer.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSBuffer.cpp rename to src/bun.js/bindings/JSBuffer.cpp diff --git a/src/javascript/jsc/bindings/JSBuffer.h b/src/bun.js/bindings/JSBuffer.h similarity index 100% rename from src/javascript/jsc/bindings/JSBuffer.h rename to src/bun.js/bindings/JSBuffer.h diff --git a/src/javascript/jsc/bindings/JSBufferEncodingType.cpp b/src/bun.js/bindings/JSBufferEncodingType.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSBufferEncodingType.cpp rename to src/bun.js/bindings/JSBufferEncodingType.cpp diff --git a/src/javascript/jsc/bindings/JSBufferEncodingType.h b/src/bun.js/bindings/JSBufferEncodingType.h similarity index 100% rename from src/javascript/jsc/bindings/JSBufferEncodingType.h rename to src/bun.js/bindings/JSBufferEncodingType.h diff --git a/src/javascript/jsc/bindings/JSCInlines.h b/src/bun.js/bindings/JSCInlines.h similarity index 100% rename from src/javascript/jsc/bindings/JSCInlines.h rename to src/bun.js/bindings/JSCInlines.h diff --git a/src/javascript/jsc/bindings/JSDOMBinding.h b/src/bun.js/bindings/JSDOMBinding.h similarity index 100% rename from src/javascript/jsc/bindings/JSDOMBinding.h rename to src/bun.js/bindings/JSDOMBinding.h diff --git a/src/javascript/jsc/bindings/JSDOMConvertBufferSource+JSBuffer.h b/src/bun.js/bindings/JSDOMConvertBufferSource+JSBuffer.h similarity index 100% rename from src/javascript/jsc/bindings/JSDOMConvertBufferSource+JSBuffer.h rename to src/bun.js/bindings/JSDOMConvertBufferSource+JSBuffer.h diff --git a/src/javascript/jsc/bindings/JSDOMExceptionHandling.cpp b/src/bun.js/bindings/JSDOMExceptionHandling.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSDOMExceptionHandling.cpp rename to src/bun.js/bindings/JSDOMExceptionHandling.cpp diff --git a/src/javascript/jsc/bindings/JSDOMExceptionHandling.h b/src/bun.js/bindings/JSDOMExceptionHandling.h similarity index 100% rename from src/javascript/jsc/bindings/JSDOMExceptionHandling.h rename to src/bun.js/bindings/JSDOMExceptionHandling.h diff --git a/src/javascript/jsc/bindings/JSDOMGlobalObject.cpp b/src/bun.js/bindings/JSDOMGlobalObject.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSDOMGlobalObject.cpp rename to src/bun.js/bindings/JSDOMGlobalObject.cpp diff --git a/src/javascript/jsc/bindings/JSDOMGlobalObject.h b/src/bun.js/bindings/JSDOMGlobalObject.h similarity index 100% rename from src/javascript/jsc/bindings/JSDOMGlobalObject.h rename to src/bun.js/bindings/JSDOMGlobalObject.h diff --git a/src/javascript/jsc/bindings/JSDOMWrapper.cpp b/src/bun.js/bindings/JSDOMWrapper.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSDOMWrapper.cpp rename to src/bun.js/bindings/JSDOMWrapper.cpp diff --git a/src/javascript/jsc/bindings/JSDOMWrapper.h b/src/bun.js/bindings/JSDOMWrapper.h similarity index 100% rename from src/javascript/jsc/bindings/JSDOMWrapper.h rename to src/bun.js/bindings/JSDOMWrapper.h diff --git a/src/javascript/jsc/bindings/JSDOMWrapperCache.cpp b/src/bun.js/bindings/JSDOMWrapperCache.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSDOMWrapperCache.cpp rename to src/bun.js/bindings/JSDOMWrapperCache.cpp diff --git a/src/javascript/jsc/bindings/JSDOMWrapperCache.h b/src/bun.js/bindings/JSDOMWrapperCache.h similarity index 100% rename from src/javascript/jsc/bindings/JSDOMWrapperCache.h rename to src/bun.js/bindings/JSDOMWrapperCache.h diff --git a/src/javascript/jsc/bindings/JSFFIFunction.cpp b/src/bun.js/bindings/JSFFIFunction.cpp similarity index 100% rename from src/javascript/jsc/bindings/JSFFIFunction.cpp rename to src/bun.js/bindings/JSFFIFunction.cpp diff --git a/src/javascript/jsc/bindings/JSFFIFunction.h b/src/bun.js/bindings/JSFFIFunction.h similarity index 100% rename from src/javascript/jsc/bindings/JSFFIFunction.h rename to src/bun.js/bindings/JSFFIFunction.h diff --git a/src/javascript/jsc/bindings/JSSink+custom.h b/src/bun.js/bindings/JSSink+custom.h similarity index 100% rename from src/javascript/jsc/bindings/JSSink+custom.h rename to src/bun.js/bindings/JSSink+custom.h diff --git a/src/javascript/jsc/bindings/JSSink.cpp b/src/bun.js/bindings/JSSink.cpp similarity index 99% rename from src/javascript/jsc/bindings/JSSink.cpp rename to src/bun.js/bindings/JSSink.cpp index 60227464c6..3c0d03174c 100644 --- a/src/javascript/jsc/bindings/JSSink.cpp +++ b/src/bun.js/bindings/JSSink.cpp @@ -1,9 +1,9 @@ // AUTO-GENERATED FILE. DO NOT EDIT. -// Generated by /Users/jarred/Code/bun/src/javascript/jsc/generate-jssink.js at 2022-06-15T10:28:21.211Z +// Generated by /Users/jarred/Code/bun/src/bun.js/generate-jssink.js at 2022-06-15T10:28:21.211Z // To regenerate this file, run: // -// bun src/javascript/jsc/generate-jssink.js +// bun src/bun.js/generate-jssink.js // #include "root.h" #include "JSSink.h" diff --git a/src/bun.js/bindings/JSSink.h b/src/bun.js/bindings/JSSink.h new file mode 100644 index 0000000000..4aa522699e --- /dev/null +++ b/src/bun.js/bindings/JSSink.h @@ -0,0 +1,165 @@ + +// AUTO-GENERATED FILE. DO NOT EDIT. +// Generated by /Users/jarred/Code/bun/src/bun.js/generate-jssink.js at 2022-06-15T10:28:21.209Z +// +#pragma once + +#include "root.h" + +#include "JSDOMWrapper.h" +#include "wtf/NeverDestroyed.h" + +#include "Sink.h" + +extern "C" bool JSSink_isSink(JSC::JSGlobalObject*, JSC::EncodedJSValue); + +namespace WebCore { +using namespace JSC; + +JSC_DECLARE_HOST_FUNCTION(functionStartDirectStream); +class JSArrayBufferSinkConstructor final : public JSC::InternalFunction { +public: + using Base = JSC::InternalFunction; + static JSArrayBufferSinkConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSC::JSObject* prototype); + static constexpr SinkID Sink = SinkID::ArrayBufferSink; + + static constexpr unsigned StructureFlags = Base::StructureFlags; + static constexpr bool needsDestruction = false; + + DECLARE_EXPORT_INFO; + template static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) + { + if constexpr (mode == JSC::SubspaceAccess::Concurrently) + return nullptr; + return WebCore::subspaceForImpl( + vm, + [](auto& spaces) { return spaces.m_clientSubspaceForJSSinkConstructor.get(); }, + [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForJSSinkConstructor = WTFMove(space); }, + [](auto& spaces) { return spaces.m_subspaceForJSSinkConstructor.get(); }, + [](auto& spaces, auto&& space) { spaces.m_subspaceForJSSinkConstructor = WTFMove(space); }); + } + + static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) + { + return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); + } + void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSObject* prototype); + + // Must be defined for each specialization class. + static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); + +private: + JSArrayBufferSinkConstructor(JSC::VM& vm, JSC::Structure* structure, JSC::NativeFunction nativeFunction) + : Base(vm, structure, nativeFunction, nativeFunction) + + { + } + + void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSC::JSObject* prototype); +}; + +class JSArrayBufferSink final : public JSC::JSDestructibleObject { +public: + using Base = JSC::JSDestructibleObject; + static JSArrayBufferSink* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* sinkPtr); + static constexpr SinkID Sink = SinkID::ArrayBufferSink; + + DECLARE_EXPORT_INFO; + template static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) + { + if constexpr (mode == JSC::SubspaceAccess::Concurrently) + return nullptr; + return WebCore::subspaceForImpl( + vm, + [](auto& spaces) { return spaces.m_clientSubspaceForJSSink.get(); }, + [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForJSSink = WTFMove(space); }, + [](auto& spaces) { return spaces.m_subspaceForJSSink.get(); }, + [](auto& spaces, auto&& space) { spaces.m_subspaceForJSSink = WTFMove(space); }); + } + + static void destroy(JSC::JSCell*); + static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) + { + return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); + } + + ~JSArrayBufferSink(); + + void* wrapped() const { return m_sinkPtr; } + + void detach() + { + m_sinkPtr = nullptr; + } + + static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); + + void* m_sinkPtr; + + JSArrayBufferSink(JSC::VM& vm, JSC::Structure* structure, void* sinkPtr) + : Base(vm, structure) + { + m_sinkPtr = sinkPtr; + } + + void finishCreation(JSC::VM&); +}; + +class JSReadableArrayBufferSinkController final : public JSC::JSDestructibleObject { +public: + using Base = JSC::JSDestructibleObject; + static JSReadableArrayBufferSinkController* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* sinkPtr); + static constexpr SinkID Sink = SinkID::ArrayBufferSink; + + DECLARE_EXPORT_INFO; + template static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) + { + if constexpr (mode == JSC::SubspaceAccess::Concurrently) + return nullptr; + return WebCore::subspaceForImpl( + vm, + [](auto& spaces) { return spaces.m_clientSubspaceForJSSinkController.get(); }, + [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForJSSinkController = WTFMove(space); }, + [](auto& spaces) { return spaces.m_subspaceForJSSinkController.get(); }, + [](auto& spaces, auto&& space) { spaces.m_subspaceForJSSinkController = WTFMove(space); }); + } + + static void destroy(JSC::JSCell*); + static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) + { + return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); + } + + ~JSReadableArrayBufferSinkController(); + + void* wrapped() const { return m_sinkPtr; } + void detach() + { + m_sinkPtr = nullptr; + } + + void start(JSC::JSGlobalObject* globalObject, JSC::JSValue readableStream, JSC::JSFunction* onPull, JSC::JSFunction* onClose); + DECLARE_VISIT_CHILDREN; + + static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); + + void* m_sinkPtr; + mutable WriteBarrier m_onPull; + mutable WriteBarrier m_onClose; + mutable JSC::Weak m_weakReadableStream; + + JSReadableArrayBufferSinkController(JSC::VM& vm, JSC::Structure* structure, void* sinkPtr) + : Base(vm, structure) + { + m_sinkPtr = sinkPtr; + } + + void finishCreation(JSC::VM&); +}; + +JSC_DECLARE_CUSTOM_GETTER(functionArrayBufferSink__getter); + +JSObject* createJSSinkPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, WebCore::SinkID sinkID); +JSObject* createJSSinkControllerPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, WebCore::SinkID sinkID); + +} // namespace WebCore diff --git a/src/javascript/jsc/bindings/MarkingConstraint.cpp b/src/bun.js/bindings/MarkingConstraint.cpp similarity index 100% rename from src/javascript/jsc/bindings/MarkingConstraint.cpp rename to src/bun.js/bindings/MarkingConstraint.cpp diff --git a/src/javascript/jsc/bindings/NodeConstants.h b/src/bun.js/bindings/NodeConstants.h similarity index 100% rename from src/javascript/jsc/bindings/NodeConstants.h rename to src/bun.js/bindings/NodeConstants.h diff --git a/src/javascript/jsc/bindings/Path.cpp b/src/bun.js/bindings/Path.cpp similarity index 100% rename from src/javascript/jsc/bindings/Path.cpp rename to src/bun.js/bindings/Path.cpp diff --git a/src/javascript/jsc/bindings/Path.h b/src/bun.js/bindings/Path.h similarity index 100% rename from src/javascript/jsc/bindings/Path.h rename to src/bun.js/bindings/Path.h diff --git a/src/javascript/jsc/bindings/Process.cpp b/src/bun.js/bindings/Process.cpp similarity index 100% rename from src/javascript/jsc/bindings/Process.cpp rename to src/bun.js/bindings/Process.cpp diff --git a/src/javascript/jsc/bindings/Process.h b/src/bun.js/bindings/Process.h similarity index 100% rename from src/javascript/jsc/bindings/Process.h rename to src/bun.js/bindings/Process.h diff --git a/src/javascript/jsc/bindings/ScriptExecutionContext.cpp b/src/bun.js/bindings/ScriptExecutionContext.cpp similarity index 100% rename from src/javascript/jsc/bindings/ScriptExecutionContext.cpp rename to src/bun.js/bindings/ScriptExecutionContext.cpp diff --git a/src/javascript/jsc/bindings/ScriptExecutionContext.h b/src/bun.js/bindings/ScriptExecutionContext.h similarity index 100% rename from src/javascript/jsc/bindings/ScriptExecutionContext.h rename to src/bun.js/bindings/ScriptExecutionContext.h diff --git a/src/javascript/jsc/bindings/Sink.h b/src/bun.js/bindings/Sink.h similarity index 100% rename from src/javascript/jsc/bindings/Sink.h rename to src/bun.js/bindings/Sink.h diff --git a/src/javascript/jsc/bindings/StreamGlobals.h b/src/bun.js/bindings/StreamGlobals.h similarity index 100% rename from src/javascript/jsc/bindings/StreamGlobals.h rename to src/bun.js/bindings/StreamGlobals.h diff --git a/src/javascript/jsc/bindings/StringAdaptors.h b/src/bun.js/bindings/StringAdaptors.h similarity index 100% rename from src/javascript/jsc/bindings/StringAdaptors.h rename to src/bun.js/bindings/StringAdaptors.h diff --git a/src/javascript/jsc/bindings/URLDecomposition.cpp b/src/bun.js/bindings/URLDecomposition.cpp similarity index 100% rename from src/javascript/jsc/bindings/URLDecomposition.cpp rename to src/bun.js/bindings/URLDecomposition.cpp diff --git a/src/javascript/jsc/bindings/URLDecomposition.h b/src/bun.js/bindings/URLDecomposition.h similarity index 100% rename from src/javascript/jsc/bindings/URLDecomposition.h rename to src/bun.js/bindings/URLDecomposition.h diff --git a/src/javascript/jsc/bindings/URLSearchParams.cpp b/src/bun.js/bindings/URLSearchParams.cpp similarity index 100% rename from src/javascript/jsc/bindings/URLSearchParams.cpp rename to src/bun.js/bindings/URLSearchParams.cpp diff --git a/src/javascript/jsc/bindings/URLSearchParams.h b/src/bun.js/bindings/URLSearchParams.h similarity index 100% rename from src/javascript/jsc/bindings/URLSearchParams.h rename to src/bun.js/bindings/URLSearchParams.h diff --git a/src/javascript/jsc/bindings/ZigConsoleClient.cpp b/src/bun.js/bindings/ZigConsoleClient.cpp similarity index 100% rename from src/javascript/jsc/bindings/ZigConsoleClient.cpp rename to src/bun.js/bindings/ZigConsoleClient.cpp diff --git a/src/javascript/jsc/bindings/ZigConsoleClient.h b/src/bun.js/bindings/ZigConsoleClient.h similarity index 100% rename from src/javascript/jsc/bindings/ZigConsoleClient.h rename to src/bun.js/bindings/ZigConsoleClient.h diff --git a/src/javascript/jsc/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp similarity index 100% rename from src/javascript/jsc/bindings/ZigGlobalObject.cpp rename to src/bun.js/bindings/ZigGlobalObject.cpp diff --git a/src/javascript/jsc/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h similarity index 100% rename from src/javascript/jsc/bindings/ZigGlobalObject.h rename to src/bun.js/bindings/ZigGlobalObject.h diff --git a/src/bun.js/bindings/ZigLazyStaticFunctions-inlines.h b/src/bun.js/bindings/ZigLazyStaticFunctions-inlines.h new file mode 100644 index 0000000000..ebef57b4a1 --- /dev/null +++ b/src/bun.js/bindings/ZigLazyStaticFunctions-inlines.h @@ -0,0 +1,143 @@ +// GENERATED FILE +#pragma once + +namespace Zig { + + template + void LazyStaticFunctions::visit(Visitor& visitor) { + this->m_Bun__HTTPRequestContext__reject.visit(visitor); + this->m_Bun__HTTPRequestContext__resolve.visit(visitor); + this->m_Bun__HTTPRequestContextTLS__reject.visit(visitor); + this->m_Bun__HTTPRequestContextTLS__resolve.visit(visitor); + this->m_Bun__HTTPRequestContextDebug__reject.visit(visitor); + this->m_Bun__HTTPRequestContextDebug__resolve.visit(visitor); + this->m_Bun__HTTPRequestContextDebugTLS__reject.visit(visitor); + this->m_Bun__HTTPRequestContextDebugTLS__resolve.visit(visitor); + + } + + void LazyStaticFunctions::init(Zig::GlobalObject *globalObject) { + + m_Bun__HTTPRequestContext__reject.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("reject"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContext__reject, + JSC::NoIntrinsic, + Bun__HTTPRequestContext__reject + ); + init.set(function); + }); + + m_Bun__HTTPRequestContext__resolve.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("resolve"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContext__resolve, + JSC::NoIntrinsic, + Bun__HTTPRequestContext__resolve + ); + init.set(function); + }); + + m_Bun__HTTPRequestContextTLS__reject.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("reject"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContextTLS__reject, + JSC::NoIntrinsic, + Bun__HTTPRequestContextTLS__reject + ); + init.set(function); + }); + + m_Bun__HTTPRequestContextTLS__resolve.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("resolve"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContextTLS__resolve, + JSC::NoIntrinsic, + Bun__HTTPRequestContextTLS__resolve + ); + init.set(function); + }); + + m_Bun__HTTPRequestContextDebug__reject.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("reject"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContextDebug__reject, + JSC::NoIntrinsic, + Bun__HTTPRequestContextDebug__reject + ); + init.set(function); + }); + + m_Bun__HTTPRequestContextDebug__resolve.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("resolve"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContextDebug__resolve, + JSC::NoIntrinsic, + Bun__HTTPRequestContextDebug__resolve + ); + init.set(function); + }); + + m_Bun__HTTPRequestContextDebugTLS__reject.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("reject"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContextDebugTLS__reject, + JSC::NoIntrinsic, + Bun__HTTPRequestContextDebugTLS__reject + ); + init.set(function); + }); + + m_Bun__HTTPRequestContextDebugTLS__resolve.initLater( + [](const JSC::LazyProperty::Initializer& init) { + WTF::String functionName = WTF::String("resolve"_s); + Zig::JSFFIFunction* function = Zig::JSFFIFunction::create( + init.vm, + init.owner, + 1, + functionName, + Bun__HTTPRequestContextDebugTLS__resolve, + JSC::NoIntrinsic, + Bun__HTTPRequestContextDebugTLS__resolve + ); + init.set(function); + }); + + } + +} // namespace Zig diff --git a/src/bun.js/bindings/ZigLazyStaticFunctions.h b/src/bun.js/bindings/ZigLazyStaticFunctions.h new file mode 100644 index 0000000000..f262d6ce05 --- /dev/null +++ b/src/bun.js/bindings/ZigLazyStaticFunctions.h @@ -0,0 +1,51 @@ +// GENERATED FILE +#pragma once +#include "root.h" + +namespace Zig { + class GlobalObject; + class JSFFIFunction; + + class LazyStaticFunctions { + public: + + void init(Zig::GlobalObject* globalObject); + + template + void visit(Visitor& visitor); + + + /* -- BEGIN FUNCTION DEFINITIONS -- */ + +#pragma mark HTTPRequestContext + + JSC::LazyProperty m_Bun__HTTPRequestContext__reject; + Zig::JSFFIFunction* get__Bun__HTTPRequestContext__reject(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContext__reject.getInitializedOnMainThread(globalObject); } + JSC::LazyProperty m_Bun__HTTPRequestContext__resolve; + Zig::JSFFIFunction* get__Bun__HTTPRequestContext__resolve(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContext__resolve.getInitializedOnMainThread(globalObject); } + +#pragma mark HTTPRequestContextTLS + + JSC::LazyProperty m_Bun__HTTPRequestContextTLS__reject; + Zig::JSFFIFunction* get__Bun__HTTPRequestContextTLS__reject(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContextTLS__reject.getInitializedOnMainThread(globalObject); } + JSC::LazyProperty m_Bun__HTTPRequestContextTLS__resolve; + Zig::JSFFIFunction* get__Bun__HTTPRequestContextTLS__resolve(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContextTLS__resolve.getInitializedOnMainThread(globalObject); } + +#pragma mark HTTPRequestContextDebug + + JSC::LazyProperty m_Bun__HTTPRequestContextDebug__reject; + Zig::JSFFIFunction* get__Bun__HTTPRequestContextDebug__reject(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContextDebug__reject.getInitializedOnMainThread(globalObject); } + JSC::LazyProperty m_Bun__HTTPRequestContextDebug__resolve; + Zig::JSFFIFunction* get__Bun__HTTPRequestContextDebug__resolve(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContextDebug__resolve.getInitializedOnMainThread(globalObject); } + +#pragma mark HTTPRequestContextDebugTLS + + JSC::LazyProperty m_Bun__HTTPRequestContextDebugTLS__reject; + Zig::JSFFIFunction* get__Bun__HTTPRequestContextDebugTLS__reject(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContextDebugTLS__reject.getInitializedOnMainThread(globalObject); } + JSC::LazyProperty m_Bun__HTTPRequestContextDebugTLS__resolve; + Zig::JSFFIFunction* get__Bun__HTTPRequestContextDebugTLS__resolve(Zig::GlobalObject *globalObject) { return m_Bun__HTTPRequestContextDebugTLS__resolve.getInitializedOnMainThread(globalObject); } + + /* -- END FUNCTION DEFINITIONS-- */ + }; + +} // namespace Zig diff --git a/src/javascript/jsc/bindings/ZigSourceProvider.cpp b/src/bun.js/bindings/ZigSourceProvider.cpp similarity index 100% rename from src/javascript/jsc/bindings/ZigSourceProvider.cpp rename to src/bun.js/bindings/ZigSourceProvider.cpp diff --git a/src/javascript/jsc/bindings/ZigSourceProvider.h b/src/bun.js/bindings/ZigSourceProvider.h similarity index 100% rename from src/javascript/jsc/bindings/ZigSourceProvider.h rename to src/bun.js/bindings/ZigSourceProvider.h diff --git a/src/javascript/jsc/bindings/bindings-generator.zig b/src/bun.js/bindings/bindings-generator.zig similarity index 96% rename from src/javascript/jsc/bindings/bindings-generator.zig rename to src/bun.js/bindings/bindings-generator.zig index a828c5f9e6..75f300b63e 100644 --- a/src/javascript/jsc/bindings/bindings-generator.zig +++ b/src/bun.js/bindings/bindings-generator.zig @@ -15,7 +15,7 @@ const Allocator = std.mem.Allocator; pub const bindgen = true; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const Classes = JSC.GlobalClasses; @@ -36,7 +36,7 @@ pub fn main() anyerror!void { const HeaderGenerator = HeaderGen( Bindings, Exports, - "src/javascript/jsc/bindings/bindings.zig", + "src/bun.js/bindings/bindings.zig", ); HeaderGenerator.exec(HeaderGenerator{}, file, cpp, static, staticInlines); } diff --git a/src/javascript/jsc/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp similarity index 100% rename from src/javascript/jsc/bindings/bindings.cpp rename to src/bun.js/bindings/bindings.cpp diff --git a/src/javascript/jsc/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig similarity index 99% rename from src/javascript/jsc/bindings/bindings.zig rename to src/bun.js/bindings/bindings.zig index a2757fc624..08c3f4fbd3 100644 --- a/src/javascript/jsc/bindings/bindings.zig +++ b/src/bun.js/bindings/bindings.zig @@ -1,10 +1,10 @@ const std = @import("std"); -const bun = @import("../../../global.zig"); +const bun = @import("../../global.zig"); const string = bun.string; const Output = bun.Output; const hasRef = std.meta.trait.hasField("ref"); -const C_API = @import("../../../jsc.zig").C; -const StringPointer = @import("../../../api/schema.zig").Api.StringPointer; +const C_API = @import("../../jsc.zig").C; +const StringPointer = @import("../../api/schema.zig").Api.StringPointer; const Exports = @import("./exports.zig"); const strings = bun.strings; const ErrorableZigString = Exports.ErrorableZigString; @@ -13,7 +13,7 @@ const ZigException = Exports.ZigException; const ZigStackTrace = Exports.ZigStackTrace; const is_bindgen: bool = std.meta.globalOption("bindgen", bool) orelse false; const ArrayBuffer = @import("../base.zig").ArrayBuffer; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const Shimmer = JSC.Shimmer; const FFI = @import("./FFI.zig"); pub const JSObject = extern struct { @@ -479,7 +479,7 @@ pub const DOMURL = opaque { }; }; -const Api = @import("../../../api/schema.zig").Api; +const Api = @import("../../api/schema.zig").Api; pub const FetchHeaders = opaque { pub const shim = Shimmer("WebCore", "FetchHeaders", @This()); @@ -983,7 +983,7 @@ pub fn NewGlobalObject(comptime Type: type) type { } Output.flush(); - const Reporter = @import("../../../report.zig"); + const Reporter = @import("../../report.zig"); Reporter.fatal(null, "A C++ exception occurred"); } }; diff --git a/src/javascript/jsc/bindings/bmalloc_heap_ref.h b/src/bun.js/bindings/bmalloc_heap_ref.h similarity index 100% rename from src/javascript/jsc/bindings/bmalloc_heap_ref.h rename to src/bun.js/bindings/bmalloc_heap_ref.h diff --git a/src/javascript/jsc/bindings/exports.zig b/src/bun.js/bindings/exports.zig similarity index 99% rename from src/javascript/jsc/bindings/exports.zig rename to src/bun.js/bindings/exports.zig index cb62ba383e..b442be742e 100644 --- a/src/javascript/jsc/bindings/exports.zig +++ b/src/bun.js/bindings/exports.zig @@ -1,11 +1,11 @@ -const JSC = @import("../../../jsc.zig"); -const Fs = @import("../../../fs.zig"); +const JSC = @import("../../jsc.zig"); +const Fs = @import("../../fs.zig"); const CAPI = JSC.C; const JS = @import("../javascript.zig"); const JSBase = @import("../base.zig"); -const ZigURL = @import("../../../url.zig").URL; -const Api = @import("../../../api/schema.zig").Api; -const bun = @import("../../../global.zig"); +const ZigURL = @import("../../url.zig").URL; +const Api = @import("../../api/schema.zig").Api; +const bun = @import("../../global.zig"); const std = @import("std"); const Shimmer = @import("./shimmer.zig").Shimmer; const strings = @import("strings"); @@ -26,9 +26,9 @@ const JSModuleLoader = JSC.JSModuleLoader; const JSModuleRecord = JSC.JSModuleRecord; const Microtask = JSC.Microtask; const JSPrivateDataPtr = @import("../base.zig").JSPrivateDataPtr; -const Backtrace = @import("../../../deps/backtrace.zig"); -const JSPrinter = @import("../../../js_printer.zig"); -const JSLexer = @import("../../../js_lexer.zig"); +const Backtrace = @import("../../deps/backtrace.zig"); +const JSPrinter = @import("../../js_printer.zig"); +const JSLexer = @import("../../js_lexer.zig"); pub const ZigGlobalObject = extern struct { pub const shim = Shimmer("Zig", "GlobalObject", @This()); bytes: shim.Bytes, @@ -187,10 +187,10 @@ pub const JSReadableStreamFile = JSC.WebCore.FileBlobLoader.Source.JSReadableStr pub const JSArrayBufferSink = JSC.WebCore.ArrayBufferSink.JSSink; // WebSocket -pub const WebSocketHTTPClient = @import("../../../http/websocket_http_client.zig").WebSocketHTTPClient; -pub const WebSocketHTTSPClient = @import("../../../http/websocket_http_client.zig").WebSocketHTTPSClient; -pub const WebSocketClient = @import("../../../http/websocket_http_client.zig").WebSocketClient; -pub const WebSocketClientTLS = @import("../../../http/websocket_http_client.zig").WebSocketClientTLS; +pub const WebSocketHTTPClient = @import("../../http/websocket_http_client.zig").WebSocketHTTPClient; +pub const WebSocketHTTSPClient = @import("../../http/websocket_http_client.zig").WebSocketHTTPSClient; +pub const WebSocketClient = @import("../../http/websocket_http_client.zig").WebSocketClient; +pub const WebSocketClientTLS = @import("../../http/websocket_http_client.zig").WebSocketClientTLS; pub fn Errorable(comptime Type: type) type { return extern struct { @@ -246,7 +246,7 @@ pub const ResolvedSource = extern struct { }; }; -const Mimalloc = @import("../../../allocators/mimalloc.zig"); +const Mimalloc = @import("../../allocators/mimalloc.zig"); export fn ZigString__free(raw: [*]const u8, len: usize, allocator_: ?*anyopaque) void { var allocator: std.mem.Allocator = @ptrCast(*std.mem.Allocator, @alignCast(@alignOf(*std.mem.Allocator), allocator_ orelse return)).*; @@ -1162,7 +1162,7 @@ pub const ZigConsoleClient = struct { // For detecting circular references pub const Visited = struct { - const ObjectPool = @import("../../../pool.zig").ObjectPool; + const ObjectPool = @import("../../pool.zig").ObjectPool; pub const Map = std.AutoHashMap(JSValue.Type, void); pub const Pool = ObjectPool( Map, diff --git a/src/javascript/jsc/bindings/header-gen.zig b/src/bun.js/bindings/header-gen.zig similarity index 100% rename from src/javascript/jsc/bindings/header-gen.zig rename to src/bun.js/bindings/header-gen.zig diff --git a/src/javascript/jsc/bindings/headers-cpp.h b/src/bun.js/bindings/headers-cpp.h similarity index 100% rename from src/javascript/jsc/bindings/headers-cpp.h rename to src/bun.js/bindings/headers-cpp.h diff --git a/src/javascript/jsc/bindings/headers-handwritten.h b/src/bun.js/bindings/headers-handwritten.h similarity index 100% rename from src/javascript/jsc/bindings/headers-handwritten.h rename to src/bun.js/bindings/headers-handwritten.h diff --git a/src/javascript/jsc/bindings/headers-replacements.zig b/src/bun.js/bindings/headers-replacements.zig similarity index 96% rename from src/javascript/jsc/bindings/headers-replacements.zig rename to src/bun.js/bindings/headers-replacements.zig index 712a634547..662502bb2e 100644 --- a/src/javascript/jsc/bindings/headers-replacements.zig +++ b/src/bun.js/bindings/headers-replacements.zig @@ -1,5 +1,5 @@ // GENERATED FILE - do not modify! -const bindings = @import("../../../jsc.zig"); +const bindings = @import("../../jsc.zig"); pub const struct_JSC__CallFrame = bindings.CallFrame; pub const struct_JSC__StringPrototype = bindings.StringPrototype; pub const struct_JSC__SetIteratorPrototype = bindings.SetIteratorPrototype; @@ -62,7 +62,7 @@ pub const Bun__Writable = bindings.NodeWritableStream; pub const Bun__ArrayBuffer = bindings.ArrayBuffer; pub const struct_WebCore__DOMURL = bindings.DOMURL; pub const struct_WebCore__FetchHeaders = bindings.FetchHeaders; -pub const StringPointer = @import("../../../api/schema.zig").Api.StringPointer; +pub const StringPointer = @import("../../api/schema.zig").Api.StringPointer; pub const struct_VirtualMachine = bindings.VirtualMachine; pub const ArrayBufferSink = @import("../webcore/streams.zig").ArrayBufferSink; diff --git a/src/javascript/jsc/bindings/headers.h b/src/bun.js/bindings/headers.h similarity index 100% rename from src/javascript/jsc/bindings/headers.h rename to src/bun.js/bindings/headers.h diff --git a/src/javascript/jsc/bindings/headers.zig b/src/bun.js/bindings/headers.zig similarity index 99% rename from src/javascript/jsc/bindings/headers.zig rename to src/bun.js/bindings/headers.zig index 1a42b9532e..77ef7ecb5a 100644 --- a/src/javascript/jsc/bindings/headers.zig +++ b/src/bun.js/bindings/headers.zig @@ -1,5 +1,5 @@ // GENERATED FILE - do not modify! -const bindings = @import("../../../jsc.zig"); +const bindings = @import("../../jsc.zig"); pub const struct_JSC__CallFrame = bindings.CallFrame; pub const struct_JSC__StringPrototype = bindings.StringPrototype; pub const struct_JSC__SetIteratorPrototype = bindings.SetIteratorPrototype; @@ -62,7 +62,7 @@ pub const Bun__Writable = bindings.NodeWritableStream; pub const Bun__ArrayBuffer = bindings.ArrayBuffer; pub const struct_WebCore__DOMURL = bindings.DOMURL; pub const struct_WebCore__FetchHeaders = bindings.FetchHeaders; -pub const StringPointer = @import("../../../api/schema.zig").Api.StringPointer; +pub const StringPointer = @import("../../api/schema.zig").Api.StringPointer; pub const struct_VirtualMachine = bindings.VirtualMachine; pub const ArrayBufferSink = @import("../webcore/streams.zig").ArrayBufferSink; diff --git a/src/javascript/jsc/bindings/helpers.h b/src/bun.js/bindings/helpers.h similarity index 100% rename from src/javascript/jsc/bindings/helpers.h rename to src/bun.js/bindings/helpers.h diff --git a/src/javascript/jsc/bindings/inlines.cpp b/src/bun.js/bindings/inlines.cpp similarity index 100% rename from src/javascript/jsc/bindings/inlines.cpp rename to src/bun.js/bindings/inlines.cpp diff --git a/src/javascript/jsc/bindings/napi.cpp b/src/bun.js/bindings/napi.cpp similarity index 100% rename from src/javascript/jsc/bindings/napi.cpp rename to src/bun.js/bindings/napi.cpp diff --git a/src/javascript/jsc/bindings/napi.h b/src/bun.js/bindings/napi.h similarity index 100% rename from src/javascript/jsc/bindings/napi.h rename to src/bun.js/bindings/napi.h diff --git a/src/javascript/jsc/bindings/napi_external.cpp b/src/bun.js/bindings/napi_external.cpp similarity index 100% rename from src/javascript/jsc/bindings/napi_external.cpp rename to src/bun.js/bindings/napi_external.cpp diff --git a/src/javascript/jsc/bindings/napi_external.h b/src/bun.js/bindings/napi_external.h similarity index 100% rename from src/javascript/jsc/bindings/napi_external.h rename to src/bun.js/bindings/napi_external.h diff --git a/src/javascript/jsc/bindings/objects.cpp b/src/bun.js/bindings/objects.cpp similarity index 100% rename from src/javascript/jsc/bindings/objects.cpp rename to src/bun.js/bindings/objects.cpp diff --git a/src/javascript/jsc/bindings/objects.h b/src/bun.js/bindings/objects.h similarity index 100% rename from src/javascript/jsc/bindings/objects.h rename to src/bun.js/bindings/objects.h diff --git a/src/javascript/jsc/bindings/process.d.ts b/src/bun.js/bindings/process.d.ts similarity index 100% rename from src/javascript/jsc/bindings/process.d.ts rename to src/bun.js/bindings/process.d.ts diff --git a/src/javascript/jsc/bindings/root.h b/src/bun.js/bindings/root.h similarity index 100% rename from src/javascript/jsc/bindings/root.h rename to src/bun.js/bindings/root.h diff --git a/src/javascript/jsc/bindings/shimmer.zig b/src/bun.js/bindings/shimmer.zig similarity index 100% rename from src/javascript/jsc/bindings/shimmer.zig rename to src/bun.js/bindings/shimmer.zig diff --git a/src/javascript/jsc/bindings/sizes.zig b/src/bun.js/bindings/sizes.zig similarity index 97% rename from src/javascript/jsc/bindings/sizes.zig rename to src/bun.js/bindings/sizes.zig index 55cb26d8b9..27505ebc01 100644 --- a/src/javascript/jsc/bindings/sizes.zig +++ b/src/bun.js/bindings/sizes.zig @@ -1,4 +1,4 @@ -// Auto-generated by src/javascript/jsc/headergen/sizegen.cpp at 2022-05-02 01:43:1651481039. +// Auto-generated by src/bun.js/headergen/sizegen.cpp at 2022-05-02 01:43:1651481039. // These are the byte sizes for the different object types with bindings in JavaScriptCore. // This allows us to safely return stack allocated C++ types to Zig. // It is only safe to do this when these sizes are correct. diff --git a/src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp b/src/bun.js/bindings/sqlite/JSSQLStatement.cpp similarity index 100% rename from src/javascript/jsc/bindings/sqlite/JSSQLStatement.cpp rename to src/bun.js/bindings/sqlite/JSSQLStatement.cpp diff --git a/src/javascript/jsc/bindings/sqlite/JSSQLStatement.h b/src/bun.js/bindings/sqlite/JSSQLStatement.h similarity index 100% rename from src/javascript/jsc/bindings/sqlite/JSSQLStatement.h rename to src/bun.js/bindings/sqlite/JSSQLStatement.h diff --git a/src/javascript/jsc/bindings/sqlite/lazy_sqlite3.h b/src/bun.js/bindings/sqlite/lazy_sqlite3.h similarity index 100% rename from src/javascript/jsc/bindings/sqlite/lazy_sqlite3.h rename to src/bun.js/bindings/sqlite/lazy_sqlite3.h diff --git a/src/javascript/jsc/bindings/sqlite/sqlite.exports.js b/src/bun.js/bindings/sqlite/sqlite.exports.js similarity index 100% rename from src/javascript/jsc/bindings/sqlite/sqlite.exports.js rename to src/bun.js/bindings/sqlite/sqlite.exports.js diff --git a/src/javascript/jsc/bindings/sqlite/sqlite3.c b/src/bun.js/bindings/sqlite/sqlite3.c similarity index 100% rename from src/javascript/jsc/bindings/sqlite/sqlite3.c rename to src/bun.js/bindings/sqlite/sqlite3.c diff --git a/src/javascript/jsc/bindings/sqlite/sqlite3_local.h b/src/bun.js/bindings/sqlite/sqlite3_local.h similarity index 100% rename from src/javascript/jsc/bindings/sqlite/sqlite3_local.h rename to src/bun.js/bindings/sqlite/sqlite3_local.h diff --git a/src/javascript/jsc/bindings/static_export.zig b/src/bun.js/bindings/static_export.zig similarity index 100% rename from src/javascript/jsc/bindings/static_export.zig rename to src/bun.js/bindings/static_export.zig diff --git a/src/javascript/jsc/bindings/webcore/AbortAlgorithm.h b/src/bun.js/bindings/webcore/AbortAlgorithm.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortAlgorithm.h rename to src/bun.js/bindings/webcore/AbortAlgorithm.h diff --git a/src/javascript/jsc/bindings/webcore/AbortAlgorithm.idl b/src/bun.js/bindings/webcore/AbortAlgorithm.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortAlgorithm.idl rename to src/bun.js/bindings/webcore/AbortAlgorithm.idl diff --git a/src/javascript/jsc/bindings/webcore/AbortController.cpp b/src/bun.js/bindings/webcore/AbortController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortController.cpp rename to src/bun.js/bindings/webcore/AbortController.cpp diff --git a/src/javascript/jsc/bindings/webcore/AbortController.h b/src/bun.js/bindings/webcore/AbortController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortController.h rename to src/bun.js/bindings/webcore/AbortController.h diff --git a/src/javascript/jsc/bindings/webcore/AbortController.idl b/src/bun.js/bindings/webcore/AbortController.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortController.idl rename to src/bun.js/bindings/webcore/AbortController.idl diff --git a/src/javascript/jsc/bindings/webcore/AbortSignal.cpp b/src/bun.js/bindings/webcore/AbortSignal.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortSignal.cpp rename to src/bun.js/bindings/webcore/AbortSignal.cpp diff --git a/src/javascript/jsc/bindings/webcore/AbortSignal.h b/src/bun.js/bindings/webcore/AbortSignal.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortSignal.h rename to src/bun.js/bindings/webcore/AbortSignal.h diff --git a/src/javascript/jsc/bindings/webcore/AbortSignal.idl b/src/bun.js/bindings/webcore/AbortSignal.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/AbortSignal.idl rename to src/bun.js/bindings/webcore/AbortSignal.idl diff --git a/src/javascript/jsc/bindings/webcore/ActiveDOMObject.cpp b/src/bun.js/bindings/webcore/ActiveDOMObject.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ActiveDOMObject.cpp rename to src/bun.js/bindings/webcore/ActiveDOMObject.cpp diff --git a/src/javascript/jsc/bindings/webcore/ActiveDOMObject.h b/src/bun.js/bindings/webcore/ActiveDOMObject.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ActiveDOMObject.h rename to src/bun.js/bindings/webcore/ActiveDOMObject.h diff --git a/src/javascript/jsc/bindings/webcore/AddEventListenerOptions.h b/src/bun.js/bindings/webcore/AddEventListenerOptions.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/AddEventListenerOptions.h rename to src/bun.js/bindings/webcore/AddEventListenerOptions.h diff --git a/src/javascript/jsc/bindings/webcore/BufferSource.h b/src/bun.js/bindings/webcore/BufferSource.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/BufferSource.h rename to src/bun.js/bindings/webcore/BufferSource.h diff --git a/src/javascript/jsc/bindings/webcore/CallbackResult.h b/src/bun.js/bindings/webcore/CallbackResult.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/CallbackResult.h rename to src/bun.js/bindings/webcore/CallbackResult.h diff --git a/src/javascript/jsc/bindings/webcore/CloseEvent.cpp b/src/bun.js/bindings/webcore/CloseEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/CloseEvent.cpp rename to src/bun.js/bindings/webcore/CloseEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/CloseEvent.h b/src/bun.js/bindings/webcore/CloseEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/CloseEvent.h rename to src/bun.js/bindings/webcore/CloseEvent.h diff --git a/src/javascript/jsc/bindings/webcore/CloseEvent.idl b/src/bun.js/bindings/webcore/CloseEvent.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/CloseEvent.idl rename to src/bun.js/bindings/webcore/CloseEvent.idl diff --git a/src/javascript/jsc/bindings/webcore/CommonAtomStrings.cpp b/src/bun.js/bindings/webcore/CommonAtomStrings.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/CommonAtomStrings.cpp rename to src/bun.js/bindings/webcore/CommonAtomStrings.cpp diff --git a/src/javascript/jsc/bindings/webcore/CommonAtomStrings.h b/src/bun.js/bindings/webcore/CommonAtomStrings.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/CommonAtomStrings.h rename to src/bun.js/bindings/webcore/CommonAtomStrings.h diff --git a/src/javascript/jsc/bindings/webcore/ContextDestructionObserver.h b/src/bun.js/bindings/webcore/ContextDestructionObserver.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ContextDestructionObserver.h rename to src/bun.js/bindings/webcore/ContextDestructionObserver.h diff --git a/src/javascript/jsc/bindings/webcore/CustomEvent.cpp b/src/bun.js/bindings/webcore/CustomEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/CustomEvent.cpp rename to src/bun.js/bindings/webcore/CustomEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/CustomEvent.h b/src/bun.js/bindings/webcore/CustomEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/CustomEvent.h rename to src/bun.js/bindings/webcore/CustomEvent.h diff --git a/src/javascript/jsc/bindings/webcore/CustomEvent.idl b/src/bun.js/bindings/webcore/CustomEvent.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/CustomEvent.idl rename to src/bun.js/bindings/webcore/CustomEvent.idl diff --git a/src/javascript/jsc/bindings/webcore/CustomEventCustom.cpp b/src/bun.js/bindings/webcore/CustomEventCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/CustomEventCustom.cpp rename to src/bun.js/bindings/webcore/CustomEventCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/DOMClientIsoSubspaces.h b/src/bun.js/bindings/webcore/DOMClientIsoSubspaces.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/DOMClientIsoSubspaces.h rename to src/bun.js/bindings/webcore/DOMClientIsoSubspaces.h diff --git a/src/javascript/jsc/bindings/webcore/DOMConstructors.h b/src/bun.js/bindings/webcore/DOMConstructors.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/DOMConstructors.h rename to src/bun.js/bindings/webcore/DOMConstructors.h diff --git a/src/javascript/jsc/bindings/webcore/DOMHighResTimeStamp.h b/src/bun.js/bindings/webcore/DOMHighResTimeStamp.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/DOMHighResTimeStamp.h rename to src/bun.js/bindings/webcore/DOMHighResTimeStamp.h diff --git a/src/javascript/jsc/bindings/webcore/DOMIsoSubspaces.h b/src/bun.js/bindings/webcore/DOMIsoSubspaces.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/DOMIsoSubspaces.h rename to src/bun.js/bindings/webcore/DOMIsoSubspaces.h diff --git a/src/javascript/jsc/bindings/webcore/DOMPromiseProxy.h b/src/bun.js/bindings/webcore/DOMPromiseProxy.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/DOMPromiseProxy.h rename to src/bun.js/bindings/webcore/DOMPromiseProxy.h diff --git a/src/javascript/jsc/bindings/webcore/ErrorCallback.cpp b/src/bun.js/bindings/webcore/ErrorCallback.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ErrorCallback.cpp rename to src/bun.js/bindings/webcore/ErrorCallback.cpp diff --git a/src/javascript/jsc/bindings/webcore/ErrorCallback.h b/src/bun.js/bindings/webcore/ErrorCallback.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ErrorCallback.h rename to src/bun.js/bindings/webcore/ErrorCallback.h diff --git a/src/javascript/jsc/bindings/webcore/ErrorCallback.idl b/src/bun.js/bindings/webcore/ErrorCallback.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/ErrorCallback.idl rename to src/bun.js/bindings/webcore/ErrorCallback.idl diff --git a/src/javascript/jsc/bindings/webcore/ErrorEvent.cpp b/src/bun.js/bindings/webcore/ErrorEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ErrorEvent.cpp rename to src/bun.js/bindings/webcore/ErrorEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/ErrorEvent.h b/src/bun.js/bindings/webcore/ErrorEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ErrorEvent.h rename to src/bun.js/bindings/webcore/ErrorEvent.h diff --git a/src/javascript/jsc/bindings/webcore/ErrorEvent.idl b/src/bun.js/bindings/webcore/ErrorEvent.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/ErrorEvent.idl rename to src/bun.js/bindings/webcore/ErrorEvent.idl diff --git a/src/javascript/jsc/bindings/webcore/Event.cpp b/src/bun.js/bindings/webcore/Event.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/Event.cpp rename to src/bun.js/bindings/webcore/Event.cpp diff --git a/src/javascript/jsc/bindings/webcore/Event.h b/src/bun.js/bindings/webcore/Event.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/Event.h rename to src/bun.js/bindings/webcore/Event.h diff --git a/src/javascript/jsc/bindings/webcore/Event.idl b/src/bun.js/bindings/webcore/Event.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/Event.idl rename to src/bun.js/bindings/webcore/Event.idl diff --git a/src/javascript/jsc/bindings/webcore/EventContext.cpp b/src/bun.js/bindings/webcore/EventContext.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventContext.cpp rename to src/bun.js/bindings/webcore/EventContext.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventContext.h b/src/bun.js/bindings/webcore/EventContext.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventContext.h rename to src/bun.js/bindings/webcore/EventContext.h diff --git a/src/javascript/jsc/bindings/webcore/EventDispatcher.cpp b/src/bun.js/bindings/webcore/EventDispatcher.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventDispatcher.cpp rename to src/bun.js/bindings/webcore/EventDispatcher.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventDispatcher.h b/src/bun.js/bindings/webcore/EventDispatcher.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventDispatcher.h rename to src/bun.js/bindings/webcore/EventDispatcher.h diff --git a/src/javascript/jsc/bindings/webcore/EventFactory.cpp b/src/bun.js/bindings/webcore/EventFactory.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventFactory.cpp rename to src/bun.js/bindings/webcore/EventFactory.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventHeaders.h b/src/bun.js/bindings/webcore/EventHeaders.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventHeaders.h rename to src/bun.js/bindings/webcore/EventHeaders.h diff --git a/src/javascript/jsc/bindings/webcore/EventInit.h b/src/bun.js/bindings/webcore/EventInit.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventInit.h rename to src/bun.js/bindings/webcore/EventInit.h diff --git a/src/javascript/jsc/bindings/webcore/EventInit.idl b/src/bun.js/bindings/webcore/EventInit.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventInit.idl rename to src/bun.js/bindings/webcore/EventInit.idl diff --git a/src/javascript/jsc/bindings/webcore/EventInterfaces.h b/src/bun.js/bindings/webcore/EventInterfaces.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventInterfaces.h rename to src/bun.js/bindings/webcore/EventInterfaces.h diff --git a/src/javascript/jsc/bindings/webcore/EventListener.h b/src/bun.js/bindings/webcore/EventListener.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventListener.h rename to src/bun.js/bindings/webcore/EventListener.h diff --git a/src/javascript/jsc/bindings/webcore/EventListener.idl b/src/bun.js/bindings/webcore/EventListener.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventListener.idl rename to src/bun.js/bindings/webcore/EventListener.idl diff --git a/src/javascript/jsc/bindings/webcore/EventListenerMap.cpp b/src/bun.js/bindings/webcore/EventListenerMap.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventListenerMap.cpp rename to src/bun.js/bindings/webcore/EventListenerMap.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventListenerMap.h b/src/bun.js/bindings/webcore/EventListenerMap.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventListenerMap.h rename to src/bun.js/bindings/webcore/EventListenerMap.h diff --git a/src/javascript/jsc/bindings/webcore/EventListenerOptions.h b/src/bun.js/bindings/webcore/EventListenerOptions.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventListenerOptions.h rename to src/bun.js/bindings/webcore/EventListenerOptions.h diff --git a/src/javascript/jsc/bindings/webcore/EventListenerOptions.idl b/src/bun.js/bindings/webcore/EventListenerOptions.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventListenerOptions.idl rename to src/bun.js/bindings/webcore/EventListenerOptions.idl diff --git a/src/javascript/jsc/bindings/webcore/EventModifierInit.h b/src/bun.js/bindings/webcore/EventModifierInit.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventModifierInit.h rename to src/bun.js/bindings/webcore/EventModifierInit.h diff --git a/src/javascript/jsc/bindings/webcore/EventNames.cpp b/src/bun.js/bindings/webcore/EventNames.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventNames.cpp rename to src/bun.js/bindings/webcore/EventNames.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventNames.h b/src/bun.js/bindings/webcore/EventNames.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventNames.h rename to src/bun.js/bindings/webcore/EventNames.h diff --git a/src/javascript/jsc/bindings/webcore/EventNames.in b/src/bun.js/bindings/webcore/EventNames.in similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventNames.in rename to src/bun.js/bindings/webcore/EventNames.in diff --git a/src/javascript/jsc/bindings/webcore/EventOptions.h b/src/bun.js/bindings/webcore/EventOptions.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventOptions.h rename to src/bun.js/bindings/webcore/EventOptions.h diff --git a/src/javascript/jsc/bindings/webcore/EventPath.cpp b/src/bun.js/bindings/webcore/EventPath.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventPath.cpp rename to src/bun.js/bindings/webcore/EventPath.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventPath.h b/src/bun.js/bindings/webcore/EventPath.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventPath.h rename to src/bun.js/bindings/webcore/EventPath.h diff --git a/src/javascript/jsc/bindings/webcore/EventSender.h b/src/bun.js/bindings/webcore/EventSender.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventSender.h rename to src/bun.js/bindings/webcore/EventSender.h diff --git a/src/javascript/jsc/bindings/webcore/EventTarget.cpp b/src/bun.js/bindings/webcore/EventTarget.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTarget.cpp rename to src/bun.js/bindings/webcore/EventTarget.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventTarget.h b/src/bun.js/bindings/webcore/EventTarget.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTarget.h rename to src/bun.js/bindings/webcore/EventTarget.h diff --git a/src/javascript/jsc/bindings/webcore/EventTarget.idl b/src/bun.js/bindings/webcore/EventTarget.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTarget.idl rename to src/bun.js/bindings/webcore/EventTarget.idl diff --git a/src/javascript/jsc/bindings/webcore/EventTargetConcrete.cpp b/src/bun.js/bindings/webcore/EventTargetConcrete.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTargetConcrete.cpp rename to src/bun.js/bindings/webcore/EventTargetConcrete.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventTargetConcrete.h b/src/bun.js/bindings/webcore/EventTargetConcrete.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTargetConcrete.h rename to src/bun.js/bindings/webcore/EventTargetConcrete.h diff --git a/src/javascript/jsc/bindings/webcore/EventTargetFactory.cpp b/src/bun.js/bindings/webcore/EventTargetFactory.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTargetFactory.cpp rename to src/bun.js/bindings/webcore/EventTargetFactory.cpp diff --git a/src/javascript/jsc/bindings/webcore/EventTargetHeaders.h b/src/bun.js/bindings/webcore/EventTargetHeaders.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTargetHeaders.h rename to src/bun.js/bindings/webcore/EventTargetHeaders.h diff --git a/src/javascript/jsc/bindings/webcore/EventTargetInterfaces.h b/src/bun.js/bindings/webcore/EventTargetInterfaces.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/EventTargetInterfaces.h rename to src/bun.js/bindings/webcore/EventTargetInterfaces.h diff --git a/src/javascript/jsc/bindings/webcore/ExceptionDetails.h b/src/bun.js/bindings/webcore/ExceptionDetails.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ExceptionDetails.h rename to src/bun.js/bindings/webcore/ExceptionDetails.h diff --git a/src/javascript/jsc/bindings/webcore/ExtendedDOMClientIsoSubspaces.h b/src/bun.js/bindings/webcore/ExtendedDOMClientIsoSubspaces.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ExtendedDOMClientIsoSubspaces.h rename to src/bun.js/bindings/webcore/ExtendedDOMClientIsoSubspaces.h diff --git a/src/javascript/jsc/bindings/webcore/ExtendedDOMIsoSubspaces.h b/src/bun.js/bindings/webcore/ExtendedDOMIsoSubspaces.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ExtendedDOMIsoSubspaces.h rename to src/bun.js/bindings/webcore/ExtendedDOMIsoSubspaces.h diff --git a/src/javascript/jsc/bindings/webcore/FetchHeaders.cpp b/src/bun.js/bindings/webcore/FetchHeaders.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/FetchHeaders.cpp rename to src/bun.js/bindings/webcore/FetchHeaders.cpp diff --git a/src/javascript/jsc/bindings/webcore/FetchHeaders.h b/src/bun.js/bindings/webcore/FetchHeaders.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/FetchHeaders.h rename to src/bun.js/bindings/webcore/FetchHeaders.h diff --git a/src/javascript/jsc/bindings/webcore/FetchHeaders.idl b/src/bun.js/bindings/webcore/FetchHeaders.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/FetchHeaders.idl rename to src/bun.js/bindings/webcore/FetchHeaders.idl diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderField.cpp b/src/bun.js/bindings/webcore/HTTPHeaderField.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderField.cpp rename to src/bun.js/bindings/webcore/HTTPHeaderField.cpp diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderField.h b/src/bun.js/bindings/webcore/HTTPHeaderField.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderField.h rename to src/bun.js/bindings/webcore/HTTPHeaderField.h diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderMap.cpp b/src/bun.js/bindings/webcore/HTTPHeaderMap.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderMap.cpp rename to src/bun.js/bindings/webcore/HTTPHeaderMap.cpp diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderMap.h b/src/bun.js/bindings/webcore/HTTPHeaderMap.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderMap.h rename to src/bun.js/bindings/webcore/HTTPHeaderMap.h diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderNames.cpp b/src/bun.js/bindings/webcore/HTTPHeaderNames.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderNames.cpp rename to src/bun.js/bindings/webcore/HTTPHeaderNames.cpp diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderNames.gperf b/src/bun.js/bindings/webcore/HTTPHeaderNames.gperf similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderNames.gperf rename to src/bun.js/bindings/webcore/HTTPHeaderNames.gperf diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderNames.h b/src/bun.js/bindings/webcore/HTTPHeaderNames.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderNames.h rename to src/bun.js/bindings/webcore/HTTPHeaderNames.h diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderNames.in b/src/bun.js/bindings/webcore/HTTPHeaderNames.in similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderNames.in rename to src/bun.js/bindings/webcore/HTTPHeaderNames.in diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderValues.cpp b/src/bun.js/bindings/webcore/HTTPHeaderValues.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderValues.cpp rename to src/bun.js/bindings/webcore/HTTPHeaderValues.cpp diff --git a/src/javascript/jsc/bindings/webcore/HTTPHeaderValues.h b/src/bun.js/bindings/webcore/HTTPHeaderValues.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPHeaderValues.h rename to src/bun.js/bindings/webcore/HTTPHeaderValues.h diff --git a/src/javascript/jsc/bindings/webcore/HTTPParsers.cpp b/src/bun.js/bindings/webcore/HTTPParsers.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPParsers.cpp rename to src/bun.js/bindings/webcore/HTTPParsers.cpp diff --git a/src/javascript/jsc/bindings/webcore/HTTPParsers.h b/src/bun.js/bindings/webcore/HTTPParsers.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/HTTPParsers.h rename to src/bun.js/bindings/webcore/HTTPParsers.h diff --git a/src/javascript/jsc/bindings/webcore/InternalWritableStream.cpp b/src/bun.js/bindings/webcore/InternalWritableStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/InternalWritableStream.cpp rename to src/bun.js/bindings/webcore/InternalWritableStream.cpp diff --git a/src/javascript/jsc/bindings/webcore/InternalWritableStream.h b/src/bun.js/bindings/webcore/InternalWritableStream.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/InternalWritableStream.h rename to src/bun.js/bindings/webcore/InternalWritableStream.h diff --git a/src/javascript/jsc/bindings/webcore/JSAbortAlgorithm.cpp b/src/bun.js/bindings/webcore/JSAbortAlgorithm.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortAlgorithm.cpp rename to src/bun.js/bindings/webcore/JSAbortAlgorithm.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSAbortAlgorithm.h b/src/bun.js/bindings/webcore/JSAbortAlgorithm.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortAlgorithm.h rename to src/bun.js/bindings/webcore/JSAbortAlgorithm.h diff --git a/src/javascript/jsc/bindings/webcore/JSAbortController.cpp b/src/bun.js/bindings/webcore/JSAbortController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortController.cpp rename to src/bun.js/bindings/webcore/JSAbortController.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSAbortController.dep b/src/bun.js/bindings/webcore/JSAbortController.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortController.dep rename to src/bun.js/bindings/webcore/JSAbortController.dep diff --git a/src/javascript/jsc/bindings/webcore/JSAbortController.h b/src/bun.js/bindings/webcore/JSAbortController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortController.h rename to src/bun.js/bindings/webcore/JSAbortController.h diff --git a/src/javascript/jsc/bindings/webcore/JSAbortSignal.cpp b/src/bun.js/bindings/webcore/JSAbortSignal.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortSignal.cpp rename to src/bun.js/bindings/webcore/JSAbortSignal.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSAbortSignal.dep b/src/bun.js/bindings/webcore/JSAbortSignal.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortSignal.dep rename to src/bun.js/bindings/webcore/JSAbortSignal.dep diff --git a/src/javascript/jsc/bindings/webcore/JSAbortSignal.h b/src/bun.js/bindings/webcore/JSAbortSignal.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortSignal.h rename to src/bun.js/bindings/webcore/JSAbortSignal.h diff --git a/src/javascript/jsc/bindings/webcore/JSAbortSignalCustom.cpp b/src/bun.js/bindings/webcore/JSAbortSignalCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAbortSignalCustom.cpp rename to src/bun.js/bindings/webcore/JSAbortSignalCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSAddEventListenerOptions.cpp b/src/bun.js/bindings/webcore/JSAddEventListenerOptions.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAddEventListenerOptions.cpp rename to src/bun.js/bindings/webcore/JSAddEventListenerOptions.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSAddEventListenerOptions.dep b/src/bun.js/bindings/webcore/JSAddEventListenerOptions.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAddEventListenerOptions.dep rename to src/bun.js/bindings/webcore/JSAddEventListenerOptions.dep diff --git a/src/javascript/jsc/bindings/webcore/JSAddEventListenerOptions.h b/src/bun.js/bindings/webcore/JSAddEventListenerOptions.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSAddEventListenerOptions.h rename to src/bun.js/bindings/webcore/JSAddEventListenerOptions.h diff --git a/src/javascript/jsc/bindings/webcore/JSByteLengthQueuingStrategy.cpp b/src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSByteLengthQueuingStrategy.cpp rename to src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSByteLengthQueuingStrategy.dep b/src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSByteLengthQueuingStrategy.dep rename to src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.dep diff --git a/src/javascript/jsc/bindings/webcore/JSByteLengthQueuingStrategy.h b/src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSByteLengthQueuingStrategy.h rename to src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.h diff --git a/src/javascript/jsc/bindings/webcore/JSCallbackData.cpp b/src/bun.js/bindings/webcore/JSCallbackData.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCallbackData.cpp rename to src/bun.js/bindings/webcore/JSCallbackData.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSCallbackData.h b/src/bun.js/bindings/webcore/JSCallbackData.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCallbackData.h rename to src/bun.js/bindings/webcore/JSCallbackData.h diff --git a/src/javascript/jsc/bindings/webcore/JSCloseEvent.cpp b/src/bun.js/bindings/webcore/JSCloseEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCloseEvent.cpp rename to src/bun.js/bindings/webcore/JSCloseEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSCloseEvent.dep b/src/bun.js/bindings/webcore/JSCloseEvent.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCloseEvent.dep rename to src/bun.js/bindings/webcore/JSCloseEvent.dep diff --git a/src/javascript/jsc/bindings/webcore/JSCloseEvent.h b/src/bun.js/bindings/webcore/JSCloseEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCloseEvent.h rename to src/bun.js/bindings/webcore/JSCloseEvent.h diff --git a/src/javascript/jsc/bindings/webcore/JSCountQueuingStrategy.cpp b/src/bun.js/bindings/webcore/JSCountQueuingStrategy.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCountQueuingStrategy.cpp rename to src/bun.js/bindings/webcore/JSCountQueuingStrategy.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSCountQueuingStrategy.dep b/src/bun.js/bindings/webcore/JSCountQueuingStrategy.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCountQueuingStrategy.dep rename to src/bun.js/bindings/webcore/JSCountQueuingStrategy.dep diff --git a/src/javascript/jsc/bindings/webcore/JSCountQueuingStrategy.h b/src/bun.js/bindings/webcore/JSCountQueuingStrategy.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCountQueuingStrategy.h rename to src/bun.js/bindings/webcore/JSCountQueuingStrategy.h diff --git a/src/javascript/jsc/bindings/webcore/JSCustomEvent.cpp b/src/bun.js/bindings/webcore/JSCustomEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCustomEvent.cpp rename to src/bun.js/bindings/webcore/JSCustomEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSCustomEvent.dep b/src/bun.js/bindings/webcore/JSCustomEvent.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCustomEvent.dep rename to src/bun.js/bindings/webcore/JSCustomEvent.dep diff --git a/src/javascript/jsc/bindings/webcore/JSCustomEvent.h b/src/bun.js/bindings/webcore/JSCustomEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSCustomEvent.h rename to src/bun.js/bindings/webcore/JSCustomEvent.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMAttribute.h b/src/bun.js/bindings/webcore/JSDOMAttribute.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMAttribute.h rename to src/bun.js/bindings/webcore/JSDOMAttribute.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMBinding.h b/src/bun.js/bindings/webcore/JSDOMBinding.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMBinding.h rename to src/bun.js/bindings/webcore/JSDOMBinding.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMBindingInternalsBuiltins.cpp b/src/bun.js/bindings/webcore/JSDOMBindingInternalsBuiltins.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMBindingInternalsBuiltins.cpp rename to src/bun.js/bindings/webcore/JSDOMBindingInternalsBuiltins.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMBindingInternalsBuiltins.h b/src/bun.js/bindings/webcore/JSDOMBindingInternalsBuiltins.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMBindingInternalsBuiltins.h rename to src/bun.js/bindings/webcore/JSDOMBindingInternalsBuiltins.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMBuiltinConstructor.h b/src/bun.js/bindings/webcore/JSDOMBuiltinConstructor.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMBuiltinConstructor.h rename to src/bun.js/bindings/webcore/JSDOMBuiltinConstructor.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMBuiltinConstructorBase.cpp b/src/bun.js/bindings/webcore/JSDOMBuiltinConstructorBase.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMBuiltinConstructorBase.cpp rename to src/bun.js/bindings/webcore/JSDOMBuiltinConstructorBase.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMBuiltinConstructorBase.h b/src/bun.js/bindings/webcore/JSDOMBuiltinConstructorBase.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMBuiltinConstructorBase.h rename to src/bun.js/bindings/webcore/JSDOMBuiltinConstructorBase.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMCastThisValue.h b/src/bun.js/bindings/webcore/JSDOMCastThisValue.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMCastThisValue.h rename to src/bun.js/bindings/webcore/JSDOMCastThisValue.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConstructor.h b/src/bun.js/bindings/webcore/JSDOMConstructor.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConstructor.h rename to src/bun.js/bindings/webcore/JSDOMConstructor.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConstructorBase.cpp b/src/bun.js/bindings/webcore/JSDOMConstructorBase.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConstructorBase.cpp rename to src/bun.js/bindings/webcore/JSDOMConstructorBase.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConstructorBase.h b/src/bun.js/bindings/webcore/JSDOMConstructorBase.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConstructorBase.h rename to src/bun.js/bindings/webcore/JSDOMConstructorBase.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConstructorNotCallable.h b/src/bun.js/bindings/webcore/JSDOMConstructorNotCallable.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConstructorNotCallable.h rename to src/bun.js/bindings/webcore/JSDOMConstructorNotCallable.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConstructorNotConstructable.h b/src/bun.js/bindings/webcore/JSDOMConstructorNotConstructable.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConstructorNotConstructable.h rename to src/bun.js/bindings/webcore/JSDOMConstructorNotConstructable.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvert.h b/src/bun.js/bindings/webcore/JSDOMConvert.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvert.h rename to src/bun.js/bindings/webcore/JSDOMConvert.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertAny.h b/src/bun.js/bindings/webcore/JSDOMConvertAny.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertAny.h rename to src/bun.js/bindings/webcore/JSDOMConvertAny.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertBase.h b/src/bun.js/bindings/webcore/JSDOMConvertBase.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertBase.h rename to src/bun.js/bindings/webcore/JSDOMConvertBase.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertBoolean.h b/src/bun.js/bindings/webcore/JSDOMConvertBoolean.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertBoolean.h rename to src/bun.js/bindings/webcore/JSDOMConvertBoolean.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertBufferSource.h b/src/bun.js/bindings/webcore/JSDOMConvertBufferSource.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertBufferSource.h rename to src/bun.js/bindings/webcore/JSDOMConvertBufferSource.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertCallbacks.h b/src/bun.js/bindings/webcore/JSDOMConvertCallbacks.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertCallbacks.h rename to src/bun.js/bindings/webcore/JSDOMConvertCallbacks.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertDate.cpp b/src/bun.js/bindings/webcore/JSDOMConvertDate.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertDate.cpp rename to src/bun.js/bindings/webcore/JSDOMConvertDate.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertDate.h b/src/bun.js/bindings/webcore/JSDOMConvertDate.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertDate.h rename to src/bun.js/bindings/webcore/JSDOMConvertDate.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertDictionary.h b/src/bun.js/bindings/webcore/JSDOMConvertDictionary.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertDictionary.h rename to src/bun.js/bindings/webcore/JSDOMConvertDictionary.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertEnumeration.h b/src/bun.js/bindings/webcore/JSDOMConvertEnumeration.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertEnumeration.h rename to src/bun.js/bindings/webcore/JSDOMConvertEnumeration.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertEventListener.h b/src/bun.js/bindings/webcore/JSDOMConvertEventListener.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertEventListener.h rename to src/bun.js/bindings/webcore/JSDOMConvertEventListener.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertInterface.h b/src/bun.js/bindings/webcore/JSDOMConvertInterface.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertInterface.h rename to src/bun.js/bindings/webcore/JSDOMConvertInterface.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertJSON.h b/src/bun.js/bindings/webcore/JSDOMConvertJSON.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertJSON.h rename to src/bun.js/bindings/webcore/JSDOMConvertJSON.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertNull.h b/src/bun.js/bindings/webcore/JSDOMConvertNull.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertNull.h rename to src/bun.js/bindings/webcore/JSDOMConvertNull.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertNullable.h b/src/bun.js/bindings/webcore/JSDOMConvertNullable.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertNullable.h rename to src/bun.js/bindings/webcore/JSDOMConvertNullable.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertNumbers.cpp b/src/bun.js/bindings/webcore/JSDOMConvertNumbers.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertNumbers.cpp rename to src/bun.js/bindings/webcore/JSDOMConvertNumbers.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertNumbers.h b/src/bun.js/bindings/webcore/JSDOMConvertNumbers.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertNumbers.h rename to src/bun.js/bindings/webcore/JSDOMConvertNumbers.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertObject.h b/src/bun.js/bindings/webcore/JSDOMConvertObject.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertObject.h rename to src/bun.js/bindings/webcore/JSDOMConvertObject.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertPromise.h b/src/bun.js/bindings/webcore/JSDOMConvertPromise.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertPromise.h rename to src/bun.js/bindings/webcore/JSDOMConvertPromise.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertRecord.h b/src/bun.js/bindings/webcore/JSDOMConvertRecord.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertRecord.h rename to src/bun.js/bindings/webcore/JSDOMConvertRecord.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertScheduledAction.h b/src/bun.js/bindings/webcore/JSDOMConvertScheduledAction.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertScheduledAction.h rename to src/bun.js/bindings/webcore/JSDOMConvertScheduledAction.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertSequences.h b/src/bun.js/bindings/webcore/JSDOMConvertSequences.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertSequences.h rename to src/bun.js/bindings/webcore/JSDOMConvertSequences.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertSerializedScriptValue.h b/src/bun.js/bindings/webcore/JSDOMConvertSerializedScriptValue.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertSerializedScriptValue.h rename to src/bun.js/bindings/webcore/JSDOMConvertSerializedScriptValue.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertStrings.cpp b/src/bun.js/bindings/webcore/JSDOMConvertStrings.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertStrings.cpp rename to src/bun.js/bindings/webcore/JSDOMConvertStrings.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertStrings.h b/src/bun.js/bindings/webcore/JSDOMConvertStrings.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertStrings.h rename to src/bun.js/bindings/webcore/JSDOMConvertStrings.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertUnion.h b/src/bun.js/bindings/webcore/JSDOMConvertUnion.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertUnion.h rename to src/bun.js/bindings/webcore/JSDOMConvertUnion.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertVariadic.h b/src/bun.js/bindings/webcore/JSDOMConvertVariadic.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertVariadic.h rename to src/bun.js/bindings/webcore/JSDOMConvertVariadic.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertWebGL.cpp b/src/bun.js/bindings/webcore/JSDOMConvertWebGL.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertWebGL.cpp rename to src/bun.js/bindings/webcore/JSDOMConvertWebGL.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertWebGL.h b/src/bun.js/bindings/webcore/JSDOMConvertWebGL.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertWebGL.h rename to src/bun.js/bindings/webcore/JSDOMConvertWebGL.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMConvertXPathNSResolver.h b/src/bun.js/bindings/webcore/JSDOMConvertXPathNSResolver.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMConvertXPathNSResolver.h rename to src/bun.js/bindings/webcore/JSDOMConvertXPathNSResolver.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMException.cpp b/src/bun.js/bindings/webcore/JSDOMException.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMException.cpp rename to src/bun.js/bindings/webcore/JSDOMException.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMException.h b/src/bun.js/bindings/webcore/JSDOMException.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMException.h rename to src/bun.js/bindings/webcore/JSDOMException.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMGlobalObjectInlines.h b/src/bun.js/bindings/webcore/JSDOMGlobalObjectInlines.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMGlobalObjectInlines.h rename to src/bun.js/bindings/webcore/JSDOMGlobalObjectInlines.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMGuardedObject.cpp b/src/bun.js/bindings/webcore/JSDOMGuardedObject.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMGuardedObject.cpp rename to src/bun.js/bindings/webcore/JSDOMGuardedObject.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMGuardedObject.h b/src/bun.js/bindings/webcore/JSDOMGuardedObject.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMGuardedObject.h rename to src/bun.js/bindings/webcore/JSDOMGuardedObject.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMIterator.cpp b/src/bun.js/bindings/webcore/JSDOMIterator.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMIterator.cpp rename to src/bun.js/bindings/webcore/JSDOMIterator.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMIterator.h b/src/bun.js/bindings/webcore/JSDOMIterator.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMIterator.h rename to src/bun.js/bindings/webcore/JSDOMIterator.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMOperation.h b/src/bun.js/bindings/webcore/JSDOMOperation.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMOperation.h rename to src/bun.js/bindings/webcore/JSDOMOperation.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMOperationReturningPromise.h b/src/bun.js/bindings/webcore/JSDOMOperationReturningPromise.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMOperationReturningPromise.h rename to src/bun.js/bindings/webcore/JSDOMOperationReturningPromise.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMPromise.cpp b/src/bun.js/bindings/webcore/JSDOMPromise.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMPromise.cpp rename to src/bun.js/bindings/webcore/JSDOMPromise.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMPromise.h b/src/bun.js/bindings/webcore/JSDOMPromise.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMPromise.h rename to src/bun.js/bindings/webcore/JSDOMPromise.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMPromiseDeferred.cpp b/src/bun.js/bindings/webcore/JSDOMPromiseDeferred.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMPromiseDeferred.cpp rename to src/bun.js/bindings/webcore/JSDOMPromiseDeferred.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMPromiseDeferred.h b/src/bun.js/bindings/webcore/JSDOMPromiseDeferred.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMPromiseDeferred.h rename to src/bun.js/bindings/webcore/JSDOMPromiseDeferred.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMURL.cpp b/src/bun.js/bindings/webcore/JSDOMURL.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMURL.cpp rename to src/bun.js/bindings/webcore/JSDOMURL.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSDOMURL.h b/src/bun.js/bindings/webcore/JSDOMURL.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMURL.h rename to src/bun.js/bindings/webcore/JSDOMURL.h diff --git a/src/javascript/jsc/bindings/webcore/JSDOMWindow.h b/src/bun.js/bindings/webcore/JSDOMWindow.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSDOMWindow.h rename to src/bun.js/bindings/webcore/JSDOMWindow.h diff --git a/src/javascript/jsc/bindings/webcore/JSErrorCallback.cpp b/src/bun.js/bindings/webcore/JSErrorCallback.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorCallback.cpp rename to src/bun.js/bindings/webcore/JSErrorCallback.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSErrorCallback.h b/src/bun.js/bindings/webcore/JSErrorCallback.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorCallback.h rename to src/bun.js/bindings/webcore/JSErrorCallback.h diff --git a/src/javascript/jsc/bindings/webcore/JSErrorEvent.cpp b/src/bun.js/bindings/webcore/JSErrorEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorEvent.cpp rename to src/bun.js/bindings/webcore/JSErrorEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSErrorEvent.dep b/src/bun.js/bindings/webcore/JSErrorEvent.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorEvent.dep rename to src/bun.js/bindings/webcore/JSErrorEvent.dep diff --git a/src/javascript/jsc/bindings/webcore/JSErrorEvent.h b/src/bun.js/bindings/webcore/JSErrorEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorEvent.h rename to src/bun.js/bindings/webcore/JSErrorEvent.h diff --git a/src/javascript/jsc/bindings/webcore/JSErrorEventCustom.cpp b/src/bun.js/bindings/webcore/JSErrorEventCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorEventCustom.cpp rename to src/bun.js/bindings/webcore/JSErrorEventCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSErrorHandler.cpp b/src/bun.js/bindings/webcore/JSErrorHandler.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorHandler.cpp rename to src/bun.js/bindings/webcore/JSErrorHandler.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSErrorHandler.h b/src/bun.js/bindings/webcore/JSErrorHandler.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSErrorHandler.h rename to src/bun.js/bindings/webcore/JSErrorHandler.h diff --git a/src/javascript/jsc/bindings/webcore/JSEvent.cpp b/src/bun.js/bindings/webcore/JSEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEvent.cpp rename to src/bun.js/bindings/webcore/JSEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEvent.dep b/src/bun.js/bindings/webcore/JSEvent.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEvent.dep rename to src/bun.js/bindings/webcore/JSEvent.dep diff --git a/src/javascript/jsc/bindings/webcore/JSEvent.h b/src/bun.js/bindings/webcore/JSEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEvent.h rename to src/bun.js/bindings/webcore/JSEvent.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventCustom.cpp b/src/bun.js/bindings/webcore/JSEventCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventCustom.cpp rename to src/bun.js/bindings/webcore/JSEventCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventCustom.h b/src/bun.js/bindings/webcore/JSEventCustom.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventCustom.h rename to src/bun.js/bindings/webcore/JSEventCustom.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventInit.cpp b/src/bun.js/bindings/webcore/JSEventInit.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventInit.cpp rename to src/bun.js/bindings/webcore/JSEventInit.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventInit.dep b/src/bun.js/bindings/webcore/JSEventInit.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventInit.dep rename to src/bun.js/bindings/webcore/JSEventInit.dep diff --git a/src/javascript/jsc/bindings/webcore/JSEventInit.h b/src/bun.js/bindings/webcore/JSEventInit.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventInit.h rename to src/bun.js/bindings/webcore/JSEventInit.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventListener.cpp b/src/bun.js/bindings/webcore/JSEventListener.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventListener.cpp rename to src/bun.js/bindings/webcore/JSEventListener.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventListener.h b/src/bun.js/bindings/webcore/JSEventListener.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventListener.h rename to src/bun.js/bindings/webcore/JSEventListener.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventListenerOptions.cpp b/src/bun.js/bindings/webcore/JSEventListenerOptions.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventListenerOptions.cpp rename to src/bun.js/bindings/webcore/JSEventListenerOptions.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventListenerOptions.dep b/src/bun.js/bindings/webcore/JSEventListenerOptions.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventListenerOptions.dep rename to src/bun.js/bindings/webcore/JSEventListenerOptions.dep diff --git a/src/javascript/jsc/bindings/webcore/JSEventListenerOptions.h b/src/bun.js/bindings/webcore/JSEventListenerOptions.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventListenerOptions.h rename to src/bun.js/bindings/webcore/JSEventListenerOptions.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventModifierInit.cpp b/src/bun.js/bindings/webcore/JSEventModifierInit.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventModifierInit.cpp rename to src/bun.js/bindings/webcore/JSEventModifierInit.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventModifierInit.dep b/src/bun.js/bindings/webcore/JSEventModifierInit.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventModifierInit.dep rename to src/bun.js/bindings/webcore/JSEventModifierInit.dep diff --git a/src/javascript/jsc/bindings/webcore/JSEventModifierInit.h b/src/bun.js/bindings/webcore/JSEventModifierInit.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventModifierInit.h rename to src/bun.js/bindings/webcore/JSEventModifierInit.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventTarget.cpp b/src/bun.js/bindings/webcore/JSEventTarget.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventTarget.cpp rename to src/bun.js/bindings/webcore/JSEventTarget.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventTarget.h b/src/bun.js/bindings/webcore/JSEventTarget.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventTarget.h rename to src/bun.js/bindings/webcore/JSEventTarget.h diff --git a/src/javascript/jsc/bindings/webcore/JSEventTargetCustom.cpp b/src/bun.js/bindings/webcore/JSEventTargetCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventTargetCustom.cpp rename to src/bun.js/bindings/webcore/JSEventTargetCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSEventTargetCustom.h b/src/bun.js/bindings/webcore/JSEventTargetCustom.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSEventTargetCustom.h rename to src/bun.js/bindings/webcore/JSEventTargetCustom.h diff --git a/src/javascript/jsc/bindings/webcore/JSFetchHeaders.cpp b/src/bun.js/bindings/webcore/JSFetchHeaders.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSFetchHeaders.cpp rename to src/bun.js/bindings/webcore/JSFetchHeaders.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSFetchHeaders.dep b/src/bun.js/bindings/webcore/JSFetchHeaders.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSFetchHeaders.dep rename to src/bun.js/bindings/webcore/JSFetchHeaders.dep diff --git a/src/javascript/jsc/bindings/webcore/JSFetchHeaders.h b/src/bun.js/bindings/webcore/JSFetchHeaders.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSFetchHeaders.h rename to src/bun.js/bindings/webcore/JSFetchHeaders.h diff --git a/src/javascript/jsc/bindings/webcore/JSMessageEvent.cpp b/src/bun.js/bindings/webcore/JSMessageEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSMessageEvent.cpp rename to src/bun.js/bindings/webcore/JSMessageEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSMessageEvent.dep b/src/bun.js/bindings/webcore/JSMessageEvent.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSMessageEvent.dep rename to src/bun.js/bindings/webcore/JSMessageEvent.dep diff --git a/src/javascript/jsc/bindings/webcore/JSMessageEvent.h b/src/bun.js/bindings/webcore/JSMessageEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSMessageEvent.h rename to src/bun.js/bindings/webcore/JSMessageEvent.h diff --git a/src/javascript/jsc/bindings/webcore/JSMessageEventCustom.cpp b/src/bun.js/bindings/webcore/JSMessageEventCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSMessageEventCustom.cpp rename to src/bun.js/bindings/webcore/JSMessageEventCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableByteStreamController.cpp b/src/bun.js/bindings/webcore/JSReadableByteStreamController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableByteStreamController.cpp rename to src/bun.js/bindings/webcore/JSReadableByteStreamController.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableByteStreamController.dep b/src/bun.js/bindings/webcore/JSReadableByteStreamController.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableByteStreamController.dep rename to src/bun.js/bindings/webcore/JSReadableByteStreamController.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableByteStreamController.h b/src/bun.js/bindings/webcore/JSReadableByteStreamController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableByteStreamController.h rename to src/bun.js/bindings/webcore/JSReadableByteStreamController.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStream.cpp b/src/bun.js/bindings/webcore/JSReadableStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStream.cpp rename to src/bun.js/bindings/webcore/JSReadableStream.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStream.dep b/src/bun.js/bindings/webcore/JSReadableStream.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStream.dep rename to src/bun.js/bindings/webcore/JSReadableStream.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStream.h b/src/bun.js/bindings/webcore/JSReadableStream.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStream.h rename to src/bun.js/bindings/webcore/JSReadableStream.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBReader.cpp b/src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBReader.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBReader.dep b/src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBReader.dep rename to src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBReader.h b/src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBReader.h rename to src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp b/src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.dep b/src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.dep rename to src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.h b/src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamBYOBRequest.h rename to src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultController.cpp b/src/bun.js/bindings/webcore/JSReadableStreamDefaultController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultController.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamDefaultController.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultController.dep b/src/bun.js/bindings/webcore/JSReadableStreamDefaultController.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultController.dep rename to src/bun.js/bindings/webcore/JSReadableStreamDefaultController.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultController.h b/src/bun.js/bindings/webcore/JSReadableStreamDefaultController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultController.h rename to src/bun.js/bindings/webcore/JSReadableStreamDefaultController.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultReader.cpp b/src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultReader.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultReader.dep b/src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultReader.dep rename to src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultReader.h b/src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamDefaultReader.h rename to src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSink.cpp b/src/bun.js/bindings/webcore/JSReadableStreamSink.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSink.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamSink.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSink.dep b/src/bun.js/bindings/webcore/JSReadableStreamSink.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSink.dep rename to src/bun.js/bindings/webcore/JSReadableStreamSink.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSink.h b/src/bun.js/bindings/webcore/JSReadableStreamSink.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSink.h rename to src/bun.js/bindings/webcore/JSReadableStreamSink.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSource.cpp b/src/bun.js/bindings/webcore/JSReadableStreamSource.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSource.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamSource.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSource.dep b/src/bun.js/bindings/webcore/JSReadableStreamSource.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSource.dep rename to src/bun.js/bindings/webcore/JSReadableStreamSource.dep diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSource.h b/src/bun.js/bindings/webcore/JSReadableStreamSource.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSource.h rename to src/bun.js/bindings/webcore/JSReadableStreamSource.h diff --git a/src/javascript/jsc/bindings/webcore/JSReadableStreamSourceCustom.cpp b/src/bun.js/bindings/webcore/JSReadableStreamSourceCustom.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSReadableStreamSourceCustom.cpp rename to src/bun.js/bindings/webcore/JSReadableStreamSourceCustom.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSServiceWorker.h b/src/bun.js/bindings/webcore/JSServiceWorker.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSServiceWorker.h rename to src/bun.js/bindings/webcore/JSServiceWorker.h diff --git a/src/javascript/jsc/bindings/webcore/JSTextEncoder.cpp b/src/bun.js/bindings/webcore/JSTextEncoder.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTextEncoder.cpp rename to src/bun.js/bindings/webcore/JSTextEncoder.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSTextEncoder.dep b/src/bun.js/bindings/webcore/JSTextEncoder.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTextEncoder.dep rename to src/bun.js/bindings/webcore/JSTextEncoder.dep diff --git a/src/javascript/jsc/bindings/webcore/JSTextEncoder.h b/src/bun.js/bindings/webcore/JSTextEncoder.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTextEncoder.h rename to src/bun.js/bindings/webcore/JSTextEncoder.h diff --git a/src/javascript/jsc/bindings/webcore/JSTransformStream.cpp b/src/bun.js/bindings/webcore/JSTransformStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTransformStream.cpp rename to src/bun.js/bindings/webcore/JSTransformStream.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSTransformStream.dep b/src/bun.js/bindings/webcore/JSTransformStream.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTransformStream.dep rename to src/bun.js/bindings/webcore/JSTransformStream.dep diff --git a/src/javascript/jsc/bindings/webcore/JSTransformStream.h b/src/bun.js/bindings/webcore/JSTransformStream.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTransformStream.h rename to src/bun.js/bindings/webcore/JSTransformStream.h diff --git a/src/javascript/jsc/bindings/webcore/JSTransformStreamDefaultController.cpp b/src/bun.js/bindings/webcore/JSTransformStreamDefaultController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTransformStreamDefaultController.cpp rename to src/bun.js/bindings/webcore/JSTransformStreamDefaultController.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSTransformStreamDefaultController.dep b/src/bun.js/bindings/webcore/JSTransformStreamDefaultController.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTransformStreamDefaultController.dep rename to src/bun.js/bindings/webcore/JSTransformStreamDefaultController.dep diff --git a/src/javascript/jsc/bindings/webcore/JSTransformStreamDefaultController.h b/src/bun.js/bindings/webcore/JSTransformStreamDefaultController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSTransformStreamDefaultController.h rename to src/bun.js/bindings/webcore/JSTransformStreamDefaultController.h diff --git a/src/javascript/jsc/bindings/webcore/JSURLSearchParams.cpp b/src/bun.js/bindings/webcore/JSURLSearchParams.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSURLSearchParams.cpp rename to src/bun.js/bindings/webcore/JSURLSearchParams.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSURLSearchParams.dep b/src/bun.js/bindings/webcore/JSURLSearchParams.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSURLSearchParams.dep rename to src/bun.js/bindings/webcore/JSURLSearchParams.dep diff --git a/src/javascript/jsc/bindings/webcore/JSURLSearchParams.h b/src/bun.js/bindings/webcore/JSURLSearchParams.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSURLSearchParams.h rename to src/bun.js/bindings/webcore/JSURLSearchParams.h diff --git a/src/javascript/jsc/bindings/webcore/JSValueInWrappedObject.h b/src/bun.js/bindings/webcore/JSValueInWrappedObject.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSValueInWrappedObject.h rename to src/bun.js/bindings/webcore/JSValueInWrappedObject.h diff --git a/src/javascript/jsc/bindings/webcore/JSWebSocket.cpp b/src/bun.js/bindings/webcore/JSWebSocket.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWebSocket.cpp rename to src/bun.js/bindings/webcore/JSWebSocket.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSWebSocket.dep b/src/bun.js/bindings/webcore/JSWebSocket.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWebSocket.dep rename to src/bun.js/bindings/webcore/JSWebSocket.dep diff --git a/src/javascript/jsc/bindings/webcore/JSWebSocket.h b/src/bun.js/bindings/webcore/JSWebSocket.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWebSocket.h rename to src/bun.js/bindings/webcore/JSWebSocket.h diff --git a/src/javascript/jsc/bindings/webcore/JSWindowProxy.h b/src/bun.js/bindings/webcore/JSWindowProxy.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWindowProxy.h rename to src/bun.js/bindings/webcore/JSWindowProxy.h diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStream.cpp b/src/bun.js/bindings/webcore/JSWritableStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStream.cpp rename to src/bun.js/bindings/webcore/JSWritableStream.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStream.dep b/src/bun.js/bindings/webcore/JSWritableStream.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStream.dep rename to src/bun.js/bindings/webcore/JSWritableStream.dep diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStream.h b/src/bun.js/bindings/webcore/JSWritableStream.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStream.h rename to src/bun.js/bindings/webcore/JSWritableStream.h diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultController.cpp b/src/bun.js/bindings/webcore/JSWritableStreamDefaultController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultController.cpp rename to src/bun.js/bindings/webcore/JSWritableStreamDefaultController.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultController.dep b/src/bun.js/bindings/webcore/JSWritableStreamDefaultController.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultController.dep rename to src/bun.js/bindings/webcore/JSWritableStreamDefaultController.dep diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultController.h b/src/bun.js/bindings/webcore/JSWritableStreamDefaultController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultController.h rename to src/bun.js/bindings/webcore/JSWritableStreamDefaultController.h diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultWriter.cpp b/src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultWriter.cpp rename to src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultWriter.dep b/src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultWriter.dep rename to src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.dep diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultWriter.h b/src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamDefaultWriter.h rename to src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.h diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamSink.cpp b/src/bun.js/bindings/webcore/JSWritableStreamSink.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamSink.cpp rename to src/bun.js/bindings/webcore/JSWritableStreamSink.cpp diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamSink.dep b/src/bun.js/bindings/webcore/JSWritableStreamSink.dep similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamSink.dep rename to src/bun.js/bindings/webcore/JSWritableStreamSink.dep diff --git a/src/javascript/jsc/bindings/webcore/JSWritableStreamSink.h b/src/bun.js/bindings/webcore/JSWritableStreamSink.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/JSWritableStreamSink.h rename to src/bun.js/bindings/webcore/JSWritableStreamSink.h diff --git a/src/javascript/jsc/bindings/webcore/MessageEvent.cpp b/src/bun.js/bindings/webcore/MessageEvent.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/MessageEvent.cpp rename to src/bun.js/bindings/webcore/MessageEvent.cpp diff --git a/src/javascript/jsc/bindings/webcore/MessageEvent.h b/src/bun.js/bindings/webcore/MessageEvent.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/MessageEvent.h rename to src/bun.js/bindings/webcore/MessageEvent.h diff --git a/src/javascript/jsc/bindings/webcore/MessageEvent.idl b/src/bun.js/bindings/webcore/MessageEvent.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/MessageEvent.idl rename to src/bun.js/bindings/webcore/MessageEvent.idl diff --git a/src/javascript/jsc/bindings/webcore/Node.h b/src/bun.js/bindings/webcore/Node.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/Node.h rename to src/bun.js/bindings/webcore/Node.h diff --git a/src/javascript/jsc/bindings/webcore/ParsedContentType.cpp b/src/bun.js/bindings/webcore/ParsedContentType.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ParsedContentType.cpp rename to src/bun.js/bindings/webcore/ParsedContentType.cpp diff --git a/src/javascript/jsc/bindings/webcore/ParsedContentType.h b/src/bun.js/bindings/webcore/ParsedContentType.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ParsedContentType.h rename to src/bun.js/bindings/webcore/ParsedContentType.h diff --git a/src/javascript/jsc/bindings/webcore/ReadableStream.cpp b/src/bun.js/bindings/webcore/ReadableStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStream.cpp rename to src/bun.js/bindings/webcore/ReadableStream.cpp diff --git a/src/javascript/jsc/bindings/webcore/ReadableStream.h b/src/bun.js/bindings/webcore/ReadableStream.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStream.h rename to src/bun.js/bindings/webcore/ReadableStream.h diff --git a/src/javascript/jsc/bindings/webcore/ReadableStreamDefaultController.cpp b/src/bun.js/bindings/webcore/ReadableStreamDefaultController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStreamDefaultController.cpp rename to src/bun.js/bindings/webcore/ReadableStreamDefaultController.cpp diff --git a/src/javascript/jsc/bindings/webcore/ReadableStreamDefaultController.h b/src/bun.js/bindings/webcore/ReadableStreamDefaultController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStreamDefaultController.h rename to src/bun.js/bindings/webcore/ReadableStreamDefaultController.h diff --git a/src/javascript/jsc/bindings/webcore/ReadableStreamSink.cpp b/src/bun.js/bindings/webcore/ReadableStreamSink.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStreamSink.cpp rename to src/bun.js/bindings/webcore/ReadableStreamSink.cpp diff --git a/src/javascript/jsc/bindings/webcore/ReadableStreamSink.h b/src/bun.js/bindings/webcore/ReadableStreamSink.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStreamSink.h rename to src/bun.js/bindings/webcore/ReadableStreamSink.h diff --git a/src/javascript/jsc/bindings/webcore/ReadableStreamSource.cpp b/src/bun.js/bindings/webcore/ReadableStreamSource.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStreamSource.cpp rename to src/bun.js/bindings/webcore/ReadableStreamSource.cpp diff --git a/src/javascript/jsc/bindings/webcore/ReadableStreamSource.h b/src/bun.js/bindings/webcore/ReadableStreamSource.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ReadableStreamSource.h rename to src/bun.js/bindings/webcore/ReadableStreamSource.h diff --git a/src/javascript/jsc/bindings/webcore/RegisteredEventListener.h b/src/bun.js/bindings/webcore/RegisteredEventListener.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/RegisteredEventListener.h rename to src/bun.js/bindings/webcore/RegisteredEventListener.h diff --git a/src/javascript/jsc/bindings/webcore/ScriptWrappable.cpp b/src/bun.js/bindings/webcore/ScriptWrappable.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/ScriptWrappable.cpp rename to src/bun.js/bindings/webcore/ScriptWrappable.cpp diff --git a/src/javascript/jsc/bindings/webcore/ScriptWrappable.h b/src/bun.js/bindings/webcore/ScriptWrappable.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ScriptWrappable.h rename to src/bun.js/bindings/webcore/ScriptWrappable.h diff --git a/src/javascript/jsc/bindings/webcore/ScriptWrappableInlines.h b/src/bun.js/bindings/webcore/ScriptWrappableInlines.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/ScriptWrappableInlines.h rename to src/bun.js/bindings/webcore/ScriptWrappableInlines.h diff --git a/src/javascript/jsc/bindings/webcore/StructuredClone.cpp b/src/bun.js/bindings/webcore/StructuredClone.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/StructuredClone.cpp rename to src/bun.js/bindings/webcore/StructuredClone.cpp diff --git a/src/javascript/jsc/bindings/webcore/StructuredClone.h b/src/bun.js/bindings/webcore/StructuredClone.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/StructuredClone.h rename to src/bun.js/bindings/webcore/StructuredClone.h diff --git a/src/javascript/jsc/bindings/webcore/TaskSource.h b/src/bun.js/bindings/webcore/TaskSource.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/TaskSource.h rename to src/bun.js/bindings/webcore/TaskSource.h diff --git a/src/javascript/jsc/bindings/webcore/TextEncoder.cpp b/src/bun.js/bindings/webcore/TextEncoder.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/TextEncoder.cpp rename to src/bun.js/bindings/webcore/TextEncoder.cpp diff --git a/src/javascript/jsc/bindings/webcore/TextEncoder.h b/src/bun.js/bindings/webcore/TextEncoder.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/TextEncoder.h rename to src/bun.js/bindings/webcore/TextEncoder.h diff --git a/src/javascript/jsc/bindings/webcore/UIEventInit.h b/src/bun.js/bindings/webcore/UIEventInit.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/UIEventInit.h rename to src/bun.js/bindings/webcore/UIEventInit.h diff --git a/src/javascript/jsc/bindings/webcore/WebCoreBuiltins.h b/src/bun.js/bindings/webcore/WebCoreBuiltins.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebCoreBuiltins.h rename to src/bun.js/bindings/webcore/WebCoreBuiltins.h diff --git a/src/javascript/jsc/bindings/webcore/WebCoreJSClientData.h b/src/bun.js/bindings/webcore/WebCoreJSClientData.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebCoreJSClientData.h rename to src/bun.js/bindings/webcore/WebCoreJSClientData.h diff --git a/src/javascript/jsc/bindings/webcore/WebCoreTypedArrayController.cpp b/src/bun.js/bindings/webcore/WebCoreTypedArrayController.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebCoreTypedArrayController.cpp rename to src/bun.js/bindings/webcore/WebCoreTypedArrayController.cpp diff --git a/src/javascript/jsc/bindings/webcore/WebCoreTypedArrayController.h b/src/bun.js/bindings/webcore/WebCoreTypedArrayController.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebCoreTypedArrayController.h rename to src/bun.js/bindings/webcore/WebCoreTypedArrayController.h diff --git a/src/javascript/jsc/bindings/webcore/WebSocket.cpp b/src/bun.js/bindings/webcore/WebSocket.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebSocket.cpp rename to src/bun.js/bindings/webcore/WebSocket.cpp diff --git a/src/javascript/jsc/bindings/webcore/WebSocket.h b/src/bun.js/bindings/webcore/WebSocket.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebSocket.h rename to src/bun.js/bindings/webcore/WebSocket.h diff --git a/src/javascript/jsc/bindings/webcore/WebSocket.idl b/src/bun.js/bindings/webcore/WebSocket.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebSocket.idl rename to src/bun.js/bindings/webcore/WebSocket.idl diff --git a/src/javascript/jsc/bindings/webcore/WebSocketIdentifier.h b/src/bun.js/bindings/webcore/WebSocketIdentifier.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WebSocketIdentifier.h rename to src/bun.js/bindings/webcore/WebSocketIdentifier.h diff --git a/src/javascript/jsc/bindings/webcore/WritableStream.cpp b/src/bun.js/bindings/webcore/WritableStream.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/WritableStream.cpp rename to src/bun.js/bindings/webcore/WritableStream.cpp diff --git a/src/javascript/jsc/bindings/webcore/WritableStream.h b/src/bun.js/bindings/webcore/WritableStream.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WritableStream.h rename to src/bun.js/bindings/webcore/WritableStream.h diff --git a/src/javascript/jsc/bindings/webcore/WritableStream.idl b/src/bun.js/bindings/webcore/WritableStream.idl similarity index 100% rename from src/javascript/jsc/bindings/webcore/WritableStream.idl rename to src/bun.js/bindings/webcore/WritableStream.idl diff --git a/src/javascript/jsc/bindings/webcore/WritableStreamSink.h b/src/bun.js/bindings/webcore/WritableStreamSink.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/WritableStreamSink.h rename to src/bun.js/bindings/webcore/WritableStreamSink.h diff --git a/src/javascript/jsc/bindings/webcore/config.h b/src/bun.js/bindings/webcore/config.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/config.h rename to src/bun.js/bindings/webcore/config.h diff --git a/src/javascript/jsc/bindings/webcore/weak_handle.cpp b/src/bun.js/bindings/webcore/weak_handle.cpp similarity index 100% rename from src/javascript/jsc/bindings/webcore/weak_handle.cpp rename to src/bun.js/bindings/webcore/weak_handle.cpp diff --git a/src/javascript/jsc/bindings/webcore/weak_handle.h b/src/bun.js/bindings/webcore/weak_handle.h similarity index 100% rename from src/javascript/jsc/bindings/webcore/weak_handle.h rename to src/bun.js/bindings/webcore/weak_handle.h diff --git a/src/javascript/jsc/bindings/wtf-bindings.cpp b/src/bun.js/bindings/wtf-bindings.cpp similarity index 100% rename from src/javascript/jsc/bindings/wtf-bindings.cpp rename to src/bun.js/bindings/wtf-bindings.cpp diff --git a/src/javascript/jsc/bindings/wtf-bindings.h b/src/bun.js/bindings/wtf-bindings.h similarity index 100% rename from src/javascript/jsc/bindings/wtf-bindings.h rename to src/bun.js/bindings/wtf-bindings.h diff --git a/src/javascript/jsc/builtins/BunBuiltinNames.h b/src/bun.js/builtins/BunBuiltinNames.h similarity index 100% rename from src/javascript/jsc/builtins/BunBuiltinNames.h rename to src/bun.js/builtins/BunBuiltinNames.h diff --git a/src/javascript/jsc/builtins/README.md b/src/bun.js/builtins/README.md similarity index 100% rename from src/javascript/jsc/builtins/README.md rename to src/bun.js/builtins/README.md diff --git a/src/javascript/jsc/builtins/WebCoreJSBuiltinInternals.cpp b/src/bun.js/builtins/WebCoreJSBuiltinInternals.cpp similarity index 100% rename from src/javascript/jsc/builtins/WebCoreJSBuiltinInternals.cpp rename to src/bun.js/builtins/WebCoreJSBuiltinInternals.cpp diff --git a/src/javascript/jsc/builtins/WebCoreJSBuiltins.cpp b/src/bun.js/builtins/WebCoreJSBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/WebCoreJSBuiltins.cpp rename to src/bun.js/builtins/WebCoreJSBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ByteLengthQueuingStrategyBuiltins.cpp b/src/bun.js/builtins/cpp/ByteLengthQueuingStrategyBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ByteLengthQueuingStrategyBuiltins.cpp rename to src/bun.js/builtins/cpp/ByteLengthQueuingStrategyBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ByteLengthQueuingStrategyBuiltins.h b/src/bun.js/builtins/cpp/ByteLengthQueuingStrategyBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ByteLengthQueuingStrategyBuiltins.h rename to src/bun.js/builtins/cpp/ByteLengthQueuingStrategyBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/CountQueuingStrategyBuiltins.cpp b/src/bun.js/builtins/cpp/CountQueuingStrategyBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/CountQueuingStrategyBuiltins.cpp rename to src/bun.js/builtins/cpp/CountQueuingStrategyBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/CountQueuingStrategyBuiltins.h b/src/bun.js/builtins/cpp/CountQueuingStrategyBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/CountQueuingStrategyBuiltins.h rename to src/bun.js/builtins/cpp/CountQueuingStrategyBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/JSBufferConstructorBuiltins.cpp b/src/bun.js/builtins/cpp/JSBufferConstructorBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/JSBufferConstructorBuiltins.cpp rename to src/bun.js/builtins/cpp/JSBufferConstructorBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/JSBufferConstructorBuiltins.h b/src/bun.js/builtins/cpp/JSBufferConstructorBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/JSBufferConstructorBuiltins.h rename to src/bun.js/builtins/cpp/JSBufferConstructorBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/JSBufferPrototypeBuiltins.cpp b/src/bun.js/builtins/cpp/JSBufferPrototypeBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/JSBufferPrototypeBuiltins.cpp rename to src/bun.js/builtins/cpp/JSBufferPrototypeBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/JSBufferPrototypeBuiltins.h b/src/bun.js/builtins/cpp/JSBufferPrototypeBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/JSBufferPrototypeBuiltins.h rename to src/bun.js/builtins/cpp/JSBufferPrototypeBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/JSZigGlobalObjectBuiltins.cpp b/src/bun.js/builtins/cpp/JSZigGlobalObjectBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/JSZigGlobalObjectBuiltins.cpp rename to src/bun.js/builtins/cpp/JSZigGlobalObjectBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/JSZigGlobalObjectBuiltins.h b/src/bun.js/builtins/cpp/JSZigGlobalObjectBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/JSZigGlobalObjectBuiltins.h rename to src/bun.js/builtins/cpp/JSZigGlobalObjectBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableByteStreamControllerBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableByteStreamControllerBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableByteStreamControllerBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableByteStreamControllerBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableByteStreamControllerBuiltins.h b/src/bun.js/builtins/cpp/ReadableByteStreamControllerBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableByteStreamControllerBuiltins.h rename to src/bun.js/builtins/cpp/ReadableByteStreamControllerBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableByteStreamInternalsBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableByteStreamInternalsBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableByteStreamInternalsBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableByteStreamInternalsBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableByteStreamInternalsBuiltins.h b/src/bun.js/builtins/cpp/ReadableByteStreamInternalsBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableByteStreamInternalsBuiltins.h rename to src/bun.js/builtins/cpp/ReadableByteStreamInternalsBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamBYOBReaderBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamBYOBReaderBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamBYOBReaderBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableStreamBYOBReaderBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamBYOBReaderBuiltins.h b/src/bun.js/builtins/cpp/ReadableStreamBYOBReaderBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamBYOBReaderBuiltins.h rename to src/bun.js/builtins/cpp/ReadableStreamBYOBReaderBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamBYOBRequestBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamBYOBRequestBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamBYOBRequestBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableStreamBYOBRequestBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamBYOBRequestBuiltins.h b/src/bun.js/builtins/cpp/ReadableStreamBYOBRequestBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamBYOBRequestBuiltins.h rename to src/bun.js/builtins/cpp/ReadableStreamBYOBRequestBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamBuiltins.h b/src/bun.js/builtins/cpp/ReadableStreamBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamBuiltins.h rename to src/bun.js/builtins/cpp/ReadableStreamBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamDefaultControllerBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamDefaultControllerBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamDefaultControllerBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableStreamDefaultControllerBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamDefaultControllerBuiltins.h b/src/bun.js/builtins/cpp/ReadableStreamDefaultControllerBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamDefaultControllerBuiltins.h rename to src/bun.js/builtins/cpp/ReadableStreamDefaultControllerBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamDefaultReaderBuiltins.h b/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamDefaultReaderBuiltins.h rename to src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamInternalsBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamInternalsBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamInternalsBuiltins.cpp rename to src/bun.js/builtins/cpp/ReadableStreamInternalsBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/ReadableStreamInternalsBuiltins.h b/src/bun.js/builtins/cpp/ReadableStreamInternalsBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/ReadableStreamInternalsBuiltins.h rename to src/bun.js/builtins/cpp/ReadableStreamInternalsBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/StreamInternalsBuiltins.cpp b/src/bun.js/builtins/cpp/StreamInternalsBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/StreamInternalsBuiltins.cpp rename to src/bun.js/builtins/cpp/StreamInternalsBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/StreamInternalsBuiltins.h b/src/bun.js/builtins/cpp/StreamInternalsBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/StreamInternalsBuiltins.h rename to src/bun.js/builtins/cpp/StreamInternalsBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/TransformStreamBuiltins.cpp b/src/bun.js/builtins/cpp/TransformStreamBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/TransformStreamBuiltins.cpp rename to src/bun.js/builtins/cpp/TransformStreamBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/TransformStreamBuiltins.h b/src/bun.js/builtins/cpp/TransformStreamBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/TransformStreamBuiltins.h rename to src/bun.js/builtins/cpp/TransformStreamBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/TransformStreamDefaultControllerBuiltins.cpp b/src/bun.js/builtins/cpp/TransformStreamDefaultControllerBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/TransformStreamDefaultControllerBuiltins.cpp rename to src/bun.js/builtins/cpp/TransformStreamDefaultControllerBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/TransformStreamDefaultControllerBuiltins.h b/src/bun.js/builtins/cpp/TransformStreamDefaultControllerBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/TransformStreamDefaultControllerBuiltins.h rename to src/bun.js/builtins/cpp/TransformStreamDefaultControllerBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/TransformStreamInternalsBuiltins.cpp b/src/bun.js/builtins/cpp/TransformStreamInternalsBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/TransformStreamInternalsBuiltins.cpp rename to src/bun.js/builtins/cpp/TransformStreamInternalsBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/TransformStreamInternalsBuiltins.h b/src/bun.js/builtins/cpp/TransformStreamInternalsBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/TransformStreamInternalsBuiltins.h rename to src/bun.js/builtins/cpp/TransformStreamInternalsBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h b/src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/WebCoreJSBuiltinInternals.h rename to src/bun.js/builtins/cpp/WebCoreJSBuiltinInternals.h diff --git a/src/javascript/jsc/builtins/cpp/WebCoreJSBuiltins.h b/src/bun.js/builtins/cpp/WebCoreJSBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/WebCoreJSBuiltins.h rename to src/bun.js/builtins/cpp/WebCoreJSBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/WritableStreamDefaultControllerBuiltins.cpp b/src/bun.js/builtins/cpp/WritableStreamDefaultControllerBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/WritableStreamDefaultControllerBuiltins.cpp rename to src/bun.js/builtins/cpp/WritableStreamDefaultControllerBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/WritableStreamDefaultControllerBuiltins.h b/src/bun.js/builtins/cpp/WritableStreamDefaultControllerBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/WritableStreamDefaultControllerBuiltins.h rename to src/bun.js/builtins/cpp/WritableStreamDefaultControllerBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/WritableStreamDefaultWriterBuiltins.cpp b/src/bun.js/builtins/cpp/WritableStreamDefaultWriterBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/WritableStreamDefaultWriterBuiltins.cpp rename to src/bun.js/builtins/cpp/WritableStreamDefaultWriterBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/WritableStreamDefaultWriterBuiltins.h b/src/bun.js/builtins/cpp/WritableStreamDefaultWriterBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/WritableStreamDefaultWriterBuiltins.h rename to src/bun.js/builtins/cpp/WritableStreamDefaultWriterBuiltins.h diff --git a/src/javascript/jsc/builtins/cpp/WritableStreamInternalsBuiltins.cpp b/src/bun.js/builtins/cpp/WritableStreamInternalsBuiltins.cpp similarity index 100% rename from src/javascript/jsc/builtins/cpp/WritableStreamInternalsBuiltins.cpp rename to src/bun.js/builtins/cpp/WritableStreamInternalsBuiltins.cpp diff --git a/src/javascript/jsc/builtins/cpp/WritableStreamInternalsBuiltins.h b/src/bun.js/builtins/cpp/WritableStreamInternalsBuiltins.h similarity index 100% rename from src/javascript/jsc/builtins/cpp/WritableStreamInternalsBuiltins.h rename to src/bun.js/builtins/cpp/WritableStreamInternalsBuiltins.h diff --git a/src/javascript/jsc/builtins/js/ByteLengthQueuingStrategy.js b/src/bun.js/builtins/js/ByteLengthQueuingStrategy.js similarity index 100% rename from src/javascript/jsc/builtins/js/ByteLengthQueuingStrategy.js rename to src/bun.js/builtins/js/ByteLengthQueuingStrategy.js diff --git a/src/javascript/jsc/builtins/js/CountQueuingStrategy.js b/src/bun.js/builtins/js/CountQueuingStrategy.js similarity index 100% rename from src/javascript/jsc/builtins/js/CountQueuingStrategy.js rename to src/bun.js/builtins/js/CountQueuingStrategy.js diff --git a/src/javascript/jsc/builtins/js/JSBufferConstructor.js b/src/bun.js/builtins/js/JSBufferConstructor.js similarity index 100% rename from src/javascript/jsc/builtins/js/JSBufferConstructor.js rename to src/bun.js/builtins/js/JSBufferConstructor.js diff --git a/src/javascript/jsc/builtins/js/JSBufferPrototype.js b/src/bun.js/builtins/js/JSBufferPrototype.js similarity index 100% rename from src/javascript/jsc/builtins/js/JSBufferPrototype.js rename to src/bun.js/builtins/js/JSBufferPrototype.js diff --git a/src/javascript/jsc/builtins/js/JSZigGlobalObject.js b/src/bun.js/builtins/js/JSZigGlobalObject.js similarity index 100% rename from src/javascript/jsc/builtins/js/JSZigGlobalObject.js rename to src/bun.js/builtins/js/JSZigGlobalObject.js diff --git a/src/javascript/jsc/builtins/js/ReadableByteStreamController.js b/src/bun.js/builtins/js/ReadableByteStreamController.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableByteStreamController.js rename to src/bun.js/builtins/js/ReadableByteStreamController.js diff --git a/src/javascript/jsc/builtins/js/ReadableByteStreamInternals.js b/src/bun.js/builtins/js/ReadableByteStreamInternals.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableByteStreamInternals.js rename to src/bun.js/builtins/js/ReadableByteStreamInternals.js diff --git a/src/javascript/jsc/builtins/js/ReadableStream.js b/src/bun.js/builtins/js/ReadableStream.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableStream.js rename to src/bun.js/builtins/js/ReadableStream.js diff --git a/src/javascript/jsc/builtins/js/ReadableStreamBYOBReader.js b/src/bun.js/builtins/js/ReadableStreamBYOBReader.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableStreamBYOBReader.js rename to src/bun.js/builtins/js/ReadableStreamBYOBReader.js diff --git a/src/javascript/jsc/builtins/js/ReadableStreamBYOBRequest.js b/src/bun.js/builtins/js/ReadableStreamBYOBRequest.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableStreamBYOBRequest.js rename to src/bun.js/builtins/js/ReadableStreamBYOBRequest.js diff --git a/src/javascript/jsc/builtins/js/ReadableStreamDefaultController.js b/src/bun.js/builtins/js/ReadableStreamDefaultController.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableStreamDefaultController.js rename to src/bun.js/builtins/js/ReadableStreamDefaultController.js diff --git a/src/javascript/jsc/builtins/js/ReadableStreamDefaultReader.js b/src/bun.js/builtins/js/ReadableStreamDefaultReader.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableStreamDefaultReader.js rename to src/bun.js/builtins/js/ReadableStreamDefaultReader.js diff --git a/src/javascript/jsc/builtins/js/ReadableStreamInternals.js b/src/bun.js/builtins/js/ReadableStreamInternals.js similarity index 100% rename from src/javascript/jsc/builtins/js/ReadableStreamInternals.js rename to src/bun.js/builtins/js/ReadableStreamInternals.js diff --git a/src/javascript/jsc/builtins/js/StreamInternals.js b/src/bun.js/builtins/js/StreamInternals.js similarity index 100% rename from src/javascript/jsc/builtins/js/StreamInternals.js rename to src/bun.js/builtins/js/StreamInternals.js diff --git a/src/javascript/jsc/builtins/js/TransformStream.js b/src/bun.js/builtins/js/TransformStream.js similarity index 100% rename from src/javascript/jsc/builtins/js/TransformStream.js rename to src/bun.js/builtins/js/TransformStream.js diff --git a/src/javascript/jsc/builtins/js/TransformStreamDefaultController.js b/src/bun.js/builtins/js/TransformStreamDefaultController.js similarity index 100% rename from src/javascript/jsc/builtins/js/TransformStreamDefaultController.js rename to src/bun.js/builtins/js/TransformStreamDefaultController.js diff --git a/src/javascript/jsc/builtins/js/TransformStreamInternals.js b/src/bun.js/builtins/js/TransformStreamInternals.js similarity index 100% rename from src/javascript/jsc/builtins/js/TransformStreamInternals.js rename to src/bun.js/builtins/js/TransformStreamInternals.js diff --git a/src/javascript/jsc/builtins/js/WritableStreamDefaultController.js b/src/bun.js/builtins/js/WritableStreamDefaultController.js similarity index 100% rename from src/javascript/jsc/builtins/js/WritableStreamDefaultController.js rename to src/bun.js/builtins/js/WritableStreamDefaultController.js diff --git a/src/javascript/jsc/builtins/js/WritableStreamDefaultWriter.js b/src/bun.js/builtins/js/WritableStreamDefaultWriter.js similarity index 100% rename from src/javascript/jsc/builtins/js/WritableStreamDefaultWriter.js rename to src/bun.js/builtins/js/WritableStreamDefaultWriter.js diff --git a/src/javascript/jsc/builtins/js/WritableStreamInternals.js b/src/bun.js/builtins/js/WritableStreamInternals.js similarity index 100% rename from src/javascript/jsc/builtins/js/WritableStreamInternals.js rename to src/bun.js/builtins/js/WritableStreamInternals.js diff --git a/src/javascript/jsc/bun-jsc.exports.js b/src/bun.js/bun-jsc.exports.js similarity index 94% rename from src/javascript/jsc/bun-jsc.exports.js rename to src/bun.js/bun-jsc.exports.js index 3f288a8e60..d94f691974 100644 --- a/src/javascript/jsc/bun-jsc.exports.js +++ b/src/bun.js/bun-jsc.exports.js @@ -1,23 +1,25 @@ const jsc = globalThis[Symbol.for("Bun.lazy")]("bun:jsc"); +export const callerSourceOrigin = jsc.callerSourceOrigin; export const describe = jsc.describe; export const describeArray = jsc.describeArray; -export const gcAndSweep = jsc.gcAndSweep; -export const fullGC = jsc.fullGC; +export const drainMicrotasks = jsc.drainMicrotasks; export const edenGC = jsc.edenGC; +export const fullGC = jsc.fullGC; +export const gcAndSweep = jsc.gcAndSweep; +export const getRandomSeed = jsc.getRandomSeed; export const heapSize = jsc.heapSize; export const heapStats = jsc.heapStats; -export const memoryUsage = jsc.memoryUsage; -export const getRandomSeed = jsc.getRandomSeed; -export const setRandomSeed = jsc.setRandomSeed; export const isRope = jsc.isRope; -export const callerSourceOrigin = jsc.callerSourceOrigin; +export const memoryUsage = jsc.memoryUsage; export const noFTL = jsc.noFTL; export const noOSRExitFuzzing = jsc.noOSRExitFuzzing; -export const optimizeNextInvocation = jsc.optimizeNextInvocation; export const numberOfDFGCompiles = jsc.numberOfDFGCompiles; +export const optimizeNextInvocation = jsc.optimizeNextInvocation; export const releaseWeakRefs = jsc.releaseWeakRefs; -export const totalCompileTime = jsc.totalCompileTime; export const reoptimizationRetryCount = jsc.reoptimizationRetryCount; -export const drainMicrotasks = jsc.drainMicrotasks; +export const setRandomSeed = jsc.setRandomSeed; +export const startRemoteDebugger = jsc.startRemoteDebugger; +export const totalCompileTime = jsc.totalCompileTime; + export default jsc; diff --git a/integration/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js b/src/bun.js/child_process.exports.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js rename to src/bun.js/child_process.exports.js diff --git a/src/javascript/jsc/config.zig b/src/bun.js/config.zig similarity index 63% rename from src/javascript/jsc/config.zig rename to src/bun.js/config.zig index 3feff8677e..8ec9238f61 100644 --- a/src/javascript/jsc/config.zig +++ b/src/bun.js/config.zig @@ -1,4 +1,4 @@ -const bun = @import("../../global.zig"); +const bun = @import("../global.zig"); const string = bun.string; const Output = bun.Output; const Global = bun.Global; @@ -10,17 +10,17 @@ const default_allocator = bun.default_allocator; const C = bun.C; const std = @import("std"); -const Fs = @import("../../fs.zig"); -const resolver = @import("../../resolver/resolver.zig"); -const ast = @import("../../import_record.zig"); -const NodeModuleBundle = @import("../../node_module_bundle.zig").NodeModuleBundle; -const logger = @import("../../logger.zig"); -const Api = @import("../../api/schema.zig").Api; -const options = @import("../../options.zig"); -const Bundler = @import("../../bundler.zig").ServeBundler; -const js_printer = @import("../../js_printer.zig"); -const hash_map = @import("../../hash_map.zig"); -const http = @import("../../http.zig"); +const Fs = @import("../fs.zig"); +const resolver = @import("../resolver/resolver.zig"); +const ast = @import("../import_record.zig"); +const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; +const logger = @import("../logger.zig"); +const Api = @import("../api/schema.zig").Api; +const options = @import("../options.zig"); +const Bundler = @import("../bundler.zig").ServeBundler; +const js_printer = @import("../js_printer.zig"); +const hash_map = @import("../hash_map.zig"); +const http = @import("../http.zig"); pub const DefaultBunDefines = struct { pub const Keys = struct { diff --git a/src/javascript/jsc/detect-libc.js b/src/bun.js/detect-libc.js similarity index 100% rename from src/javascript/jsc/detect-libc.js rename to src/bun.js/detect-libc.js diff --git a/src/javascript/jsc/detect-libc.linux.js b/src/bun.js/detect-libc.linux.js similarity index 100% rename from src/javascript/jsc/detect-libc.linux.js rename to src/bun.js/detect-libc.linux.js diff --git a/src/javascript/jsc/event_loop.zig b/src/bun.js/event_loop.zig similarity index 98% rename from src/javascript/jsc/event_loop.zig rename to src/bun.js/event_loop.zig index 0a32732d0c..d6b7f75da6 100644 --- a/src/javascript/jsc/event_loop.zig +++ b/src/bun.js/event_loop.zig @@ -2,14 +2,14 @@ const std = @import("std"); const JSC = @import("javascript_core"); const JSGlobalObject = JSC.JSGlobalObject; const VirtualMachine = JSC.VirtualMachine; -const Lock = @import("../../lock.zig").Lock; +const Lock = @import("../lock.zig").Lock; const Microtask = JSC.Microtask; -const bun = @import("../../global.zig"); +const bun = @import("../global.zig"); const Environment = bun.Environment; const Fetch = JSC.WebCore.Fetch; const WebCore = JSC.WebCore; const Bun = JSC.API.Bun; -const TaggedPointerUnion = @import("../../tagged_pointer.zig").TaggedPointerUnion; +const TaggedPointerUnion = @import("../tagged_pointer.zig").TaggedPointerUnion; const CopyFilePromiseTask = WebCore.Blob.Store.CopyFile.CopyFilePromiseTask; const AsyncTransformTask = @import("./api/transpiler.zig").TransformTask.AsyncTransformTask; const BunTimerTimeoutTask = Bun.Timer.Timeout.TimeoutTask; @@ -19,8 +19,8 @@ const napi_async_work = JSC.napi.napi_async_work; const FetchTasklet = Fetch.FetchTasklet; const JSValue = JSC.JSValue; const js = JSC.C; -pub const WorkPool = @import("../../work_pool.zig").WorkPool; -pub const WorkPoolTask = @import("../../work_pool.zig").Task; +pub const WorkPool = @import("../work_pool.zig").WorkPool; +pub const WorkPoolTask = @import("../work_pool.zig").Task; const NetworkThread = @import("http").NetworkThread; pub fn ConcurrentPromiseTask(comptime Context: type) type { @@ -84,7 +84,7 @@ pub fn ConcurrentPromiseTask(comptime Context: type) type { pub fn SerialPromiseTask(comptime Context: type) type { return struct { - const SerialWorkPool = @import("../../work_pool.zig").NewWorkPool(1); + const SerialWorkPool = @import("../work_pool.zig").NewWorkPool(1); const This = @This(); ctx: *Context, diff --git a/src/javascript/jsc/ffi.exports.js b/src/bun.js/ffi.exports.js similarity index 100% rename from src/javascript/jsc/ffi.exports.js rename to src/bun.js/ffi.exports.js diff --git a/src/javascript/jsc/fs.exports.js b/src/bun.js/fs.exports.js similarity index 100% rename from src/javascript/jsc/fs.exports.js rename to src/bun.js/fs.exports.js diff --git a/src/javascript/jsc/fs_promises.exports.js b/src/bun.js/fs_promises.exports.js similarity index 100% rename from src/javascript/jsc/fs_promises.exports.js rename to src/bun.js/fs_promises.exports.js diff --git a/src/javascript/jsc/generate-jssink.js b/src/bun.js/generate-jssink.js similarity index 99% rename from src/javascript/jsc/generate-jssink.js rename to src/bun.js/generate-jssink.js index 924b8f0591..1d20be64fb 100644 --- a/src/javascript/jsc/generate-jssink.js +++ b/src/bun.js/generate-jssink.js @@ -203,7 +203,7 @@ async function implementation() { // Generated by ${import.meta.path} at ${new Date().toISOString()} // To regenerate this file, run: // -// bun src/javascript/jsc/generate-jssink.js +// bun src/bun.js/generate-jssink.js // #include "root.h" #include "JSSink.h" diff --git a/src/javascript/jsc/headergen/sizegen.cpp b/src/bun.js/headergen/sizegen.cpp similarity index 95% rename from src/javascript/jsc/headergen/sizegen.cpp rename to src/bun.js/headergen/sizegen.cpp index c8308d0842..1249d93b12 100644 --- a/src/javascript/jsc/headergen/sizegen.cpp +++ b/src/bun.js/headergen/sizegen.cpp @@ -25,8 +25,8 @@ int main() { strftime(buf, 80, "%Y-%m-%d %H:%M:%s", timeinfo); - cout << "// Auto-generated by src/javascript/jsc/headergen/sizegen.cpp at " - << buf << ".\n"; + cout << "// Auto-generated by src/bun.js/headergen/sizegen.cpp at " << buf + << ".\n"; cout << "// These are the byte sizes for the different object types with " "bindings in JavaScriptCore.\n"; cout << "// This allows us to safely return stack allocated C++ types to " diff --git a/src/javascript/jsc/javascript.zig b/src/bun.js/javascript.zig similarity index 97% rename from src/javascript/jsc/javascript.zig rename to src/bun.js/javascript.zig index a5c9f1e015..937b40cc6f 100644 --- a/src/javascript/jsc/javascript.zig +++ b/src/bun.js/javascript.zig @@ -2,7 +2,7 @@ const std = @import("std"); const is_bindgen: bool = std.meta.globalOption("bindgen", bool) orelse false; const StaticExport = @import("./bindings/static_export.zig"); const c_char = StaticExport.c_char; -const bun = @import("../../global.zig"); +const bun = @import("../global.zig"); const string = bun.string; const Output = bun.Output; const Global = bun.Global; @@ -12,7 +12,7 @@ const MutableString = bun.MutableString; const stringZ = bun.stringZ; const default_allocator = bun.default_allocator; const StoredFileDescriptorType = bun.StoredFileDescriptorType; -const Arena = @import("../../mimalloc_arena.zig").Arena; +const Arena = @import("../mimalloc_arena.zig").Arena; const C = bun.C; const NetworkThread = @import("http").NetworkThread; const IO = @import("io"); @@ -20,68 +20,68 @@ pub fn zigCast(comptime Destination: type, value: anytype) *Destination { return @ptrCast(*Destination, @alignCast(@alignOf(*Destination), value)); } const Allocator = std.mem.Allocator; -const IdentityContext = @import("../../identity_context.zig").IdentityContext; -const Fs = @import("../../fs.zig"); -const Resolver = @import("../../resolver/resolver.zig"); -const ast = @import("../../import_record.zig"); -const NodeModuleBundle = @import("../../node_module_bundle.zig").NodeModuleBundle; -const MacroEntryPoint = @import("../../bundler.zig").MacroEntryPoint; -const logger = @import("../../logger.zig"); -const Api = @import("../../api/schema.zig").Api; -const options = @import("../../options.zig"); -const Bundler = @import("../../bundler.zig").Bundler; -const ServerEntryPoint = @import("../../bundler.zig").ServerEntryPoint; -const js_printer = @import("../../js_printer.zig"); -const js_parser = @import("../../js_parser.zig"); -const js_ast = @import("../../js_ast.zig"); -const hash_map = @import("../../hash_map.zig"); -const http = @import("../../http.zig"); -const NodeFallbackModules = @import("../../node_fallbacks.zig"); +const IdentityContext = @import("../identity_context.zig").IdentityContext; +const Fs = @import("../fs.zig"); +const Resolver = @import("../resolver/resolver.zig"); +const ast = @import("../import_record.zig"); +const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; +const MacroEntryPoint = @import("../bundler.zig").MacroEntryPoint; +const logger = @import("../logger.zig"); +const Api = @import("../api/schema.zig").Api; +const options = @import("../options.zig"); +const Bundler = @import("../bundler.zig").Bundler; +const ServerEntryPoint = @import("../bundler.zig").ServerEntryPoint; +const js_printer = @import("../js_printer.zig"); +const js_parser = @import("../js_parser.zig"); +const js_ast = @import("../js_ast.zig"); +const hash_map = @import("../hash_map.zig"); +const http = @import("../http.zig"); +const NodeFallbackModules = @import("../node_fallbacks.zig"); const ImportKind = ast.ImportKind; -const Analytics = @import("../../analytics/analytics_thread.zig"); -const ZigString = @import("../../jsc.zig").ZigString; -const Runtime = @import("../../runtime.zig"); +const Analytics = @import("../analytics/analytics_thread.zig"); +const ZigString = @import("../jsc.zig").ZigString; +const Runtime = @import("../runtime.zig"); const Router = @import("./api/router.zig"); const ImportRecord = ast.ImportRecord; -const DotEnv = @import("../../env_loader.zig"); -const ParseResult = @import("../../bundler.zig").ParseResult; -const PackageJSON = @import("../../resolver/package_json.zig").PackageJSON; -const MacroRemap = @import("../../resolver/package_json.zig").MacroMap; -const WebCore = @import("../../jsc.zig").WebCore; +const DotEnv = @import("../env_loader.zig"); +const ParseResult = @import("../bundler.zig").ParseResult; +const PackageJSON = @import("../resolver/package_json.zig").PackageJSON; +const MacroRemap = @import("../resolver/package_json.zig").MacroMap; +const WebCore = @import("../jsc.zig").WebCore; const Request = WebCore.Request; const Response = WebCore.Response; const Headers = WebCore.Headers; const Fetch = WebCore.Fetch; const FetchEvent = WebCore.FetchEvent; -const js = @import("../../jsc.zig").C; -const JSC = @import("../../jsc.zig"); +const js = @import("../jsc.zig").C; +const JSC = @import("../jsc.zig"); const JSError = @import("./base.zig").JSError; const d = @import("./base.zig").d; const MarkedArrayBuffer = @import("./base.zig").MarkedArrayBuffer; const getAllocator = @import("./base.zig").getAllocator; -const JSValue = @import("../../jsc.zig").JSValue; +const JSValue = @import("../jsc.zig").JSValue; const NewClass = @import("./base.zig").NewClass; -const Microtask = @import("../../jsc.zig").Microtask; -const JSGlobalObject = @import("../../jsc.zig").JSGlobalObject; -const ExceptionValueRef = @import("../../jsc.zig").ExceptionValueRef; -const JSPrivateDataPtr = @import("../../jsc.zig").JSPrivateDataPtr; -const ZigConsoleClient = @import("../../jsc.zig").ZigConsoleClient; -const Node = @import("../../jsc.zig").Node; -const ZigException = @import("../../jsc.zig").ZigException; -const ZigStackTrace = @import("../../jsc.zig").ZigStackTrace; -const ErrorableResolvedSource = @import("../../jsc.zig").ErrorableResolvedSource; -const ResolvedSource = @import("../../jsc.zig").ResolvedSource; -const JSPromise = @import("../../jsc.zig").JSPromise; -const JSInternalPromise = @import("../../jsc.zig").JSInternalPromise; -const JSModuleLoader = @import("../../jsc.zig").JSModuleLoader; -const JSPromiseRejectionOperation = @import("../../jsc.zig").JSPromiseRejectionOperation; -const Exception = @import("../../jsc.zig").Exception; -const ErrorableZigString = @import("../../jsc.zig").ErrorableZigString; -const ZigGlobalObject = @import("../../jsc.zig").ZigGlobalObject; -const VM = @import("../../jsc.zig").VM; -const JSFunction = @import("../../jsc.zig").JSFunction; +const Microtask = @import("../jsc.zig").Microtask; +const JSGlobalObject = @import("../jsc.zig").JSGlobalObject; +const ExceptionValueRef = @import("../jsc.zig").ExceptionValueRef; +const JSPrivateDataPtr = @import("../jsc.zig").JSPrivateDataPtr; +const ZigConsoleClient = @import("../jsc.zig").ZigConsoleClient; +const Node = @import("../jsc.zig").Node; +const ZigException = @import("../jsc.zig").ZigException; +const ZigStackTrace = @import("../jsc.zig").ZigStackTrace; +const ErrorableResolvedSource = @import("../jsc.zig").ErrorableResolvedSource; +const ResolvedSource = @import("../jsc.zig").ResolvedSource; +const JSPromise = @import("../jsc.zig").JSPromise; +const JSInternalPromise = @import("../jsc.zig").JSInternalPromise; +const JSModuleLoader = @import("../jsc.zig").JSModuleLoader; +const JSPromiseRejectionOperation = @import("../jsc.zig").JSPromiseRejectionOperation; +const Exception = @import("../jsc.zig").Exception; +const ErrorableZigString = @import("../jsc.zig").ErrorableZigString; +const ZigGlobalObject = @import("../jsc.zig").ZigGlobalObject; +const VM = @import("../jsc.zig").VM; +const JSFunction = @import("../jsc.zig").JSFunction; const Config = @import("./config.zig"); -const URL = @import("../../url.zig").URL; +const URL = @import("../url.zig").URL; const Transpiler = @import("./api/transpiler.zig"); const Bun = JSC.API.Bun; const EventLoop = JSC.EventLoop; @@ -111,11 +111,11 @@ pub const GlobalClasses = [_]type{ // The last item in this array becomes "process.env" Bun.EnvironmentVariables.Class, }; -const TaggedPointerUnion = @import("../../tagged_pointer.zig").TaggedPointerUnion; +const TaggedPointerUnion = @import("../tagged_pointer.zig").TaggedPointerUnion; const Task = JSC.Task; -const Blob = @import("../../blob.zig"); +const Blob = @import("../blob.zig"); pub const Buffer = MarkedArrayBuffer; -const Lock = @import("../../lock.zig").Lock; +const Lock = @import("../lock.zig").Lock; pub const OpaqueCallback = fn (current: ?*anyopaque) callconv(.C) void; pub fn OpaqueWrap(comptime Context: type, comptime Function: fn (this: *Context) void) OpaqueCallback { @@ -129,7 +129,7 @@ pub fn OpaqueWrap(comptime Context: type, comptime Function: fn (this: *Context) const bun_file_import_path = "/node_modules.server.bun"; -const SourceMap = @import("../../sourcemap/sourcemap.zig"); +const SourceMap = @import("../sourcemap/sourcemap.zig"); const MappingList = SourceMap.Mapping.List; pub const SavedSourceMap = struct { diff --git a/src/javascript/jsc/javascript_core_c_api.zig b/src/bun.js/javascript_core_c_api.zig similarity index 100% rename from src/javascript/jsc/javascript_core_c_api.zig rename to src/bun.js/javascript_core_c_api.zig diff --git a/src/javascript/jsc/module.exports.js b/src/bun.js/module.exports.js similarity index 100% rename from src/javascript/jsc/module.exports.js rename to src/bun.js/module.exports.js diff --git a/src/javascript/jsc/node/buffer.js b/src/bun.js/node/buffer.js similarity index 100% rename from src/javascript/jsc/node/buffer.js rename to src/bun.js/node/buffer.js diff --git a/src/javascript/jsc/node/buffer.zig b/src/bun.js/node/buffer.zig similarity index 97% rename from src/javascript/jsc/node/buffer.zig rename to src/bun.js/node/buffer.zig index 2b604d5942..412c617226 100644 --- a/src/javascript/jsc/node/buffer.zig +++ b/src/bun.js/node/buffer.zig @@ -1,9 +1,9 @@ const std = @import("std"); -const bun = @import("../../../global.zig"); +const bun = @import("../../global.zig"); const strings = bun.strings; const string = bun.string; const AsyncIO = @import("io"); -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const PathString = JSC.PathString; const Environment = bun.Environment; const C = bun.C; diff --git a/src/javascript/jsc/node/dir_iterator.zig b/src/bun.js/node/dir_iterator.zig similarity index 99% rename from src/javascript/jsc/node/dir_iterator.zig rename to src/bun.js/node/dir_iterator.zig index 3d28541e76..19db4177db 100644 --- a/src/javascript/jsc/node/dir_iterator.zig +++ b/src/bun.js/node/dir_iterator.zig @@ -9,12 +9,12 @@ const std = @import("std"); const os = std.os; const Dir = std.fs.Dir; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const PathString = JSC.PathString; const IteratorError = error{ AccessDenied, SystemResources } || os.UnexpectedError; const mem = std.mem; -const strings = @import("../../../global.zig").strings; +const strings = @import("../../global.zig").strings; const Maybe = JSC.Maybe; const File = std.fs.File; const Result = Maybe(?Entry); diff --git a/src/javascript/jsc/node/node_fs.zig b/src/bun.js/node/node_fs.zig similarity index 99% rename from src/javascript/jsc/node/node_fs.zig rename to src/bun.js/node/node_fs.zig index 4a556f15cc..3cacb57b25 100644 --- a/src/javascript/jsc/node/node_fs.zig +++ b/src/bun.js/node/node_fs.zig @@ -2,11 +2,11 @@ // for interacting with the filesystem from JavaScript. // The top-level functions assume the arguments are already validated const std = @import("std"); -const bun = @import("../../../global.zig"); +const bun = @import("../../global.zig"); const strings = bun.strings; const string = bun.string; const AsyncIO = @import("io"); -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const PathString = JSC.PathString; const Environment = bun.Environment; const C = bun.C; @@ -25,8 +25,8 @@ const PathLike = JSC.Node.PathLike; const PathOrFileDescriptor = JSC.Node.PathOrFileDescriptor; const FileDescriptor = JSC.Node.FileDescriptor; const DirIterator = @import("./dir_iterator.zig"); -const Path = @import("../../../resolver/resolve_path.zig"); -const FileSystem = @import("../../../fs.zig").FileSystem; +const Path = @import("../../resolver/resolve_path.zig"); +const FileSystem = @import("../../fs.zig").FileSystem; const StringOrBuffer = JSC.Node.StringOrBuffer; const ArgumentsSlice = JSC.Node.ArgumentsSlice; const TimeLike = JSC.Node.TimeLike; @@ -1873,7 +1873,7 @@ const Arguments = struct { stream.end = end.toInt32(); } - if (arg.getIfPropertyExists(ctx.ptr(), "highwaterMark")) |highwaterMark| { + if (arg.getIfPropertyExists(ctx.ptr(), "highWaterMark")) |highwaterMark| { stream.highwater_mark = highwaterMark.toU32(); } } diff --git a/src/javascript/jsc/node/node_fs_binding.zig b/src/bun.js/node/node_fs_binding.zig similarity index 99% rename from src/javascript/jsc/node/node_fs_binding.zig rename to src/bun.js/node/node_fs_binding.zig index 9e689b929b..298727fb94 100644 --- a/src/javascript/jsc/node/node_fs_binding.zig +++ b/src/bun.js/node/node_fs_binding.zig @@ -1,11 +1,11 @@ -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const std = @import("std"); const Flavor = JSC.Node.Flavor; const ArgumentsSlice = JSC.Node.ArgumentsSlice; const system = std.os.system; const Maybe = JSC.Maybe; const Encoding = JSC.Node.Encoding; -const FeatureFlags = @import("../../../global.zig").FeatureFlags; +const FeatureFlags = @import("../../global.zig").FeatureFlags; const Args = JSC.Node.NodeFS.Arguments; const d = JSC.d; diff --git a/src/javascript/jsc/node/node_fs_constant.zig b/src/bun.js/node/node_fs_constant.zig similarity index 99% rename from src/javascript/jsc/node/node_fs_constant.zig rename to src/bun.js/node/node_fs_constant.zig index 655c18a4c5..72e752184c 100644 --- a/src/javascript/jsc/node/node_fs_constant.zig +++ b/src/bun.js/node/node_fs_constant.zig @@ -1,4 +1,4 @@ -const bun = @import("../../../global.zig"); +const bun = @import("../../global.zig"); const Environment = bun.Environment; const std = @import("std"); diff --git a/src/javascript/jsc/node/nodejs_error_code.zig b/src/bun.js/node/nodejs_error_code.zig similarity index 100% rename from src/javascript/jsc/node/nodejs_error_code.zig rename to src/bun.js/node/nodejs_error_code.zig diff --git a/src/javascript/jsc/node/syscall.zig b/src/bun.js/node/syscall.zig similarity index 98% rename from src/javascript/jsc/node/syscall.zig rename to src/bun.js/node/syscall.zig index ad4545aa9b..b931e9c0e8 100644 --- a/src/javascript/jsc/node/syscall.zig +++ b/src/bun.js/node/syscall.zig @@ -5,14 +5,14 @@ const os = std.os; const builtin = @import("builtin"); const Syscall = @This(); -const Environment = @import("../../../global.zig").Environment; -const default_allocator = @import("../../../global.zig").default_allocator; -const JSC = @import("../../../jsc.zig"); +const Environment = @import("../../global.zig").Environment; +const default_allocator = @import("../../global.zig").default_allocator; +const JSC = @import("../../jsc.zig"); const SystemError = JSC.SystemError; -const bun = @import("../../../global.zig"); +const bun = @import("../../global.zig"); const MAX_PATH_BYTES = bun.MAX_PATH_BYTES; const fd_t = bun.FileDescriptorType; -const C = @import("../../../global.zig").C; +const C = @import("../../global.zig").C; const linux = os.linux; const Maybe = JSC.Maybe; @@ -96,7 +96,7 @@ pub const Tag = enum(u8) { kqueue, pub var strings = std.EnumMap(Tag, JSC.C.JSStringRef).initFull(null); }; -const PathString = @import("../../../global.zig").PathString; +const PathString = @import("../../global.zig").PathString; const mode_t = os.mode_t; diff --git a/src/javascript/jsc/node/types.zig b/src/bun.js/node/types.zig similarity index 99% rename from src/javascript/jsc/node/types.zig rename to src/bun.js/node/types.zig index 0f9c31683a..52a35699b9 100644 --- a/src/javascript/jsc/node/types.zig +++ b/src/bun.js/node/types.zig @@ -1,20 +1,20 @@ const std = @import("std"); const builtin = @import("builtin"); -const bun = @import("../../../global.zig"); +const bun = @import("../../global.zig"); const strings = bun.strings; const string = bun.string; const AsyncIO = @import("io"); -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const PathString = JSC.PathString; const Environment = bun.Environment; const C = bun.C; const Syscall = @import("./syscall.zig"); const os = std.os; const Buffer = JSC.MarkedArrayBuffer; -const IdentityContext = @import("../../../identity_context.zig").IdentityContext; -const logger = @import("../../../logger.zig"); -const Fs = @import("../../../fs.zig"); -const URL = @import("../../../url.zig").URL; +const IdentityContext = @import("../../identity_context.zig").IdentityContext; +const logger = @import("../../logger.zig"); +const Fs = @import("../../fs.zig"); +const URL = @import("../../url.zig").URL; const Shimmer = @import("../bindings/shimmer.zig").Shimmer; const is_bindgen: bool = std.meta.globalOption("bindgen", bool) orelse false; const meta = bun.meta; @@ -2161,8 +2161,8 @@ pub const Path = struct { pub const name = "Bun__Path"; pub const include = "Path.h"; pub const namespace = shim.namespace; - const PathHandler = @import("../../../resolver/resolve_path.zig"); - const StringBuilder = @import("../../../string_builder.zig"); + const PathHandler = @import("../../resolver/resolve_path.zig"); + const StringBuilder = @import("../../string_builder.zig"); pub const code = @embedFile("../path.exports.js"); pub fn create(globalObject: *JSC.JSGlobalObject, isWindows: bool) callconv(.C) JSC.JSValue { diff --git a/src/javascript/jsc/node_streams_consumer.exports.js b/src/bun.js/node_streams_consumer.exports.js similarity index 100% rename from src/javascript/jsc/node_streams_consumer.exports.js rename to src/bun.js/node_streams_consumer.exports.js diff --git a/src/javascript/jsc/node_streams_web.exports.js b/src/bun.js/node_streams_web.exports.js similarity index 100% rename from src/javascript/jsc/node_streams_web.exports.js rename to src/bun.js/node_streams_web.exports.js diff --git a/src/javascript/jsc/node_timers.exports.js b/src/bun.js/node_timers.exports.js similarity index 100% rename from src/javascript/jsc/node_timers.exports.js rename to src/bun.js/node_timers.exports.js diff --git a/src/javascript/jsc/node_timers_promises.exports.js b/src/bun.js/node_timers_promises.exports.js similarity index 100% rename from src/javascript/jsc/node_timers_promises.exports.js rename to src/bun.js/node_timers_promises.exports.js diff --git a/src/javascript/jsc/path-posix.exports.js b/src/bun.js/path-posix.exports.js similarity index 100% rename from src/javascript/jsc/path-posix.exports.js rename to src/bun.js/path-posix.exports.js diff --git a/src/javascript/jsc/path-win32.exports.js b/src/bun.js/path-win32.exports.js similarity index 100% rename from src/javascript/jsc/path-win32.exports.js rename to src/bun.js/path-win32.exports.js diff --git a/src/javascript/jsc/path.exports.js b/src/bun.js/path.exports.js similarity index 100% rename from src/javascript/jsc/path.exports.js rename to src/bun.js/path.exports.js diff --git a/src/javascript/jsc/perf_hooks.exports.js b/src/bun.js/perf_hooks.exports.js similarity index 100% rename from src/javascript/jsc/perf_hooks.exports.js rename to src/bun.js/perf_hooks.exports.js diff --git a/src/javascript/jsc/process.exports.js b/src/bun.js/process.exports.js similarity index 100% rename from src/javascript/jsc/process.exports.js rename to src/bun.js/process.exports.js diff --git a/src/javascript/jsc/rare_data.zig b/src/bun.js/rare_data.zig similarity index 94% rename from src/javascript/jsc/rare_data.zig rename to src/bun.js/rare_data.zig index f82418da9a..cfca61ce0b 100644 --- a/src/javascript/jsc/rare_data.zig +++ b/src/bun.js/rare_data.zig @@ -1,13 +1,13 @@ -const EditorContext = @import("../../open.zig").EditorContext; +const EditorContext = @import("../open.zig").EditorContext; const Blob = @import("./webcore/response.zig").Blob; -const default_allocator = @import("../../global.zig").default_allocator; -const Output = @import("../../global.zig").Output; +const default_allocator = @import("../global.zig").default_allocator; +const Output = @import("../global.zig").Output; const RareData = @This(); const Syscall = @import("./node/syscall.zig"); const JSC = @import("javascript_core"); const std = @import("std"); const BoringSSL = @import("boringssl"); -const WebSocketClientMask = @import("../../http/websocket_http_client.zig").Mask; +const WebSocketClientMask = @import("../http/websocket_http_client.zig").Mask; boring_ssl_engine: ?*BoringSSL.ENGINE = null, editor_context: EditorContext = EditorContext{}, diff --git a/src/javascript/jsc/script_execution_context.zig b/src/bun.js/script_execution_context.zig similarity index 80% rename from src/javascript/jsc/script_execution_context.zig rename to src/bun.js/script_execution_context.zig index 37594e0f4e..551614ccc0 100644 --- a/src/javascript/jsc/script_execution_context.zig +++ b/src/bun.js/script_execution_context.zig @@ -1,4 +1,4 @@ -const JSC = @import("../../jsc.zig"); +const JSC = @import("../jsc.zig"); pub const ScriptExecutionContext = extern struct { main_file_path: JSC.ZigString, diff --git a/src/javascript/jsc/test/jest.zig b/src/bun.js/test/jest.zig similarity index 97% rename from src/javascript/jsc/test/jest.zig rename to src/bun.js/test/jest.zig index 5ca581d530..2128bc1316 100644 --- a/src/javascript/jsc/test/jest.zig +++ b/src/bun.js/test/jest.zig @@ -1,26 +1,26 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const RequestContext = @import("../../../http.zig").RequestContext; -const MimeType = @import("../../../http.zig").MimeType; -const ZigURL = @import("../../../url.zig").URL; +const Api = @import("../../api/schema.zig").Api; +const RequestContext = @import("../../http.zig").RequestContext; +const MimeType = @import("../../http.zig").MimeType; +const ZigURL = @import("../../url.zig").URL; const HTTPClient = @import("http"); const NetworkThread = HTTPClient.NetworkThread; -const Environment = @import("../../../env.zig"); +const Environment = @import("../../env.zig"); -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const js = JSC.C; -const logger = @import("../../../logger.zig"); -const Method = @import("../../../http/method.zig").Method; +const logger = @import("../../logger.zig"); +const Method = @import("../../http/method.zig").Method; -const ObjectPool = @import("../../../pool.zig").ObjectPool; +const ObjectPool = @import("../../pool.zig").ObjectPool; -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; -const strings = @import("../../../global.zig").strings; -const string = @import("../../../global.zig").string; -const default_allocator = @import("../../../global.zig").default_allocator; -const FeatureFlags = @import("../../../global.zig").FeatureFlags; +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; +const strings = @import("../../global.zig").strings; +const string = @import("../../global.zig").string; +const default_allocator = @import("../../global.zig").default_allocator; +const FeatureFlags = @import("../../global.zig").FeatureFlags; const ArrayBuffer = @import("../base.zig").ArrayBuffer; const Properties = @import("../base.zig").Properties; const NewClass = @import("../base.zig").NewClass; @@ -40,7 +40,7 @@ const JSGlobalObject = JSC.JSGlobalObject; const VirtualMachine = @import("../javascript.zig").VirtualMachine; const Task = @import("../javascript.zig").Task; -const Fs = @import("../../../fs.zig"); +const Fs = @import("../../fs.zig"); const is_bindgen: bool = std.meta.globalOption("bindgen", bool) orelse false; fn notImplementedFn(_: *anyopaque, ctx: js.JSContextRef, _: js.JSObjectRef, _: js.JSObjectRef, _: []const js.JSValueRef, exception: js.ExceptionRef) js.JSValueRef { @@ -59,7 +59,7 @@ fn notImplementedProp( return null; } -const ArrayIdentityContext = @import("../../../identity_context.zig").ArrayIdentityContext; +const ArrayIdentityContext = @import("../../identity_context.zig").ArrayIdentityContext; pub const TestRunner = struct { tests: TestRunner.Test.List = .{}, log: *logger.Log, diff --git a/src/javascript/jsc/typescript.zig b/src/bun.js/typescript.zig similarity index 96% rename from src/javascript/jsc/typescript.zig rename to src/bun.js/typescript.zig index 8815071ee1..6095320f62 100644 --- a/src/javascript/jsc/typescript.zig +++ b/src/bun.js/typescript.zig @@ -11,9 +11,9 @@ const print = std.debug.print; const mem = std.mem; const testing = std.testing; const Allocator = std.mem.Allocator; -const resolve_path = @import("../../resolver/resolve_path.zig"); -const JSC = @import("../../jsc.zig"); -const bun = @import("../../global.zig"); +const resolve_path = @import("../resolver/resolve_path.zig"); +const JSC = @import("../jsc.zig"); +const bun = @import("../global.zig"); const string = bun.string; const strings = bun.strings; const default_allocator = bun.default_allocator; diff --git a/src/javascript/jsc/undici.exports.js b/src/bun.js/undici.exports.js similarity index 100% rename from src/javascript/jsc/undici.exports.js rename to src/bun.js/undici.exports.js diff --git a/src/javascript/jsc/uuid.zig b/src/bun.js/uuid.zig similarity index 100% rename from src/javascript/jsc/uuid.zig rename to src/bun.js/uuid.zig diff --git a/src/javascript/jsc/webcore.zig b/src/bun.js/webcore.zig similarity index 98% rename from src/javascript/jsc/webcore.zig rename to src/bun.js/webcore.zig index 799b408f28..0433402fc2 100644 --- a/src/javascript/jsc/webcore.zig +++ b/src/bun.js/webcore.zig @@ -2,7 +2,7 @@ pub usingnamespace @import("./webcore/response.zig"); pub usingnamespace @import("./webcore/encoding.zig"); pub usingnamespace @import("./webcore/streams.zig"); -const JSC = @import("../../jsc.zig"); +const JSC = @import("../jsc.zig"); const std = @import("std"); pub const Lifetime = enum { diff --git a/src/javascript/jsc/webcore/base64.zig b/src/bun.js/webcore/base64.zig similarity index 100% rename from src/javascript/jsc/webcore/base64.zig rename to src/bun.js/webcore/base64.zig diff --git a/src/javascript/jsc/webcore/encoding.zig b/src/bun.js/webcore/encoding.zig similarity index 98% rename from src/javascript/jsc/webcore/encoding.zig rename to src/bun.js/webcore/encoding.zig index b168e97ffa..cfef1c0d7d 100644 --- a/src/javascript/jsc/webcore/encoding.zig +++ b/src/bun.js/webcore/encoding.zig @@ -1,24 +1,24 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const RequestContext = @import("../../../http.zig").RequestContext; -const MimeType = @import("../../../http.zig").MimeType; -const ZigURL = @import("../../../url.zig").URL; +const Api = @import("../../api/schema.zig").Api; +const RequestContext = @import("../../http.zig").RequestContext; +const MimeType = @import("../../http.zig").MimeType; +const ZigURL = @import("../../url.zig").URL; const HTTPClient = @import("http"); const NetworkThread = HTTPClient.NetworkThread; -const JSC = @import("../../../jsc.zig"); +const JSC = @import("../../jsc.zig"); const js = JSC.C; -const Method = @import("../../../http/method.zig").Method; +const Method = @import("../../http/method.zig").Method; -const ObjectPool = @import("../../../pool.zig").ObjectPool; -const bun = @import("../../../global.zig"); -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; -const strings = @import("../../../global.zig").strings; -const string = @import("../../../global.zig").string; -const default_allocator = @import("../../../global.zig").default_allocator; -const FeatureFlags = @import("../../../global.zig").FeatureFlags; +const ObjectPool = @import("../../pool.zig").ObjectPool; +const bun = @import("../../global.zig"); +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; +const strings = @import("../../global.zig").strings; +const string = @import("../../global.zig").string; +const default_allocator = @import("../../global.zig").default_allocator; +const FeatureFlags = @import("../../global.zig").FeatureFlags; const ArrayBuffer = @import("../base.zig").ArrayBuffer; const Properties = @import("../base.zig").Properties; const NewClass = @import("../base.zig").NewClass; @@ -27,7 +27,7 @@ const castObj = @import("../base.zig").castObj; const getAllocator = @import("../base.zig").getAllocator; const JSPrivateDataPtr = @import("../base.zig").JSPrivateDataPtr; const GetJSPrivateData = @import("../base.zig").GetJSPrivateData; -const Environment = @import("../../../env.zig"); +const Environment = @import("../../env.zig"); const ZigString = JSC.ZigString; const JSInternalPromise = JSC.JSInternalPromise; const JSPromise = JSC.JSPromise; diff --git a/src/javascript/jsc/webcore/response.zig b/src/bun.js/webcore/response.zig similarity index 99% rename from src/javascript/jsc/webcore/response.zig rename to src/bun.js/webcore/response.zig index 75c9f8d981..017edb8054 100644 --- a/src/javascript/jsc/webcore/response.zig +++ b/src/bun.js/webcore/response.zig @@ -1,25 +1,25 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const bun = @import("../../../global.zig"); -const RequestContext = @import("../../../http.zig").RequestContext; -const MimeType = @import("../../../http.zig").MimeType; -const ZigURL = @import("../../../url.zig").URL; +const Api = @import("../../api/schema.zig").Api; +const bun = @import("../../global.zig"); +const RequestContext = @import("../../http.zig").RequestContext; +const MimeType = @import("../../http.zig").MimeType; +const ZigURL = @import("../../url.zig").URL; const HTTPClient = @import("http"); const NetworkThread = HTTPClient.NetworkThread; const AsyncIO = NetworkThread.AsyncIO; const JSC = @import("javascript_core"); const js = JSC.C; -const Method = @import("../../../http/method.zig").Method; +const Method = @import("../../http/method.zig").Method; const FetchHeaders = JSC.FetchHeaders; -const ObjectPool = @import("../../../pool.zig").ObjectPool; +const ObjectPool = @import("../../pool.zig").ObjectPool; const SystemError = JSC.SystemError; -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; -const strings = @import("../../../global.zig").strings; -const string = @import("../../../global.zig").string; -const default_allocator = @import("../../../global.zig").default_allocator; -const FeatureFlags = @import("../../../global.zig").FeatureFlags; +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; +const strings = @import("../../global.zig").strings; +const string = @import("../../global.zig").string; +const default_allocator = @import("../../global.zig").default_allocator; +const FeatureFlags = @import("../../global.zig").FeatureFlags; const ArrayBuffer = @import("../base.zig").ArrayBuffer; const Properties = @import("../base.zig").Properties; const NewClass = @import("../base.zig").NewClass; @@ -28,9 +28,9 @@ const castObj = @import("../base.zig").castObj; const getAllocator = @import("../base.zig").getAllocator; const JSPrivateDataPtr = @import("../base.zig").JSPrivateDataPtr; const GetJSPrivateData = @import("../base.zig").GetJSPrivateData; -const Environment = @import("../../../env.zig"); +const Environment = @import("../../env.zig"); const ZigString = JSC.ZigString; -const IdentityContext = @import("../../../identity_context.zig").IdentityContext; +const IdentityContext = @import("../../identity_context.zig").IdentityContext; const JSInternalPromise = JSC.JSInternalPromise; const JSPromise = JSC.JSPromise; const JSValue = JSC.JSValue; @@ -39,9 +39,9 @@ const JSGlobalObject = JSC.JSGlobalObject; const VirtualMachine = @import("../javascript.zig").VirtualMachine; const Task = JSC.Task; -const JSPrinter = @import("../../../js_printer.zig"); +const JSPrinter = @import("../../js_printer.zig"); const picohttp = @import("picohttp"); -const StringJoiner = @import("../../../string_joiner.zig"); +const StringJoiner = @import("../../string_joiner.zig"); const uws = @import("uws"); pub const Response = struct { diff --git a/src/javascript/jsc/webcore/streams.zig b/src/bun.js/webcore/streams.zig similarity index 98% rename from src/javascript/jsc/webcore/streams.zig rename to src/bun.js/webcore/streams.zig index df5de24fa9..f07cc7c269 100644 --- a/src/javascript/jsc/webcore/streams.zig +++ b/src/bun.js/webcore/streams.zig @@ -1,25 +1,25 @@ const std = @import("std"); -const Api = @import("../../../api/schema.zig").Api; -const bun = @import("../../../global.zig"); -const RequestContext = @import("../../../http.zig").RequestContext; -const MimeType = @import("../../../http.zig").MimeType; -const ZigURL = @import("../../../url.zig").URL; +const Api = @import("../../api/schema.zig").Api; +const bun = @import("../../global.zig"); +const RequestContext = @import("../../http.zig").RequestContext; +const MimeType = @import("../../http.zig").MimeType; +const ZigURL = @import("../../url.zig").URL; const HTTPClient = @import("http"); const NetworkThread = HTTPClient.NetworkThread; const AsyncIO = NetworkThread.AsyncIO; const JSC = @import("javascript_core"); const js = JSC.C; -const Method = @import("../../../http/method.zig").Method; +const Method = @import("../../http/method.zig").Method; const FetchHeaders = JSC.FetchHeaders; -const ObjectPool = @import("../../../pool.zig").ObjectPool; +const ObjectPool = @import("../../pool.zig").ObjectPool; const SystemError = JSC.SystemError; -const Output = @import("../../../global.zig").Output; -const MutableString = @import("../../../global.zig").MutableString; -const strings = @import("../../../global.zig").strings; -const string = @import("../../../global.zig").string; -const default_allocator = @import("../../../global.zig").default_allocator; -const FeatureFlags = @import("../../../global.zig").FeatureFlags; +const Output = @import("../../global.zig").Output; +const MutableString = @import("../../global.zig").MutableString; +const strings = @import("../../global.zig").strings; +const string = @import("../../global.zig").string; +const default_allocator = @import("../../global.zig").default_allocator; +const FeatureFlags = @import("../../global.zig").FeatureFlags; const ArrayBuffer = @import("../base.zig").ArrayBuffer; const Properties = @import("../base.zig").Properties; const NewClass = @import("../base.zig").NewClass; @@ -28,9 +28,9 @@ const castObj = @import("../base.zig").castObj; const getAllocator = @import("../base.zig").getAllocator; const JSPrivateDataPtr = @import("../base.zig").JSPrivateDataPtr; const GetJSPrivateData = @import("../base.zig").GetJSPrivateData; -const Environment = @import("../../../env.zig"); +const Environment = @import("../../env.zig"); const ZigString = JSC.ZigString; -const IdentityContext = @import("../../../identity_context.zig").IdentityContext; +const IdentityContext = @import("../../identity_context.zig").IdentityContext; const JSInternalPromise = JSC.JSInternalPromise; const JSPromise = JSC.JSPromise; const JSValue = JSC.JSValue; @@ -39,9 +39,9 @@ const JSGlobalObject = JSC.JSGlobalObject; const VirtualMachine = @import("../javascript.zig").VirtualMachine; const Task = JSC.Task; -const JSPrinter = @import("../../../js_printer.zig"); +const JSPrinter = @import("../../js_printer.zig"); const picohttp = @import("picohttp"); -const StringJoiner = @import("../../../string_joiner.zig"); +const StringJoiner = @import("../../string_joiner.zig"); const uws = @import("uws"); const Blob = JSC.WebCore.Blob; const Response = JSC.WebCore.Response; @@ -179,7 +179,7 @@ pub const ReadableStream = struct { return ReadableStream__empty(globalThis); } - const Base = @import("../../../ast/base.zig"); + const Base = @import("../../ast/base.zig"); pub const StreamTag = enum(usize) { invalid = 0, _, diff --git a/src/javascript/jsc/ws.exports.js b/src/bun.js/ws.exports.js similarity index 100% rename from src/javascript/jsc/ws.exports.js rename to src/bun.js/ws.exports.js diff --git a/src/bun_js.zig b/src/bun_js.zig index 7ccdc87472..2ccc3f47f1 100644 --- a/src/bun_js.zig +++ b/src/bun_js.zig @@ -22,7 +22,7 @@ const panicky = @import("panic_handler.zig"); const sync = @import("./sync.zig"); const Api = @import("api/schema.zig").Api; const resolve_path = @import("./resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("./javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("./bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("cli.zig").Command; const bundler = @import("bundler.zig"); const NodeModuleBundle = @import("node_module_bundle.zig").NodeModuleBundle; @@ -42,7 +42,7 @@ pub const Run = struct { pub fn boot(ctx: Command.Context, file: std.fs.File, entry_path: string) !void { if (comptime JSC.is_bindgen) unreachable; - @import("javascript/jsc/javascript_core_c_api.zig").JSCInitialize(); + @import("bun.js/javascript_core_c_api.zig").JSCInitialize(); js_ast.Expr.Data.Store.create(default_allocator); js_ast.Stmt.Data.Store.create(default_allocator); diff --git a/src/cli.zig b/src/cli.zig index 10721a5d2c..971aafa84f 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -24,7 +24,7 @@ const panicky = @import("panic_handler.zig"); const sync = @import("./sync.zig"); const Api = @import("api/schema.zig").Api; const resolve_path = @import("./resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("./javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("./bun.js/config.zig").configureTransformOptionsForBun; const clap = @import("clap"); const BunJS = @import("./bun_js.zig"); const Install = @import("./install/install.zig"); diff --git a/src/cli/build_command.zig b/src/cli/build_command.zig index eb2bb3141e..fc63f10a73 100644 --- a/src/cli/build_command.zig +++ b/src/cli/build_command.zig @@ -23,7 +23,7 @@ const allocators = @import("../allocators.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; diff --git a/src/cli/bun_command.zig b/src/cli/bun_command.zig index 8305379d79..77e639f180 100644 --- a/src/cli/bun_command.zig +++ b/src/cli/bun_command.zig @@ -24,7 +24,7 @@ const panicky = @import("../panic_handler.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; const GenerateNodeModuleBundle = @import("../bundler/generate_node_modules_bundle.zig"); diff --git a/src/cli/create_command.zig b/src/cli/create_command.zig index 6afcdc3c03..c9439d93f1 100644 --- a/src/cli/create_command.zig +++ b/src/cli/create_command.zig @@ -23,7 +23,7 @@ const allocators = @import("../allocators.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; diff --git a/src/cli/install_completions_command.zig b/src/cli/install_completions_command.zig index a52e8c1fb7..d82169aaac 100644 --- a/src/cli/install_completions_command.zig +++ b/src/cli/install_completions_command.zig @@ -22,7 +22,7 @@ const allocators = @import("../allocators.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index e717488924..6f99329707 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -23,7 +23,7 @@ const panicky = @import("../panic_handler.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; diff --git a/src/cli/test_command.zig b/src/cli/test_command.zig index cba31e5ce1..50be09878e 100644 --- a/src/cli/test_command.zig +++ b/src/cli/test_command.zig @@ -25,7 +25,7 @@ const panicky = @import("../panic_handler.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; diff --git a/src/cli/upgrade_command.zig b/src/cli/upgrade_command.zig index 4d7ae5c9bb..8f94b54c4d 100644 --- a/src/cli/upgrade_command.zig +++ b/src/cli/upgrade_command.zig @@ -22,7 +22,7 @@ const allocators = @import("../allocators.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const resolve_path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const bundler = @import("../bundler.zig"); const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; diff --git a/src/http.zig b/src/http.zig index 1a474a5bbb..fd30aae8ea 100644 --- a/src/http.zig +++ b/src/http.zig @@ -1452,7 +1452,7 @@ pub const RequestContext = struct { handler.start_timer = std.time.Timer.start() catch unreachable; Output.Source.configureThread(); - @import("javascript/jsc/javascript_core_c_api.zig").JSCInitialize(); + @import("bun.js/javascript_core_c_api.zig").JSCInitialize(); js_ast.Stmt.Data.Store.create(bun.default_allocator); js_ast.Expr.Data.Store.create(bun.default_allocator); diff --git a/src/install/install.zig b/src/install/install.zig index b16b398131..5f890e832e 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -22,7 +22,7 @@ const panicky = @import("../panic_handler.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const Path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const BunArguments = @import("../cli.zig").Arguments; const bundler = @import("../bundler.zig"); diff --git a/src/install/lockfile.zig b/src/install/lockfile.zig index 63274cc43c..21ee9f3146 100644 --- a/src/install/lockfile.zig +++ b/src/install/lockfile.zig @@ -22,7 +22,7 @@ const panicky = @import("../panic_handler.zig"); const sync = @import("../sync.zig"); const Api = @import("../api/schema.zig").Api; const Path = @import("../resolver/resolve_path.zig"); -const configureTransformOptionsForBun = @import("../javascript/jsc/config.zig").configureTransformOptionsForBun; +const configureTransformOptionsForBun = @import("../bun.js/config.zig").configureTransformOptionsForBun; const Command = @import("../cli.zig").Command; const BunArguments = @import("../cli.zig").Arguments; const bundler = @import("../bundler.zig"); diff --git a/src/javascript/jsc/bindings/JSSink.h b/src/javascript/jsc/bindings/JSSink.h deleted file mode 100644 index cc4f667e0c..0000000000 --- a/src/javascript/jsc/bindings/JSSink.h +++ /dev/null @@ -1,169 +0,0 @@ - -// AUTO-GENERATED FILE. DO NOT EDIT. -// Generated by /Users/jarred/Code/bun/src/javascript/jsc/generate-jssink.js at 2022-06-15T10:28:21.209Z -// -#pragma once - -#include "root.h" - -#include "JSDOMWrapper.h" -#include "wtf/NeverDestroyed.h" - -#include "Sink.h" - -extern "C" bool JSSink_isSink(JSC::JSGlobalObject*, JSC::EncodedJSValue); - -namespace WebCore { -using namespace JSC; - -JSC_DECLARE_HOST_FUNCTION(functionStartDirectStream); -class JSArrayBufferSinkConstructor final : public JSC::InternalFunction { - public: - using Base = JSC::InternalFunction; - static JSArrayBufferSinkConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSC::JSObject* prototype); - static constexpr SinkID Sink = SinkID::ArrayBufferSink; - - static constexpr unsigned StructureFlags = Base::StructureFlags; - static constexpr bool needsDestruction = false; - - DECLARE_EXPORT_INFO; - template static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) - { - if constexpr (mode == JSC::SubspaceAccess::Concurrently) - return nullptr; - return WebCore::subspaceForImpl( - vm, - [](auto& spaces) { return spaces.m_clientSubspaceForJSSinkConstructor.get(); }, - [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForJSSinkConstructor = WTFMove(space); }, - [](auto& spaces) { return spaces.m_subspaceForJSSinkConstructor.get(); }, - [](auto& spaces, auto&& space) { spaces.m_subspaceForJSSinkConstructor = WTFMove(space); }); - } - - static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) - { - return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); - } - void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSObject* prototype); - - - // Must be defined for each specialization class. - static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); - - private: - JSArrayBufferSinkConstructor(JSC::VM& vm, JSC::Structure* structure, JSC::NativeFunction nativeFunction) - : Base(vm, structure, nativeFunction, nativeFunction) - - { - } - - void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSC::JSObject* prototype); - }; - - class JSArrayBufferSink final : public JSC::JSDestructibleObject { - public: - using Base = JSC::JSDestructibleObject; - static JSArrayBufferSink* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* sinkPtr); - static constexpr SinkID Sink = SinkID::ArrayBufferSink; - - DECLARE_EXPORT_INFO; - template static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) - { - if constexpr (mode == JSC::SubspaceAccess::Concurrently) - return nullptr; - return WebCore::subspaceForImpl( - vm, - [](auto& spaces) { return spaces.m_clientSubspaceForJSSink.get(); }, - [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForJSSink = WTFMove(space); }, - [](auto& spaces) { return spaces.m_subspaceForJSSink.get(); }, - [](auto& spaces, auto&& space) { spaces.m_subspaceForJSSink = WTFMove(space); }); - } - - static void destroy(JSC::JSCell*); - static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) - { - return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); - } - - ~JSArrayBufferSink(); - - void* wrapped() const { return m_sinkPtr; } - - void detach() { - m_sinkPtr = nullptr; - } - - static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); - - void* m_sinkPtr; - - JSArrayBufferSink(JSC::VM& vm, JSC::Structure* structure, void* sinkPtr) - : Base(vm, structure) - { - m_sinkPtr = sinkPtr; - } - - void finishCreation(JSC::VM&); - }; - - class JSReadableArrayBufferSinkController final : public JSC::JSDestructibleObject { - public: - using Base = JSC::JSDestructibleObject; - static JSReadableArrayBufferSinkController* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* sinkPtr); - static constexpr SinkID Sink = SinkID::ArrayBufferSink; - - DECLARE_EXPORT_INFO; - template static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) - { - if constexpr (mode == JSC::SubspaceAccess::Concurrently) - return nullptr; - return WebCore::subspaceForImpl( - vm, - [](auto& spaces) { return spaces.m_clientSubspaceForJSSinkController.get(); }, - [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForJSSinkController = WTFMove(space); }, - [](auto& spaces) { return spaces.m_subspaceForJSSinkController.get(); }, - [](auto& spaces, auto&& space) { spaces.m_subspaceForJSSinkController = WTFMove(space); }); - } - - static void destroy(JSC::JSCell*); - static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) - { - return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); - } - - ~JSReadableArrayBufferSinkController(); - - - void* wrapped() const { return m_sinkPtr; } - void detach() { - m_sinkPtr = nullptr; - } - - void start(JSC::JSGlobalObject *globalObject, JSC::JSValue readableStream, JSC::JSFunction *onPull, JSC::JSFunction *onClose); - DECLARE_VISIT_CHILDREN; - - static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); - - void* m_sinkPtr; - mutable WriteBarrier m_onPull; - mutable WriteBarrier m_onClose; - mutable JSC::Weak m_weakReadableStream; - - JSReadableArrayBufferSinkController(JSC::VM& vm, JSC::Structure* structure, void* sinkPtr) - : Base(vm, structure) - { - m_sinkPtr = sinkPtr; - } - - void finishCreation(JSC::VM&); - }; - -JSC_DECLARE_CUSTOM_GETTER(functionArrayBufferSink__getter); - - - - - -JSObject* createJSSinkPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, WebCore::SinkID sinkID); -JSObject* createJSSinkControllerPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, WebCore::SinkID sinkID); - -} // namespace WebCore diff --git a/src/js_ast.zig b/src/js_ast.zig index 650540aa88..54b3bbbeb5 100644 --- a/src/js_ast.zig +++ b/src/js_ast.zig @@ -4737,13 +4737,13 @@ pub fn printmem(comptime format: string, args: anytype) void { pub const Macro = struct { const JavaScript = @import("javascript_core"); - const JSCBase = @import("./javascript/jsc/base.zig"); + const JSCBase = @import("./bun.js/base.zig"); const Resolver = @import("./resolver/resolver.zig").Resolver; const isPackagePath = @import("./resolver/resolver.zig").isPackagePath; const ResolveResult = @import("./resolver/resolver.zig").Result; const DotEnv = @import("./env_loader.zig"); - const js = @import("./javascript/jsc/javascript_core_c_api.zig"); - const Zig = @import("./javascript/jsc/bindings/exports.zig"); + const js = @import("./bun.js/javascript_core_c_api.zig"); + const Zig = @import("./bun.js/bindings/exports.zig"); const Bundler = @import("./bundler.zig").Bundler; const MacroEntryPoint = @import("./bundler.zig").MacroEntryPoint; const MacroRemap = @import("./resolver/package_json.zig").MacroMap; diff --git a/src/js_lexer.zig b/src/js_lexer.zig index 030ddcdf7d..3d382d8ed8 100644 --- a/src/js_lexer.zig +++ b/src/js_lexer.zig @@ -699,12 +699,12 @@ fn NewLexer_( } else if (is_json and lexer.code_point < 0x20) { try lexer.syntaxError(); } else if (comptime quote == '"' or quote == '\'') { - // this is only faster at the 800 KB or so mark - // so, pretty good for source maps - // but probably not a lot else const remainder = lexer.source.contents[lexer.current..]; - if (remainder.len > 16_000) { - lexer.current += indexOfInterestingCharacterInStringLiteral(remainder, quote) orelse remainder.len; + if (remainder.len >= 4096) { + lexer.current += indexOfInterestingCharacterInStringLiteral(remainder, quote) orelse { + lexer.step(); + continue; + }; lexer.end = lexer.current -| 1; lexer.step(); continue; @@ -3001,7 +3001,7 @@ fn indexOfInterestingCharacterInStringLiteral(text_: []const u8, quote: u8) ?usi const backslash = @splat(strings.ascii_vector_size, @as(u8, '\\')); const V1x16 = strings.AsciiVectorU1; - while (strings.ascii_vector_size < text.len) { + while (text.len >= strings.ascii_vector_size) { const vec: strings.AsciiVector = text[0..strings.ascii_vector_size].*; const any_significant = @@ -3010,11 +3010,11 @@ fn indexOfInterestingCharacterInStringLiteral(text_: []const u8, quote: u8) ?usi @bitCast(V1x16, quote_ == vec) | @bitCast(V1x16, backslash == vec); - const bitmask = @ptrCast(*const u16, &any_significant).*; - const first = @ctz(u16, bitmask); - - if (first < strings.ascii_vector_size) { - return first + (text_.len - text.len); + if (@reduce(.Max, any_significant) > 0) { + const bitmask = @ptrCast(*const u16, &any_significant).*; + const first = @ctz(u16, bitmask); + std.debug.assert(first < strings.ascii_vector_size); + return first + (@ptrToInt(text.ptr) - @ptrToInt(text_.ptr)); } text = text[strings.ascii_vector_size..]; } diff --git a/src/jsc.zig b/src/jsc.zig index 56bc7256d3..04608477db 100644 --- a/src/jsc.zig +++ b/src/jsc.zig @@ -2,44 +2,44 @@ pub const is_bindgen = @import("std").meta.globalOption("bindgen", bool) orelse false; pub const napi = @import("./napi/napi.zig"); -pub usingnamespace @import("./javascript/jsc/bindings/exports.zig"); -pub usingnamespace @import("./javascript/jsc/bindings/bindings.zig"); -pub usingnamespace @import("./javascript/jsc/event_loop.zig"); -pub usingnamespace @import("./javascript/jsc/base.zig"); -pub const RareData = @import("./javascript/jsc/rare_data.zig"); -pub const Shimmer = @import("./javascript/jsc/bindings/shimmer.zig").Shimmer; -pub usingnamespace @import("./javascript/jsc/javascript.zig"); -pub const C = @import("./javascript/jsc/javascript_core_c_api.zig"); -pub const WebCore = @import("./javascript/jsc/webcore.zig"); +pub usingnamespace @import("./bun.js/bindings/exports.zig"); +pub usingnamespace @import("./bun.js/bindings/bindings.zig"); +pub usingnamespace @import("./bun.js/event_loop.zig"); +pub usingnamespace @import("./bun.js/base.zig"); +pub const RareData = @import("./bun.js/rare_data.zig"); +pub const Shimmer = @import("./bun.js/bindings/shimmer.zig").Shimmer; +pub usingnamespace @import("./bun.js/javascript.zig"); +pub const C = @import("./bun.js/javascript_core_c_api.zig"); +pub const WebCore = @import("./bun.js/webcore.zig"); pub const Cloudflare = struct { - pub const HTMLRewriter = @import("./javascript/jsc/api/html_rewriter.zig").HTMLRewriter; - pub const ContentOptions = @import("./javascript/jsc/api/html_rewriter.zig").ContentOptions; - pub const Element = @import("./javascript/jsc/api/html_rewriter.zig").Element; - pub const Comment = @import("./javascript/jsc/api/html_rewriter.zig").Comment; - pub const TextChunk = @import("./javascript/jsc/api/html_rewriter.zig").TextChunk; - pub const DocType = @import("./javascript/jsc/api/html_rewriter.zig").DocType; - pub const DocEnd = @import("./javascript/jsc/api/html_rewriter.zig").DocEnd; - pub const EndTag = @import("./javascript/jsc/api/html_rewriter.zig").EndTag; - pub const AttributeIterator = @import("./javascript/jsc/api/html_rewriter.zig").AttributeIterator; + pub const HTMLRewriter = @import("./bun.js/api/html_rewriter.zig").HTMLRewriter; + pub const ContentOptions = @import("./bun.js/api/html_rewriter.zig").ContentOptions; + pub const Element = @import("./bun.js/api/html_rewriter.zig").Element; + pub const Comment = @import("./bun.js/api/html_rewriter.zig").Comment; + pub const TextChunk = @import("./bun.js/api/html_rewriter.zig").TextChunk; + pub const DocType = @import("./bun.js/api/html_rewriter.zig").DocType; + pub const DocEnd = @import("./bun.js/api/html_rewriter.zig").DocEnd; + pub const EndTag = @import("./bun.js/api/html_rewriter.zig").EndTag; + pub const AttributeIterator = @import("./bun.js/api/html_rewriter.zig").AttributeIterator; }; -pub const Jest = @import("./javascript/jsc/test/jest.zig"); +pub const Jest = @import("./bun.js/test/jest.zig"); pub const API = struct { - pub const Transpiler = @import("./javascript/jsc/api/transpiler.zig"); - pub const Server = @import("./javascript/jsc/api/server.zig").Server; - pub const SSLServer = @import("./javascript/jsc/api/server.zig").SSLServer; - pub const DebugServer = @import("./javascript/jsc/api/server.zig").DebugServer; - pub const DebugSSLServer = @import("./javascript/jsc/api/server.zig").DebugSSLServer; - pub const Bun = @import("./javascript/jsc/api/bun.zig"); - pub const Router = @import("./javascript/jsc/api/router.zig"); - pub const ServerConfig = @import("./javascript/jsc/api/server.zig").ServerConfig; + pub const Transpiler = @import("./bun.js/api/transpiler.zig"); + pub const Server = @import("./bun.js/api/server.zig").Server; + pub const SSLServer = @import("./bun.js/api/server.zig").SSLServer; + pub const DebugServer = @import("./bun.js/api/server.zig").DebugServer; + pub const DebugSSLServer = @import("./bun.js/api/server.zig").DebugSSLServer; + pub const Bun = @import("./bun.js/api/bun.zig"); + pub const Router = @import("./bun.js/api/router.zig"); + pub const ServerConfig = @import("./bun.js/api/server.zig").ServerConfig; }; -pub const FFI = @import("./javascript/jsc/api/ffi.zig").FFI; +pub const FFI = @import("./bun.js/api/ffi.zig").FFI; pub const Node = struct { - pub usingnamespace @import("./javascript/jsc/node/types.zig"); - pub usingnamespace @import("./javascript/jsc/node/node_fs.zig"); - pub usingnamespace @import("./javascript/jsc/node/node_fs_binding.zig"); - pub const Syscall = @import("./javascript/jsc/node/syscall.zig"); - pub const fs = @import("./javascript/jsc/node/node_fs_constant.zig"); + pub usingnamespace @import("./bun.js/node/types.zig"); + pub usingnamespace @import("./bun.js/node/node_fs.zig"); + pub usingnamespace @import("./bun.js/node/node_fs_binding.zig"); + pub const Syscall = @import("./bun.js/node/syscall.zig"); + pub const fs = @import("./bun.js/node/node_fs_constant.zig"); }; pub const Maybe = Node.Maybe; pub inline fn markBinding() void { diff --git a/src/main.zig b/src/main.zig index 4fd2b8234b..6a513805a3 100644 --- a/src/main.zig +++ b/src/main.zig @@ -20,8 +20,8 @@ const C = bun.C; const panicky = @import("panic_handler.zig"); const cli = @import("cli.zig"); pub const MainPanicHandler = panicky.NewPanicHandler(std.builtin.default_panic); -const js = @import("javascript/jsc/bindings/bindings.zig"); -const JavaScript = @import("javascript/jsc/javascript.zig"); +const js = @import("bun.js/bindings/bindings.zig"); +const JavaScript = @import("bun.js/javascript.zig"); pub const io_mode = .blocking; pub const bindgen = @import("build_options").bindgen; const Report = @import("./report.zig"); diff --git a/src/router.zig b/src/router.zig index 98f502bd85..2ae4b98fb9 100644 --- a/src/router.zig +++ b/src/router.zig @@ -966,7 +966,7 @@ pub const Test = struct { } pub fn make(comptime testName: string, data: anytype) !Router { - std.testing.refAllDecls(@import("./javascript/jsc/bindings/exports.zig")); + std.testing.refAllDecls(@import("./bun.js/bindings/exports.zig")); try makeTest(testName, data); const JSAst = @import("./js_ast.zig"); JSAst.Expr.Data.Store.create(default_allocator); diff --git a/src/runtime/hmr.ts b/src/runtime/hmr.ts index 4e62afa0f7..2882744dbf 100644 --- a/src/runtime/hmr.ts +++ b/src/runtime/hmr.ts @@ -18,7 +18,7 @@ if (typeof window !== "undefined") { Loading, Loaded, } - + var registryMap = new Map(); type HTMLStylableElement = HTMLLinkElement | HTMLStyleElement; type CSSHMRInsertionPoint = { id: number; @@ -1411,8 +1411,8 @@ if (typeof window !== "undefined") { const callbacksStart = performance.now(); const origUpdaters = oldModule - ? oldModule.additional_updaters.slice() - : []; + ? new Set(oldModule.additional_updaters) + : new Set(); try { switch (this.reloader) { case ReloadBehavior.hotReload: { @@ -1424,7 +1424,8 @@ if (typeof window !== "undefined") { oldModule.previousVersion.id === oldModule.id && oldModule.hasSameExports(oldModule.previousVersion); - if (oldModule) { + var thisMod = HMRModule.dependencies.modules[this.module_index]; + if (oldModule && oldModule._update !== thisMod._update) { // ESM-based HMR has a disadvantage against CommonJS HMR // ES Namespace objects are not [[Configurable]] // That means we have to loop through all previous versions of updated modules that that have unique export names @@ -1432,19 +1433,21 @@ if (typeof window !== "undefined") { // Otherwise, changes will not be reflected properly // However, we only need to loop through modules that add or remove exports, i.e. those are ones which have "real" exports if (!isOldModuleDead) { - HMRModule.dependencies.modules[ - this.module_index - ].additional_updaters.push(oldModule.update.bind(oldModule)); - HMRModule.dependencies.modules[ - this.module_index - ].previousVersion = oldModule; + oldModule.boundUpdate ||= oldModule.update.bind(oldModule); + + if (thisMod.additional_updaters) + thisMod.additional_updaters.add(oldModule.boundUpdate); + else + thisMod.additional_updaters = new Set([ + oldModule.boundUpdate, + ]); + + thisMod.previousVersion = oldModule; } else { - HMRModule.dependencies.modules[ - this.module_index - ].previousVersion = oldModule.previousVersion; - HMRModule.dependencies.modules[ - this.module_index - ].additional_updaters = origUpdaters; + if (oldModule.previousVersion) + thisMod.previousVersion = oldModule.previousVersion; + + thisMod.additional_updaters = origUpdaters; } } @@ -1652,13 +1655,21 @@ if (typeof window !== "undefined") { return true; } - - additional_files = []; - additional_updaters = []; - _update: (exports: Object) => void; + #updateFunction; + get _update() { + return this.#updateFunction; + } + set _update(value) { + this.#updateFunction = value; + var existing = registryMap.get(this.file_path); + } + boundUpdate; update() { - for (let update of this.additional_updaters) { - update(this.exports); + var updaters = registryMap.get(this.id); + if (updaters?.length) { + for (let update of updaters) { + update(this.exports); + } } this._update(this.exports); diff --git a/src/typegen.zig b/src/typegen.zig index 0f2222bff4..4ddaca4a68 100644 --- a/src/typegen.zig +++ b/src/typegen.zig @@ -1,5 +1,5 @@ pub const bindgen = true; pub fn main() anyerror!void { - return try @import("javascript/jsc/typescript.zig").main(); + return try @import("bun.js/typescript.zig").main(); } diff --git a/src/work_pool.zig b/src/work_pool.zig index a663e71865..9ddf106e99 100644 --- a/src/work_pool.zig +++ b/src/work_pool.zig @@ -33,6 +33,28 @@ pub fn NewWorkPool(comptime max_threads: ?usize) type { pub fn schedule(task: *ThreadPool.Task) void { get().schedule(ThreadPool.Batch.from(task)); } + + pub fn go(allocator: std.mem.Allocator, comptime Context: type, context: Context, comptime function: fn (Context) void) !void { + const TaskType = struct { + task: Task, + context: Context, + allocator: std.mem.Allocator, + + pub fn callback(task: *Task) void { + var this_task = @fieldParentPtr(@This(), "task", task); + function(this_task.context); + this_task.allocator.destroy(this_task); + } + }; + + var task_ = try allocator.create(TaskType); + task_.* = .{ + .task = .{ .callback = TaskType.callback }, + .context = context, + .allocator = allocator, + }; + schedule(&task_.task); + } }; } diff --git a/integration/README.md b/test/README.md similarity index 92% rename from integration/README.md rename to test/README.md index 6f0f047b72..292d23cf2a 100644 --- a/integration/README.md +++ b/test/README.md @@ -70,13 +70,13 @@ These were the first tests bun started with ### Runtime tests -These tests are in [./bunjs-only-snippets](./bunjs-only-snippets) and are files which are either `.test.js` or `.test.ts` files. +These tests are in [./bun.js](./bun.js) and are files which are either `.test.js` or `.test.ts` files. These test that the runtime behaves as expected. These also test the transpiler, both because test files are transpiled and directly by running the transpiler via `Bun.Transpiler`. #### Adding a new test -1. Create a new file in [./bunjs-only-snippets](./bunjs-only-snippets/) with `.test` in the name. +1. Create a new file in [./bun.js](./bun.js/) with `.test` in the name. These test use `bun:test` as the import (though you can also import from `vitest` or jest and it will work). @@ -98,7 +98,7 @@ describe("Example", () => { Run `bun wiptest ${part-of-file-name}` -If you run the test in the top-level bun repo directory, it will take an extra couple seconds because `bun wiptest` will scan through all of WebKit recursively. Consider running it in the `bunjs-only-snippets` directory instead. +If you run the test in the top-level bun repo directory, it will take an extra couple seconds because `bun wiptest` will scan through all of WebKit recursively. Consider running it in the `bun.js` directory instead. ### CLI tests diff --git a/integration/apps/bun-create-next.sh b/test/apps/bun-create-next.sh similarity index 100% rename from integration/apps/bun-create-next.sh rename to test/apps/bun-create-next.sh diff --git a/integration/apps/bun-create-react.sh b/test/apps/bun-create-react.sh similarity index 100% rename from integration/apps/bun-create-react.sh rename to test/apps/bun-create-react.sh diff --git a/integration/apps/bun-dev-index-html.sh b/test/apps/bun-dev-index-html.sh similarity index 100% rename from integration/apps/bun-dev-index-html.sh rename to test/apps/bun-dev-index-html.sh diff --git a/integration/apps/bun-dev.sh b/test/apps/bun-dev.sh similarity index 100% rename from integration/apps/bun-dev.sh rename to test/apps/bun-dev.sh diff --git a/integration/apps/bun-install-lockfile-status.sh b/test/apps/bun-install-lockfile-status.sh similarity index 100% rename from integration/apps/bun-install-lockfile-status.sh rename to test/apps/bun-install-lockfile-status.sh diff --git a/integration/apps/bun-install-utf8.sh b/test/apps/bun-install-utf8.sh similarity index 100% rename from integration/apps/bun-install-utf8.sh rename to test/apps/bun-install-utf8.sh diff --git a/integration/apps/bun-install.sh b/test/apps/bun-install.sh similarity index 100% rename from integration/apps/bun-install.sh rename to test/apps/bun-install.sh diff --git a/integration/apps/bun-run-check-package.json b/test/apps/bun-run-check-package.json similarity index 100% rename from integration/apps/bun-run-check-package.json rename to test/apps/bun-run-check-package.json diff --git a/integration/apps/bun-run-check.sh b/test/apps/bun-run-check.sh similarity index 100% rename from integration/apps/bun-run-check.sh rename to test/apps/bun-run-check.sh diff --git a/integration/bunjs-only-snippets/atob.test.js b/test/bun.js/atob.test.js similarity index 100% rename from integration/bunjs-only-snippets/atob.test.js rename to test/bun.js/atob.test.js diff --git a/integration/bunjs-only-snippets/baz.js b/test/bun.js/baz.js similarity index 100% rename from integration/bunjs-only-snippets/baz.js rename to test/bun.js/baz.js diff --git a/test/bun.js/buffer.test.js b/test/bun.js/buffer.test.js new file mode 100644 index 0000000000..6e9a3c6b43 --- /dev/null +++ b/test/bun.js/buffer.test.js @@ -0,0 +1,304 @@ +// import { describe, it, expect, beforeEach, afterEach } from "bun:test"; +// import { gc } from "./gc"; + +// beforeEach(() => gc()); +// afterEach(() => gc()); + +// it("buffer", () => { +// var buf = new Buffer(20); +// gc(); +// // if this fails or infinitely loops, it means there is a memory issue with the JSC::Structure object +// expect(Object.keys(buf).length > 0).toBe(true); +// gc(); +// expect(buf.write("hello world ")).toBe(12); +// expect(buf.write("hello world ", "utf8")).toBe(12); + +// gc(); +// expect(buf.toString("utf8", 0, "hello world ".length)).toBe("hello world "); +// gc(); +// expect(buf.toString("base64url", 0, "hello world ".length)).toBe( +// btoa("hello world ") +// ); +// gc(); +// expect(buf instanceof Uint8Array).toBe(true); +// gc(); +// expect(buf instanceof Buffer).toBe(true); +// gc(); +// expect(buf.slice() instanceof Uint8Array).toBe(true); +// gc(); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// gc(); +// expect(buf.slice(0, 1) instanceof Uint8Array).toBe(true); +// gc(); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// gc(); +// }); + +// it("Buffer", () => { +// var inputs = [ +// "hello world", +// "hello world".repeat(100), +// `😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`, +// ]; +// var good = inputs.map((a) => new TextEncoder().encode(a)); +// for (let i = 0; i < inputs.length; i++) { +// var input = inputs[i]; +// expect(new Buffer(input).toString("utf8")).toBe(inputs[i]); +// gc(); +// expect(Array.from(new Buffer(input)).join(",")).toBe(good[i].join(",")); +// gc(); +// expect(Buffer.byteLength(input)).toBe(good[i].length); +// gc(); +// expect(Buffer.from(input).byteLength).toBe(Buffer.byteLength(input)); +// } +// }); + +// it("Buffer.byteLength", () => { +// expect(Buffer.byteLength("😀😃😄😁😆😅😂🤣☺️😊😊😇")).toBe( +// new TextEncoder().encode("😀😃😄😁😆😅😂🤣☺️😊😊😇").byteLength +// ); +// }); + +// it("Buffer.isBuffer", () => { +// expect(Buffer.isBuffer(new Buffer(1))).toBe(true); +// gc(); +// expect(Buffer.isBuffer(new Buffer(0))).toBe(true); +// gc(); +// expect(Buffer.isBuffer(new Uint8Array(0))).toBe(false); +// gc(); +// expect(Buffer.isBuffer(new Uint8Array(1))).toBe(false); +// gc(); +// var a = new Uint8Array(1); +// gc(); +// expect(Buffer.isBuffer(a)).toBe(false); +// gc(); +// Buffer.toBuffer(a); +// gc(); +// expect(Buffer.isBuffer(a)).toBe(true); +// gc(); +// }); + +// it("Buffer.toBuffer throws", () => { +// const checks = [ +// [], +// {}, +// "foo", +// new Uint16Array(), +// new DataView(new Uint8Array(14).buffer), +// ]; +// for (let i = 0; i < checks.length; i++) { +// try { +// Buffer.toBuffer(checks[i]); +// expect(false).toBe(true); +// } catch (exception) { +// expect(exception.message).toBe("Expected Uint8Array"); +// } +// } +// expect(true).toBe(true); +// }); + +// it("Buffer.toBuffer works", () => { +// var array = new Uint8Array(20); +// expect(array instanceof Buffer).toBe(false); +// var buf = Buffer.toBuffer(array); +// expect(array instanceof Buffer).toBe(true); +// // if this fails or infinitely loops, it means there is a memory issue with the JSC::Structure object +// expect(Object.keys(buf).length > 0).toBe(true); + +// expect(buf.write("hello world ")).toBe(12); +// gc(); +// expect(buf.toString("utf8", 0, "hello world ".length)).toBe("hello world "); +// gc(); +// expect(buf.toString("base64url", 0, "hello world ".length)).toBe( +// btoa("hello world ") +// ); +// gc(); + +// expect(buf instanceof Uint8Array).toBe(true); +// expect(buf instanceof Buffer).toBe(true); +// expect(buf.slice() instanceof Uint8Array).toBe(true); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// expect(buf.slice(0, 1) instanceof Uint8Array).toBe(true); +// expect(buf.slice(0, 1) instanceof Buffer).toBe(true); +// expect(new Buffer(buf) instanceof Buffer).toBe(true); +// expect(new Buffer(buf.buffer) instanceof Buffer).toBe(true); +// }); + +// it("writeInt", () => { +// var buf = new Buffer(1024); +// var data = new DataView(buf.buffer); +// buf.writeInt32BE(100); +// expect(data.getInt32(0, false)).toBe(100); +// buf.writeInt32BE(100); +// expect(data.getInt32(0, false)).toBe(100); +// var childBuf = buf.subarray(0, 4); +// expect(data.getInt32(0, false)).toBe(100); +// expect(childBuf.readInt32BE(0, false)).toBe(100); +// }); + +// it("Buffer.from", () => { +// expect(Buffer.from("hello world").toString("utf8")).toBe("hello world"); +// expect(Buffer.from("hello world", "ascii").toString("utf8")).toBe( +// "hello world" +// ); +// expect(Buffer.from("hello world", "latin1").toString("utf8")).toBe( +// "hello world" +// ); +// gc(); +// expect(Buffer.from([254]).join(",")).toBe("254"); +// expect(Buffer.from(123).join(",")).toBe(Uint8Array.from(123).join(",")); +// expect(Buffer.from({ length: 124 }).join(",")).toBe( +// Uint8Array.from({ length: 124 }).join(",") +// ); + +// expect(Buffer.from(new ArrayBuffer(1024), 0, 512).join(",")).toBe( +// new Uint8Array(512).join(",") +// ); + +// expect(Buffer.from(new Buffer(new ArrayBuffer(1024), 0, 512)).join(",")).toBe( +// new Uint8Array(512).join(",") +// ); +// gc(); +// }); + +// it("Buffer.equals", () => { +// var a = new Uint8Array(10); +// a[2] = 1; +// var b = new Uint8Array(10); +// b[2] = 1; +// Buffer.toBuffer(a); +// Buffer.toBuffer(b); +// expect(a.equals(b)).toBe(true); +// b[2] = 0; +// expect(a.equals(b)).toBe(false); +// }); + +// it("Buffer.compare", () => { +// var a = new Uint8Array(10); +// a[2] = 1; +// var b = new Uint8Array(10); +// b[2] = 1; +// Buffer.toBuffer(a); +// Buffer.toBuffer(b); +// expect(a.compare(b)).toBe(0); +// b[2] = 0; +// expect(a.compare(b)).toBe(1); +// expect(b.compare(a)).toBe(-1); +// }); + +// it("Buffer.copy", () => { +// var array1 = new Uint8Array(128); +// array1.fill(100); +// Buffer.toBuffer(array1); +// var array2 = new Uint8Array(128); +// array2.fill(200); +// Buffer.toBuffer(array2); +// var array3 = new Uint8Array(128); +// Buffer.toBuffer(array3); +// gc(); +// expect(array1.copy(array2)).toBe(128); +// expect(array1.join("")).toBe(array2.join("")); +// }); + +// it("Buffer.concat", () => { +// var array1 = new Uint8Array(128); +// array1.fill(100); +// var array2 = new Uint8Array(128); +// array2.fill(200); +// var array3 = new Uint8Array(128); +// array3.fill(300); +// gc(); +// expect(Buffer.concat([array1, array2, array3]).join("")).toBe( +// array1.join("") + array2.join("") + array3.join("") +// ); +// expect(Buffer.concat([array1, array2, array3], 222).length).toBe(222); +// expect( +// Buffer.concat([array1, array2, array3], 222).subarray(0, 128).join("") +// ).toBe("100".repeat(128)); +// expect( +// Buffer.concat([array1, array2, array3], 222).subarray(129, 222).join("") +// ).toBe("200".repeat(222 - 129)); +// }); + +// it("read", () => { +// var buf = new Buffer(1024); +// var data = new DataView(buf.buffer); +// function reset() { +// new Uint8Array(buf.buffer).fill(0); +// } +// data.setBigInt64(0, BigInt(1000), false); +// expect(buf.readBigInt64BE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setBigInt64(0, BigInt(1000), false); +// expect(buf.readBigInt64LE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setBigUint64(0, BigInt(1000), false); +// expect(buf.readBigUInt64BE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setBigUint64(0, BigInt(1000), false); +// expect(buf.readBigUInt64LE(0)).toBe(BigInt(1000)); +// reset(); + +// data.setFloat64(0, 1000, false); +// expect(buf.readDoubleBE(0)).toBe(1000); +// reset(); + +// data.setFloat64(0, 1000, true); +// expect(buf.readDoubleLE(0)).toBe(1000); +// reset(); + +// data.setFloat32(0, 1000, false); +// expect(buf.readFloatBE(0)).toBe(1000); +// reset(); + +// data.setFloat32(0, 1000, true); +// expect(buf.readFloatLE(0)).toBe(1000); +// reset(); + +// data.setInt16(0, 1000, false); +// expect(buf.readInt16BE(0)).toBe(1000); +// reset(); + +// data.setInt16(0, 1000, true); +// expect(buf.readInt16LE(0)).toBe(1000); +// reset(); + +// data.setInt32(0, 1000, false); +// expect(buf.readInt32BE(0)).toBe(1000); +// reset(); + +// data.setInt32(0, 1000, true); +// expect(buf.readInt32LE(0)).toBe(1000); +// reset(); + +// data.setInt8(0, 100, false); +// expect(buf.readInt8(0)).toBe(100); +// reset(); + +// data.setUint16(0, 1000, false); +// expect(buf.readUInt16BE(0)).toBe(1000); +// reset(); + +// data.setUint16(0, 1000, true); +// expect(buf.readUInt16LE(0)).toBe(1000); +// reset(); + +// data.setUint32(0, 1000, false); +// expect(buf.readUInt32BE(0)).toBe(1000); +// reset(); + +// data.setUint32(0, 1000, true); +// expect(buf.readUInt32LE(0)).toBe(1000); +// reset(); + +// data.setUint8(0, 255, false); +// expect(buf.readUInt8(0)).toBe(255); +// reset(); + +// data.setUint8(0, 255, false); +// expect(buf.readUInt8(0)).toBe(255); +// reset(); +// }); diff --git a/integration/bunjs-only-snippets/bun-jsc.test.js b/test/bun.js/bun-jsc.test.js similarity index 95% rename from integration/bunjs-only-snippets/bun-jsc.test.js rename to test/bun.js/bun-jsc.test.js index 975003b775..8ee0decf2f 100644 --- a/integration/bunjs-only-snippets/bun-jsc.test.js +++ b/test/bun.js/bun-jsc.test.js @@ -20,6 +20,7 @@ import { totalCompileTime, reoptimizationRetryCount, drainMicrotasks, + startRemoteDebugger, } from "bun:jsc"; describe("bun:jsc", () => { @@ -91,4 +92,7 @@ describe("bun:jsc", () => { it("drainMicrotasks", () => { drainMicrotasks(); }); + it("startRemoteDebugger", () => { + startRemoteDebugger(""); + }); }); diff --git a/integration/bunjs-only-snippets/bun.lockb b/test/bun.js/bun.lockb similarity index 100% rename from integration/bunjs-only-snippets/bun.lockb rename to test/bun.js/bun.lockb diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/always-bundled-module b/test/bun.js/bundled/always-bundled-module/always-bundled-module similarity index 100% rename from integration/bunjs-only-snippets/bundled/always-bundled-module/always-bundled-module rename to test/bun.js/bundled/always-bundled-module/always-bundled-module diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/cjs.js b/test/bun.js/bundled/always-bundled-module/cjs.js similarity index 100% rename from integration/bunjs-only-snippets/bundled/always-bundled-module/cjs.js rename to test/bun.js/bundled/always-bundled-module/cjs.js diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/esm.js b/test/bun.js/bundled/always-bundled-module/esm.js similarity index 100% rename from integration/bunjs-only-snippets/bundled/always-bundled-module/esm.js rename to test/bun.js/bundled/always-bundled-module/esm.js diff --git a/integration/bunjs-only-snippets/bundled/always-bundled-module/package.json b/test/bun.js/bundled/always-bundled-module/package.json similarity index 100% rename from integration/bunjs-only-snippets/bundled/always-bundled-module/package.json rename to test/bun.js/bundled/always-bundled-module/package.json diff --git a/integration/bunjs-only-snippets/bundled/entrypoint.ts b/test/bun.js/bundled/entrypoint.ts similarity index 100% rename from integration/bunjs-only-snippets/bundled/entrypoint.ts rename to test/bun.js/bundled/entrypoint.ts diff --git a/integration/bunjs-only-snippets/bundled/package.json b/test/bun.js/bundled/package.json similarity index 100% rename from integration/bunjs-only-snippets/bundled/package.json rename to test/bun.js/bundled/package.json diff --git a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/cjs.js b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js similarity index 100% rename from integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/cjs.js rename to test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/cjs.js diff --git a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/esm.js b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js similarity index 100% rename from integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/esm.js rename to test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/esm.js diff --git a/integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/package.json b/test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json similarity index 100% rename from integration/bunjs-only-snippets/bundled/to_bundle_node_modules/i-am-bundled/package.json rename to test/bun.js/bundled/to_bundle_node_modules/i-am-bundled/package.json diff --git a/integration/bunjs-only-snippets/bundled/tsconfig.json b/test/bun.js/bundled/tsconfig.json similarity index 100% rename from integration/bunjs-only-snippets/bundled/tsconfig.json rename to test/bun.js/bundled/tsconfig.json diff --git a/integration/bunjs-only-snippets/concat.test.js b/test/bun.js/concat.test.js similarity index 100% rename from integration/bunjs-only-snippets/concat.test.js rename to test/bun.js/concat.test.js diff --git a/integration/bunjs-only-snippets/console-log.js b/test/bun.js/console-log.js similarity index 100% rename from integration/bunjs-only-snippets/console-log.js rename to test/bun.js/console-log.js diff --git a/integration/bunjs-only-snippets/crypto.test.js b/test/bun.js/crypto.test.js similarity index 100% rename from integration/bunjs-only-snippets/crypto.test.js rename to test/bun.js/crypto.test.js diff --git a/integration/bunjs-only-snippets/dirname.test.js b/test/bun.js/dirname.test.js similarity index 100% rename from integration/bunjs-only-snippets/dirname.test.js rename to test/bun.js/dirname.test.js diff --git a/integration/bunjs-only-snippets/escapeHTML.test.js b/test/bun.js/escapeHTML.test.js similarity index 100% rename from integration/bunjs-only-snippets/escapeHTML.test.js rename to test/bun.js/escapeHTML.test.js diff --git a/integration/bunjs-only-snippets/esm/first.mjs b/test/bun.js/esm/first.mjs similarity index 100% rename from integration/bunjs-only-snippets/esm/first.mjs rename to test/bun.js/esm/first.mjs diff --git a/integration/bunjs-only-snippets/esm/second-child.mjs b/test/bun.js/esm/second-child.mjs similarity index 100% rename from integration/bunjs-only-snippets/esm/second-child.mjs rename to test/bun.js/esm/second-child.mjs diff --git a/integration/bunjs-only-snippets/esm/second.mjs b/test/bun.js/esm/second.mjs similarity index 100% rename from integration/bunjs-only-snippets/esm/second.mjs rename to test/bun.js/esm/second.mjs diff --git a/integration/bunjs-only-snippets/esm/startEnd.mjs b/test/bun.js/esm/startEnd.mjs similarity index 100% rename from integration/bunjs-only-snippets/esm/startEnd.mjs rename to test/bun.js/esm/startEnd.mjs diff --git a/integration/bunjs-only-snippets/esm/third.mjs b/test/bun.js/esm/third.mjs similarity index 100% rename from integration/bunjs-only-snippets/esm/third.mjs rename to test/bun.js/esm/third.mjs diff --git a/integration/bunjs-only-snippets/exit.js b/test/bun.js/exit.js similarity index 100% rename from integration/bunjs-only-snippets/exit.js rename to test/bun.js/exit.js diff --git a/integration/bunjs-only-snippets/fetch.js.txt b/test/bun.js/fetch.js.txt similarity index 100% rename from integration/bunjs-only-snippets/fetch.js.txt rename to test/bun.js/fetch.js.txt diff --git a/integration/bunjs-only-snippets/fetch.test.js b/test/bun.js/fetch.test.js similarity index 100% rename from integration/bunjs-only-snippets/fetch.test.js rename to test/bun.js/fetch.test.js diff --git a/integration/bunjs-only-snippets/ffi-test.c b/test/bun.js/ffi-test.c similarity index 100% rename from integration/bunjs-only-snippets/ffi-test.c rename to test/bun.js/ffi-test.c diff --git a/integration/bunjs-only-snippets/ffi.test.fixture.callback.c b/test/bun.js/ffi.test.fixture.callback.c similarity index 98% rename from integration/bunjs-only-snippets/ffi.test.fixture.callback.c rename to test/bun.js/ffi.test.fixture.callback.c index 3a557e7d5d..d48ef67537 100644 --- a/integration/bunjs-only-snippets/ffi.test.fixture.callback.c +++ b/test/bun.js/ffi.test.fixture.callback.c @@ -1,7 +1,7 @@ #define IS_CALLBACK 1 // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/javascript/jsc/api/FFI.h#L2 +// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/integration/bunjs-only-snippets/ffi.test.fixture.receiver.c b/test/bun.js/ffi.test.fixture.receiver.c similarity index 98% rename from integration/bunjs-only-snippets/ffi.test.fixture.receiver.c rename to test/bun.js/ffi.test.fixture.receiver.c index 8a75e12f9a..5bb51bda53 100644 --- a/integration/bunjs-only-snippets/ffi.test.fixture.receiver.c +++ b/test/bun.js/ffi.test.fixture.receiver.c @@ -2,7 +2,7 @@ #define USES_FLOAT 1 // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/javascript/jsc/api/FFI.h#L2 +// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/test/bun.js/ffi.test.js b/test/bun.js/ffi.test.js new file mode 100644 index 0000000000..db2cfb6d4a --- /dev/null +++ b/test/bun.js/ffi.test.js @@ -0,0 +1,543 @@ +// import { describe, it, expect } from "bun:test"; +// import { unsafe } from "bun"; +// // +// import { +// native, +// viewSource, +// dlopen, +// CString, +// ptr, +// toBuffer, +// toArrayBuffer, +// FFIType, +// callback, +// CFunction, +// } from "bun:ffi"; + +// it("ffi print", async () => { +// await Bun.write( +// import.meta.dir + "/ffi.test.fixture.callback.c", +// viewSource( +// { +// returns: "bool", +// args: ["ptr"], +// }, +// true +// ) +// ); +// await Bun.write( +// import.meta.dir + "/ffi.test.fixture.receiver.c", +// viewSource( +// { +// not_a_callback: { +// returns: "float", +// args: ["float"], +// }, +// }, +// false +// )[0] +// ); +// expect( +// viewSource( +// { +// returns: "int8_t", +// args: [], +// }, +// true +// ).length > 0 +// ).toBe(true); +// expect( +// viewSource( +// { +// a: { +// returns: "int8_t", +// args: [], +// }, +// }, +// false +// ).length > 0 +// ).toBe(true); +// }); + +// function getTypes(fast) { +// const int64_t = fast ? "i64_fast" : "int64_t"; +// const uint64_t = fast ? "u64_fast" : "uint64_t"; +// return { +// returns_true: { +// returns: "bool", +// args: [], +// }, +// returns_false: { +// returns: "bool", +// args: [], +// }, +// returns_42_char: { +// returns: "char", +// args: [], +// }, +// returns_42_float: { +// returns: "float", +// args: [], +// }, +// returns_42_double: { +// returns: "double", +// args: [], +// }, +// returns_42_uint8_t: { +// returns: "uint8_t", +// args: [], +// }, +// returns_neg_42_int8_t: { +// returns: "int8_t", +// args: [], +// }, +// returns_42_uint16_t: { +// returns: "uint16_t", +// args: [], +// }, +// returns_42_uint32_t: { +// returns: "uint32_t", +// args: [], +// }, +// returns_42_uint64_t: { +// returns: uint64_t, +// args: [], +// }, +// returns_neg_42_int16_t: { +// returns: "int16_t", +// args: [], +// }, +// returns_neg_42_int32_t: { +// returns: "int32_t", +// args: [], +// }, +// returns_neg_42_int64_t: { +// returns: int64_t, +// args: [], +// }, + +// identity_char: { +// returns: "char", +// args: ["char"], +// }, +// identity_float: { +// returns: "float", +// args: ["float"], +// }, +// identity_bool: { +// returns: "bool", +// args: ["bool"], +// }, +// identity_double: { +// returns: "double", +// args: ["double"], +// }, +// identity_int8_t: { +// returns: "int8_t", +// args: ["int8_t"], +// }, +// identity_int16_t: { +// returns: "int16_t", +// args: ["int16_t"], +// }, +// identity_int32_t: { +// returns: "int32_t", +// args: ["int32_t"], +// }, +// identity_int64_t: { +// returns: int64_t, +// args: [int64_t], +// }, +// identity_uint8_t: { +// returns: "uint8_t", +// args: ["uint8_t"], +// }, +// identity_uint16_t: { +// returns: "uint16_t", +// args: ["uint16_t"], +// }, +// identity_uint32_t: { +// returns: "uint32_t", +// args: ["uint32_t"], +// }, +// identity_uint64_t: { +// returns: uint64_t, +// args: [uint64_t], +// }, + +// add_char: { +// returns: "char", +// args: ["char", "char"], +// }, +// add_float: { +// returns: "float", +// args: ["float", "float"], +// }, +// add_double: { +// returns: "double", +// args: ["double", "double"], +// }, +// add_int8_t: { +// returns: "int8_t", +// args: ["int8_t", "int8_t"], +// }, +// add_int16_t: { +// returns: "int16_t", +// args: ["int16_t", "int16_t"], +// }, +// add_int32_t: { +// returns: "int32_t", +// args: ["int32_t", "int32_t"], +// }, +// add_int64_t: { +// returns: int64_t, +// args: [int64_t, int64_t], +// }, +// add_uint8_t: { +// returns: "uint8_t", +// args: ["uint8_t", "uint8_t"], +// }, +// add_uint16_t: { +// returns: "uint16_t", +// args: ["uint16_t", "uint16_t"], +// }, +// add_uint32_t: { +// returns: "uint32_t", +// args: ["uint32_t", "uint32_t"], +// }, + +// does_pointer_equal_42_as_int32_t: { +// returns: "bool", +// args: ["ptr"], +// }, + +// ptr_should_point_to_42_as_int32_t: { +// returns: "ptr", +// args: [], +// }, +// identity_ptr: { +// returns: "ptr", +// args: ["ptr"], +// }, +// add_uint64_t: { +// returns: uint64_t, +// args: [uint64_t, uint64_t], +// }, + +// cb_identity_true: { +// returns: "bool", +// args: ["ptr"], +// }, +// cb_identity_false: { +// returns: "bool", +// args: ["ptr"], +// }, +// cb_identity_42_char: { +// returns: "char", +// args: ["ptr"], +// }, +// cb_identity_42_float: { +// returns: "float", +// args: ["ptr"], +// }, +// cb_identity_42_double: { +// returns: "double", +// args: ["ptr"], +// }, +// cb_identity_42_uint8_t: { +// returns: "uint8_t", +// args: ["ptr"], +// }, +// cb_identity_neg_42_int8_t: { +// returns: "int8_t", +// args: ["ptr"], +// }, +// cb_identity_42_uint16_t: { +// returns: "uint16_t", +// args: ["ptr"], +// }, +// cb_identity_42_uint32_t: { +// returns: "uint32_t", +// args: ["ptr"], +// }, +// cb_identity_42_uint64_t: { +// returns: uint64_t, +// args: ["ptr"], +// }, +// cb_identity_neg_42_int16_t: { +// returns: "int16_t", +// args: ["ptr"], +// }, +// cb_identity_neg_42_int32_t: { +// returns: "int32_t", +// args: ["ptr"], +// }, +// cb_identity_neg_42_int64_t: { +// returns: int64_t, +// args: ["ptr"], +// }, + +// return_a_function_ptr_to_function_that_returns_true: { +// returns: "ptr", +// args: [], +// }, +// }; +// } + +// function ffiRunner(types) { +// const { +// symbols: { +// returns_true, +// returns_false, +// return_a_function_ptr_to_function_that_returns_true, +// returns_42_char, +// returns_42_float, +// returns_42_double, +// returns_42_uint8_t, +// returns_neg_42_int8_t, +// returns_42_uint16_t, +// returns_42_uint32_t, +// returns_42_uint64_t, +// returns_neg_42_int16_t, +// returns_neg_42_int32_t, +// returns_neg_42_int64_t, +// identity_char, +// identity_float, +// identity_bool, +// identity_double, +// identity_int8_t, +// identity_int16_t, +// identity_int32_t, +// identity_int64_t, +// identity_uint8_t, +// identity_uint16_t, +// identity_uint32_t, +// identity_uint64_t, +// add_char, +// add_float, +// add_double, +// add_int8_t, +// add_int16_t, +// add_int32_t, +// add_int64_t, +// add_uint8_t, +// add_uint16_t, +// identity_ptr, +// add_uint32_t, +// add_uint64_t, +// does_pointer_equal_42_as_int32_t, +// ptr_should_point_to_42_as_int32_t, +// cb_identity_true, +// cb_identity_false, +// cb_identity_42_char, +// cb_identity_42_float, +// cb_identity_42_double, +// cb_identity_42_uint8_t, +// cb_identity_neg_42_int8_t, +// cb_identity_42_uint16_t, +// cb_identity_42_uint32_t, +// cb_identity_42_uint64_t, +// cb_identity_neg_42_int16_t, +// cb_identity_neg_42_int32_t, +// cb_identity_neg_42_int64_t, +// }, +// close, +// } = dlopen("/tmp/bun-ffi-test.dylib", types); + +// expect(returns_true()).toBe(true); + +// expect(returns_false()).toBe(false); + +// expect(returns_42_char()).toBe(42); +// console.log( +// returns_42_uint64_t().valueOf(), +// returns_42_uint64_t(), +// returns_42_uint64_t().valueOf() === returns_42_uint64_t() +// ); +// expect(returns_42_uint64_t().valueOf()).toBe(42); + +// expect(Math.fround(returns_42_float())).toBe(Math.fround(42.41999804973602)); +// expect(returns_42_double()).toBe(42.42); +// expect(returns_42_uint8_t()).toBe(42); +// expect(returns_neg_42_int8_t()).toBe(-42); +// expect(returns_42_uint16_t()).toBe(42); +// expect(returns_42_uint32_t()).toBe(42); +// expect(returns_42_uint64_t()).toBe(42); +// expect(returns_neg_42_int16_t()).toBe(-42); +// expect(returns_neg_42_int32_t()).toBe(-42); +// expect(identity_int32_t(10)).toBe(10); +// expect(returns_neg_42_int64_t()).toBe(-42); + +// expect(identity_char(10)).toBe(10); + +// expect(identity_float(10.199999809265137)).toBe(10.199999809265137); + +// expect(identity_bool(true)).toBe(true); + +// expect(identity_bool(false)).toBe(false); +// expect(identity_double(10.100000000000364)).toBe(10.100000000000364); + +// expect(identity_int8_t(10)).toBe(10); +// expect(identity_int16_t(10)).toBe(10); +// expect(identity_int64_t(10)).toBe(10); +// expect(identity_uint8_t(10)).toBe(10); +// expect(identity_uint16_t(10)).toBe(10); +// expect(identity_uint32_t(10)).toBe(10); +// expect(identity_uint64_t(10)).toBe(10); + +// var bigArray = new BigUint64Array(8); +// new Uint8Array(bigArray.buffer).fill(255); +// var bigIntArray = new BigInt64Array(bigArray.buffer); +// expect(identity_uint64_t(bigArray[0])).toBe(bigArray[0]); +// expect(identity_uint64_t(bigArray[0] - BigInt(1))).toBe( +// bigArray[0] - BigInt(1) +// ); + +// expect(add_uint64_t(BigInt(-1) * bigArray[0], bigArray[0])).toBe(0); +// expect(add_uint64_t(BigInt(-1) * bigArray[0] + BigInt(10), bigArray[0])).toBe( +// 10 +// ); +// expect(identity_uint64_t(0)).toBe(0); +// expect(identity_uint64_t(100)).toBe(100); +// expect(identity_uint64_t(BigInt(100))).toBe(100); +// expect(identity_int64_t(bigIntArray[0])).toBe(bigIntArray[0]); +// expect(identity_int64_t(bigIntArray[0] - BigInt(1))).toBe( +// bigIntArray[0] - BigInt(1) +// ); + +// expect(add_char(1, 1)).toBe(2); +// expect(add_float(2.4, 2.8)).toBe(Math.fround(5.2)); +// expect(add_double(4.2, 0.1)).toBe(4.3); +// expect(add_int8_t(1, 1)).toBe(2); +// expect(add_int16_t(1, 1)).toBe(2); +// expect(add_int32_t(1, 1)).toBe(2); +// expect(add_int64_t(1, 1)).toBe(2); +// expect(add_uint8_t(1, 1)).toBe(2); +// expect(add_uint16_t(1, 1)).toBe(2); +// expect(add_uint32_t(1, 1)).toBe(2); + +// const cptr = ptr_should_point_to_42_as_int32_t(); +// expect(cptr != 0).toBe(true); +// expect(typeof cptr === "number").toBe(true); +// expect(does_pointer_equal_42_as_int32_t(cptr)).toBe(true); +// const buffer = toBuffer(cptr, 0, 4); +// expect(buffer.readInt32(0)).toBe(42); +// expect(new DataView(toArrayBuffer(cptr, 0, 4), 0, 4).getInt32(0, true)).toBe( +// 42 +// ); +// expect(ptr(buffer)).toBe(cptr); +// expect(new CString(cptr, 0, 1).toString()).toBe("*"); +// expect(identity_ptr(cptr)).toBe(cptr); +// const second_ptr = ptr(new Buffer(8)); +// expect(identity_ptr(second_ptr)).toBe(second_ptr); + +// var myCFunction = new CFunction({ +// ptr: return_a_function_ptr_to_function_that_returns_true(), +// returns: "bool", +// }); +// expect(myCFunction()).toBe(true); + +// // function identityBool() { +// // return true; +// // } +// // globalThis.identityBool = identityBool; + +// // const first = native.callback( +// // { +// // returns: "bool", +// // }, +// // identityBool +// // ); +// // expect( +// // cb_identity_true() +// // ).toBe(true); + +// // expect(cb_identity_true(first)).toBe(true); + +// // expect( +// // cb_identity_false( +// // callback( +// // { +// // returns: "bool", +// // }, +// // () => false +// // ) +// // ) +// // ).toBe(false); + +// // expect( +// // cb_identity_42_char( +// // callback( +// // { +// // returns: "char", +// // }, +// // () => 42 +// // ) +// // ) +// // ).toBe(42); +// // expect( +// // cb_identity_42_uint8_t( +// // callback( +// // { +// // returns: "uint8_t", +// // }, +// // () => 42 +// // ) +// // ) +// // ).toBe(42); + +// // cb_identity_neg_42_int8_t( +// // callback( +// // { +// // returns: "int8_t", +// // }, +// // () => -42 +// // ) +// // ).toBe(-42); + +// // cb_identity_42_uint16_t( +// // callback( +// // { +// // returns: "uint16_t", +// // }, +// // () => 42 +// // ) +// // ).toBe(42); + +// // cb_identity_42_uint32_t( +// // callback( +// // { +// // returns: "uint32_t", +// // }, +// // () => 42 +// // ) +// // ).toBe(42); + +// // cb_identity_neg_42_int16_t( +// // callback( +// // { +// // returns: "int16_t", +// // }, +// // () => -42 +// // ) +// // ).toBe(-42); + +// // cb_identity_neg_42_int32_t( +// // callback( +// // { +// // returns: "int32_t", +// // }, +// // () => -42 +// // ) +// // ).toBe(-42); + +// close(); +// } + +// it("run ffi fast", () => { +// ffiRunner(getTypes(true)); +// }); + +// it("run ffi", () => { +// ffiRunner(getTypes(false)); +// }); diff --git a/integration/bunjs-only-snippets/fs-stream.js b/test/bun.js/fs-stream.js similarity index 100% rename from integration/bunjs-only-snippets/fs-stream.js rename to test/bun.js/fs-stream.js diff --git a/integration/bunjs-only-snippets/fs.test.js b/test/bun.js/fs.test.js similarity index 100% rename from integration/bunjs-only-snippets/fs.test.js rename to test/bun.js/fs.test.js diff --git a/integration/bunjs-only-snippets/gc.js b/test/bun.js/gc.js similarity index 100% rename from integration/bunjs-only-snippets/gc.js rename to test/bun.js/gc.js diff --git a/integration/bunjs-only-snippets/globals.test.js b/test/bun.js/globals.test.js similarity index 100% rename from integration/bunjs-only-snippets/globals.test.js rename to test/bun.js/globals.test.js diff --git a/integration/bunjs-only-snippets/hash.test.js b/test/bun.js/hash.test.js similarity index 100% rename from integration/bunjs-only-snippets/hash.test.js rename to test/bun.js/hash.test.js diff --git a/integration/bunjs-only-snippets/html-rewriter.test.js b/test/bun.js/html-rewriter.test.js similarity index 100% rename from integration/bunjs-only-snippets/html-rewriter.test.js rename to test/bun.js/html-rewriter.test.js diff --git a/integration/bunjs-only-snippets/import-meta.test.js b/test/bun.js/import-meta.test.js similarity index 83% rename from integration/bunjs-only-snippets/import-meta.test.js rename to test/bun.js/import-meta.test.js index 0520be3a56..0e2faa9039 100644 --- a/integration/bunjs-only-snippets/import-meta.test.js +++ b/test/bun.js/import-meta.test.js @@ -25,11 +25,9 @@ it("import.meta.require", () => { }); it("import.meta.dir", () => { - expect(dir.endsWith("/bun/integration/bunjs-only-snippets")).toBe(true); + expect(dir.endsWith("/bun/test/bun.js")).toBe(true); }); it("import.meta.path", () => { - expect( - path.endsWith("/bun/integration/bunjs-only-snippets/import-meta.test.js") - ).toBe(true); + expect(path.endsWith("/bun/test/bun.js/import-meta.test.js")).toBe(true); }); diff --git a/integration/bunjs-only-snippets/inline.macro.js b/test/bun.js/inline.macro.js similarity index 100% rename from integration/bunjs-only-snippets/inline.macro.js rename to test/bun.js/inline.macro.js diff --git a/integration/bunjs-only-snippets/inspect.test.js b/test/bun.js/inspect.test.js similarity index 100% rename from integration/bunjs-only-snippets/inspect.test.js rename to test/bun.js/inspect.test.js diff --git a/integration/bunjs-only-snippets/macro-check.js b/test/bun.js/macro-check.js similarity index 100% rename from integration/bunjs-only-snippets/macro-check.js rename to test/bun.js/macro-check.js diff --git a/integration/bunjs-only-snippets/microtask.test.js b/test/bun.js/microtask.test.js similarity index 100% rename from integration/bunjs-only-snippets/microtask.test.js rename to test/bun.js/microtask.test.js diff --git a/integration/bunjs-only-snippets/mmap.test.js b/test/bun.js/mmap.test.js similarity index 100% rename from integration/bunjs-only-snippets/mmap.test.js rename to test/bun.js/mmap.test.js diff --git a/integration/bunjs-only-snippets/node-builtins.test.js b/test/bun.js/node-builtins.test.js similarity index 100% rename from integration/bunjs-only-snippets/node-builtins.test.js rename to test/bun.js/node-builtins.test.js diff --git a/integration/bunjs-only-snippets/path.test.js b/test/bun.js/path.test.js similarity index 100% rename from integration/bunjs-only-snippets/path.test.js rename to test/bun.js/path.test.js diff --git a/integration/bunjs-only-snippets/performance.test.js b/test/bun.js/performance.test.js similarity index 100% rename from integration/bunjs-only-snippets/performance.test.js rename to test/bun.js/performance.test.js diff --git a/integration/bunjs-only-snippets/process-nexttick.js b/test/bun.js/process-nexttick.js similarity index 100% rename from integration/bunjs-only-snippets/process-nexttick.js rename to test/bun.js/process-nexttick.js diff --git a/integration/bunjs-only-snippets/process-nexttick.test.js b/test/bun.js/process-nexttick.test.js similarity index 100% rename from integration/bunjs-only-snippets/process-nexttick.test.js rename to test/bun.js/process-nexttick.test.js diff --git a/integration/bunjs-only-snippets/process.test.js b/test/bun.js/process.test.js similarity index 100% rename from integration/bunjs-only-snippets/process.test.js rename to test/bun.js/process.test.js diff --git a/integration/bunjs-only-snippets/readFileSync.txt b/test/bun.js/readFileSync.txt similarity index 100% rename from integration/bunjs-only-snippets/readFileSync.txt rename to test/bun.js/readFileSync.txt diff --git a/integration/bunjs-only-snippets/readdir.js b/test/bun.js/readdir.js similarity index 100% rename from integration/bunjs-only-snippets/readdir.js rename to test/bun.js/readdir.js diff --git a/integration/bunjs-only-snippets/reportError.test.js b/test/bun.js/reportError.test.js similarity index 100% rename from integration/bunjs-only-snippets/reportError.test.js rename to test/bun.js/reportError.test.js diff --git a/integration/bunjs-only-snippets/require-json.json b/test/bun.js/require-json.json similarity index 100% rename from integration/bunjs-only-snippets/require-json.json rename to test/bun.js/require-json.json diff --git a/integration/bunjs-only-snippets/resolve-typescript-file.tsx b/test/bun.js/resolve-typescript-file.tsx similarity index 100% rename from integration/bunjs-only-snippets/resolve-typescript-file.tsx rename to test/bun.js/resolve-typescript-file.tsx diff --git a/integration/bunjs-only-snippets/resolve.test.js b/test/bun.js/resolve.test.js similarity index 98% rename from integration/bunjs-only-snippets/resolve.test.js rename to test/bun.js/resolve.test.js index f86d319804..56162de4f2 100644 --- a/integration/bunjs-only-snippets/resolve.test.js +++ b/test/bun.js/resolve.test.js @@ -12,7 +12,7 @@ it("import.meta.resolve", async () => { expect( // optional second param can be any path, including a dir await import.meta.resolve( - "./bunjs-only-snippets/resolve.test.js", + "./bun.js/resolve.test.js", join(import.meta.path, "../") ) ).toBe(import.meta.path); diff --git a/integration/bunjs-only-snippets/response.file.test.js b/test/bun.js/response.file.test.js similarity index 100% rename from integration/bunjs-only-snippets/response.file.test.js rename to test/bun.js/response.file.test.js diff --git a/integration/bunjs-only-snippets/serve.test.ts b/test/bun.js/serve.test.ts similarity index 100% rename from integration/bunjs-only-snippets/serve.test.ts rename to test/bun.js/serve.test.ts diff --git a/integration/bunjs-only-snippets/setInterval.test.js b/test/bun.js/setInterval.test.js similarity index 100% rename from integration/bunjs-only-snippets/setInterval.test.js rename to test/bun.js/setInterval.test.js diff --git a/integration/bunjs-only-snippets/setTimeout.test.js b/test/bun.js/setTimeout.test.js similarity index 100% rename from integration/bunjs-only-snippets/setTimeout.test.js rename to test/bun.js/setTimeout.test.js diff --git a/integration/bunjs-only-snippets/shadow.test.js b/test/bun.js/shadow.test.js similarity index 100% rename from integration/bunjs-only-snippets/shadow.test.js rename to test/bun.js/shadow.test.js diff --git a/integration/bunjs-only-snippets/sleep.js b/test/bun.js/sleep.js similarity index 100% rename from integration/bunjs-only-snippets/sleep.js rename to test/bun.js/sleep.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js b/test/bun.js/solid-dom-fixtures/SVG/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js rename to test/bun.js/solid-dom-fixtures/SVG/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.bun.js b/test/bun.js/solid-dom-fixtures/SVG/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.bun.js rename to test/bun.js/solid-dom-fixtures/SVG/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.js b/test/bun.js/solid-dom-fixtures/SVG/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/SVG/output.js rename to test/bun.js/solid-dom-fixtures/SVG/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/code.js b/test/bun.js/solid-dom-fixtures/attributeExpressions/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/code.js rename to test/bun.js/solid-dom-fixtures/attributeExpressions/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.bun.js b/test/bun.js/solid-dom-fixtures/attributeExpressions/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.bun.js rename to test/bun.js/solid-dom-fixtures/attributeExpressions/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.js b/test/bun.js/solid-dom-fixtures/attributeExpressions/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/attributeExpressions/output.js rename to test/bun.js/solid-dom-fixtures/attributeExpressions/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/components/code.js b/test/bun.js/solid-dom-fixtures/components/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/components/code.js rename to test/bun.js/solid-dom-fixtures/components/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/components/output.bun.js b/test/bun.js/solid-dom-fixtures/components/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/components/output.bun.js rename to test/bun.js/solid-dom-fixtures/components/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/components/output.js b/test/bun.js/solid-dom-fixtures/components/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/components/output.js rename to test/bun.js/solid-dom-fixtures/components/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js b/test/bun.js/solid-dom-fixtures/conditionalExpressions/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js rename to test/bun.js/solid-dom-fixtures/conditionalExpressions/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js b/test/bun.js/solid-dom-fixtures/conditionalExpressions/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js rename to test/bun.js/solid-dom-fixtures/conditionalExpressions/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.js b/test/bun.js/solid-dom-fixtures/conditionalExpressions/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.js rename to test/bun.js/solid-dom-fixtures/conditionalExpressions/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/code.js b/test/bun.js/solid-dom-fixtures/customElements/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/customElements/code.js rename to test/bun.js/solid-dom-fixtures/customElements/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.bun.js b/test/bun.js/solid-dom-fixtures/customElements/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.bun.js rename to test/bun.js/solid-dom-fixtures/customElements/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.js b/test/bun.js/solid-dom-fixtures/customElements/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/customElements/output.js rename to test/bun.js/solid-dom-fixtures/customElements/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js b/test/bun.js/solid-dom-fixtures/eventExpressions/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js rename to test/bun.js/solid-dom-fixtures/eventExpressions/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.bun.js b/test/bun.js/solid-dom-fixtures/eventExpressions/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.bun.js rename to test/bun.js/solid-dom-fixtures/eventExpressions/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.js b/test/bun.js/solid-dom-fixtures/eventExpressions/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/output.js rename to test/bun.js/solid-dom-fixtures/eventExpressions/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/code.js b/test/bun.js/solid-dom-fixtures/fragments/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/fragments/code.js rename to test/bun.js/solid-dom-fixtures/fragments/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.bun.js b/test/bun.js/solid-dom-fixtures/fragments/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.bun.js rename to test/bun.js/solid-dom-fixtures/fragments/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.js b/test/bun.js/solid-dom-fixtures/fragments/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/fragments/output.js rename to test/bun.js/solid-dom-fixtures/fragments/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/code.js b/test/bun.js/solid-dom-fixtures/insertChildren/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/code.js rename to test/bun.js/solid-dom-fixtures/insertChildren/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/output.js b/test/bun.js/solid-dom-fixtures/insertChildren/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/insertChildren/output.js rename to test/bun.js/solid-dom-fixtures/insertChildren/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/code.js b/test/bun.js/solid-dom-fixtures/namespaceElements/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/code.js rename to test/bun.js/solid-dom-fixtures/namespaceElements/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/output.js b/test/bun.js/solid-dom-fixtures/namespaceElements/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/namespaceElements/output.js rename to test/bun.js/solid-dom-fixtures/namespaceElements/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/code.js b/test/bun.js/solid-dom-fixtures/simpleElements/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/code.js rename to test/bun.js/solid-dom-fixtures/simpleElements/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.bun.js b/test/bun.js/solid-dom-fixtures/simpleElements/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.bun.js rename to test/bun.js/solid-dom-fixtures/simpleElements/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.js b/test/bun.js/solid-dom-fixtures/simpleElements/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/simpleElements/output.js rename to test/bun.js/solid-dom-fixtures/simpleElements/output.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/code.js b/test/bun.js/solid-dom-fixtures/textInterpolation/code.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/code.js rename to test/bun.js/solid-dom-fixtures/textInterpolation/code.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.bun.js b/test/bun.js/solid-dom-fixtures/textInterpolation/output.bun.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.bun.js rename to test/bun.js/solid-dom-fixtures/textInterpolation/output.bun.js diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.js b/test/bun.js/solid-dom-fixtures/textInterpolation/output.js similarity index 100% rename from integration/bunjs-only-snippets/solid-dom-fixtures/textInterpolation/output.js rename to test/bun.js/solid-dom-fixtures/textInterpolation/output.js diff --git a/integration/bunjs-only-snippets/some-fs.js b/test/bun.js/some-fs.js similarity index 100% rename from integration/bunjs-only-snippets/some-fs.js rename to test/bun.js/some-fs.js diff --git a/integration/bunjs-only-snippets/sql-raw.test.js b/test/bun.js/sql-raw.test.js similarity index 100% rename from integration/bunjs-only-snippets/sql-raw.test.js rename to test/bun.js/sql-raw.test.js diff --git a/integration/bunjs-only-snippets/sqlite.test.js b/test/bun.js/sqlite.test.js similarity index 100% rename from integration/bunjs-only-snippets/sqlite.test.js rename to test/bun.js/sqlite.test.js diff --git a/integration/bunjs-only-snippets/streams.test.js b/test/bun.js/streams.test.js similarity index 100% rename from integration/bunjs-only-snippets/streams.test.js rename to test/bun.js/streams.test.js diff --git a/integration/bunjs-only-snippets/text-encoder.test.js b/test/bun.js/text-encoder.test.js similarity index 100% rename from integration/bunjs-only-snippets/text-encoder.test.js rename to test/bun.js/text-encoder.test.js diff --git a/integration/bunjs-only-snippets/toml-fixture.toml b/test/bun.js/toml-fixture.toml similarity index 100% rename from integration/bunjs-only-snippets/toml-fixture.toml rename to test/bun.js/toml-fixture.toml diff --git a/integration/bunjs-only-snippets/toml.test.js b/test/bun.js/toml.test.js similarity index 100% rename from integration/bunjs-only-snippets/toml.test.js rename to test/bun.js/toml.test.js diff --git a/integration/bunjs-only-snippets/transpiler.test.js b/test/bun.js/transpiler.test.js similarity index 100% rename from integration/bunjs-only-snippets/transpiler.test.js rename to test/bun.js/transpiler.test.js diff --git a/integration/bunjs-only-snippets/tsconfig.json b/test/bun.js/tsconfig.json similarity index 100% rename from integration/bunjs-only-snippets/tsconfig.json rename to test/bun.js/tsconfig.json diff --git a/integration/bunjs-only-snippets/unsafe.test.js b/test/bun.js/unsafe.test.js similarity index 100% rename from integration/bunjs-only-snippets/unsafe.test.js rename to test/bun.js/unsafe.test.js diff --git a/integration/bunjs-only-snippets/url.test.ts b/test/bun.js/url.test.ts similarity index 100% rename from integration/bunjs-only-snippets/url.test.ts rename to test/bun.js/url.test.ts diff --git a/integration/bunjs-only-snippets/wasm-return-1-test.zig b/test/bun.js/wasm-return-1-test.zig similarity index 100% rename from integration/bunjs-only-snippets/wasm-return-1-test.zig rename to test/bun.js/wasm-return-1-test.zig diff --git a/integration/bunjs-only-snippets/wasm.js b/test/bun.js/wasm.js similarity index 100% rename from integration/bunjs-only-snippets/wasm.js rename to test/bun.js/wasm.js diff --git a/integration/bunjs-only-snippets/wasm.test.js b/test/bun.js/wasm.test.js similarity index 100% rename from integration/bunjs-only-snippets/wasm.test.js rename to test/bun.js/wasm.test.js diff --git a/integration/bunjs-only-snippets/web-globals.test.js b/test/bun.js/web-globals.test.js similarity index 100% rename from integration/bunjs-only-snippets/web-globals.test.js rename to test/bun.js/web-globals.test.js diff --git a/integration/bunjs-only-snippets/websocket.test.js b/test/bun.js/websocket.test.js similarity index 100% rename from integration/bunjs-only-snippets/websocket.test.js rename to test/bun.js/websocket.test.js diff --git a/integration/bunjs-only-snippets/writeFileSync.txt b/test/bun.js/writeFileSync.txt similarity index 100% rename from integration/bunjs-only-snippets/writeFileSync.txt rename to test/bun.js/writeFileSync.txt diff --git a/integration/bunjs-only-snippets/zlib.test.js b/test/bun.js/zlib.test.js similarity index 100% rename from integration/bunjs-only-snippets/zlib.test.js rename to test/bun.js/zlib.test.js diff --git a/integration/macro/assert.tsx b/test/macro/assert.tsx similarity index 100% rename from integration/macro/assert.tsx rename to test/macro/assert.tsx diff --git a/integration/macro/fetchSync.tsx b/test/macro/fetchSync.tsx similarity index 100% rename from integration/macro/fetchSync.tsx rename to test/macro/fetchSync.tsx diff --git a/integration/macro/hello-fetch-macro.tsx b/test/macro/hello-fetch-macro.tsx similarity index 100% rename from integration/macro/hello-fetch-macro.tsx rename to test/macro/hello-fetch-macro.tsx diff --git a/integration/macro/loadMocks.tsx b/test/macro/loadMocks.tsx similarity index 100% rename from integration/macro/loadMocks.tsx rename to test/macro/loadMocks.tsx diff --git a/integration/scripts/browser.js b/test/scripts/browser.js similarity index 100% rename from integration/scripts/browser.js rename to test/scripts/browser.js diff --git a/integration/scripts/bun.js b/test/scripts/bun.js similarity index 100% rename from integration/scripts/bun.js rename to test/scripts/bun.js diff --git a/integration/scripts/bun.lockb b/test/scripts/bun.lockb similarity index 100% rename from integration/scripts/bun.lockb rename to test/scripts/bun.lockb diff --git a/integration/scripts/package-lock.json b/test/scripts/package-lock.json similarity index 100% rename from integration/scripts/package-lock.json rename to test/scripts/package-lock.json diff --git a/integration/scripts/package.json b/test/scripts/package.json similarity index 100% rename from integration/scripts/package.json rename to test/scripts/package.json diff --git a/integration/scripts/snippets.json b/test/scripts/snippets.json similarity index 100% rename from integration/scripts/snippets.json rename to test/scripts/snippets.json diff --git a/integration/snapshots/.prettierignore b/test/snapshots/.prettierignore similarity index 100% rename from integration/snapshots/.prettierignore rename to test/snapshots/.prettierignore diff --git a/integration/snapshots/array-args-with-default-values.debug.js b/test/snapshots/array-args-with-default-values.debug.js similarity index 100% rename from integration/snapshots/array-args-with-default-values.debug.js rename to test/snapshots/array-args-with-default-values.debug.js diff --git a/integration/snapshots/array-args-with-default-values.hmr.debug.js b/test/snapshots/array-args-with-default-values.hmr.debug.js similarity index 100% rename from integration/snapshots/array-args-with-default-values.hmr.debug.js rename to test/snapshots/array-args-with-default-values.hmr.debug.js diff --git a/integration/snapshots/array-args-with-default-values.hmr.js b/test/snapshots/array-args-with-default-values.hmr.js similarity index 100% rename from integration/snapshots/array-args-with-default-values.hmr.js rename to test/snapshots/array-args-with-default-values.hmr.js diff --git a/integration/snapshots/array-args-with-default-values.js b/test/snapshots/array-args-with-default-values.js similarity index 100% rename from integration/snapshots/array-args-with-default-values.js rename to test/snapshots/array-args-with-default-values.js diff --git a/integration/snapshots/bundled-entry-point.debug.js b/test/snapshots/bundled-entry-point.debug.js similarity index 100% rename from integration/snapshots/bundled-entry-point.debug.js rename to test/snapshots/bundled-entry-point.debug.js diff --git a/integration/snapshots/bundled-entry-point.hmr.debug.js b/test/snapshots/bundled-entry-point.hmr.debug.js similarity index 100% rename from integration/snapshots/bundled-entry-point.hmr.debug.js rename to test/snapshots/bundled-entry-point.hmr.debug.js diff --git a/integration/snapshots/bundled-entry-point.hmr.js b/test/snapshots/bundled-entry-point.hmr.js similarity index 100% rename from integration/snapshots/bundled-entry-point.hmr.js rename to test/snapshots/bundled-entry-point.hmr.js diff --git a/integration/snapshots/bundled-entry-point.js b/test/snapshots/bundled-entry-point.js similarity index 100% rename from integration/snapshots/bundled-entry-point.js rename to test/snapshots/bundled-entry-point.js diff --git a/integration/snapshots/caught-require.debug.js b/test/snapshots/caught-require.debug.js similarity index 100% rename from integration/snapshots/caught-require.debug.js rename to test/snapshots/caught-require.debug.js diff --git a/integration/snapshots/caught-require.hmr.debug.js b/test/snapshots/caught-require.hmr.debug.js similarity index 100% rename from integration/snapshots/caught-require.hmr.debug.js rename to test/snapshots/caught-require.hmr.debug.js diff --git a/integration/snapshots/caught-require.hmr.js b/test/snapshots/caught-require.hmr.js similarity index 100% rename from integration/snapshots/caught-require.hmr.js rename to test/snapshots/caught-require.hmr.js diff --git a/integration/snapshots/caught-require.js b/test/snapshots/caught-require.js similarity index 100% rename from integration/snapshots/caught-require.js rename to test/snapshots/caught-require.js diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js similarity index 100% rename from integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js rename to test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js similarity index 100% rename from integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js rename to test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js similarity index 100% rename from integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js rename to test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js similarity index 100% rename from integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js rename to test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js diff --git a/integration/snapshots/code-simplification-neql-define.debug.js b/test/snapshots/code-simplification-neql-define.debug.js similarity index 100% rename from integration/snapshots/code-simplification-neql-define.debug.js rename to test/snapshots/code-simplification-neql-define.debug.js diff --git a/integration/snapshots/code-simplification-neql-define.hmr.debug.js b/test/snapshots/code-simplification-neql-define.hmr.debug.js similarity index 100% rename from integration/snapshots/code-simplification-neql-define.hmr.debug.js rename to test/snapshots/code-simplification-neql-define.hmr.debug.js diff --git a/integration/snapshots/code-simplification-neql-define.hmr.js b/test/snapshots/code-simplification-neql-define.hmr.js similarity index 100% rename from integration/snapshots/code-simplification-neql-define.hmr.js rename to test/snapshots/code-simplification-neql-define.hmr.js diff --git a/integration/snapshots/code-simplification-neql-define.js b/test/snapshots/code-simplification-neql-define.js similarity index 100% rename from integration/snapshots/code-simplification-neql-define.js rename to test/snapshots/code-simplification-neql-define.js diff --git a/integration/snapshots/custom-emotion-jsx/file.debug.jsx b/test/snapshots/custom-emotion-jsx/file.debug.jsx similarity index 100% rename from integration/snapshots/custom-emotion-jsx/file.debug.jsx rename to test/snapshots/custom-emotion-jsx/file.debug.jsx diff --git a/integration/snapshots/custom-emotion-jsx/file.hmr.debug.jsx b/test/snapshots/custom-emotion-jsx/file.hmr.debug.jsx similarity index 100% rename from integration/snapshots/custom-emotion-jsx/file.hmr.debug.jsx rename to test/snapshots/custom-emotion-jsx/file.hmr.debug.jsx diff --git a/integration/snapshots/custom-emotion-jsx/file.hmr.jsx b/test/snapshots/custom-emotion-jsx/file.hmr.jsx similarity index 100% rename from integration/snapshots/custom-emotion-jsx/file.hmr.jsx rename to test/snapshots/custom-emotion-jsx/file.hmr.jsx diff --git a/integration/snapshots/custom-emotion-jsx/file.jsx b/test/snapshots/custom-emotion-jsx/file.jsx similarity index 100% rename from integration/snapshots/custom-emotion-jsx/file.jsx rename to test/snapshots/custom-emotion-jsx/file.jsx diff --git a/integration/snapshots/export-default-module-hot.debug.js b/test/snapshots/export-default-module-hot.debug.js similarity index 100% rename from integration/snapshots/export-default-module-hot.debug.js rename to test/snapshots/export-default-module-hot.debug.js diff --git a/integration/snapshots/export-default-module-hot.hmr.debug.js b/test/snapshots/export-default-module-hot.hmr.debug.js similarity index 100% rename from integration/snapshots/export-default-module-hot.hmr.debug.js rename to test/snapshots/export-default-module-hot.hmr.debug.js diff --git a/integration/snapshots/export-default-module-hot.hmr.js b/test/snapshots/export-default-module-hot.hmr.js similarity index 100% rename from integration/snapshots/export-default-module-hot.hmr.js rename to test/snapshots/export-default-module-hot.hmr.js diff --git a/integration/snapshots/export-default-module-hot.js b/test/snapshots/export-default-module-hot.js similarity index 100% rename from integration/snapshots/export-default-module-hot.js rename to test/snapshots/export-default-module-hot.js diff --git a/integration/snapshots/export.debug.js b/test/snapshots/export.debug.js similarity index 100% rename from integration/snapshots/export.debug.js rename to test/snapshots/export.debug.js diff --git a/integration/snapshots/export.hmr.debug.js b/test/snapshots/export.hmr.debug.js similarity index 100% rename from integration/snapshots/export.hmr.debug.js rename to test/snapshots/export.hmr.debug.js diff --git a/integration/snapshots/export.hmr.js b/test/snapshots/export.hmr.js similarity index 100% rename from integration/snapshots/export.hmr.js rename to test/snapshots/export.hmr.js diff --git a/integration/snapshots/export.js b/test/snapshots/export.js similarity index 100% rename from integration/snapshots/export.js rename to test/snapshots/export.js diff --git a/integration/snapshots/forbid-in-is-correct.debug.js b/test/snapshots/forbid-in-is-correct.debug.js similarity index 100% rename from integration/snapshots/forbid-in-is-correct.debug.js rename to test/snapshots/forbid-in-is-correct.debug.js diff --git a/integration/snapshots/forbid-in-is-correct.hmr.debug.js b/test/snapshots/forbid-in-is-correct.hmr.debug.js similarity index 100% rename from integration/snapshots/forbid-in-is-correct.hmr.debug.js rename to test/snapshots/forbid-in-is-correct.hmr.debug.js diff --git a/integration/snapshots/forbid-in-is-correct.hmr.js b/test/snapshots/forbid-in-is-correct.hmr.js similarity index 100% rename from integration/snapshots/forbid-in-is-correct.hmr.js rename to test/snapshots/forbid-in-is-correct.hmr.js diff --git a/integration/snapshots/forbid-in-is-correct.js b/test/snapshots/forbid-in-is-correct.js similarity index 100% rename from integration/snapshots/forbid-in-is-correct.js rename to test/snapshots/forbid-in-is-correct.js diff --git a/integration/snapshots/global-is-remapped-to-globalThis.debug.js b/test/snapshots/global-is-remapped-to-globalThis.debug.js similarity index 100% rename from integration/snapshots/global-is-remapped-to-globalThis.debug.js rename to test/snapshots/global-is-remapped-to-globalThis.debug.js diff --git a/integration/snapshots/global-is-remapped-to-globalThis.hmr.debug.js b/test/snapshots/global-is-remapped-to-globalThis.hmr.debug.js similarity index 100% rename from integration/snapshots/global-is-remapped-to-globalThis.hmr.debug.js rename to test/snapshots/global-is-remapped-to-globalThis.hmr.debug.js diff --git a/integration/snapshots/global-is-remapped-to-globalThis.hmr.js b/test/snapshots/global-is-remapped-to-globalThis.hmr.js similarity index 100% rename from integration/snapshots/global-is-remapped-to-globalThis.hmr.js rename to test/snapshots/global-is-remapped-to-globalThis.hmr.js diff --git a/integration/snapshots/global-is-remapped-to-globalThis.js b/test/snapshots/global-is-remapped-to-globalThis.js similarity index 100% rename from integration/snapshots/global-is-remapped-to-globalThis.js rename to test/snapshots/global-is-remapped-to-globalThis.js diff --git a/integration/snapshots/jsx-entities.debug.jsx b/test/snapshots/jsx-entities.debug.jsx similarity index 100% rename from integration/snapshots/jsx-entities.debug.jsx rename to test/snapshots/jsx-entities.debug.jsx diff --git a/integration/snapshots/jsx-entities.hmr.debug.jsx b/test/snapshots/jsx-entities.hmr.debug.jsx similarity index 100% rename from integration/snapshots/jsx-entities.hmr.debug.jsx rename to test/snapshots/jsx-entities.hmr.debug.jsx diff --git a/integration/snapshots/jsx-entities.hmr.jsx b/test/snapshots/jsx-entities.hmr.jsx similarity index 100% rename from integration/snapshots/jsx-entities.hmr.jsx rename to test/snapshots/jsx-entities.hmr.jsx diff --git a/integration/snapshots/jsx-entities.jsx b/test/snapshots/jsx-entities.jsx similarity index 100% rename from integration/snapshots/jsx-entities.jsx rename to test/snapshots/jsx-entities.jsx diff --git a/integration/snapshots/jsx-spacing.debug.jsx b/test/snapshots/jsx-spacing.debug.jsx similarity index 100% rename from integration/snapshots/jsx-spacing.debug.jsx rename to test/snapshots/jsx-spacing.debug.jsx diff --git a/integration/snapshots/jsx-spacing.hmr.debug.jsx b/test/snapshots/jsx-spacing.hmr.debug.jsx similarity index 100% rename from integration/snapshots/jsx-spacing.hmr.debug.jsx rename to test/snapshots/jsx-spacing.hmr.debug.jsx diff --git a/integration/snapshots/jsx-spacing.hmr.jsx b/test/snapshots/jsx-spacing.hmr.jsx similarity index 100% rename from integration/snapshots/jsx-spacing.hmr.jsx rename to test/snapshots/jsx-spacing.hmr.jsx diff --git a/integration/snapshots/jsx-spacing.jsx b/test/snapshots/jsx-spacing.jsx similarity index 100% rename from integration/snapshots/jsx-spacing.jsx rename to test/snapshots/jsx-spacing.jsx diff --git a/integration/snapshots/latin1-chars-in-regexp.debug.js b/test/snapshots/latin1-chars-in-regexp.debug.js similarity index 100% rename from integration/snapshots/latin1-chars-in-regexp.debug.js rename to test/snapshots/latin1-chars-in-regexp.debug.js diff --git a/integration/snapshots/latin1-chars-in-regexp.hmr.debug.js b/test/snapshots/latin1-chars-in-regexp.hmr.debug.js similarity index 100% rename from integration/snapshots/latin1-chars-in-regexp.hmr.debug.js rename to test/snapshots/latin1-chars-in-regexp.hmr.debug.js diff --git a/integration/snapshots/latin1-chars-in-regexp.hmr.js b/test/snapshots/latin1-chars-in-regexp.hmr.js similarity index 100% rename from integration/snapshots/latin1-chars-in-regexp.hmr.js rename to test/snapshots/latin1-chars-in-regexp.hmr.js diff --git a/integration/snapshots/latin1-chars-in-regexp.js b/test/snapshots/latin1-chars-in-regexp.js similarity index 100% rename from integration/snapshots/latin1-chars-in-regexp.js rename to test/snapshots/latin1-chars-in-regexp.js diff --git a/integration/snapshots/lodash-regexp.debug.js b/test/snapshots/lodash-regexp.debug.js similarity index 100% rename from integration/snapshots/lodash-regexp.debug.js rename to test/snapshots/lodash-regexp.debug.js diff --git a/integration/snapshots/lodash-regexp.hmr.debug.js b/test/snapshots/lodash-regexp.hmr.debug.js similarity index 100% rename from integration/snapshots/lodash-regexp.hmr.debug.js rename to test/snapshots/lodash-regexp.hmr.debug.js diff --git a/integration/snapshots/lodash-regexp.hmr.js b/test/snapshots/lodash-regexp.hmr.js similarity index 100% rename from integration/snapshots/lodash-regexp.hmr.js rename to test/snapshots/lodash-regexp.hmr.js diff --git a/integration/snapshots/lodash-regexp.js b/test/snapshots/lodash-regexp.js similarity index 100% rename from integration/snapshots/lodash-regexp.js rename to test/snapshots/lodash-regexp.js diff --git a/integration/snapshots/multiple-imports.debug.js b/test/snapshots/multiple-imports.debug.js similarity index 100% rename from integration/snapshots/multiple-imports.debug.js rename to test/snapshots/multiple-imports.debug.js diff --git a/integration/snapshots/multiple-imports.hmr.debug.js b/test/snapshots/multiple-imports.hmr.debug.js similarity index 100% rename from integration/snapshots/multiple-imports.hmr.debug.js rename to test/snapshots/multiple-imports.hmr.debug.js diff --git a/integration/snapshots/multiple-imports.hmr.js b/test/snapshots/multiple-imports.hmr.js similarity index 100% rename from integration/snapshots/multiple-imports.hmr.js rename to test/snapshots/multiple-imports.hmr.js diff --git a/integration/snapshots/multiple-imports.js b/test/snapshots/multiple-imports.js similarity index 100% rename from integration/snapshots/multiple-imports.js rename to test/snapshots/multiple-imports.js diff --git a/integration/snapshots/multiple-var.debug.js b/test/snapshots/multiple-var.debug.js similarity index 100% rename from integration/snapshots/multiple-var.debug.js rename to test/snapshots/multiple-var.debug.js diff --git a/integration/snapshots/multiple-var.hmr.debug.js b/test/snapshots/multiple-var.hmr.debug.js similarity index 100% rename from integration/snapshots/multiple-var.hmr.debug.js rename to test/snapshots/multiple-var.hmr.debug.js diff --git a/integration/snapshots/multiple-var.hmr.js b/test/snapshots/multiple-var.hmr.js similarity index 100% rename from integration/snapshots/multiple-var.hmr.js rename to test/snapshots/multiple-var.hmr.js diff --git a/integration/snapshots/multiple-var.js b/test/snapshots/multiple-var.js similarity index 100% rename from integration/snapshots/multiple-var.js rename to test/snapshots/multiple-var.js diff --git a/integration/snapshots/number-literal-bug.debug.js b/test/snapshots/number-literal-bug.debug.js similarity index 100% rename from integration/snapshots/number-literal-bug.debug.js rename to test/snapshots/number-literal-bug.debug.js diff --git a/integration/snapshots/number-literal-bug.hmr.debug.js b/test/snapshots/number-literal-bug.hmr.debug.js similarity index 100% rename from integration/snapshots/number-literal-bug.hmr.debug.js rename to test/snapshots/number-literal-bug.hmr.debug.js diff --git a/integration/snapshots/number-literal-bug.hmr.js b/test/snapshots/number-literal-bug.hmr.js similarity index 100% rename from integration/snapshots/number-literal-bug.hmr.js rename to test/snapshots/number-literal-bug.hmr.js diff --git a/integration/snapshots/number-literal-bug.js b/test/snapshots/number-literal-bug.js similarity index 100% rename from integration/snapshots/number-literal-bug.js rename to test/snapshots/number-literal-bug.js diff --git a/integration/snapshots/optional-chain-with-function.debug.js b/test/snapshots/optional-chain-with-function.debug.js similarity index 100% rename from integration/snapshots/optional-chain-with-function.debug.js rename to test/snapshots/optional-chain-with-function.debug.js diff --git a/integration/snapshots/optional-chain-with-function.hmr.debug.js b/test/snapshots/optional-chain-with-function.hmr.debug.js similarity index 100% rename from integration/snapshots/optional-chain-with-function.hmr.debug.js rename to test/snapshots/optional-chain-with-function.hmr.debug.js diff --git a/integration/snapshots/optional-chain-with-function.hmr.js b/test/snapshots/optional-chain-with-function.hmr.js similarity index 100% rename from integration/snapshots/optional-chain-with-function.hmr.js rename to test/snapshots/optional-chain-with-function.hmr.js diff --git a/integration/snapshots/optional-chain-with-function.js b/test/snapshots/optional-chain-with-function.js similarity index 100% rename from integration/snapshots/optional-chain-with-function.js rename to test/snapshots/optional-chain-with-function.js diff --git a/integration/snapshots/package-json-exports/index.debug.js b/test/snapshots/package-json-exports/index.debug.js similarity index 100% rename from integration/snapshots/package-json-exports/index.debug.js rename to test/snapshots/package-json-exports/index.debug.js diff --git a/integration/snapshots/package-json-exports/index.hmr.debug.js b/test/snapshots/package-json-exports/index.hmr.debug.js similarity index 100% rename from integration/snapshots/package-json-exports/index.hmr.debug.js rename to test/snapshots/package-json-exports/index.hmr.debug.js diff --git a/integration/snapshots/package-json-exports/index.hmr.js b/test/snapshots/package-json-exports/index.hmr.js similarity index 100% rename from integration/snapshots/package-json-exports/index.hmr.js rename to test/snapshots/package-json-exports/index.hmr.js diff --git a/integration/snapshots/package-json-exports/index.js b/test/snapshots/package-json-exports/index.js similarity index 100% rename from integration/snapshots/package-json-exports/index.js rename to test/snapshots/package-json-exports/index.js diff --git a/integration/snapshots/package-json-utf8.debug.js b/test/snapshots/package-json-utf8.debug.js similarity index 100% rename from integration/snapshots/package-json-utf8.debug.js rename to test/snapshots/package-json-utf8.debug.js diff --git a/integration/snapshots/package-json-utf8.hmr.debug.js b/test/snapshots/package-json-utf8.hmr.debug.js similarity index 100% rename from integration/snapshots/package-json-utf8.hmr.debug.js rename to test/snapshots/package-json-utf8.hmr.debug.js diff --git a/integration/snapshots/package-json-utf8.hmr.js b/test/snapshots/package-json-utf8.hmr.js similarity index 100% rename from integration/snapshots/package-json-utf8.hmr.js rename to test/snapshots/package-json-utf8.hmr.js diff --git a/integration/snapshots/package-json-utf8.js b/test/snapshots/package-json-utf8.js similarity index 100% rename from integration/snapshots/package-json-utf8.js rename to test/snapshots/package-json-utf8.js diff --git a/integration/snapshots/react-context-value-func.debug.tsx b/test/snapshots/react-context-value-func.debug.tsx similarity index 100% rename from integration/snapshots/react-context-value-func.debug.tsx rename to test/snapshots/react-context-value-func.debug.tsx diff --git a/integration/snapshots/react-context-value-func.hmr.debug.tsx b/test/snapshots/react-context-value-func.hmr.debug.tsx similarity index 100% rename from integration/snapshots/react-context-value-func.hmr.debug.tsx rename to test/snapshots/react-context-value-func.hmr.debug.tsx diff --git a/integration/snapshots/react-context-value-func.hmr.tsx b/test/snapshots/react-context-value-func.hmr.tsx similarity index 100% rename from integration/snapshots/react-context-value-func.hmr.tsx rename to test/snapshots/react-context-value-func.hmr.tsx diff --git a/integration/snapshots/react-context-value-func.tsx b/test/snapshots/react-context-value-func.tsx similarity index 100% rename from integration/snapshots/react-context-value-func.tsx rename to test/snapshots/react-context-value-func.tsx diff --git a/integration/snapshots/spread_with_key.debug.tsx b/test/snapshots/spread_with_key.debug.tsx similarity index 100% rename from integration/snapshots/spread_with_key.debug.tsx rename to test/snapshots/spread_with_key.debug.tsx diff --git a/integration/snapshots/spread_with_key.hmr.debug.tsx b/test/snapshots/spread_with_key.hmr.debug.tsx similarity index 100% rename from integration/snapshots/spread_with_key.hmr.debug.tsx rename to test/snapshots/spread_with_key.hmr.debug.tsx diff --git a/integration/snapshots/spread_with_key.hmr.tsx b/test/snapshots/spread_with_key.hmr.tsx similarity index 100% rename from integration/snapshots/spread_with_key.hmr.tsx rename to test/snapshots/spread_with_key.hmr.tsx diff --git a/integration/snapshots/spread_with_key.tsx b/test/snapshots/spread_with_key.tsx similarity index 100% rename from integration/snapshots/spread_with_key.tsx rename to test/snapshots/spread_with_key.tsx diff --git a/integration/snapshots/string-escapes.debug.js b/test/snapshots/string-escapes.debug.js similarity index 100% rename from integration/snapshots/string-escapes.debug.js rename to test/snapshots/string-escapes.debug.js diff --git a/integration/snapshots/string-escapes.hmr.debug.js b/test/snapshots/string-escapes.hmr.debug.js similarity index 100% rename from integration/snapshots/string-escapes.hmr.debug.js rename to test/snapshots/string-escapes.hmr.debug.js diff --git a/integration/snapshots/string-escapes.hmr.js b/test/snapshots/string-escapes.hmr.js similarity index 100% rename from integration/snapshots/string-escapes.hmr.js rename to test/snapshots/string-escapes.hmr.js diff --git a/integration/snapshots/string-escapes.js b/test/snapshots/string-escapes.js similarity index 100% rename from integration/snapshots/string-escapes.js rename to test/snapshots/string-escapes.js diff --git a/integration/snapshots/styled-components-output.hmr.js b/test/snapshots/styled-components-output.hmr.js similarity index 100% rename from integration/snapshots/styled-components-output.hmr.js rename to test/snapshots/styled-components-output.hmr.js diff --git a/integration/snapshots/styledcomponents-output.debug.js b/test/snapshots/styledcomponents-output.debug.js similarity index 100% rename from integration/snapshots/styledcomponents-output.debug.js rename to test/snapshots/styledcomponents-output.debug.js diff --git a/integration/snapshots/styledcomponents-output.hmr.debug.js b/test/snapshots/styledcomponents-output.hmr.debug.js similarity index 100% rename from integration/snapshots/styledcomponents-output.hmr.debug.js rename to test/snapshots/styledcomponents-output.hmr.debug.js diff --git a/integration/snapshots/styledcomponents-output.hmr.js b/test/snapshots/styledcomponents-output.hmr.js similarity index 100% rename from integration/snapshots/styledcomponents-output.hmr.js rename to test/snapshots/styledcomponents-output.hmr.js diff --git a/integration/snapshots/styledcomponents-output.js b/test/snapshots/styledcomponents-output.js similarity index 100% rename from integration/snapshots/styledcomponents-output.js rename to test/snapshots/styledcomponents-output.js diff --git a/integration/snapshots/template-literal.debug.js b/test/snapshots/template-literal.debug.js similarity index 100% rename from integration/snapshots/template-literal.debug.js rename to test/snapshots/template-literal.debug.js diff --git a/integration/snapshots/template-literal.hmr.debug.js b/test/snapshots/template-literal.hmr.debug.js similarity index 100% rename from integration/snapshots/template-literal.hmr.debug.js rename to test/snapshots/template-literal.hmr.debug.js diff --git a/integration/snapshots/template-literal.hmr.js b/test/snapshots/template-literal.hmr.js similarity index 100% rename from integration/snapshots/template-literal.hmr.js rename to test/snapshots/template-literal.hmr.js diff --git a/integration/snapshots/template-literal.js b/test/snapshots/template-literal.js similarity index 100% rename from integration/snapshots/template-literal.js rename to test/snapshots/template-literal.js diff --git a/integration/snapshots/ts-fallback-rewrite-works.debug.js b/test/snapshots/ts-fallback-rewrite-works.debug.js similarity index 100% rename from integration/snapshots/ts-fallback-rewrite-works.debug.js rename to test/snapshots/ts-fallback-rewrite-works.debug.js diff --git a/integration/snapshots/ts-fallback-rewrite-works.hmr.debug.js b/test/snapshots/ts-fallback-rewrite-works.hmr.debug.js similarity index 100% rename from integration/snapshots/ts-fallback-rewrite-works.hmr.debug.js rename to test/snapshots/ts-fallback-rewrite-works.hmr.debug.js diff --git a/integration/snapshots/ts-fallback-rewrite-works.hmr.js b/test/snapshots/ts-fallback-rewrite-works.hmr.js similarity index 100% rename from integration/snapshots/ts-fallback-rewrite-works.hmr.js rename to test/snapshots/ts-fallback-rewrite-works.hmr.js diff --git a/integration/snapshots/ts-fallback-rewrite-works.js b/test/snapshots/ts-fallback-rewrite-works.js similarity index 100% rename from integration/snapshots/ts-fallback-rewrite-works.js rename to test/snapshots/ts-fallback-rewrite-works.js diff --git a/integration/snapshots/tsx-fallback-rewrite-works.debug.js b/test/snapshots/tsx-fallback-rewrite-works.debug.js similarity index 100% rename from integration/snapshots/tsx-fallback-rewrite-works.debug.js rename to test/snapshots/tsx-fallback-rewrite-works.debug.js diff --git a/integration/snapshots/tsx-fallback-rewrite-works.hmr.debug.js b/test/snapshots/tsx-fallback-rewrite-works.hmr.debug.js similarity index 100% rename from integration/snapshots/tsx-fallback-rewrite-works.hmr.debug.js rename to test/snapshots/tsx-fallback-rewrite-works.hmr.debug.js diff --git a/integration/snapshots/tsx-fallback-rewrite-works.hmr.js b/test/snapshots/tsx-fallback-rewrite-works.hmr.js similarity index 100% rename from integration/snapshots/tsx-fallback-rewrite-works.hmr.js rename to test/snapshots/tsx-fallback-rewrite-works.hmr.js diff --git a/integration/snapshots/tsx-fallback-rewrite-works.js b/test/snapshots/tsx-fallback-rewrite-works.js similarity index 100% rename from integration/snapshots/tsx-fallback-rewrite-works.js rename to test/snapshots/tsx-fallback-rewrite-works.js diff --git a/integration/snapshots/type-only-imports.debug.ts b/test/snapshots/type-only-imports.debug.ts similarity index 100% rename from integration/snapshots/type-only-imports.debug.ts rename to test/snapshots/type-only-imports.debug.ts diff --git a/integration/snapshots/type-only-imports.hmr.debug.ts b/test/snapshots/type-only-imports.hmr.debug.ts similarity index 100% rename from integration/snapshots/type-only-imports.hmr.debug.ts rename to test/snapshots/type-only-imports.hmr.debug.ts diff --git a/integration/snapshots/type-only-imports.hmr.ts b/test/snapshots/type-only-imports.hmr.ts similarity index 100% rename from integration/snapshots/type-only-imports.hmr.ts rename to test/snapshots/type-only-imports.hmr.ts diff --git a/integration/snapshots/type-only-imports.ts b/test/snapshots/type-only-imports.ts similarity index 100% rename from integration/snapshots/type-only-imports.ts rename to test/snapshots/type-only-imports.ts diff --git a/integration/snapshots/unicode-identifiers.debug.js b/test/snapshots/unicode-identifiers.debug.js similarity index 100% rename from integration/snapshots/unicode-identifiers.debug.js rename to test/snapshots/unicode-identifiers.debug.js diff --git a/integration/snapshots/unicode-identifiers.hmr.debug.js b/test/snapshots/unicode-identifiers.hmr.debug.js similarity index 100% rename from integration/snapshots/unicode-identifiers.hmr.debug.js rename to test/snapshots/unicode-identifiers.hmr.debug.js diff --git a/integration/snapshots/unicode-identifiers.hmr.js b/test/snapshots/unicode-identifiers.hmr.js similarity index 100% rename from integration/snapshots/unicode-identifiers.hmr.js rename to test/snapshots/unicode-identifiers.hmr.js diff --git a/integration/snapshots/unicode-identifiers.js b/test/snapshots/unicode-identifiers.js similarity index 100% rename from integration/snapshots/unicode-identifiers.js rename to test/snapshots/unicode-identifiers.js diff --git a/integration/snapshots/void-shouldnt-delete-call-expressions.debug.js b/test/snapshots/void-shouldnt-delete-call-expressions.debug.js similarity index 100% rename from integration/snapshots/void-shouldnt-delete-call-expressions.debug.js rename to test/snapshots/void-shouldnt-delete-call-expressions.debug.js diff --git a/integration/snapshots/void-shouldnt-delete-call-expressions.hmr.debug.js b/test/snapshots/void-shouldnt-delete-call-expressions.hmr.debug.js similarity index 100% rename from integration/snapshots/void-shouldnt-delete-call-expressions.hmr.debug.js rename to test/snapshots/void-shouldnt-delete-call-expressions.hmr.debug.js diff --git a/integration/snapshots/void-shouldnt-delete-call-expressions.hmr.js b/test/snapshots/void-shouldnt-delete-call-expressions.hmr.js similarity index 100% rename from integration/snapshots/void-shouldnt-delete-call-expressions.hmr.js rename to test/snapshots/void-shouldnt-delete-call-expressions.hmr.js diff --git a/integration/snapshots/void-shouldnt-delete-call-expressions.js b/test/snapshots/void-shouldnt-delete-call-expressions.js similarity index 100% rename from integration/snapshots/void-shouldnt-delete-call-expressions.js rename to test/snapshots/void-shouldnt-delete-call-expressions.js diff --git a/integration/snippets/_auth.js b/test/snippets/_auth.js similarity index 100% rename from integration/snippets/_auth.js rename to test/snippets/_auth.js diff --git a/integration/snippets/_bacon.js b/test/snippets/_bacon.js similarity index 100% rename from integration/snippets/_bacon.js rename to test/snippets/_bacon.js diff --git a/integration/snippets/_login.js b/test/snippets/_login.js similarity index 100% rename from integration/snippets/_login.js rename to test/snippets/_login.js diff --git a/integration/snippets/array-args-with-default-values.js b/test/snippets/array-args-with-default-values.js similarity index 100% rename from integration/snippets/array-args-with-default-values.js rename to test/snippets/array-args-with-default-values.js diff --git a/integration/snippets/bun.lockb b/test/snippets/bun.lockb similarity index 100% rename from integration/snippets/bun.lockb rename to test/snippets/bun.lockb diff --git a/integration/snippets/bundled-entry-point.js b/test/snippets/bundled-entry-point.js similarity index 100% rename from integration/snippets/bundled-entry-point.js rename to test/snippets/bundled-entry-point.js diff --git a/integration/snippets/caught-require.js b/test/snippets/caught-require.js similarity index 100% rename from integration/snippets/caught-require.js rename to test/snippets/caught-require.js diff --git a/integration/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js b/test/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js similarity index 100% rename from integration/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js rename to test/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js diff --git a/integration/snippets/code-simplification-neql-define.js b/test/snippets/code-simplification-neql-define.js similarity index 100% rename from integration/snippets/code-simplification-neql-define.js rename to test/snippets/code-simplification-neql-define.js diff --git a/integration/snippets/custom-emotion-jsx/file.jsx b/test/snippets/custom-emotion-jsx/file.jsx similarity index 100% rename from integration/snippets/custom-emotion-jsx/file.jsx rename to test/snippets/custom-emotion-jsx/file.jsx diff --git a/integration/snippets/custom-emotion-jsx/tsconfig.json b/test/snippets/custom-emotion-jsx/tsconfig.json similarity index 100% rename from integration/snippets/custom-emotion-jsx/tsconfig.json rename to test/snippets/custom-emotion-jsx/tsconfig.json diff --git a/integration/snippets/export-default-module-hot.js b/test/snippets/export-default-module-hot.js similarity index 100% rename from integration/snippets/export-default-module-hot.js rename to test/snippets/export-default-module-hot.js diff --git a/integration/snippets/export.js b/test/snippets/export.js similarity index 100% rename from integration/snippets/export.js rename to test/snippets/export.js diff --git a/integration/snippets/forbid-in-is-correct.js b/test/snippets/forbid-in-is-correct.js similarity index 100% rename from integration/snippets/forbid-in-is-correct.js rename to test/snippets/forbid-in-is-correct.js diff --git a/integration/snippets/global-is-remapped-to-globalThis.js b/test/snippets/global-is-remapped-to-globalThis.js similarity index 100% rename from integration/snippets/global-is-remapped-to-globalThis.js rename to test/snippets/global-is-remapped-to-globalThis.js diff --git a/integration/snippets/jsx-entities.jsx b/test/snippets/jsx-entities.jsx similarity index 100% rename from integration/snippets/jsx-entities.jsx rename to test/snippets/jsx-entities.jsx diff --git a/integration/snippets/jsx-spacing.js b/test/snippets/jsx-spacing.js similarity index 100% rename from integration/snippets/jsx-spacing.js rename to test/snippets/jsx-spacing.js diff --git a/integration/snippets/jsx-spacing.jsx b/test/snippets/jsx-spacing.jsx similarity index 100% rename from integration/snippets/jsx-spacing.jsx rename to test/snippets/jsx-spacing.jsx diff --git a/integration/snippets/jsx-top-level.tsx b/test/snippets/jsx-top-level.tsx similarity index 100% rename from integration/snippets/jsx-top-level.tsx rename to test/snippets/jsx-top-level.tsx diff --git a/integration/snippets/latin1-chars-in-regexp.js b/test/snippets/latin1-chars-in-regexp.js similarity index 100% rename from integration/snippets/latin1-chars-in-regexp.js rename to test/snippets/latin1-chars-in-regexp.js diff --git a/integration/snippets/lodash-regexp.js b/test/snippets/lodash-regexp.js similarity index 100% rename from integration/snippets/lodash-regexp.js rename to test/snippets/lodash-regexp.js diff --git a/integration/snippets/multiple-imports.js b/test/snippets/multiple-imports.js similarity index 100% rename from integration/snippets/multiple-imports.js rename to test/snippets/multiple-imports.js diff --git a/integration/snippets/multiple-var.js b/test/snippets/multiple-var.js similarity index 100% rename from integration/snippets/multiple-var.js rename to test/snippets/multiple-var.js diff --git a/integration/snippets/number-literal-bug.js b/test/snippets/number-literal-bug.js similarity index 100% rename from integration/snippets/number-literal-bug.js rename to test/snippets/number-literal-bug.js diff --git a/integration/snippets/optional-chain-with-function.js b/test/snippets/optional-chain-with-function.js similarity index 100% rename from integration/snippets/optional-chain-with-function.js rename to test/snippets/optional-chain-with-function.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/exact/package.json b/test/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/exact/package.json rename to test/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js b/test/snippets/package-json-exports/_node_modules_copy/exact/package.json similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js rename to test/snippets/package-json-exports/_node_modules_copy/exact/package.json diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js rename to test/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/inexact/package.json b/test/snippets/package-json-exports/_node_modules_copy/inexact/package.json similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/inexact/package.json rename to test/snippets/package-json-exports/_node_modules_copy/inexact/package.json diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json similarity index 100% rename from integration/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json rename to test/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json diff --git a/integration/snippets/package-json-exports/index.js b/test/snippets/package-json-exports/index.js similarity index 100% rename from integration/snippets/package-json-exports/index.js rename to test/snippets/package-json-exports/index.js diff --git a/integration/snippets/package-json-exports/package.json b/test/snippets/package-json-exports/package.json similarity index 100% rename from integration/snippets/package-json-exports/package.json rename to test/snippets/package-json-exports/package.json diff --git a/integration/snippets/package-json-utf8.js b/test/snippets/package-json-utf8.js similarity index 100% rename from integration/snippets/package-json-utf8.js rename to test/snippets/package-json-utf8.js diff --git a/integration/snippets/package.json b/test/snippets/package.json similarity index 100% rename from integration/snippets/package.json rename to test/snippets/package.json diff --git a/integration/snippets/public/index.html b/test/snippets/public/index.html similarity index 100% rename from integration/snippets/public/index.html rename to test/snippets/public/index.html diff --git a/integration/snippets/react-context-value-func.tsx b/test/snippets/react-context-value-func.tsx similarity index 100% rename from integration/snippets/react-context-value-func.tsx rename to test/snippets/react-context-value-func.tsx diff --git a/integration/snippets/segfault.js b/test/snippets/segfault.js similarity index 100% rename from integration/snippets/segfault.js rename to test/snippets/segfault.js diff --git a/integration/snippets/spread_with_key.tsx b/test/snippets/spread_with_key.tsx similarity index 100% rename from integration/snippets/spread_with_key.tsx rename to test/snippets/spread_with_key.tsx diff --git a/integration/snippets/string-escapes.js b/test/snippets/string-escapes.js similarity index 100% rename from integration/snippets/string-escapes.js rename to test/snippets/string-escapes.js diff --git a/integration/snippets/styledcomponents-output.js b/test/snippets/styledcomponents-output.js similarity index 100% rename from integration/snippets/styledcomponents-output.js rename to test/snippets/styledcomponents-output.js diff --git a/integration/snippets/template-literal.js b/test/snippets/template-literal.js similarity index 100% rename from integration/snippets/template-literal.js rename to test/snippets/template-literal.js diff --git a/integration/snippets/ts-fallback-rewrite-works.ts b/test/snippets/ts-fallback-rewrite-works.ts similarity index 100% rename from integration/snippets/ts-fallback-rewrite-works.ts rename to test/snippets/ts-fallback-rewrite-works.ts diff --git a/integration/snippets/tsx-fallback-rewrite-works.tsx b/test/snippets/tsx-fallback-rewrite-works.tsx similarity index 100% rename from integration/snippets/tsx-fallback-rewrite-works.tsx rename to test/snippets/tsx-fallback-rewrite-works.tsx diff --git a/integration/snippets/type-only-imports.ts b/test/snippets/type-only-imports.ts similarity index 100% rename from integration/snippets/type-only-imports.ts rename to test/snippets/type-only-imports.ts diff --git a/integration/snippets/unicode-identifiers.js b/test/snippets/unicode-identifiers.js similarity index 100% rename from integration/snippets/unicode-identifiers.js rename to test/snippets/unicode-identifiers.js diff --git a/integration/snippets/utf8-package-json.json b/test/snippets/utf8-package-json.json similarity index 100% rename from integration/snippets/utf8-package-json.json rename to test/snippets/utf8-package-json.json diff --git a/integration/snippets/void-shouldnt-delete-call-expressions.js b/test/snippets/void-shouldnt-delete-call-expressions.js similarity index 100% rename from integration/snippets/void-shouldnt-delete-call-expressions.js rename to test/snippets/void-shouldnt-delete-call-expressions.js diff --git a/integration/snippets/zero.js b/test/snippets/zero.js similarity index 100% rename from integration/snippets/zero.js rename to test/snippets/zero.js