Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mgmt] migrate mgmt package to esm 10 #32546

Merged
merged 64 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8ccf30a
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Dec 27, 2024
4104624
Migration: Update test config
kazrael2119 Dec 27, 2024
41c9b39
Migration: Clean up files
kazrael2119 Dec 27, 2024
0d3ac99
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Dec 27, 2024
7919382
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Dec 27, 2024
a5ed6c3
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Dec 27, 2024
290c8f6
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Dec 27, 2024
5f5b6be
Migration: Apply codemod: "addViHelper"
kazrael2119 Dec 27, 2024
ab571a0
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Dec 27, 2024
6d1feca
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Dec 27, 2024
bdb2a6c
Migration: rushx format
kazrael2119 Dec 27, 2024
ac9877d
update
kazrael2119 Dec 27, 2024
5b06b7d
merge main
kazrael2119 Jan 14, 2025
f8e1107
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 14, 2025
971dcc4
Migration: Update test config
kazrael2119 Jan 14, 2025
7b62e98
Migration: Clean up files
kazrael2119 Jan 14, 2025
8cefd72
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 14, 2025
b947abb
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 14, 2025
504a69c
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 14, 2025
801a6d7
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 14, 2025
967dd60
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 14, 2025
0224ad1
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 14, 2025
1f73639
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 14, 2025
b735700
Migration: rushx format
kazrael2119 Jan 14, 2025
8744ccc
update
kazrael2119 Jan 14, 2025
d54bc7f
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 14, 2025
605ac38
Migration: Update test config
kazrael2119 Jan 14, 2025
955785c
Migration: Clean up files
kazrael2119 Jan 14, 2025
46ad196
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 14, 2025
b960c68
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 14, 2025
723515f
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 14, 2025
2d0c1f7
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 14, 2025
328ee01
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 14, 2025
e2f24a8
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 14, 2025
1a77699
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 14, 2025
1ca36c8
Migration: rushx format
kazrael2119 Jan 14, 2025
8a3f645
update
kazrael2119 Jan 14, 2025
611bee3
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 14, 2025
16611a9
Migration: Update test config
kazrael2119 Jan 14, 2025
0bc630c
Migration: Clean up files
kazrael2119 Jan 14, 2025
07ff736
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 14, 2025
81c21a7
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 14, 2025
c945011
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 14, 2025
46b017a
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 14, 2025
8d159a9
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 14, 2025
43b3014
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 14, 2025
70f92be
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 14, 2025
0c3c7a1
Migration: rushx format
kazrael2119 Jan 14, 2025
cc0a76b
update
kazrael2119 Jan 14, 2025
cfe600f
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 14, 2025
ea3e4a0
Migration: Update test config
kazrael2119 Jan 14, 2025
560c51a
Migration: Clean up files
kazrael2119 Jan 14, 2025
d28d394
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 14, 2025
068869d
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 14, 2025
f9a6766
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 14, 2025
768c3d0
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 14, 2025
f0b8810
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 14, 2025
98acd6b
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 14, 2025
735fa96
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 14, 2025
e7b9395
Migration: rushx format
kazrael2119 Jan 14, 2025
257e349
update
kazrael2119 Jan 14, 2025
d3f29ae
Update dataprotection_operations_test.spec.ts
kazrael2119 Jan 14, 2025
bd9b5bd
merge main
kazrael2119 Jan 15, 2025
12e09e3
update
kazrael2119 Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
223 changes: 135 additions & 88 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sdk/datadog/arm-datadog/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
Expand All @@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-datadog.d.ts"
"publicTrimmedFilePath": "dist/arm-datadog.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
84 changes: 57 additions & 27 deletions sdk/datadog/arm-datadog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@
"isomorphic"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-datadog.d.ts",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^1.0.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
"@azure-tools/test-utils-vitest": "^1.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@types/chai": "^4.2.8",
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"chai": "^4.2.0",
"@vitest/browser": "^2.1.8",
"@vitest/coverage-istanbul": "^2.1.8",
"dotenv": "^16.0.0",
"mocha": "^11.0.2",
"ts-node": "^10.0.0",
"typescript": "~5.7.2"
"playwright": "^1.49.1",
"typescript": "~5.7.2",
"vitest": "^2.1.8"
},
"repository": {
"type": "git",
Expand All @@ -49,24 +49,14 @@
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
"dist-esm/**/*.js",
"dist-esm/**/*.js.map",
"dist-esm/**/*.d.ts",
"dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"dist/",
"README.md",
"LICENSE",
"tsconfig.json",
"review/*",
"CHANGELOG.md",
"types/*"
"review/",
"CHANGELOG.md"
],
"scripts": {
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api",
"build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
Expand All @@ -78,7 +68,7 @@
"format": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:node": "dev-tool run test:vitest --esm",
"lint": "echo skipped",
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"pack": "npm pack 2>&1",
Expand All @@ -88,7 +78,7 @@
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"sideEffects": false,
Expand All @@ -109,5 +99,45 @@
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-datadog?view=azure-node-preview"
},
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false
},
"browser": "./dist/browser/index.js",
"react-native": "./dist/react-native/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"browser": {
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.js"
},
"react-native": {
"types": "./dist/react-native/index.d.ts",
"default": "./dist/react-native/index.js"
},
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Informs if the current subscription is being already monitored for selected Datadog organization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Informs if the current subscription is being already monitored for selected Datadog organization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {
MicrosoftDatadogClient
} from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Create Datadog marketplace agreement in the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List Datadog marketplace agreements in the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {
MicrosoftDatadogClient
} from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Add the subscriptions that should be monitored by the Datadog monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Updates the subscriptions that are being monitored by the Datadog monitor resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List the subscriptions currently being monitored by the Datadog monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List the subscriptions currently being monitored by the Datadog monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {
MicrosoftDatadogClient
} from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Updates the subscriptions that are being monitored by the Datadog monitor resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {
MicrosoftDatadogClient
} from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Create a monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Delete a monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Get the default api key.
Expand Down
4 changes: 1 addition & 3 deletions sdk/datadog/arm-datadog/samples-dev/monitorsGetSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Get the properties of a specific monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List the api keys for a given monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List all monitors under the specified resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List the hosts for a given monitor resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List all Azure resources associated to the same Datadog organization as the target resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List the resources currently being monitored by the Datadog monitor resource.
Expand Down
4 changes: 1 addition & 3 deletions sdk/datadog/arm-datadog/samples-dev/monitorsListSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to List all monitors under the specified subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Refresh the set password link and return a latest one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {
MicrosoftDatadogClient
} from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Set the default api key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {
MicrosoftDatadogClient
} from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

dotenv.config();
import "dotenv/config";

/**
* This sample demonstrates how to Update a monitor resource.
Expand Down
Loading
Loading