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 7 #32363

Merged
merged 65 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4c7e78c
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Dec 26, 2024
d940701
Migration: Update test config
kazrael2119 Dec 26, 2024
756936b
Migration: Clean up files
kazrael2119 Dec 26, 2024
3f53d53
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Dec 26, 2024
4f82a29
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Dec 26, 2024
118a8e9
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Dec 26, 2024
fc1e00a
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Dec 26, 2024
4fddff6
Migration: Apply codemod: "addViHelper"
kazrael2119 Dec 26, 2024
63667f5
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Dec 26, 2024
f320abf
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Dec 26, 2024
ab222c6
Migration: rushx format
kazrael2119 Dec 26, 2024
0d23a1e
update
kazrael2119 Dec 26, 2024
d0766ed
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Dec 26, 2024
efb0119
Migration: Update test config
kazrael2119 Dec 26, 2024
4541fcf
Migration: Clean up files
kazrael2119 Dec 26, 2024
af13220
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Dec 26, 2024
dfb3606
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Dec 26, 2024
4a3e5c6
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Dec 26, 2024
a99d380
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Dec 26, 2024
1eab920
Migration: Apply codemod: "addViHelper"
kazrael2119 Dec 26, 2024
437bfa1
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Dec 26, 2024
5e5bdf1
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Dec 26, 2024
638c405
Migration: rushx format
kazrael2119 Dec 26, 2024
b3e24ee
update
kazrael2119 Dec 26, 2024
da23e4c
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Dec 26, 2024
38accc3
Migration: Update test config
kazrael2119 Dec 26, 2024
52b0436
Migration: Clean up files
kazrael2119 Dec 26, 2024
9177a77
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Dec 26, 2024
8aa302d
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Dec 26, 2024
a72c260
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Dec 26, 2024
9e35e7a
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Dec 26, 2024
d57f9d0
Migration: Apply codemod: "addViHelper"
kazrael2119 Dec 26, 2024
2efa96f
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Dec 26, 2024
534d3b6
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Dec 26, 2024
e262406
Migration: rushx format
kazrael2119 Dec 26, 2024
68f0a10
update
kazrael2119 Dec 26, 2024
6d4ea28
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Dec 26, 2024
7ba78d8
Migration: Update test config
kazrael2119 Dec 26, 2024
94cee64
Migration: Clean up files
kazrael2119 Dec 26, 2024
33963f8
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Dec 26, 2024
6336305
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Dec 26, 2024
6cfd194
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Dec 26, 2024
1d15e2a
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Dec 26, 2024
c937032
Migration: Apply codemod: "addViHelper"
kazrael2119 Dec 26, 2024
c89a2b4
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Dec 26, 2024
77e1c11
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Dec 26, 2024
1c96f61
Migration: rushx format
kazrael2119 Dec 26, 2024
dde2c72
update
kazrael2119 Dec 26, 2024
95d9483
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Dec 26, 2024
e272897
Migration: Update test config
kazrael2119 Dec 26, 2024
a7161de
Migration: Clean up files
kazrael2119 Dec 26, 2024
0a352b3
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Dec 26, 2024
a1d7406
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Dec 26, 2024
1038fe0
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Dec 26, 2024
2cfaf09
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Dec 26, 2024
16a5ce1
Migration: Apply codemod: "addViHelper"
kazrael2119 Dec 26, 2024
f1cbcc1
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Dec 26, 2024
bd7b755
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Dec 26, 2024
a6e6236
Migration: rushx format
kazrael2119 Dec 26, 2024
8f6f42c
update
kazrael2119 Dec 26, 2024
d362bc4
update
kazrael2119 Dec 27, 2024
e2e97a0
update
kazrael2119 Jan 3, 2025
21963dd
update
kazrael2119 Jan 3, 2025
41f179b
Merge branch 'main' into migrate-mgmt7
kazrael2119 Jan 10, 2025
82339d5
Update pnpm-lock.yaml
kazrael2119 Jan 10, 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
  •  
  •  
  •  
192 changes: 123 additions & 69 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sdk/consumption/arm-consumption/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-consumption.d.ts"
"publicTrimmedFilePath": "dist/arm-consumption.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
84 changes: 57 additions & 27 deletions sdk/consumption/arm-consumption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"isomorphic"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-consumption.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 @@ -47,24 +47,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 @@ -76,7 +66,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 @@ -86,7 +76,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 @@ -107,5 +97,45 @@
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-consumption?view=azure-node-preview"
},
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
qiaozha marked this conversation as resolved.
Show resolved Hide resolved
"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 @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Provides the aggregate cost of a management group and all child management groups by current billing period.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Provides the aggregate cost of a management group and all child management groups by specified billing period
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Budget, ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to The operation to delete a budget.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Gets the budget for the scope by budget name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists all budgets for the defined scope.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists the charges based for the defined scope.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to The credit summary by billingAccountId and billingProfileId.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile. Microsoft Azure consumption commitments are only supported for the billing account scope.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile. Microsoft Azure consumption commitments are only supported for the billing account scope.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Details of a reservation recommendation for what-if analysis of reserved instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to List of recommendations for purchasing reserved instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to List of transactions for reserved instances on billing account scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import {
ConsumptionManagementClient
} from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to List of transactions for reserved instances on billing account scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConsumptionManagementClient } from "@azure/arm-consumption";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";

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

/**
* This sample demonstrates how to Lists the reservations details for provided date range.
Expand Down
Loading
Loading