Skip to content

Conversation

@rzhao271
Copy link
Contributor

@rzhao271 rzhao271 commented Nov 7, 2024

Also fixes up the existing pipeline to become a CI-only pipeline.
One issue with the new pipeline is that it uses the package.json version. I'm not sure how to let it auto-generate a new beta version.

@rzhao271 rzhao271 added this to the November 2024 milestone Nov 7, 2024
@rzhao271 rzhao271 requested a review from Tyriar November 7, 2024 18:36
@rzhao271 rzhao271 self-assigned this Nov 7, 2024
@Tyriar
Copy link
Member

Tyriar commented Nov 7, 2024

One issue with the new pipeline is that it uses the package.json version. I'm not sure how to let it auto-generate a new beta version.

It would be a shame to lose that, would it instead publish whenever the package.json changes in main?

@rzhao271
Copy link
Contributor Author

rzhao271 commented Nov 7, 2024

Afaik, the maintainer must manually set the package.json version, run a pipeline build, and get it approved, ref https://dev.azure.com/monacotools/Monaco/_build/results?buildId=297071&view=results

Edit: Adding Lad to the PR to confirm.

@rzhao271 rzhao271 requested a review from lszomoru November 7, 2024 18:44
@rzhao271 rzhao271 force-pushed the rzhao271/publish-pipeline branch from ba3b771 to 2b77d25 Compare November 12, 2024 23:51
@rzhao271
Copy link
Contributor Author

rzhao271 commented Nov 12, 2024

I have changed the publish script to only increment the package.json version, and the YAML should now run that script to set the correct version before publishing the package. There is no verification build because the pipeline needs to be on the main branch for me to create a new pipeline in ADO for it.

@lszomoru
Copy link
Member

You should look at vsce as it implements the desired pattern to automatically update the package version based on the nextVersion pipeline input parameter - https://github.com/microsoft/vscode-vsce/blob/f1fc6d255d634849db9a7f28e59a031c49cd4918/build/azure-pipelines.yml#L18

@rzhao271
Copy link
Contributor Author

@lszomoru I believe the version format is different for node-pty: https://www.npmjs.com/package/node-pty?activeTab=versions

Here's what I see for @vscode/vsce: https://www.npmjs.com/package/@vscode/vsce?activeTab=versions

@lszomoru
Copy link
Member

If node-pty is using custom version number format then it is up to the package owner to increment it. If you specify the nextVersion template parameter (list vsce does) we will run npm version ${{ parameters.nextVersion }} --no-git-tag-version --allow-same-version to update the package.json.

