Skip to content

add nodejs/node ncrypto sync workflow#42

Open
panva wants to merge 4 commits intonodejs:mainfrom
panva:sync-workflow
Open

add nodejs/node ncrypto sync workflow#42
panva wants to merge 4 commits intonodejs:mainfrom
panva:sync-workflow

Conversation

@panva
Copy link
Copy Markdown
Member

@panva panva commented Apr 28, 2026

This:

  • updates the GHA dependency pins
  • introduces a workflow_dispatch sync job for pulling nodejs/node state in here
  • includes its first bootstrapped run (0b0ecca) and resolved merge conflicts (ce5b003)

The sync script maps these Node.js files into this repository:

  • deps/ncrypto/ncrypto.h -> include/ncrypto.h
  • deps/ncrypto/ncrypto.cc -> src/ncrypto.cpp
  • deps/ncrypto/engine.cc -> src/engine.cpp

The script performs a 3-way merge rather than blindly copying files:

  • base: the previous nodejs/node commit recorded in .github/sync-node-ncrypto.json
  • ours: the current standalone ncrypto file in this repository
  • theirs: the requested target nodejs/node ref

This applies the Node-side changes from base to theirs onto the standalone files while preserving standalone-only edits when possible.

On the first bootstrap run (panva#6), .github/sync-node-ncrypto.json had no recorded Node commit, so base_node_ref was supplied manually. After a successful sync, the script records the resolved target Node commit in that state file, allowing future runs to infer the merge base automatically.

The script also checks whether nodejs/node added new deps/ncrypto C/C++ source or header files that are not mapped into this repository. If it finds any, it fails rather than silently omitting files.

If a 3-way merge produces conflicts, the conflicted files are still written with diff3 conflict markers, and the workflow opens the PR as a draft for manual resolution.

panva and others added 4 commits April 28, 2026 16:20
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Node-Base-Commit: 84aaed75978e537ebcfa82b094794fa4bb0ffa79

Node-Target-Commit: 8385efc01343a835e3a0efe05611f44272cbb413
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
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.

1 participant