Skip to content

Commit

Permalink
[arm] Precise Typechecking (#32181)
Browse files Browse the repository at this point in the history
### Packages impacted by this PR
- @azure/arm-computefleet
- @azure/arm-computeschedule
- @azure/arm-connectedcache
- @azure/arm-devopsinfrastructure
- @azure/arm-edgezones
- @azure/arm-fabric
- @azure/arm-iotoperations
- @azure/arm-containerorchestratorruntime
- @azure/arm-mongocluster
- @azure/arm-neonpostgres
- @azure/arm-standbypool
- @azure/arm-terraform
- @azure/arm-trustedsigning

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
Tests are not being typechecked and linting isn't configured correctly.
This PR migrates those libraries to precise typechecking setup
introduced in #31786

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

### Are there test cases added in this PR? _(If not, why?)_
N/A

### Provide a list of related PRs _(if any)_
#31786

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
  • Loading branch information
deyaaeldeen authored Dec 12, 2024
1 parent 22422a6 commit b22eafc
Show file tree
Hide file tree
Showing 104 changed files with 376 additions and 553 deletions.
16 changes: 0 additions & 16 deletions sdk/computefleet/arm-computefleet/eslint.config.mjs

This file was deleted.

13 changes: 3 additions & 10 deletions sdk/computefleet/arm-computefleet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"browser",
"react-native"
],
"selfLink": false
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
Expand Down Expand Up @@ -92,7 +93,7 @@
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
Expand All @@ -116,44 +117,36 @@
"./package.json": "./package.json",
".": {
"browser": {
"source": "./src/index.ts",
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.js"
},
"react-native": {
"source": "./src/index.ts",
"types": "./dist/react-native/index.d.ts",
"default": "./dist/react-native/index.js"
},
"import": {
"source": "./src/index.ts",
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"source": "./src/index.ts",
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
},
"./models": {
"browser": {
"source": "./src/models/index.ts",
"types": "./dist/browser/models/index.d.ts",
"default": "./dist/browser/models/index.js"
},
"react-native": {
"source": "./src/models/index.ts",
"types": "./dist/react-native/models/index.d.ts",
"default": "./dist/react-native/models/index.js"
},
"import": {
"source": "./src/models/index.ts",
"types": "./dist/esm/models/index.d.ts",
"default": "./dist/esm/models/index.js"
},
"require": {
"source": "./src/models/index.ts",
"types": "./dist/commonjs/models/index.d.ts",
"default": "./dist/commonjs/models/index.js"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./.tshy/build.json",
"include": ["./src/**/*.ts", "./src/**/*.mts", "./test/**/*.spec.ts"],
"exclude": ["./test/**/node/**/*.ts"],
"compilerOptions": {
"outDir": "./dist-test/browser",
"rootDir": ".",
"skipLibCheck": true
}
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"]
}
23 changes: 6 additions & 17 deletions sdk/computefleet/arm-computefleet/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"rootDir": ".",
"skipLibCheck": true,
"paths": {
"@azure/arm-computefleet": ["./src/index"]
}
},
"include": [
"./src/**/*.ts",
"./src/**/*.mts",
"./src/**/*.cts",
"test/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
]
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.samples.json" },
{ "path": "./tsconfig.test.json" }
],
"files": []
}
8 changes: 8 additions & 0 deletions sdk/computefleet/arm-computefleet/tsconfig.samples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.samples.base.json",
"compilerOptions": {
"paths": {
"@azure/arm-computefleet": ["./dist/esm"]
}
}
}
3 changes: 3 additions & 0 deletions sdk/computefleet/arm-computefleet/tsconfig.src.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.lib.json"
}
3 changes: 3 additions & 0 deletions sdk/computefleet/arm-computefleet/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"]
}
5 changes: 5 additions & 0 deletions sdk/computefleet/arm-computefleet/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { relativeRecordingsPath } from "@azure-tools/test-recorder";