@rzhao271 rzhao271 modified the milestones: November 2024, January 2025 Nov 27, 2024
@rzhao271 rzhao271 force-pushed the rzhao271/publish-pipeline branch from 2b77d25 to bda4d28 Compare December 2, 2024 16:03
// Publish
const args = ['publish'];
if (!isStableRelease) {
args.push('--tag', 'beta');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the pipeline will have to support this tag functionality as well. Leaving the PR unmerged.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we automatically create a GH release and tag.

Copy link
Member

Choose a reason for hiding this comment

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

This is an npm release tag, not a gh/git one. It's critical that this is published to npm under the beta tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added tag parameters to the YAML that should tell ESRP to publish with the correct tag.

@rzhao271 rzhao271 requested a review from lszomoru December 2, 2024 21:33
@rzhao271
Copy link
Contributor Author

rzhao271 commented Dec 2, 2024

There is only a verification build for the CI pipeline at this time: https://dev.azure.com/vscode/node-pty/_build/results?buildId=138802&view=results

I will create and test the publishing pipeline after this PR is merged. Afaik, I am unable to create the pipeline using the Start Right process from a non-main branch.

@rzhao271 rzhao271 merged commit d32b574 into main Dec 3, 2024
7 checks passed
@rzhao271 rzhao271 deleted the rzhao271/publish-pipeline branch December 3, 2024 16:46
NorthernMan54 added a commit to homebridge/node-pty-prebuilt-multiarch that referenced this pull request Jun 9, 2025
* Port to NAPI (microsoft#644)

* Port to NAPI

The "5th pty bug" in microsoft#432 fixed also.

* Fix help message in pty.cc

* Move NAPI deps to devDependencies in package.json

* Apply most of deepak1556's suggestions

* Fix winpty

* Fix conpty missing CloseHandle

* Use unique_ptr to avoid `goto`s

* Why macos failed?

* fix: ci and minor cleanups

* fix build failed on windows

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* build(deps): bump ip from 2.0.0 to 2.0.1

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](indutny/node-ip@v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* api scan

* fix job name

* chore: fix APIScan software name (microsoft#667)

* fix: comment out invalid API call (microsoft#669)

* fix: assertion on node environment shutdown (microsoft#672)

* Upgrade node-gyp to fix microsoft#643 and microsoft#646 (microsoft#673)

* chore: remove deprecated api `process.binding` (microsoft#653)

* Remove deprecated API `process.binding`

Originally designed to work with ancient node.js 0.12 and io.js

* Fix node `net.Socket` limitations

nodejs/node#37780

* chore: migrate pipeline to use 1ES template (microsoft#676)

* build(deps): bump tar from 6.2.0 to 6.2.1

Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: add a note on Spectre-mitigated libraries (microsoft#679)

* build(deps): bump braces from 3.0.2 to 3.0.3

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Include termios.h on freebsd

* Get conpty.dll conditionally loading

* Add conpty dlls and node headers

* Add useConptyDll option

* Copy conpty.dll and openconsole.exe depending on arch in postinstall

* Ship third_party folder with module

This needs to be there to copy over the right binary on postinstall

Part of microsoft/vscode#224488

* Don't run CI for node 16

* Disable APIScan task

* Fix winpty resize and reduce test flakiness

* Publish third_party folder

* Improve can't find conpty.dll exception message

Part of microsoft/vscode#224488

* Get path of conpty.node for conpty.dll

Part of microsoft/vscode#224488

* Update to newer version of conpty

* Fix correct method being loaded when not using conptydll

Part of microsoft/vscode#224488

* Copy right dll/exe based on npm_config_arch

Part of microsoft/vscode#224488
Part of microsoft/vscode#225355

* Bring back clear impl

Fixes microsoft#711

* Close piClient.hThread handle

Fixes microsoft#717

* Move buffer_ to heap

Resolves warning:

src\win\path_util.cc(54): warning C6262: Function uses '131804' bytes of stack:  exceeds /analyze:stacksize '16384'.  Consider moving some data to heap.

* Catch possible exceptions in ~Agent

Fixes warning:

deps\winpty\src\agent\Agent.cc(231): warning C4722: 'Agent::~Agent': destructor never returns, potential memory leak

* yarn.lock -> package-lock.json

Fixes microsoft#712

* Regenerate dependencies

* Fix typo in trace log

Follow up microsoft#720

* Move to compile commands on postinstall for fixing intellisense

Fixes microsoft#707

* chore: use node 20 and fix build (microsoft#730)

* chore: use node 20 and fix build

* chore: bump macOS deployment target

* spec: reduce flakyness

* Revert "chore: bump macOS deployment target"

This reverts commit d9d18b3.

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: add new publish pipeline (microsoft#727)

Also allows the CI pipeline to use the Unofficial template

* fix: ensure proper cleanup of console process on shutdown

* fix: publish pipeline broken APIScan task (microsoft#756)

* chore: improve cleanup with useConptyDll mode

* chore: update tests

* chore: auto-publish beta versions (microsoft#757)

* chore: work around blocked release integration (microsoft#758)

* Update to conpty v1.22 (microsoft#759)

* Update to conpty v1.22

Fixes microsoft#490

* Add logs to show the problem happening

* spec: increase exit delay

* refactor: input and output handling with conpty

* Close the input read and output write handles after creating
  the client process
* Call ReleasePseudoConsole after creating the client process
  which will cause the output read handle to close when there
  is no more data from the session
* For manual termination via Kill, we close the input write handle
  and call into ClosePseudoConsole, we should then drain the output
  handle

NB: ideally draining the output handle should have been enough
to cause the client process to close but it doesn't work, we call
TerminateProcess to fix this case.

* chore: restore legacy conpty path

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: remove old publishing stage (microsoft#761)

* fix: restore conpty non-dll path (microsoft#766)

* chore: add BinSkim flags to winpty (microsoft#767)

* chore: add BinSkim flags to winpty

* Apply PR feedback

* conpty@1.22.250204002

* Change buffer size to 128KiB

Fixes microsoft#765

* chore: match trigger with perf-bot's (microsoft#773)

* chore: match exclude with latest conpty (microsoft#774)

* chore: use folder wildcard (microsoft#775)

* Revert "conpty@1.22.250204002"

This reverts commit 247ae7d.

* fix: gate conpty-exclusive call behind conpty check (microsoft#778)

* NodeJS-24

* Node 20

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: kkocdko <31189892+kkocdko@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
Co-authored-by: SteVen Batten <sbatten@microsoft.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: jpcastberg <jpcastberg@gmail.com>
NorthernMan54 added a commit to homebridge/node-pty-prebuilt-multiarch that referenced this pull request Jul 2, 2025
* upgrade conpty from 1.20 to 1.22 (#56)

Signed-off-by: Chapman Pendery <cpendery@microsoft.com>

* Update package.json

* Node js 24 (#58)

* Port to NAPI (microsoft#644)

* Port to NAPI

The "5th pty bug" in microsoft#432 fixed also.

* Fix help message in pty.cc

* Move NAPI deps to devDependencies in package.json

* Apply most of deepak1556's suggestions

* Fix winpty

* Fix conpty missing CloseHandle

* Use unique_ptr to avoid `goto`s

* Why macos failed?

* fix: ci and minor cleanups

* fix build failed on windows

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* build(deps): bump ip from 2.0.0 to 2.0.1

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](indutny/node-ip@v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* api scan

* fix job name

* chore: fix APIScan software name (microsoft#667)

* fix: comment out invalid API call (microsoft#669)

* fix: assertion on node environment shutdown (microsoft#672)

* Upgrade node-gyp to fix microsoft#643 and microsoft#646 (microsoft#673)

* chore: remove deprecated api `process.binding` (microsoft#653)

* Remove deprecated API `process.binding`

Originally designed to work with ancient node.js 0.12 and io.js

* Fix node `net.Socket` limitations

nodejs/node#37780

* chore: migrate pipeline to use 1ES template (microsoft#676)

* build(deps): bump tar from 6.2.0 to 6.2.1

Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: add a note on Spectre-mitigated libraries (microsoft#679)

* build(deps): bump braces from 3.0.2 to 3.0.3

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Include termios.h on freebsd

* Get conpty.dll conditionally loading

* Add conpty dlls and node headers

* Add useConptyDll option

* Copy conpty.dll and openconsole.exe depending on arch in postinstall

* Ship third_party folder with module

This needs to be there to copy over the right binary on postinstall

Part of microsoft/vscode#224488

* Don't run CI for node 16

* Disable APIScan task

* Fix winpty resize and reduce test flakiness

* Publish third_party folder

* Improve can't find conpty.dll exception message

Part of microsoft/vscode#224488

* Get path of conpty.node for conpty.dll

Part of microsoft/vscode#224488

* Update to newer version of conpty

* Fix correct method being loaded when not using conptydll

Part of microsoft/vscode#224488

* Copy right dll/exe based on npm_config_arch

Part of microsoft/vscode#224488
Part of microsoft/vscode#225355

* Bring back clear impl

Fixes microsoft#711

* Close piClient.hThread handle

Fixes microsoft#717

* Move buffer_ to heap

Resolves warning:

src\win\path_util.cc(54): warning C6262: Function uses '131804' bytes of stack:  exceeds /analyze:stacksize '16384'.  Consider moving some data to heap.

* Catch possible exceptions in ~Agent

Fixes warning:

deps\winpty\src\agent\Agent.cc(231): warning C4722: 'Agent::~Agent': destructor never returns, potential memory leak

* yarn.lock -> package-lock.json

Fixes microsoft#712

* Regenerate dependencies

* Fix typo in trace log

Follow up microsoft#720

* Move to compile commands on postinstall for fixing intellisense

Fixes microsoft#707

* chore: use node 20 and fix build (microsoft#730)

* chore: use node 20 and fix build

* chore: bump macOS deployment target

* spec: reduce flakyness

* Revert "chore: bump macOS deployment target"

This reverts commit d9d18b3.

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: add new publish pipeline (microsoft#727)

Also allows the CI pipeline to use the Unofficial template

* fix: ensure proper cleanup of console process on shutdown

* fix: publish pipeline broken APIScan task (microsoft#756)

* chore: improve cleanup with useConptyDll mode

* chore: update tests

* chore: auto-publish beta versions (microsoft#757)

* chore: work around blocked release integration (microsoft#758)

* Update to conpty v1.22 (microsoft#759)

* Update to conpty v1.22

Fixes microsoft#490

* Add logs to show the problem happening

* spec: increase exit delay

* refactor: input and output handling with conpty

* Close the input read and output write handles after creating
  the client process
* Call ReleasePseudoConsole after creating the client process
  which will cause the output read handle to close when there
  is no more data from the session
* For manual termination via Kill, we close the input write handle
  and call into ClosePseudoConsole, we should then drain the output
  handle

NB: ideally draining the output handle should have been enough
to cause the client process to close but it doesn't work, we call
TerminateProcess to fix this case.

* chore: restore legacy conpty path

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: remove old publishing stage (microsoft#761)

* fix: restore conpty non-dll path (microsoft#766)

* chore: add BinSkim flags to winpty (microsoft#767)

* chore: add BinSkim flags to winpty

* Apply PR feedback

* conpty@1.22.250204002

* Change buffer size to 128KiB

Fixes microsoft#765

* chore: match trigger with perf-bot's (microsoft#773)

* chore: match exclude with latest conpty (microsoft#774)

* chore: use folder wildcard (microsoft#775)

* Revert "conpty@1.22.250204002"

This reverts commit 247ae7d.

* fix: gate conpty-exclusive call behind conpty check (microsoft#778)

* NodeJS-24

* Node 20

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: kkocdko <31189892+kkocdko@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
Co-authored-by: SteVen Batten <sbatten@microsoft.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: jpcastberg <jpcastberg@gmail.com>

* Working

* Update validate for NodeJS 24

* Should now be working

* Update Stage 2 - Validate.yml

* Update Prepare prebuild environment.yml

* Update Dockerfile.debian

* Fix ?

* Add git

* Fix ?

* Fixed

* Update package-lock.json

* Fix

* Try again

* Again

* Update Stage 2 - Validate.yml

* Windows fix

* fix

* Update updateABIRegistry.js

* Update engines to match prebuilds

---------

Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Chapman Pendery <35637443+cpendery@users.noreply.github.com>
Co-authored-by: kkocdko <31189892+kkocdko@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
Co-authored-by: SteVen Batten <sbatten@microsoft.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: jpcastberg <jpcastberg@gmail.com>
@Tyriar Tyriar modified the milestones: January 2025, 1.1.0 Dec 21, 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.

4 participants