From 0bb07c00dc3242333d67bfb5ef0ce3e9e0e82bcc Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 24 Apr 2026 23:06:12 +0000 Subject: [PATCH 1/3] Require node 22 or higher --- .github/dependabot.yml | 2 +- .github/workflows/test.yaml | 4 +- ChangeLog.md | 1 + eng/templates/stages/oav.yml | 112 +++++++++++++++++------------------ package.json | 4 +- 5 files changed, 62 insertions(+), 61 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 16f7d053..65db845b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -29,7 +29,7 @@ updates: # devDependencies - # locked to "^20.0.0" to align with our minimum node version in package.json/engines + # locked to align with our minimum node version in package.json/engines - dependency-name: "@types/node" # locked to "^8", since newer versions include breaking changes diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2fd7209d..8a0b1600 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,11 +17,11 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Setup Node 20 + - name: Setup Node 22 uses: actions/setup-node@v6 with: cache: "npm" - node-version: 20 + node-version: 22 - name: Install deps run: | diff --git a/ChangeLog.md b/ChangeLog.md index d8e9f6fd..2e89bf1e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,7 @@ ## 04/24/2026 4.0.4 +- Requires Node 22 or higher - Remove unused runtime dependency `@azure/ms-rest-js` - Remove dead code under `lib/templates` (`httpTemplate.ts`, `markdownHttpTemplate.ts`, `yamlHttpTemplate.ts`) and the unused `lib/models/responseWrapper.ts` diff --git a/eng/templates/stages/oav.yml b/eng/templates/stages/oav.yml index 0906cef3..09400b38 100644 --- a/eng/templates/stages/oav.yml +++ b/eng/templates/stages/oav.yml @@ -20,10 +20,10 @@ extends: - checkout: self submodules: true - - task: NodeTool@0 + - task: UseNode@1 inputs: - versionSpec: "20.x" - displayName: "Use Node 20" + version: "22.x" + displayName: "Use Node 22" - task: Npm@1 displayName: "npm ci" @@ -75,62 +75,62 @@ extends: - template: /eng/templates/steps/publish-1es-artifact.yml parameters: - ArtifactName: 'oav' - ArtifactPath: '$(Build.ArtifactStagingDirectory)' + ArtifactName: "oav" + ArtifactPath: "$(Build.ArtifactStagingDirectory)" CustomCondition: succeededOrFailed() - template: /eng/templates/stages/examples-regression.yml # only include if running on `internal` build with manual queue, otherwise never include - ${{ if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}: - - stage: Publish - displayName: Publish - dependsOn: Build_And_Test - - jobs: - - deployment: Publish - environment: 'package-publish' - pool: - name: azsdk-pool - image: ubuntu-24.04 - os: linux - - variables: - - name: ArtifactPath - value: $(Pipeline.Workspace)/oav - - templateContext: - type: releaseJob - isProduction: true - inputs: - - input: pipelineArtifact - artifactName: oav - itemPattern: '**/*.tgz' - targetPath: $(ArtifactPath) - - strategy: - runOnce: - deploy: - steps: - - pwsh: | - Write-Host "Will deploy with tag of latest" - Get-ChildItem "$(ArtifactPath)" *.tgz -Recurse | % { Write-Host $_.FullName } - displayName: Packages to be published - - - task: EsrpRelease@9 - displayName: 'Publish oav to ESRP' - inputs: - ConnectedServiceName: 'Azure SDK PME Managed Identity' - ClientId: '5f81938c-2544-4f1f-9251-dd9de5b8a81b' - DomainTenantId: '975f013f-7f24-47e8-a7d3-abc4752bf346' - UseManagedIdentity: true - KeyVaultName: 'kv-azuresdk-codesign' - SignCertName: 'azure-sdk-esrp-release-certificate' - Intent: 'PackageDistribution' - ContentType: 'npm' - FolderLocation: $(ArtifactPath) - Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }} - Approvers: 'azuresdk@microsoft.com' - ServiceEndpointUrl: 'https://api.esrp.microsoft.com' - MainPublisher: 'ESRPRELPACMANTEST' - productstate: latest + - stage: Publish + displayName: Publish + dependsOn: Build_And_Test + + jobs: + - deployment: Publish + environment: "package-publish" + pool: + name: azsdk-pool + image: ubuntu-24.04 + os: linux + + variables: + - name: ArtifactPath + value: $(Pipeline.Workspace)/oav + + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: oav + itemPattern: "**/*.tgz" + targetPath: $(ArtifactPath) + + strategy: + runOnce: + deploy: + steps: + - pwsh: | + Write-Host "Will deploy with tag of latest" + Get-ChildItem "$(ArtifactPath)" *.tgz -Recurse | % { Write-Host $_.FullName } + displayName: Packages to be published + + - task: EsrpRelease@9 + displayName: "Publish oav to ESRP" + inputs: + ConnectedServiceName: "Azure SDK PME Managed Identity" + ClientId: "5f81938c-2544-4f1f-9251-dd9de5b8a81b" + DomainTenantId: "975f013f-7f24-47e8-a7d3-abc4752bf346" + UseManagedIdentity: true + KeyVaultName: "kv-azuresdk-codesign" + SignCertName: "azure-sdk-esrp-release-certificate" + Intent: "PackageDistribution" + ContentType: "npm" + FolderLocation: $(ArtifactPath) + Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }} + Approvers: "azuresdk@microsoft.com" + ServiceEndpointUrl: "https://api.esrp.microsoft.com" + MainPublisher: "ESRPRELPACMANTEST" + productstate: latest diff --git a/package.json b/package.json index 99359a52..be32dba7 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/json-schema-traverse": "^0.4.0", "@types/lodash": "^4.17.20", "@types/mustache": "^4.1.2", - "@types/node": "^20.0.0", + "@types/node": "^22.19.17", "@types/toposort": "^2.0.3", "@types/yargs": "^11.1.2", "@typescript-eslint/eslint-plugin": "^8.44.1", @@ -116,7 +116,7 @@ "li": "npm install @ts-common/local-install --no-save && local-install" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" }, "jest-junit": { "output": "test-results.xml" From 678067c6b122101f7c3563262cc69a6a15e7b5c7 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 24 Apr 2026 23:08:57 +0000 Subject: [PATCH 2/3] npm i --- package-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba637e46..f69ae256 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "@types/json-schema-traverse": "^0.4.0", "@types/lodash": "^4.17.20", "@types/mustache": "^4.1.2", - "@types/node": "^20.0.0", + "@types/node": "^22.19.17", "@types/toposort": "^2.0.3", "@types/yargs": "^11.1.2", "@typescript-eslint/eslint-plugin": "^8.44.1", @@ -63,7 +63,7 @@ "typescript": "~5.9.2" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" } }, "node_modules/@apidevtools/json-schema-ref-parser": { @@ -2079,9 +2079,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.19.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", - "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", + "version": "22.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", + "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" From af9c2f476b55b77087278a93c47406c9e92158e4 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 24 Apr 2026 23:09:59 +0000 Subject: [PATCH 3/3] format --- eng/templates/stages/oav.yml | 106 +++++++++++++++++------------------ 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/eng/templates/stages/oav.yml b/eng/templates/stages/oav.yml index 09400b38..97f13e3a 100644 --- a/eng/templates/stages/oav.yml +++ b/eng/templates/stages/oav.yml @@ -75,62 +75,62 @@ extends: - template: /eng/templates/steps/publish-1es-artifact.yml parameters: - ArtifactName: "oav" - ArtifactPath: "$(Build.ArtifactStagingDirectory)" + ArtifactName: 'oav' + ArtifactPath: '$(Build.ArtifactStagingDirectory)' CustomCondition: succeededOrFailed() - template: /eng/templates/stages/examples-regression.yml # only include if running on `internal` build with manual queue, otherwise never include - ${{ if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}: - - stage: Publish - displayName: Publish - dependsOn: Build_And_Test - - jobs: - - deployment: Publish - environment: "package-publish" - pool: - name: azsdk-pool - image: ubuntu-24.04 - os: linux - - variables: - - name: ArtifactPath - value: $(Pipeline.Workspace)/oav - - templateContext: - type: releaseJob - isProduction: true - inputs: - - input: pipelineArtifact - artifactName: oav - itemPattern: "**/*.tgz" - targetPath: $(ArtifactPath) - - strategy: - runOnce: - deploy: - steps: - - pwsh: | - Write-Host "Will deploy with tag of latest" - Get-ChildItem "$(ArtifactPath)" *.tgz -Recurse | % { Write-Host $_.FullName } - displayName: Packages to be published - - - task: EsrpRelease@9 - displayName: "Publish oav to ESRP" - inputs: - ConnectedServiceName: "Azure SDK PME Managed Identity" - ClientId: "5f81938c-2544-4f1f-9251-dd9de5b8a81b" - DomainTenantId: "975f013f-7f24-47e8-a7d3-abc4752bf346" - UseManagedIdentity: true - KeyVaultName: "kv-azuresdk-codesign" - SignCertName: "azure-sdk-esrp-release-certificate" - Intent: "PackageDistribution" - ContentType: "npm" - FolderLocation: $(ArtifactPath) - Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }} - Approvers: "azuresdk@microsoft.com" - ServiceEndpointUrl: "https://api.esrp.microsoft.com" - MainPublisher: "ESRPRELPACMANTEST" - productstate: latest + - stage: Publish + displayName: Publish + dependsOn: Build_And_Test + + jobs: + - deployment: Publish + environment: 'package-publish' + pool: + name: azsdk-pool + image: ubuntu-24.04 + os: linux + + variables: + - name: ArtifactPath + value: $(Pipeline.Workspace)/oav + + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: oav + itemPattern: '**/*.tgz' + targetPath: $(ArtifactPath) + + strategy: + runOnce: + deploy: + steps: + - pwsh: | + Write-Host "Will deploy with tag of latest" + Get-ChildItem "$(ArtifactPath)" *.tgz -Recurse | % { Write-Host $_.FullName } + displayName: Packages to be published + + - task: EsrpRelease@9 + displayName: 'Publish oav to ESRP' + inputs: + ConnectedServiceName: 'Azure SDK PME Managed Identity' + ClientId: '5f81938c-2544-4f1f-9251-dd9de5b8a81b' + DomainTenantId: '975f013f-7f24-47e8-a7d3-abc4752bf346' + UseManagedIdentity: true + KeyVaultName: 'kv-azuresdk-codesign' + SignCertName: 'azure-sdk-esrp-release-certificate' + Intent: 'PackageDistribution' + ContentType: 'npm' + FolderLocation: $(ArtifactPath) + Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }} + Approvers: 'azuresdk@microsoft.com' + ServiceEndpointUrl: 'https://api.esrp.microsoft.com' + MainPublisher: 'ESRPRELPACMANTEST' + productstate: latest