From 8210d5bea8fb0e45f852bddbb8aedd6bd5d5fe2d Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Tue, 24 Dec 2024 22:10:54 -0800 Subject: [PATCH] Upgrade `mocha` to `^11.0.2` for generated packages (#2945) Now NodeJS version "^18.18.0 || ^20.9.0 || >=21.1.0" is required Co-authored-by: Mary Gao --- .../src/generators/static/packageFileGenerator.ts | 2 +- .../integration/generated/additionalProperties/package.json | 2 +- .../test/integration/generated/datasearch/package.json | 2 +- .../test/integration/generated/patterntest/package.json | 2 +- .../test/rlcIntegration/generated/bodyStringRest/package.json | 2 +- .../test/smoke/generated/agrifood-data-plane/package.json | 2 +- .../test/smoke/generated/anomaly-detector-rest/package.json | 2 +- .../generated/arm-package-subscriptions-2019-06/package.json | 2 +- .../test/smoke/generated/compute-resource-manager/package.json | 2 +- .../test/smoke/generated/keyvault-resource-manager/package.json | 2 +- .../test/smoke/generated/msi-resource-manager/package.json | 2 +- .../test/smoke/generated/network-resource-manager/package.json | 2 +- .../test/smoke/generated/sql-resource-manager/package.json | 2 +- .../test/smoke/generated/storage-resource-manager/package.json | 2 +- .../test/smoke/generated/web-resource-manager/package.json | 2 +- .../rlc-common/src/metadata/packageJson/azurePackageCommon.ts | 2 +- .../src/metadata/packageJson/buildAzureMonorepoPackage.ts | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/autorest.typescript/src/generators/static/packageFileGenerator.ts b/packages/autorest.typescript/src/generators/static/packageFileGenerator.ts index 18ee32bbdd..3fc876224f 100644 --- a/packages/autorest.typescript/src/generators/static/packageFileGenerator.ts +++ b/packages/autorest.typescript/src/generators/static/packageFileGenerator.ts @@ -203,7 +203,7 @@ function regularAutorestPackage( packageInfo.devDependencies["@azure/identity"] = "^4.2.1"; packageInfo.devDependencies["@azure-tools/test-recorder"] = "^3.0.0"; packageInfo.devDependencies["@azure-tools/test-credential"] = "^1.1.0"; - packageInfo.devDependencies["mocha"] = "^10.0.0"; + packageInfo.devDependencies["mocha"] = "^11.0.2"; packageInfo.devDependencies["@types/mocha"] = "^10.0.0"; packageInfo.devDependencies["tsx"] = "^4.7.1"; packageInfo.devDependencies["@types/chai"] = "^4.2.8"; diff --git a/packages/autorest.typescript/test/integration/generated/additionalProperties/package.json b/packages/autorest.typescript/test/integration/generated/additionalProperties/package.json index 7f5a238616..abf5474af8 100644 --- a/packages/autorest.typescript/test/integration/generated/additionalProperties/package.json +++ b/packages/autorest.typescript/test/integration/generated/additionalProperties/package.json @@ -31,7 +31,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/integration/generated/datasearch/package.json b/packages/autorest.typescript/test/integration/generated/datasearch/package.json index 9c73af4693..ad89383b22 100644 --- a/packages/autorest.typescript/test/integration/generated/datasearch/package.json +++ b/packages/autorest.typescript/test/integration/generated/datasearch/package.json @@ -31,7 +31,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/integration/generated/patterntest/package.json b/packages/autorest.typescript/test/integration/generated/patterntest/package.json index 8535bfde35..650beb91ef 100644 --- a/packages/autorest.typescript/test/integration/generated/patterntest/package.json +++ b/packages/autorest.typescript/test/integration/generated/patterntest/package.json @@ -31,7 +31,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/package.json b/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/package.json index b567b34f73..9f2dfdc33c 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/package.json +++ b/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/package.json @@ -40,7 +40,7 @@ "@azure-tools/test-credential": "^1.1.0", "@azure-tools/test-recorder": "^3.0.0", "nyc": "^15.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "@types/chai": "^4.2.8", "chai": "^4.2.0", diff --git a/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/package.json b/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/package.json index 77eba7e6df..2b4f6e4ee3 100644 --- a/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/package.json +++ b/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/package.json @@ -42,7 +42,7 @@ "@azure-tools/test-credential": "^1.1.0", "@azure-tools/test-recorder": "^3.0.0", "nyc": "^15.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "@types/chai": "^4.2.8", "chai": "^4.2.0", diff --git a/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/package.json b/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/package.json index 9dee610d38..f2bb39da05 100644 --- a/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/package.json +++ b/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/package.json @@ -42,7 +42,7 @@ "@azure-tools/test-credential": "^1.1.0", "@azure-tools/test-recorder": "^3.0.0", "nyc": "^15.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "@types/chai": "^4.2.8", "chai": "^4.2.0", diff --git a/packages/autorest.typescript/test/smoke/generated/arm-package-subscriptions-2019-06/package.json b/packages/autorest.typescript/test/smoke/generated/arm-package-subscriptions-2019-06/package.json index e371d31a79..b78d644fc8 100644 --- a/packages/autorest.typescript/test/smoke/generated/arm-package-subscriptions-2019-06/package.json +++ b/packages/autorest.typescript/test/smoke/generated/arm-package-subscriptions-2019-06/package.json @@ -33,7 +33,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/compute-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/compute-resource-manager/package.json index f38edc9f9b..8868ccb6ba 100644 --- a/packages/autorest.typescript/test/smoke/generated/compute-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/compute-resource-manager/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/keyvault-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/keyvault-resource-manager/package.json index 2be3606e07..022c8b00a3 100644 --- a/packages/autorest.typescript/test/smoke/generated/keyvault-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/keyvault-resource-manager/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/msi-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/msi-resource-manager/package.json index 186bb2a5ba..d94998126b 100644 --- a/packages/autorest.typescript/test/smoke/generated/msi-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/msi-resource-manager/package.json @@ -33,7 +33,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/network-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/network-resource-manager/package.json index b134f38f1b..bc41d039eb 100644 --- a/packages/autorest.typescript/test/smoke/generated/network-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/network-resource-manager/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/sql-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/sql-resource-manager/package.json index 9983e581b7..c1f4994e0e 100644 --- a/packages/autorest.typescript/test/smoke/generated/sql-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/sql-resource-manager/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/storage-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/storage-resource-manager/package.json index 69a2b8bab4..927d99d53c 100644 --- a/packages/autorest.typescript/test/smoke/generated/storage-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/storage-resource-manager/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/autorest.typescript/test/smoke/generated/web-resource-manager/package.json b/packages/autorest.typescript/test/smoke/generated/web-resource-manager/package.json index 899b03c723..f0dc2e601e 100644 --- a/packages/autorest.typescript/test/smoke/generated/web-resource-manager/package.json +++ b/packages/autorest.typescript/test/smoke/generated/web-resource-manager/package.json @@ -35,7 +35,7 @@ "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", + "mocha": "^11.0.2", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", diff --git a/packages/rlc-common/src/metadata/packageJson/azurePackageCommon.ts b/packages/rlc-common/src/metadata/packageJson/azurePackageCommon.ts index 3b95e0296c..4420f5eba6 100644 --- a/packages/rlc-common/src/metadata/packageJson/azurePackageCommon.ts +++ b/packages/rlc-common/src/metadata/packageJson/azurePackageCommon.ts @@ -96,7 +96,7 @@ function getAzurePackageCjsDevDependencies({ "@azure-tools/test-credential": "^1.1.0", "@azure-tools/test-recorder": "^3.0.0", nyc: "^15.1.0", - mocha: "^10.0.0", + mocha: "^11.0.2", "@types/mocha": "^10.0.0", "@types/chai": "^4.2.8", chai: "^4.2.0", diff --git a/packages/rlc-common/src/metadata/packageJson/buildAzureMonorepoPackage.ts b/packages/rlc-common/src/metadata/packageJson/buildAzureMonorepoPackage.ts index 36e3786d6b..6ee6758f52 100644 --- a/packages/rlc-common/src/metadata/packageJson/buildAzureMonorepoPackage.ts +++ b/packages/rlc-common/src/metadata/packageJson/buildAzureMonorepoPackage.ts @@ -132,7 +132,7 @@ function getCjsDevDependencies({ if (withTests) { testDevDependencies = { dotenv: "^16.0.0", - mocha: "^10.0.0", + mocha: "^11.0.2", "@types/mocha": "^10.0.0", "@types/chai": "^4.2.8", chai: "^4.2.0",