Skip to content

Conversation

@DeeDeeG
Copy link
Member

@DeeDeeG DeeDeeG commented Sep 27, 2025

Node 16 has been out of support (EOL) for a long time now.

Node 18 has only somewhat more recently gone out of support.

We should update to something newer, for the usual performance and security reasons.

I don't think ppm compiles against Node 20, though, so this is the furthest trivial upgrade we can do, as far as I know.

Better than nothing.

windows-2019 images are discontinued, switch to '-latest'.
Need newer node-gyp to support newer Visual Studio versions.

(Node-gyp 9 is the newest node-gyp that is compatible with NodeJS 14.
It's new enough to support the Visual Studio version used in CI,
though.)
macos-latest resolves to macos-15, which is too new to work
with one of our dependencies. Specifically: there are
compilation errors in git-utils --> libgit2 --> zlib
when compiling with too new of an Xcode toolchain, apparently.

So, pin to the macos-14 image, which still works with our dependencies.
@DeeDeeG DeeDeeG marked this pull request as draft October 17, 2025 19:44
@DeeDeeG DeeDeeG force-pushed the Node-18-latest-patch-version branch from b47d365 to 48f8225 Compare October 17, 2025 19:45
Node 16 has been out of support (EOL) for a long time now.

Node 18 has only somewhat more recently gone out of support.

We should update to something newer,
for the usual performance and security reasons.

I don't think ppm compiles against Node 20, though,
so this is the furthest trivial upgrade we can do, as far as I know.

Better than nothing.
@savetheclocktower
Copy link
Contributor

savetheclocktower commented Nov 11, 2025

We might want to go further and start explicitly keeping ppm’s Node and Pulsar’s Node in sync — manually to start, then eventually forcing ppm to use the actual Pulsar executable as its Node (via ELECTRON_RUN_AS_NODE=1).

When testing the new terminal package on Windows, I ran ppm install pulsar-edit/terminal and immediately ran into trouble. It tried to install using ppm’s version of Node, but a build script somewhere was relying on Array.prototype.at, which wasn't introduced to Node until v16.6. (EDIT: The culprit is rollup version 4, which supports Node 18 and above.)

This PR would've solved this specific case, but any version discrepancy between ppm and Pulsar could cause similar problems. This is why node and npm are themselves so coupled together.

If it's not a gigantic pain in the ass to bump ppm’s bundled Node to 20.11.1 before we ship the Electron 30 upgrade, we should think about it. If it would be a pain, then we can hold off on it — but we should land this PR at a minimum.

That said, I'm happy to learn more about this infrastructure so that I can help more with this effort in the future. This shouldn't be just one person's job!

@savetheclocktower
Copy link
Contributor

I promise I read these words before I commented — I just didn't internalize them:

I don't think ppm compiles against Node 20, though, so this is the furthest trivial upgrade we can do, as far as I know.

So when you get a chance, let's pin down exactly what the failure is when we try to move to Node 20. I can throw myself at fixing that problem.

@savetheclocktower
Copy link
Contributor

To start to answer my own question: I can check out ppm locally, update BUNDLED_NODE_VERSION to 20.11.1, then run npm install and wind up with a bin/node binary that claims it's version 20.11.1.

But when I try

bin/ppm install pulsar-edit/terminal

I get:

Code/JavaScript/ppm (node-20) ➜  bin/ppm install pulsar-edit/terminal                                                                                               (Ruby 3.3.0 / Node 20.11.1)
Cloning https://github.com/pulsar-edit/terminal.git ✓
Installing modules ✗
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > [email protected] install /Users/andrew/.pulsar/.apm/_cacache/tmp/git-clone-031d3079
npm ERR! prepareGitDep > node-gyp rebuild
npm ERR! prepareGitDep
npm ERR! prepareGitDep undefined
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--also=dev` instead.
npm ERR! prepareGitDep npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!
npm ERR! prepareGitDep npm WARN deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
npm ERR! prepareGitDep npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm ERR! prepareGitDep gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
npm ERR! prepareGitDep gyp ERR! configure error
npm ERR! prepareGitDep gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! prepareGitDep gyp ERR! stack at ChildProcess.onCpExit (/Users/andrew/Code/JavaScript/ppm/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
npm ERR! prepareGitDep gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm ERR! prepareGitDep gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! prepareGitDep gyp ERR! System Darwin 23.6.0
npm ERR! prepareGitDep gyp ERR! command "/Users/andrew/Code/JavaScript/ppm/bin/node" "/Users/andrew/Code/JavaScript/ppm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! prepareGitDep gyp ERR! cwd /Users/andrew/.pulsar/.apm/_cacache/tmp/git-clone-031d3079
npm ERR! prepareGitDep gyp ERR! node -v v20.11.1
npm ERR! prepareGitDep gyp ERR! node-gyp -v v9.4.0
npm ERR! prepareGitDep gyp ERR! not ok
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the [email protected] install script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /Users/andrew/.pulsar/.node-gyp/.npm/_logs/2025-11-11T22_50_50_224Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andrew/.pulsar/.apm/_logs/2025-11-11T22_50_50_246Z-debug.log

@savetheclocktower
Copy link
Contributor

OK, the good news is that that problem had an easy fix: I was being silly and not giving this checked-out ppm repo any way of finding the correct Pulsar installation so it could extract Electron version info. Once I did

ATOM_RESOURCE_PATH="/path/to/pulsar-on-electron-30" bin/ppm install pulsar-edit/terminal

everything seemed to work great.

@savetheclocktower
Copy link
Contributor

Shall we close this one out now that it's been superseded by #156?

@DeeDeeG
Copy link
Member Author

DeeDeeG commented Nov 19, 2025

Can think about revisiting this if Node 18 ever becomes desirable, such as for an alternate branch of ppm, but I don't have perfect foresight to know if that will ever be the case.

The main obvious thing is that #156 is great for Electron 30 stuff, and hopefully in any other context as well. But we shall find out, I guess.

@DeeDeeG DeeDeeG closed this Nov 19, 2025
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