Skip to content

implement pnpm migration - #22262

Merged
dylan-conway merged 53 commits into
mainfrom
riskymh/pnpm
Sep 27, 2025
Merged

dylan-conway merged 53 commits into
mainfrom
riskymh/pnpm

Conversation

@RiskyMH

@RiskyMH RiskyMH commented Aug 30, 2025 •

Copy link
Copy Markdown
Contributor

What does this PR do?

fixes #7157, fixes #14662

migrates pnpm-workspace.yaml data to package.json & converts pnpm-lock.yml to bun.lock


How did you verify your code works?

manually, tests and real world examples

@coderabbitai

coderabbitai Bot commented Aug 30, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds PNPM lockfile migration and parsing, manifest-cache population, path-based install APIs, file-read size-hint enum, AST tag-check simplifications, analytics metric for pnpm migrations, multiple lockfile/resolution/lock ingestion changes, and extensive PNPM migration tests and fixtures.

Changes

Cohort / File(s) Summary
PNPM migration core & tests
src/install/pnpm.zig, src/install/migration.zig, test/cli/install/migration/pnpm/..., test/cli/install/migration/pnpm-*.test.ts
Add full pnpm->bun migration: migratePnpmLockfile, parsing helpers, error types, post-migration package.json updates, and many migration tests/fixtures.
Lockfile & catalog support
src/install/lockfile.zig, src/install/lockfile/CatalogMap.zig
Add resolveCatalogDependency, fetchNecessaryPackageMetadataAfterYarnOrPnpmMigration, and CatalogMap.fromPnpmLockfile with helpers and pnpm parsing/error handling.
Resolution parsing
src/install/resolution.zig
Add fromPnpmLockfile and FromPnpmLockfileError; parse pnpm resolution forms (codeload, file:, git, tarball, npm, workspace) and integrate new variants.
PackageManager path & manifest cache
src/install/PackageManager.zig, src/install/PackageManager/PopulateManifestCache.zig
Replace package_json_cwd with root_package_json_path, expose populateManifestCache, and add PopulateManifestCache module.
Install API & callers
src/install/PackageManager/install_with_manager.zig, src/cli/install_command.zig, src/cli/update_interactive_command.zig, src/cli/outdated_command.zig, src/cli/pm_trusted_command.zig, src/install/PackageManager/updatePackageJSONAndInstall.zig
Change installWithManager to accept root_package_json_path (path-based cache access), remove inline package.json I/O, and update callers to use path/manifest-cache flows.
Populate manifest cache module
src/install/PackageManager/PopulateManifestCache.zig
New module populateManifestCache(manager, packages) to load manifests, schedule network tasks, drive fetch loops and progress handling.
Package, dependency & enqueue changes
src/install/lockfile/Package.zig, src/install/PackageManager/PackageManagerEnqueue.zig, src/install/dependency.zig, src/install/bin.zig, src/install/yarn.zig, src/install/repository.zig
Use manifest.string_buf in Package.fromNPM (remove param); add dependency parsing helpers (splitVersionAndMaybeName, splitNameAndVersionOrLatest, splitNameAndVersion); remove Bin.cloneAppend; adjust enqueue callsites; call metadata fetch after yarn migration; change Repository fields from GitSHA→String.
Lockfile migration metadata & helpers
src/install/lockfile.zig, src/install/lockfile/Package.zig, src/install/lockfile/CatalogMap.zig
Add helpers to clone bin strings into lockfile after migration, ingest pnpm catalog entries, and support post-migration metadata population.
Network/task typing & runTasks
src/install/NetworkTask.zig, src/install/PackageManager/runTasks.zig
Narrow forManifest error alias and change runTasks return type from anyerror!void to !void.
AST tag-check simplifications
src/ast/Expr.zig, src/ast/E.zig, src/ast/P.zig, src/ast/visitExpr.zig
Replace std.meta.activeTag(...) with direct Tag enum comparisons; add Expr.getBoolean and simplify guard checks.
File read size-hint & callers
src/sys/File.zig, src/io/PipeReader.zig, src/bun.js/node/node_os.zig, src/install/resolvers/folder_resolver.zig
Replace boolean probably_small parameter with size_guess: enum { probably_small, unknown_size } in readToEndWithArrayList and update call sites.
Tests, harness & helpers
test/harness.ts, test/cli/install/*.test.ts, test/cli/install/bun-lock*.test.ts, test/cli/install/catalogs.test.ts, test/cli/install/isolated-install.test.ts, test/cli/install/bun-publish.test.ts
VerdaccioRegistry.createTestDir now accepts { bunfigOpts?, files? }; tests updated to nest bunfig options under bunfigOpts; widened tempDir return typing; added nodeModulesPackages helper; minor realpath and path-normalization adjustments.
Analytics metric
src/analytics.zig
Add pub var pnpm_migration: usize = 0; to Features to track pnpm migrations.
Misc & small fixes
src/install/PackageManager/WorkspacePackageJSONCache.zig, various tests
Remove two frees in cache parse error path; test option shape/path normalization; minor buffer/path variable renames.

Possibly related PRs

Suggested reviewers

  • zackradisic
  • Jarred-Sumner
  • nektro

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning While the pull request delivers the pnpm migration feature, it also includes extensive unrelated modifications such as analytics metric additions, AST tag simplifications, file I/O enum changes, multiple CLI command refactors, and varied API signature updates. These alterations fall outside the scope of the pnpm migration objectives and complicate the review process by mixing distinct feature work. Unrelated changes should be relocated to separate pull requests to maintain focus and clarity for this migration feature. Please split or remove unrelated changes into separate pull requests so that only pnpm migration code remains in this PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title “implement pnpm migration” succinctly reflects the primary change of adding pnpm migration support in the CLI. It clearly conveys the main objective of enabling pnpm lockfile and workspace data migration without extraneous detail. The phrasing is concise and specific enough for a teammate scanning history to understand the core update at a glance.
Linked Issues Check ✅ Passed The implemented code adds a pnpm migration branch in the CLI, introduces the migratePnpmLockfile function and updatePackageJsonAfterMigration routine to handle pnpm-workspace.yaml data, and provides extensive tests covering diverse pnpm scenarios. These changes directly fulfill issue #7157 by supporting conversion of pnpm-lock.yaml to bun.lock and address issue #14662 by automating catalog entries from pnpm-workspace.yaml into package.json. The objectives outlined in both linked issues are satisfied by the new functionality and accompanying test coverage.
Description Check ✅ Passed The pull request description follows the repository template by including a “What does this PR do?” section that outlines the fixes for issues #7157 and #14662 and the pnpm migration actions, and a “How did you verify your code works?” section that describes manual testing, automated tests, and real-world examples. Both required headings are present and appropriately populated. The description adheres fully to the provided template.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch riskymh/pnpm

Comment @coderabbitai help to get the list of available commands and usage tips.

@robobun

robobun commented Aug 30, 2025 •

Copy link
Copy Markdown
Collaborator
Updated 2:37 AM PT - Sep 27th, 2025

❌ @dylan-conway, your commit 8023044 has 3 failures in Build #27302 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 22262

That installs a local version of the PR into your bun-22262 executable, so you can run:

bun-22262 --bun

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ca459db and edcf93f.

📒 Files selected for processing (1)
  • src/install/pnpm.zig (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.zig

📄 CodeRabbit inference engine (.cursor/rules/building-bun.mdc)

Implement debug logs in Zig using const log = bun.Output.scoped(.${SCOPE}, false); and invoking log("...", .{})

Files:

  • src/install/pnpm.zig
**/*.zig

