Skip to content

Commit c2e2e99

Browse files
l0lawrenceCopilot
andcommitted
Allow .ts extension imports in eng typecheck
Running emitter-diff with plain node requires .ts import specifiers, but the repo-wide check:eng gate (tsconfig.eng.json, --noEmit) rejected them. Enable allowImportingTsExtensions there so the tool stays covered by the existing typecheck. Also reword the ensureDeps comment: http-client-python commits its own package-lock.json to the repo (lockfiles aren't in the published tarball), which is why npm ci works on a source checkout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 722e756 commit c2e2e99

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

eng/emitter-diff/src/adapters/python.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ async function isBuilt(dir: string): Promise<boolean> {
5656
* Ensure the package's npm dependencies are installed. A fresh source checkout
5757
* (a github clone or a bare local path) has no `node_modules`, so `npm run
5858
* build` would fail to resolve its types/deps. http-client-python is
59-
* npm-managed (it ships its own package-lock.json), so `npm ci` here is safe.
59+
* npm-managed and commits its own package-lock.json to the repo, so a source
60+
* checkout already has the lockfile that `npm ci` needs.
6061
*/
6162
async function ensureDeps(dir: string, ctx: AdapterContext): Promise<void> {
6263
if (existsSync(join(dir, "node_modules"))) return;

tsconfig.eng.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"allowImportingTsExtensions": true
5+
},
36
"include": ["eng"],
47
"exclude": ["eng/vitest.config.ts"]
58
}

0 commit comments

Comments
 (0)