Skip to content

Commit

Permalink
Merge branch 'main' into don/net/blocklist
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac authored Feb 7, 2025
2 parents b123577 + c970922 commit adc431e
Show file tree
Hide file tree
Showing 30 changed files with 1,037 additions and 115 deletions.
13 changes: 13 additions & 0 deletions .vscode/launch.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ list(APPEND CMAKE_MODULE_PATH
include(Policies)
include(Globals)

if (CMAKE_HOST_WIN32)
# Workaround for TLS certificate verification issue on Windows when downloading from GitHub
# Remove this once we've bumped the CI machines build image
set(CMAKE_TLS_VERIFY 0)
endif()

# --- Compilers ---

if(CMAKE_HOST_APPLE)
Expand Down
52 changes: 34 additions & 18 deletions packages/bun-types/bun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2009,35 +2009,51 @@ declare module "bun" {
*/
type SQLOptions = {
/** Connection URL (can be string or URL object) */
url: URL | string;
url?: URL | string;
/** Database server hostname */
host: string;
host?: string;
/** Database server hostname (alias for host) */
hostname?: string;
/** Database server port number */
port: number | string;
port?: number | string;
/** Database user for authentication */
username: string;
username?: string;
/** Database user for authentication (alias for username) */
user?: string;
/** Database password for authentication */
password: string;
password?: string;
/** Database password for authentication (alias for password) */
pass?: string;
/** Name of the database to connect to */
database: string;
database?: string;
/** Name of the database to connect to (alias for database) */
db?: string;
/** Database adapter/driver to use */
adapter: string;
/** Maximum time in milliseconds to wait for connection to become available */
idleTimeout: number;
/** Maximum time in milliseconds to wait when establishing a connection */
connectionTimeout: number;
/** Maximum lifetime in milliseconds of a connection */
maxLifetime: number;
adapter?: string;
/** Maximum time in seconds to wait for connection to become available */
idleTimeout?: number;
/** Maximum time in seconds to wait for connection to become available (alias for idleTimeout) */
idle_timeout?: number;
/** Maximum time in seconds to wait when establishing a connection */
connectionTimeout?: number;
/** Maximum time in seconds to wait when establishing a connection (alias for connectionTimeout) */
connection_timeout?: number;
/** Maximum lifetime in seconds of a connection */
maxLifetime?: number;
/** Maximum lifetime in seconds of a connection (alias for maxLifetime) */
max_lifetime?: number;
/** Whether to use TLS/SSL for the connection */
tls: boolean;
tls?: TLSOptions | boolean;
/** Whether to use TLS/SSL for the connection (alias for tls) */
ssl?: TLSOptions | boolean;
/** Callback function executed when a connection is established */
onconnect: (client: SQL) => void;
onconnect?: (client: SQL) => void;
/** Callback function executed when a connection is closed */
onclose: (client: SQL) => void;
onclose?: (client: SQL) => void;
/** Maximum number of connections in the pool */
max: number;
max?: number;
/** By default values outside i32 range are returned as strings. If this is true, values outside i32 range are returned as BigInts. */
bigint: boolean;
bigint?: boolean;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/bun.js/bindings/BunObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,12 @@ JSC_DEFINE_HOST_FUNCTION(functionBunDeepEquals, (JSGlobalObject * globalObject,

JSC::JSValue arg1 = callFrame->uncheckedArgument(0);
JSC::JSValue arg2 = callFrame->uncheckedArgument(1);
JSC::JSValue arg3 = callFrame->argument(2);
JSC::JSValue strict = callFrame->argument(2);

Vector<std::pair<JSValue, JSValue>, 16> stack;
MarkedArgumentBuffer gcBuffer;

if (arg3.isBoolean() && arg3.asBoolean()) {
if (strict.isBoolean() && strict.asBoolean()) {

bool isEqual = Bun__deepEquals<true, false>(globalObject, arg1, arg2, gcBuffer, stack, &scope, true);
RETURN_IF_EXCEPTION(scope, {});
Expand Down
Loading

0 comments on commit adc431e

Please sign in to comment.