Skip to content

Commit

Permalink
node: fix the rest of test-process (#16026)
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro authored Jan 6, 2025
1 parent 8268af3 commit e1cfea4
Show file tree
Hide file tree
Showing 107 changed files with 2,833 additions and 834 deletions.
2 changes: 1 addition & 1 deletion docs/runtime/nodejs-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ The table below lists all globals implemented by Node.js and Bun's current compa

### [`process`](https://nodejs.org/api/process.html)

🟡 Missing `domain` `initgroups` `setegid` `seteuid` `setgid` `setgroups` `setuid` `allowedNodeEnvironmentFlags` `getActiveResourcesInfo` `setActiveResourcesInfo` `moduleLoadList` `setSourceMapsEnabled`. `process.binding` is partially implemented.
🟡 Missing `initgroups` `allowedNodeEnvironmentFlags` `getActiveResourcesInfo` `setActiveResourcesInfo` `moduleLoadList` `setSourceMapsEnabled`. `process.binding` is partially implemented.

### [`queueMicrotask()`](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask)

Expand Down
2 changes: 1 addition & 1 deletion scripts/check-node-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ esac

export BUN_DEBUG_QUIET_LOGS=1

for x in $(find test/js/node/test/parallel -type f -name "test-$1*.js")
for x in $(find test/js/node/test/parallel -type f -name "test-$1*.js" | sort)
do
i=$((i+1))
echo ./$x
Expand Down
2 changes: 1 addition & 1 deletion src/api/schema.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ pub const Api = struct {
origin: ?[]const u8 = null,

/// absolute_working_dir
absolute_working_dir: ?[]const u8 = null,
absolute_working_dir: ?[:0]const u8 = null,

/// define
define: ?StringMap = null,
Expand Down
2 changes: 1 addition & 1 deletion src/bake/DevServer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub const igLog = bun.Output.scoped(.IncrementalGraph, false);
pub const Options = struct {
/// Arena must live until DevServer.deinit()
arena: Allocator,
root: []const u8,
root: [:0]const u8,
vm: *VirtualMachine,
framework: bake.Framework,
bundler_options: bake.SplitBundlerOptions,
Expand Down
6 changes: 3 additions & 3 deletions src/bake/bake.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub const UserOptions = struct {
arena: std.heap.ArenaAllocator,
allocations: StringRefList,

root: []const u8,
root: [:0]const u8,
framework: Framework,
bundler_options: SplitBundlerOptions,

Expand Down Expand Up @@ -78,9 +78,9 @@ pub const UserOptions = struct {
const StringRefList = struct {
strings: std.ArrayListUnmanaged(ZigString.Slice),

pub fn track(al: *StringRefList, str: ZigString.Slice) []const u8 {
pub fn track(al: *StringRefList, str: ZigString.Slice) [:0]const u8 {
al.strings.append(bun.default_allocator, str) catch bun.outOfMemory();
return str.slice();
return str.sliceZ();
}

pub fn free(al: *StringRefList) void {
Expand Down
1 change: 0 additions & 1 deletion src/bun.js/bindings/BunObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ JSC_DEFINE_HOST_FUNCTION(functionConcatTypedArrays, (JSGlobalObject * globalObje
auto arg2 = callFrame->argument(2);
if (!arg2.isUndefined()) {
asUint8Array = arg2.toBoolean(globalObject);
RETURN_IF_EXCEPTION(throwScope, {});
}

return flattenArrayOfBuffersIntoArrayBufferOrUint8Array(globalObject, arrayValue, maxLength, asUint8Array);
Expand Down
Loading

0 comments on commit e1cfea4

Please sign in to comment.