diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 83604b234..4d23a1aca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,8 +26,8 @@ extends: os: Linux strategy: matrix: - node_18_x: - node_version: 18.x + node_20_x: + node_version: 20.x steps: - task: NodeTool@0 inputs: @@ -50,8 +50,8 @@ extends: os: macOS strategy: matrix: - node_18_x: - node_version: 18.x + node_20_x: + node_version: 20.x steps: - task: NodeTool@0 inputs: @@ -76,8 +76,8 @@ extends: os: Windows strategy: matrix: - node_18_x: - node_version: 18.x + node_20_x: + node_version: 20.x steps: - task: NodeTool@0 inputs: @@ -93,73 +93,6 @@ extends: 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: @@ -177,7 +110,7 @@ extends: steps: - task: NodeTool@0 inputs: - versionSpec: '18.x' + versionSpec: '20.x' displayName: 'Install Node.js' - script: | npm i diff --git a/src/unixTerminal.test.ts b/src/unixTerminal.test.ts index 651eb6516..69647468b 100644 --- a/src/unixTerminal.test.ts +++ b/src/unixTerminal.test.ts @@ -272,10 +272,9 @@ if (process.platform !== 'win32') { ptyProcess.on('data', function (data) { if (ptyProcess.process === 'Python') { console.log('title', ptyProcess.process); + console.log('ready', ptyProcess.pid); } }); - setTimeout(() => null, 500); - console.log('ready', ptyProcess.pid); `; const p = cp.spawn('node', ['-e', data]); let sub = ''; @@ -283,12 +282,10 @@ if (process.platform !== 'win32') { p.stdout.on('data', (data) => { if (!data.toString().indexOf('title')) { sub = data.toString().split(' ')[1].slice(0, -1); - setTimeout(() => { - process.kill(parseInt(pid), 'SIGINT'); - p.kill('SIGINT'); - }, 200); } else if (!data.toString().indexOf('ready')) { pid = data.toString().split(' ')[1].slice(0, -1); + process.kill(parseInt(pid), 'SIGINT'); + p.kill('SIGINT'); } }); p.on('exit', () => {