export default defineConfig({
test: {
typecheck: {
enabled: true,
tsconfig: "tsconfig.test.json",
include: ["test/**/*.ts", "test/**/*.mts", "test/**/*.cts"],
},
reporters: ["basic", "junit"],
outputFile: {
junit: "test-results.browser.xml",
Expand Down
16 changes: 0 additions & 16 deletions sdk/computeschedule/arm-computeschedule/eslint.config.mjs

This file was deleted.

5 changes: 3 additions & 2 deletions sdk/computeschedule/arm-computeschedule/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"browser",
"react-native"
],
"selfLink": false
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
Expand Down Expand Up @@ -91,7 +92,7 @@
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./.tshy/build.json",
"include": ["./src/**/*.ts", "./src/**/*.mts", "./test/**/*.spec.ts"],
"exclude": ["./test/**/node/**/*.ts"],
"compilerOptions": {
"outDir": "./dist-test/browser",
"rootDir": ".",
"skipLibCheck": true
}
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"]
}
21 changes: 6 additions & 15 deletions sdk/computeschedule/arm-computeschedule/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"rootDir": ".",
"skipLibCheck": true,
"paths": { "@azure/arm-computeschedule": ["./src/index"] }
},
"include": [
"./src/**/*.ts",
"./src/**/*.mts",
"./src/**/*.cts",
"test/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
]
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.samples.json" },
{ "path": "./tsconfig.test.json" }
],
"files": []
}
8 changes: 8 additions & 0 deletions sdk/computeschedule/arm-computeschedule/tsconfig.samples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.samples.base.json",
"compilerOptions": {
"paths": {
"@azure/arm-computeschedule": ["./dist/esm"]
}
}
}
3 changes: 3 additions & 0 deletions sdk/computeschedule/arm-computeschedule/tsconfig.src.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.lib.json"
}
3 changes: 3 additions & 0 deletions sdk/computeschedule/arm-computeschedule/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"]
}
5 changes: 5 additions & 0 deletions sdk/computeschedule/arm-computeschedule/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { relativeRecordingsPath } from "@azure-tools/test-recorder";

export default defineConfig({
test: {
typecheck: {
enabled: true,
tsconfig: "tsconfig.test.json",
include: ["test/**/*.ts", "test/**/*.mts", "test/**/*.cts"],
},
reporters: ["basic", "junit"],
outputFile: {
junit: "test-results.browser.xml",
Expand Down
16 changes: 0 additions & 16 deletions sdk/connectedcache/arm-connectedcache/eslint.config.mjs

This file was deleted.

5 changes: 3 additions & 2 deletions sdk/connectedcache/arm-connectedcache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"browser",
"react-native"
],
"selfLink": false
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
Expand Down Expand Up @@ -94,7 +95,7 @@
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./.tshy/build.json",
"include": ["src/**/*.ts", "src/**/*.mts", "test/**/*.spec.ts"],
"exclude": ["test/**/node/**/*.ts"],
"compilerOptions": {
"outDir": "./dist-test/browser",
"rootDir": ".",
"skipLibCheck": true
}
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"]
}
21 changes: 6 additions & 15 deletions sdk/connectedcache/arm-connectedcache/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"rootDir": ".",
"skipLibCheck": true,
"paths": { "@azure/arm-connectedcache": ["./src/index"] }
},
"include": [
"src/**/*.ts",
"src/**/*.mts",
"src/**/*.cts",
"test/**/*.ts",
"test/**/*.ts",
"samples-dev/**/*.ts"
]
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.samples.json" },
{ "path": "./tsconfig.test.json" }
],
"files": []
}
8 changes: 8 additions & 0 deletions sdk/connectedcache/arm-connectedcache/tsconfig.samples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.samples.base.json",
"compilerOptions": {
"paths": {
"@azure/arm-connectedcache": ["./dist/esm"]
}
}
}
3 changes: 3 additions & 0 deletions sdk/connectedcache/arm-connectedcache/tsconfig.src.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.lib.json"
}
3 changes: 3 additions & 0 deletions sdk/connectedcache/arm-connectedcache/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"]
}
5 changes: 5 additions & 0 deletions sdk/connectedcache/arm-connectedcache/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { relativeRecordingsPath } from "@azure-tools/test-recorder";

export default defineConfig({
test: {
typecheck: {
enabled: true,
tsconfig: "tsconfig.test.json",
include: ["test/**/*.ts", "test/**/*.mts", "test/**/*.cts"],
},
reporters: ["basic", "junit"],
outputFile: {
junit: "test-results.browser.xml",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"browser",
"react-native"
],
"selfLink": false
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
Expand Down Expand Up @@ -95,7 +96,7 @@
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
Expand Down
Loading

0 comments on commit b22eafc

Please sign in to comment.