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

[eng/tools] Use TypeScript project references #31213

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ eng/tools/**/dist
!eng/tools/**/cmd/*.js
!eng/tools/**/eslint.config.js

# TypeScript cache
*.tsbuildinfo
mikeharder marked this conversation as resolved.
Show resolved Hide resolved

# No package-lock.json files should be commited except the top-level.
**/package-lock.json
!/package-lock.json
Expand Down
4 changes: 4 additions & 0 deletions eng/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
"@azure-tools/typespec-requirement": "file:typespec-requirement",
"@azure-tools/typespec-validation": "file:typespec-validation"
},
"scripts": {
"build": "tsc -b",
"postinstall": "npm run build"
},
"private": true
}
1 change: 0 additions & 1 deletion eng/tools/specs-model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"scripts": {
"build": "tsc",
"postinstall": "npm run build",
"test": "vitest",
"test:ci": "vitest run --coverage --reporter=verbose",
"lint": "eslint . -c eslint.config.js --report-unused-disable-directives --max-warnings 0",
Expand Down
1 change: 0 additions & 1 deletion eng/tools/suppressions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"scripts": {
"build": "tsc",
"postinstall": "npm run build",
"test": "vitest",
"test:ci": "vitest run --coverage --reporter=verbose"
},
Expand Down
14 changes: 12 additions & 2 deletions eng/tools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
"module": "Node16",

// override "importHelpers:true" in root tsconfig.json
"importHelpers": false
}
"importHelpers": false,

// required to use project references
"composite": true,
},
"references": [
{ "path": "./specs-model" },
{ "path": "./suppressions" },
{ "path": "./tsp-client-tests" },
{ "path": "./typespec-requirement" },
{ "path": "./typespec-validation" }
]
}
1 change: 0 additions & 1 deletion eng/tools/tsp-client-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"scripts": {
"build": "tsc",
"postinstall": "npm run build",
"test": "vitest",
"test:ci": "vitest run --reporter=verbose"
},
Expand Down
1 change: 0 additions & 1 deletion eng/tools/typespec-requirement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"scripts": {
"build": "tsc",
"postinstall": "npm run build",
"test": "vitest",
"test:ci": "vitest run --reporter=verbose"
},
Expand Down
1 change: 0 additions & 1 deletion eng/tools/typespec-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"scripts": {
"build": "tsc",
"postinstall": "cd ../suppressions && npm run build && cd ../typespec-validation && npm run build",
"test": "vitest",
"test:ci": "vitest run --coverage --reporter=verbose"
},
Expand Down
5 changes: 4 additions & 1 deletion eng/tools/typespec-validation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
}
},
"references": [
{ "path": "../suppressions" }
]
}