Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
b1fdda4
Port to NAPI (#644)
kkocdko Jan 26, 2024
e08593d
build(deps): bump ip from 2.0.0 to 2.0.1
dependabot[bot] Feb 21, 2024
0661eaf
Merge pull request #664 from microsoft/dependabot/npm_and_yarn/ip-2.0.1
Tyriar Feb 21, 2024
2483032
api scan
sbatten Feb 25, 2024
0253460
fix job name
sbatten Feb 25, 2024
a0dd31d
Merge pull request #666 from microsoft/sbatten/apiscan
sbatten Feb 25, 2024
c712cce
chore: fix APIScan software name (#667)
rzhao271 Feb 29, 2024
2dab380
fix: comment out invalid API call (#669)
rzhao271 Mar 4, 2024
783c7ed
fix: assertion on node environment shutdown (#672)
deepak1556 Mar 7, 2024
f25bb55
Upgrade node-gyp to fix #643 and #646 (#673)
kkocdko Mar 15, 2024
3913479
chore: remove deprecated api `process.binding` (#653)
kkocdko Mar 18, 2024
6aa0758
chore: migrate pipeline to use 1ES template (#676)
rzhao271 Apr 1, 2024
0fbbcf6
build(deps): bump tar from 6.2.0 to 6.2.1
dependabot[bot] Apr 11, 2024
f014e86
Merge pull request #678 from microsoft/dependabot/npm_and_yarn/tar-6.2.1
Tyriar Apr 11, 2024
df1ae8c
docs: add a note on Spectre-mitigated libraries (#679)
rzhao271 Apr 16, 2024
0e791c1
build(deps): bump braces from 3.0.2 to 3.0.3
dependabot[bot] Jun 16, 2024
26f1c69
Include termios.h on freebsd
jpcastberg Jun 17, 2024
8be08fd
Merge pull request #688 from jpcastberg/termios-freebsd
Tyriar Jun 17, 2024
efbf8eb
Merge pull request #687 from microsoft/dependabot/npm_and_yarn/braces…
Tyriar Jun 18, 2024
f2be1af
Get conpty.dll conditionally loading
Tyriar Jul 30, 2024
95f67e7
Add conpty dlls and node headers
Tyriar Aug 1, 2024
ddcd0b0
Add useConptyDll option
Tyriar Aug 1, 2024
4392169
Copy conpty.dll and openconsole.exe depending on arch in postinstall
Tyriar Aug 1, 2024
bd7fa4f
Merge pull request #694 from microsoft/tyriar/conptydll
Tyriar Aug 1, 2024
7c4e9ed
Ship third_party folder with module
Tyriar Aug 1, 2024
2622bd1
Merge pull request #695 from microsoft/tyriar/conpty2
Tyriar Aug 1, 2024
dde63ec
Don't run CI for node 16
Tyriar Aug 1, 2024
5874200
Merge pull request #696 from microsoft/tyriar/node16
Tyriar Aug 1, 2024
055cd3f
Disable APIScan task
Tyriar Aug 1, 2024
59f5d47
Fix winpty resize and reduce test flakiness
Tyriar Aug 1, 2024
47c16e2
Merge pull request #697 from microsoft/tyriar/conpty4
Tyriar Aug 1, 2024
5e99f76
Publish third_party folder
Tyriar Aug 1, 2024
1247f91
Merge pull request #698 from microsoft/tyriar/publish_third_party
Tyriar Aug 1, 2024
98d8566
Improve can't find conpty.dll exception message
Tyriar Aug 5, 2024
485379c
Merge pull request #699 from microsoft/tyriar/conptydll_exception
Tyriar Aug 5, 2024
cf62104
Get path of conpty.node for conpty.dll
Tyriar Aug 6, 2024
7a8c67c
Merge pull request #700 from microsoft/tyriar/conpty_path
Tyriar Aug 6, 2024
061487a
Update to newer version of conpty
Tyriar Aug 6, 2024
8fc21c9
Merge pull request #702 from microsoft/tyriar/conpty_update
Tyriar Aug 6, 2024
ef1cefc
Fix correct method being loaded when not using conptydll
Tyriar Aug 9, 2024
8c0a6d7
Merge pull request #703 from microsoft/tyriar/conpty_prefix
Tyriar Aug 9, 2024
4f2f641
Copy right dll/exe based on npm_config_arch
Tyriar Aug 11, 2024
cb94da7
Merge pull request #704 from microsoft/tyriar/npm_arch
Tyriar Aug 11, 2024
59771c0
Bring back clear impl
Tyriar Sep 9, 2024
796e11e
Merge pull request #713 from microsoft/tyriar/711
Tyriar Sep 27, 2024
d2bf81f
Close piClient.hThread handle
Tyriar Oct 3, 2024
53e60b0
Move buffer_ to heap
Tyriar Oct 3, 2024
7e431b9
Catch possible exceptions in ~Agent
Tyriar Oct 3, 2024
13c661d
yarn.lock -> package-lock.json
Tyriar Oct 3, 2024
353f219
Regenerate dependencies
Tyriar Oct 3, 2024
1ece036
Merge pull request #720 from microsoft/tyriar/catch_winpty_deconstructor
Tyriar Oct 3, 2024
b2d9866
Merge pull request #718 from microsoft/tyriar/717
Tyriar Oct 3, 2024
de86139
Merge pull request #719 from microsoft/tyriar/move_buffer_to_heap
Tyriar Oct 3, 2024
589a720
Merge pull request #721 from microsoft/tyriar/deps
Tyriar Oct 3, 2024
d06ed4f
Fix typo in trace log
Tyriar Oct 3, 2024
5063e0e
Merge pull request #722 from microsoft/tyriar/log
Tyriar Oct 3, 2024
d3ea906
Move to compile commands on postinstall for fixing intellisense
Tyriar Oct 4, 2024
8bdbd71
Merge pull request #723 from microsoft/tyriar/compile_commands
Tyriar Oct 4, 2024
ad9d907
chore: use node 20 and fix build (#730)
rzhao271 Nov 21, 2024
d32b574
chore: add new publish pipeline (#727)
rzhao271 Dec 3, 2024
483e7c7
fix: ensure proper cleanup of console process on shutdown
deepak1556 Jan 23, 2025
22f7a84
fix: publish pipeline broken APIScan task (#756)
rzhao271 Jan 25, 2025
17062cd
chore: improve cleanup with useConptyDll mode
deepak1556 Jan 27, 2025
16bd639
chore: update tests
deepak1556 Jan 27, 2025
358750c
Merge pull request #755 from microsoft/robo/fix_process_cleanup
Tyriar Feb 3, 2025
7b97ff9
chore: auto-publish beta versions (#757)
rzhao271 Feb 4, 2025
5a61096
chore: work around blocked release integration (#758)
rzhao271 Feb 4, 2025
298fec1
Update to conpty v1.22 (#759)
Tyriar Feb 18, 2025
4c5aa31
chore: remove old publishing stage (#761)
rzhao271 Feb 19, 2025
467cea0
fix: restore conpty non-dll path (#766)
deepak1556 Mar 11, 2025
090384f
chore: add BinSkim flags to winpty (#767)
rzhao271 Mar 14, 2025
247ae7d
conpty@1.22.250204002
Tyriar Mar 15, 2025
d9f659b
Change buffer size to 128KiB
Tyriar Mar 15, 2025
bfbd943
Merge pull request #770 from microsoft/tyriar/765_buffer_size
Tyriar Mar 17, 2025
f9b6b2f
Merge pull request #769 from microsoft/tyriar/node-pty
Tyriar Mar 17, 2025
b10eafd
chore: match trigger with perf-bot's (#773)
rzhao271 Mar 17, 2025
4cc52da
chore: match exclude with latest conpty (#774)
rzhao271 Mar 20, 2025
a29b65b
chore: use folder wildcard (#775)
rzhao271 Mar 21, 2025
4f88612
Revert "conpty@1.22.250204002"
Tyriar Mar 24, 2025
56ae53b
Merge pull request #776 from microsoft/tyriar/conpty_revert
Tyriar Mar 24, 2025
d738123
fix: gate conpty-exclusive call behind conpty check (#778)
rzhao271 Apr 1, 2025
e656ea4
Merge remote-tracking branch 'upstream/main' into NodeJS-24
NorthernMan54 Jun 9, 2025
38e854f
NodeJS-24
NorthernMan54 Jun 9, 2025
56aa651
Node 20
NorthernMan54 Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Prepare prebuild environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
# Order reversed so newer versions are built first - Add new versions to the front (fail fast)
# electronBuildTargets version 28 has an issue
oldNodeBuildTargets: -t 17.0.1
currentNodeBuildTargets: -t 23.0.0 -t 22.0.0 -t 21.0.0 -t 20.0.0 -t 19.0.0 -t 18.0.0
currentNodeBuildTargets: -t 24.0.0 -t 23.0.0 -t 22.0.0 -t 21.0.0 -t 20.0.0 -t 19.0.0 -t 18.0.0
oldElectronBuildTargets: -t 19.0.0 -t 18.0.0 -t 17.0.0
electronBuildTargets: -t 29.0.0 -t 27.0.0 -t 26.0.0 -t 25.0.0 -t 24.0.0 -t 23.0.0 -t 22.0.0 -t 21.0.0 -t 20.0.0
winIA32nodeBuildTargets: -t 17.0.1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ fixtures/space folder/
prebuilds
.vscode/ipch/
.idea
yarn.lock
2 changes: 1 addition & 1 deletion .prebuild/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN [ "$(uname -m)" = "x86_64" ] && apt-get install -y g++-multilib gcc-multilib

## Linux 32 bit support was dropped with NodeJS 18.4.0

ENV NODE_VERSION 18.18.2
ENV NODE_VERSION=18.18.2

RUN case "${QEMU_ARCH}" in \
x86_64) NODE_ARCH='x64';; \
Expand Down
2 changes: 1 addition & 1 deletion .prebuild/Dockerfile.oldDebian
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN wget -q https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz && tar xf
&& cd Python-3.6.15 && ./configure --prefix=/usr --enable-optimizations --enable-shared && make -j8 build_all \
&& make -j8 altinstall && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 50

ENV NODE_VERSION 16.20.2
ENV NODE_VERSION=16.20.2

RUN case "${QEMU_ARCH}" in \
x86_64) NODE_ARCH='x64';; \
Expand Down
143 changes: 14 additions & 129 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,164 +24,49 @@ extends:
pool:
name: 1es-oss-ubuntu-22.04-x64
os: Linux
strategy:
matrix:
node_18_x:
node_version: 18.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
versionSpec: 20.x
displayName: 'Install Node.js'
- script: |
npm i
- script: npm ci
displayName: 'Install dependencies and build'
- script: |
npm test
- script: npm test
displayName: 'Test'
- script: |
npm run lint
- script: npm run lint
displayName: 'Lint'

- job: macOS
pool:
name: Azure Pipelines
vmImage: 'macOS-latest'
vmImage: 'macOS-14'
os: macOS
strategy:
matrix:
node_18_x:
node_version: 18.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
versionSpec: 20.x
displayName: 'Install Node.js'
- script: |
python3 -m pip install setuptools
- script: python3 -m pip install setuptools
displayName: Install setuptools (macOS)
- script: |
npm i
- script: npm ci
displayName: 'Install dependencies and build'
- script: |
npm test
- script: npm test
displayName: 'Test'
- script: |
npm run lint
- script: npm run lint
displayName: 'Lint'

- job: Windows
pool:
name: 1es-oss-windows-2022-x64
os: Windows
strategy:
matrix:
node_18_x:
node_version: 18.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
versionSpec: 20.x
displayName: 'Install Node.js'
- script: |
npm i
- script: npm ci
displayName: 'Install dependencies and build'
- script: |
npm test
- script: npm test
displayName: 'Test'
- script: |
npm run lint
- script: npm run lint
displayName: 'Lint'

# - job: APIScan
# dependsOn: []
# pool:
# name: 1es-oss-windows-2022-x64
# os: Windows
# strategy:
# matrix:
# node_18_x:
# node_version: 18.x
# steps:
# - task: NodeTool@0
# inputs:
# versionSpec: $(node_version)
# displayName: 'Install Node.js'
# - pwsh: |
# $includes = @'
# {
# 'target_defaults': {
# 'conditions': [
# ['OS=="win"', {
# 'msvs_settings': {
# 'VCCLCompilerTool': {
# 'AdditionalOptions': [
# '/Zi',
# '/FS'
# ],
# },
# 'VCLinkerTool': {
# 'AdditionalOptions': [
# '/profile'
# ]
# }
# }
# }]
# ]
# }
# }
# '@

# if (!(Test-Path "~/.gyp")) {
# mkdir "~/.gyp"
# echo $includes > "~/.gyp/include.gypi"
# }
# displayName: Create include.gypi
# - script: |
# npm i
# displayName: 'Install dependencies and build'

# - task: APIScan@2
# inputs:
# softwareFolder: $(Build.SourcesDirectory)\build\Release
# softwareName: 'vscode-node-pty'
# softwareVersionNum: '1'
# isLargeApp: false
# toolVersion: 'Latest'
# displayName: Run ApiScan
# condition: succeeded()
# env:
# AzureServicesAuthConnectionString: $(apiscan-connectionstring)

# - task: PublishSecurityAnalysisLogs@3
# inputs:
# ArtifactName: CodeAnalysisLogs
# ArtifactType: Container
# PublishProcessedResults: false
# AllTools: true

- stage: Release
dependsOn: Build
jobs:
- job: Release
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
# Output artifact to produce SBOM and to run SDL checks
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(Build.SourcesDirectory)
artifactName: drop
pool:
name: 1es-oss-ubuntu-22.04-x64
os: Linux
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: 'Install Node.js'
- script: |
npm i
displayName: 'Install dependencies and build'
- script: |
NPM_AUTH_TOKEN="$(NPM_AUTH_TOKEN)" node ./scripts/publish.js
displayName: 'Publish to npm'
8 changes: 5 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set -e

export oldNodeBuildTargets='-t 17.0.1 -t 18.0.0'
export nodeBuildTargets='-t 23.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0'
export nodeBuildTargets='-t 24.0.0 -t 23.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0'

export oldElectronBuildTargets='-t 17.0.0 -t 18.0.0 -t 19.0.0'
export electronBuildTargets='-t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0'
Expand Down Expand Up @@ -45,8 +45,10 @@ export CMD="./.prebuild/build.sh .prebuild/prebuild.js ${nodeBuildTargets}"
echo
echo "--------------------------- $QEMU_ARCH - $DOCKERFILE -------------------------------"
echo
# docker build -f .prebuild/$DOCKERFILE --build-arg QEMU_ARCH=${QEMU_ARCH} -t multiarch-build .
# docker run --rm -v $(pwd):/node-pty multiarch-build bash -c "$CMD"
docker build -f .prebuild/$DOCKERFILE --build-arg QEMU_ARCH=${QEMU_ARCH} -t multiarch-build .
docker run --rm -v $(pwd):/node-pty multiarch-build bash -c "$CMD"

exit 1

#docker run -v $(pwd):/node-pty multiarch-build ./.prebuild/build.sh .prebuild/prebuild.js ${nodeBuildTargets}
#docker run --rm -v $(pwd):/node-pty multiarch-build ./.prebuild/build.sh .prebuild/prebuildify.js ${nodeBuildTargets}
Expand Down
30 changes: 29 additions & 1 deletion deps/winpty/src/winpty.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Add the 'src/gen' directory to the include path and force gyp to
# run the script (re)generating the version header.
'<!(cmd /c "cd shared && UpdateGenVersion.bat <(WINPTY_COMMIT_HASH)")',
],
]
},
'targets' : [
{
Expand All @@ -41,12 +41,26 @@
'-lshell32',
'-luser32',
],
'msvs_configuration_attributes': {
'SpectreMitigation': 'Spectre'
},
'msvs_settings': {
# Specify this setting here to override a setting from somewhere
# else, such as node's common.gypi.
'VCCLCompilerTool': {
'ExceptionHandling': '1', # /EHsc
'AdditionalOptions': [
'/guard:cf',
'/w34244',
'/w34267',
'/ZH:SHA_256'
]
},
'VCLinkerTool': {
'AdditionalOptions': [
'/guard:cf'
]
}
},
'sources' : [
'agent/Agent.h',
Expand Down Expand Up @@ -129,12 +143,26 @@
'-ladvapi32',
'-luser32',
],
'msvs_configuration_attributes': {
'SpectreMitigation': 'Spectre'
},
'msvs_settings': {
# Specify this setting here to override a setting from somewhere
# else, such as node's common.gypi.
'VCCLCompilerTool': {
'ExceptionHandling': '1', # /EHsc
'AdditionalOptions': [
'/guard:cf',
'/w34244',
'/w34267',
'/ZH:SHA_256'
]
},
'VCLinkerTool': {
'AdditionalOptions': [
'/guard:cf'
]
}
},
'sources' : [
'include/winpty.h',
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@
"@typescript-eslint/parser": "^2.27.0",
"cross-env": "^5.1.4",
"eslint": "^6.8.0",
"node-abi": "^3.71.0",
"mocha": "10",
"node-abi": "^3.75.0",
"node-gyp": "=10.1.0",
"prebuild": "^13.0.1",
"prebuildify": "^5.0.1",
"ps-list": "^6.0.0",
"typescript": "^3.8.3"
}
}
}
Loading