Skip to content

Rewrite in N-API for Electron 30+ compatibility #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

savetheclocktower
Copy link

This is the upgrade to superstring we need for PulsarNext.

Here's what this does:

  • Rewrites superstring so that it uses node-addon-api instead of nan, gaining context-awareness in the process.
  • Upgrades from PCRE 10.23 to PCRE 10.44 on Linux/macOS in order to fix a bug in JIT compilation of regexes.
  • Gets the CI working again and tests against versions of Node up to 20.

Now that we've published our existing superstring version (relied on for mainline Pulsar) to NPM as @pulsar-edit/superstring version 2.5.0, we can land this to master and bump the major version, publishing it as version 3.0.0.

mauricioszabo and others added 27 commits September 16, 2024 18:57
…by eliminating static references to constructors.

Technique outright stolen from `tree-sitter/node-tree-sitter`.
…to something that can actually run on my system without complaining about random number generation.
(On my machine, a call to `pcre2_jit_compile` is causing test failures; not sure where the fault lies there. Commenting out the call fixed it, but is probably not a great idea as a permanent fix.)
Copy link
Member

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

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

I'm willing to more or less rubber-stamp approve this on the basis it's already been in use on the ElectronNext / Pulsar Next branch of Pulsar for a while, right?

Ideally we would have a subject-matter expert sift through hundreds of C++ files and such, but... I don't see that happening. So I think we will use this and have the proof of the pudding be in the eating, so to speak.

In that sense, Looks Good To Me.

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.

3 participants