Skip to content

Conversation

@devm33
Copy link
Contributor

@devm33 devm33 commented Aug 22, 2025

Adds prebuilt binaries to the published npm package.

After looking into using prebuild-install and prebuildify, went with a hand-rolled approach since the gyp build for node-pty was sufficiently unique with all of the different targets and assets.

The last commit is purely for testing via fork and should be dropped before merging.

See example build on forked package: https://www.npmjs.com/package/@devm33/node-pty?activeTab=code

The second to last commit is using GitHub Actions to publish instead of Azure Pipelines since I didn't have access to test there. If Actions is acceptable to use that'd be great! Otherwise will need to port to Pipelines.

cc #46

@Tyriar
Copy link
Member

Tyriar commented Aug 24, 2025

@rzhao271 when you're back can you help @devm33 get this through? Just devops integration/publish verification to do

@devm33
Copy link
Contributor Author

devm33 commented Aug 25, 2025

Thanks @Tyriar! I did at least manage to get the tests green on CI with b7e506d
Hopefully, the workflow changes aren't too bad adapting 3af980b into azure-pipelines.yml and publish.yml. But without access I'd be flying blind. Appreciate your help when you're back @rzhao271 🙇 Please feel free to ping me on slack/teams to discuss

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add node scripts/prebuild.js --populate to azure-pipelines.yml and publish.yml after all npm ci tasks? This file is good for testing but I don't think we want it in the final PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I can start with that. I think we'll need a way to run the publish.yml on multiple platforms, and then merge the prebuild/ directories to publish together

Copy link
Contributor

@rzhao271 rzhao271 Aug 26, 2025

Choose a reason for hiding this comment

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

Looks like it.
The extension template has support for multiple platforms, but the npm package template doesn't. Your ask is also not the same as what the extension template does. Ref https://github.com/microsoft/vscode-jupyter/blob/main/build/azure-pipeline.stable.yml#L26 and CC @lszomoru

Edit: It might be easier for me to create a new pipeline that runs before the publishing pipeline that prepares the binaries.

@devm33 devm33 force-pushed the prebuilds branch 2 times, most recently from 947531f to a7508ed Compare August 27, 2025 05:58
@devm33
Copy link
Contributor Author

devm33 commented Oct 7, 2025

Closing in favor of #804!

@devm33 devm33 closed this Oct 7, 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