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 12 #32548

Merged
merged 62 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
37d5531
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 14, 2025
120b3c9
Migration: Update test config
kazrael2119 Jan 14, 2025
5b2b49e
Migration: Clean up files
kazrael2119 Jan 14, 2025
e55e5c8
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 14, 2025
44a72ea
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 14, 2025
a2d5234
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 14, 2025
824dd59
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 14, 2025
f1491f2
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 14, 2025
cd8d128
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 14, 2025
5784991
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 14, 2025
af6b87c
Migration: rushx format
kazrael2119 Jan 14, 2025
d6904bf
update
kazrael2119 Jan 14, 2025
4fbec62
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 14, 2025
65edc3a
Migration: Update test config
kazrael2119 Jan 14, 2025
8b0883d
Migration: Clean up files
kazrael2119 Jan 14, 2025
033e8c3
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 14, 2025
3fc9d92
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 14, 2025
0311f4b
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 14, 2025
6c49c58
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 14, 2025
22e185e
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 14, 2025
c95773b
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 14, 2025
1be0df0
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 14, 2025
9a364d2
Migration: rushx format
kazrael2119 Jan 14, 2025
db5f657
update
kazrael2119 Jan 15, 2025
8fb3939
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 15, 2025
3bd41dc
Migration: Update test config
kazrael2119 Jan 15, 2025
425fcb4
Migration: Clean up files
kazrael2119 Jan 15, 2025
753da64
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 15, 2025
f8cb8ca
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 15, 2025
87cff7f
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 15, 2025
41b6170
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 15, 2025
cbb4a5d
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 15, 2025
525a1d7
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 15, 2025
d0298db
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 15, 2025
95718d5
Migration: rushx format
kazrael2119 Jan 15, 2025
50c6803
update
kazrael2119 Jan 15, 2025
4bebcad
merge main
kazrael2119 Jan 15, 2025
ad6ec2a
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 15, 2025
4036d05
Migration: Update test config
kazrael2119 Jan 15, 2025
9967310
Migration: Clean up files
kazrael2119 Jan 15, 2025
9cdff8b
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 15, 2025
867d4ae
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 15, 2025
ae03d51
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 15, 2025
9e0ddfe
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 15, 2025
b894bda
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 15, 2025
82be988
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 15, 2025
75fe4a2
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 15, 2025
79734e6
Migration: rushx format
kazrael2119 Jan 15, 2025
f38bdf7
update
kazrael2119 Jan 15, 2025
c5fc53c
Migration: Update package.json, tsconfig.json, and api-extractor.json
kazrael2119 Jan 15, 2025
34203fd
Migration: Update test config
kazrael2119 Jan 15, 2025
016aa45
Migration: Clean up files
kazrael2119 Jan 15, 2025
1540dc2
Migration: Apply codemod: "fixSourceFile"
kazrael2119 Jan 15, 2025
597abc5
Migration: Apply codemod: "fixTestingImports"
kazrael2119 Jan 15, 2025
ed3d9d0
Migration: Apply codemod: "replaceAssertIsRejected"
kazrael2119 Jan 15, 2025
c2c29db
Migration: Apply codemod: "replaceSinonStub"
kazrael2119 Jan 15, 2025
3475de9
Migration: Apply codemod: "addViHelper"
kazrael2119 Jan 15, 2025
d727b98
Migration: Apply codemod: "replaceSupportTracing"
kazrael2119 Jan 15, 2025
470f3f8
Migration: Apply codemod: "replaceTestUtils"
kazrael2119 Jan 15, 2025
bfd6fb5
Migration: rushx format
kazrael2119 Jan 15, 2025
2cee759
update
kazrael2119 Jan 15, 2025
193a26c
merge main
kazrael2119 Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Migration: Update package.json, tsconfig.json, and api-extractor.json
  • Loading branch information
kazrael2119 committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 4fbec62b54ee94bc67ac3ec5506fb8400a13c84d
6 changes: 3 additions & 3 deletions sdk/deviceupdate/arm-deviceupdate/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
},
@@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-deviceupdate.d.ts"
"publicTrimmedFilePath": "dist/arm-deviceupdate.d.ts"
},
"messages": {
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
}
}
}
}
}
59 changes: 34 additions & 25 deletions sdk/deviceupdate/arm-deviceupdate/package.json
Original file line number Diff line number Diff line change
@@ -28,18 +28,18 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-deviceupdate.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",
@@ -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.",
@@ -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",
@@ -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,
@@ -109,5 +99,24 @@
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-deviceupdate?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"
}
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ describe("DeviceUpdate test", () => {

it("accounts delete test", async function () {
const resArray = new Array();
const res = await client.accounts.beginDeleteAndWait(resourceGroup, resourcename
await client.accounts.beginDeleteAndWait(resourceGroup, resourcename
)
for await (let item of client.accounts.listByResourceGroup(resourceGroup)) {
resArray.push(item);
40 changes: 10 additions & 30 deletions sdk/deviceupdate/arm-deviceupdate/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,13 @@
{
"compilerOptions": {
"module": "es6",
"moduleResolution": "node",
"strict": true,
"target": "es6",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"es6",
"dom"
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-deviceupdate": [
"./src/index"
]
"references": [
{
"path": "./tsconfig.src.json"
},
{
"path": "./tsconfig.samples.json"
},
{
"path": "./tsconfig.test.json"
}
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
],
"exclude": [
"node_modules"
]
}
}
10 changes: 10 additions & 0 deletions sdk/deviceupdate/arm-deviceupdate/tsconfig.samples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../../tsconfig.samples.base.json",
"compilerOptions": {
"paths": {
"@azure/arm-deviceupdate": [
"./dist/esm"
]
}
}
}
3 changes: 3 additions & 0 deletions sdk/deviceupdate/arm-deviceupdate/tsconfig.src.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.lib.json"
}
6 changes: 6 additions & 0 deletions sdk/deviceupdate/arm-deviceupdate/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"./tsconfig.src.json",
"../../../tsconfig.test.base.json"
]
}