📄 CodeRabbit inference engine (.cursor/rules/javascriptcore-class.mdc)

**/*.zig: Declare the extern C symbol in Zig and export a Zig-friendly alias for use
Wrap the Bun____toJS extern in a Zig method that takes a JSGlobalObject and returns JSC.JSValue

**/*.zig: Format Zig files with zig-format (bun run zig-format)
In Zig, manage memory carefully with allocators and use defer for cleanup

Files:

  • src/install/pnpm.zig
🔇 Additional comments (6)
src/install/pnpm.zig (6)

22-29: Fix peers index lookup when patch suffix present

Re-iterating earlier feedback: when both peers and patch_hash suffixes exist, searching forward from (patch_hash= cannot find the peers group, so we return the wrong slice. This leads to incorrect dependency keys during migration. Scan the prefix before the patch suffix instead.

-            if (strings.startsWith(path[i + 1 ..], "(patch_hash=")) {
-                const peers_idx = if (strings.indexOfChar(path[i + 2 ..], '(')) |idx|
-                    idx + i + 2
-                else
-                    null;
-
-                return .{ peers_idx, i + 1 };
-            }
+            if (strings.startsWith(path[i + 1 ..], "(patch_hash=")) {
+                const prefix = path[0..i];
+                const peers_idx, _ = indexOfDepPathSuffix(prefix);
+                return .{ peers_idx, i + 1 };
+            }

42-44: Avoid invalid optional unwrap in removeSuffix

The patch_hash_idx orelse peers_idx pattern still causes a compile error. Unwrap each optional separately as previously requested.

-    if (patch_hash_idx orelse peers_idx) |idx| {
-        return path[0..idx];
-    }
+    if (patch_hash_idx) |idx| {
+        return path[0..idx];
+    }
+    if (peers_idx) |idx| {
+        return path[0..idx];
+    }

95-104: Use safe float-to-int conversion for lockfileVersion

std.math.divExact cannot be used with f64 and this still fails to compile. Enforce integrality via floor and convert with @intFromFloat.

-                .e_number => |num| {
-                    if (num.value < 0 or num.value > std.math.maxInt(u32)) {
-                        break :err;
-                    }
-
-                    break :lockfile_version @intFromFloat(std.math.divExact(f64, num.value, 1) catch break :err);
-                },
+                .e_number => |num| {
+                    const value = num.value;
+                    if (value < 0) break :err;
+                    const max = @floatFromInt(f64, std.math.maxInt(u32));
+                    if (value > max) break :err;
+                    if (std.math.floor(f64, value) != value) break :err;
+                    break :lockfile_version @intFromFloat(u32, value);
+                },

500-503: Do not unwrap dual optionals with orelse here

The same optional-unwrapping bug remains in the snapshot key handling; this still won’t compile.

-                const key_str_without_suffix = if (patch_hash_idx orelse peer_hash_idx) |idx| key_str[0..idx] else key_str;
+                const key_str_without_suffix = if (patch_hash_idx) |idx| key_str[0..idx] else if (peer_hash_idx) |idx| key_str[0..idx] else key_str;

769-772: Guard link: handling against missing prefix

Still using strings.withoutPrefixComptime assumes every version starts with link: and can mis-handle non-link versions. Switch to the optional variant and branch only when present.

-                    const maybe_symlink_or_folder_or_workspace_path = strings.withoutPrefixComptime(version_without_suffix, "link:");
-                    if (pkg_map.get(maybe_symlink_or_folder_or_workspace_path)) |workspace_pkg_id| {
-                        lockfile.buffers.resolutions.items[dep_id] = workspace_pkg_id;
-                        continue;
-                    }
+                    if (strings.withoutPrefixIfPossibleComptime(version_without_suffix, "link:")) |maybe_symlink_or_folder_or_workspace_path| {
+                        if (pkg_map.get(maybe_symlink_or_folder_or_workspace_path)) |workspace_pkg_id| {
+                            lockfile.buffers.resolutions.items[dep_id] = workspace_pkg_id;
+                            continue;
+                        }
+                    }

1104-1106: Drop needless comptime branch

The if (comptime group_behavior.prod) block is still here and serves no purpose; it also risks compile issues. Remove it as previously requested.

-                // TODO: find peerDependencies from package.json
-                if (comptime group_behavior.prod) {
-                    //
-                }
+                // TODO: consider peerDependencies from package.json if needed

Comment thread src/install/pnpm.zig Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/install/pnpm.zig (1)

1304-1342: Add fallback for pnpm-workspace.yml

Many repos use .yml. Try that if pnpm-workspace.yaml is missing.

-    switch (bun.sys.File.readFrom(bun.FD.cwd(), "pnpm-workspace.yaml", allocator)) {
-        .result => |contents| read_pnpm_workspace_yaml: {
+    switch (bun.sys.File.readFrom(bun.FD.cwd(), "pnpm-workspace.yaml", allocator)) {
+        .result => |contents| read_pnpm_workspace_yaml: {
             const yaml_source = logger.Source.initPathString("pnpm-workspace.yaml", contents);
             const root = YAML.parse(&yaml_source, log, allocator) catch {
                 break :read_pnpm_workspace_yaml;
             };
             ...
         },
-        .err => {},
+        .err => switch (bun.sys.File.readFrom(bun.FD.cwd(), "pnpm-workspace.yml", allocator)) {
+            .result => |contents| read_pnpm_workspace_yaml: {
+                const yaml_source = logger.Source.initPathString("pnpm-workspace.yml", contents);
+                const root = YAML.parse(&yaml_source, log, allocator) catch {
+                    break :read_pnpm_workspace_yaml;
+                };
+                ...
+            },
+            .err => {},
+        },
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between edcf93f and 22faa36.

📒 Files selected for processing (2)
  • src/install/migration.zig (1 hunks)
  • src/install/pnpm.zig (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.zig

📄 CodeRabbit inference engine (.cursor/rules/building-bun.mdc)

Implement debug logs in Zig using const log = bun.Output.scoped(.${SCOPE}, false); and invoking log("...", .{})

Files:

  • src/install/migration.zig
  • src/install/pnpm.zig
**/*.zig

📄 CodeRabbit inference engine (.cursor/rules/javascriptcore-class.mdc)

**/*.zig: Declare the extern C symbol in Zig and export a Zig-friendly alias for use
Wrap the Bun____toJS extern in a Zig method that takes a JSGlobalObject and returns JSC.JSValue

**/*.zig: Format Zig files with zig-format (bun run zig-format)
In Zig, manage memory carefully with allocators and use defer for cleanup

Files:

  • src/install/migration.zig
  • src/install/pnpm.zig
🔇 Additional comments (9)
src/install/migration.zig (3)

89-99: Support .yml fallback and propagate the chosen filename

Currently only pnpm-lock.yaml is attempted and the returned lockfile_path/messages are hardcoded. Add .yml fallback and use the actual filename in errors and prints.

-        const lockfile = File.openat(dir, "pnpm-lock.yaml", bun.O.RDONLY, 0).unwrap() catch break :pnpm;
+        var lockfile_name: []const u8 = "pnpm-lock.yaml";
+        const lockfile = File.openat(dir, lockfile_name, bun.O.RDONLY, 0).unwrap() catch blk: {
+            lockfile_name = "pnpm-lock.yml";
+            break :blk File.openat(dir, lockfile_name, bun.O.RDONLY, 0).unwrap() catch break :pnpm;
+        };
         defer lockfile.close();
         const data = lockfile.readToEnd(allocator).unwrap() catch break :pnpm;
-        const migrate_result = @import("./pnpm.zig").migratePnpmLockfile(this, manager, allocator, log, data, dir) catch |err| {
+        const migrate_result = @import("./pnpm.zig").migratePnpmLockfile(this, manager, allocator, log, data, dir) catch |err| {
             switch (err) {
                 error.PnpmLockfileTooOld => {
                     Output.prettyErrorln(
-                        \\<red><b>error<r><d>:<r> pnpm-lock.yaml version is too old (\< v7)
+                        \\<red><b>error<r><d>:<r> {s} version is too old (< v7)
                         \\
                         \\Please upgrade using 'pnpm install --lockfile-only' first, then try again.
-                    , .{});
+                    , .{lockfile_name});
                     Global.exit(1);
                 },
                 error.NonExistentWorkspaceDependency => {
-                    Output.err("PnpmLockfileMigration", "Workspace link dependencies to non-existent folders aren't supported yet. Please follow along here for more information <magenta>https://github.com/oven-sh/bun/issues/23026<r>", .{});
+                    Output.errGeneric("Pnpm lockfile migration: workspace link dependencies to non-existent folders aren't supported yet. Follow: <magenta>https://github.com/oven-sh/bun/issues/23026<r>", .{});
                     Global.exit(1);
                 },
                 error.WorkspaceNameMissing => {
                     if (log.hasErrors()) {
                         log.print(Output.errorWriter()) catch {};
                     }
-                    Output.errGeneric("pnpm-lock.yaml migration failed due to missing workspace name", .{});
+                    Output.errGeneric("{s} migration failed due to missing workspace name", .{lockfile_name});
                     Global.exit(1);
                 },
                 error.YamlParseError => {
                     if (log.hasErrors()) {
                         log.print(Output.errorWriter()) catch {};
                     }
                     Output.errGeneric("failed to parse YAML", .{});
                     Global.exit(1);
                 },
                 else => {},
             }
             if (Environment.isDebug) {
                 bun.handleErrorReturnTrace(err, @errorReturnTrace());
 
                 Output.prettyErrorln("Error: {s}", .{@errorName(err)});
                 log.print(Output.errorWriter()) catch {};
-                Output.prettyErrorln("Invalid pnpm-lock.yaml\nIn a release build, this would ignore and do a fresh install.\nAborting", .{});
+                Output.prettyErrorln("Invalid {s}\nIn a release build, this would ignore and do a fresh install.\nAborting", .{lockfile_name});
                 Global.exit(1);
             }
             return LoadResult{ .err = .{
                 .step = .migrating,
                 .value = err,
-                .lockfile_path = "pnpm-lock.yaml",
+                .lockfile_path = lockfile_name,
                 .format = .binary,
             } };
         };
@@
-            Output.prettyErrorln("<d>migrated lockfile from <r><green>pnpm-lock.yaml<r>", .{});
+            Output.prettyErrorln("<d>migrated lockfile from <r><green>{s}<r>", .{lockfile_name});

Also applies to: 130-135, 141-141


96-99: Remove stray backslash before “< v7”

The message renders “(< v7)”. Use “(< v7)”.

-                        \\<red><b>error<r><d>:<r> pnpm-lock.yaml version is too old (\< v7)
+                        \\<red><b>error<r><d>:<r> pnpm-lock.yaml version is too old (< v7)

103-105: Use Output.errGeneric; current Output.err call likely mismatched

Output.err expects a different signature; pass a single formatted string via errGeneric.

-                    Output.err("PnpmLockfileMigration", "Workspace link dependencies to non-existent folders aren't supported yet. Please follow along here for more information <magenta>https://github.com/oven-sh/bun/issues/23026<r>", .{});
+                    Output.errGeneric("Pnpm lockfile migration: workspace link dependencies to non-existent folders aren't supported yet. Follow: <magenta>https://github.com/oven-sh/bun/issues/23026<r>", .{});
src/install/pnpm.zig (6)

22-29: Fix peers_idx detection when both peers and patch_hash suffixes exist

Searching forward from the patch_hash group misses an earlier peers group. Scan the prefix before the patch_hash.

-            if (strings.startsWith(path[i + 1 ..], "(patch_hash=")) {
-                const peers_idx = if (strings.indexOfChar(path[i + 2 ..], '(')) |idx|
-                    idx + i + 2
-                else
-                    null;
-
-                return .{ peers_idx, i + 1 };
-            }
+            if (strings.startsWith(path[i + 1 ..], "(patch_hash=")) {
+                const p_idx, _ = indexOfDepPathSuffix(path[0..i]);
+                return .{ p_idx, i + 1 };
+            }

40-47: Invalid optional unwrapping with orelse (compile error)

Don’t combine two optionals with orelse. Unwrap sequentially.

-    if (patch_hash_idx orelse peers_idx) |idx| {
-        return path[0..idx];
-    }
+    if (patch_hash_idx) |idx| {
+        return path[0..idx];
+    } else if (peers_idx) |idx| {
+        return path[0..idx];
+    }

92-114: lockfileVersion parsing uses divExact(f64) (won’t compile); accept only integral numbers

divExact is for integers. Validate integral f64 then cast, or parse from string.

-                .e_number => |num| {
-                    if (num.value < 0 or num.value > std.math.maxInt(u32)) {
-                        break :err;
-                    }
-
-                    break :lockfile_version @intFromFloat(std.math.divExact(f64, num.value, 1) catch break :err);
-                },
+                .e_number => |num| {
+                    const n = num.value;
+                    const max_f = @as(f64, @floatFromInt(std.math.maxInt(u32)));
+                    if (n < 0 or n > max_f) break :err;
+                    if (@floor(n) != n) break :err; // must be integral
+                    break :lockfile_version @as(u32, @intFromFloat(n));
+                },

495-498: Same optional-unwrapping bug here (compile error)

Sequentially unwrap patch_hash_idx and peer_hash_idx.

-                const key_str_without_suffix = if (patch_hash_idx orelse peer_hash_idx) |idx| key_str[0..idx] else key_str;
+                const key_str_without_suffix =
+                    if (patch_hash_idx) |idx| key_str[0..idx]
+                    else if (peer_hash_idx) |idx| key_str[0..idx]
+                    else key_str;

763-771: Guard “link:” handling; avoid assuming prefix

Use the optional-return variant to prevent false positives.

-                .folder, .symlink, .workspace => {
-                    const maybe_symlink_or_folder_or_workspace_path = strings.withoutPrefixComptime(version_without_suffix, "link:");
-                    if (pkg_map.get(maybe_symlink_or_folder_or_workspace_path)) |workspace_pkg_id| {
+                .folder, .symlink, .workspace => {
+                    if (strings.withoutPrefixIfPossibleComptime(version_without_suffix, "link:")) |p| {
+                        if (pkg_map.get(p)) |workspace_pkg_id| {
                         lockfile.buffers.resolutions.items[dep_id] = workspace_pkg_id;
                         continue;
-                    }
+                        }
+                    }
                 },

1099-1102: Remove unnecessary comptime in dependency parsing

comptime group_behavior.prod here can break compilation. It’s also a no-op.

-                // TODO: find peerDependencies from package.json
-                if (comptime group_behavior.prod) {
-                    //
-                }
+                // TODO: consider peerDependencies from package.json if needed

Comment thread src/install/migration.zig
.step = .migrating,
.value = err,
.lockfile_path = "pnpm-lock.yaml",
.format = .binary,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/ast/Expr.zig (1)

313-320: Prefer delegating to asBool() for consistency

asBool() already encapsulates the literal-boolean guard, so reusing it keeps the behaviour in one place and avoids repeating the tag check.

-        if (query.expr.data == .e_boolean) {
-            return query.expr.data.e_boolean.value;
-        }
+        return query.expr.asBool();
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ded8c2b and 8023044.

📒 Files selected for processing (1)
  • src/ast/Expr.zig (9 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.zig

📄 CodeRabbit inference engine (.cursor/rules/building-bun.mdc)

Implement debug logs in Zig using const log = bun.Output.scoped(.${SCOPE}, false); and invoking log("...", .{})

Files:

  • src/ast/Expr.zig
**/*.zig

📄 CodeRabbit inference engine (.cursor/rules/javascriptcore-class.mdc)

**/*.zig: Declare the extern C symbol in Zig and export a Zig-friendly alias for use
Wrap the Bun____toJS extern in a Zig method that takes a JSGlobalObject and returns JSC.JSValue

**/*.zig: Format Zig files with zig-format (bun run zig-format)
In Zig, manage memory carefully with allocators and use defer for cleanup

Files:

  • src/ast/Expr.zig
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Format

@okineadev

Copy link
Copy Markdown
Contributor

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automated migration from pnpm to bun project Support pnpm-lock.yaml in bun pm migrate

5 participants