Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions plugins/vscode/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
],
"sourceMap": true,
"outDir": "dist",
// `include` reaches into source/ below, and TypeScript 7 infers a
// rootDir of plugins/vscode and rejects those files. The extension is
// bundled by esbuild (see build:ext) and tsc only type-checks this
// project, so widening rootDir to the repo root costs nothing.
"rootDir": "../..",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
Expand Down
5 changes: 4 additions & 1 deletion source/wizards/steps/location-step.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {TitledBoxWithPreferences} from '@/components/ui/titled-box';
import {useResponsiveTerminal} from '@/hooks/useTerminalWidth';
import {renderWithTheme as render} from '@/test-utils/render-with-theme';
import React from 'react';
import stripAnsi from 'strip-ansi';
import {LocationStep} from './location-step.js';

// Mirrors base-config-wizard.tsx's real LocationStep box.
Expand Down Expand Up @@ -70,7 +71,9 @@ test('LocationStep shows the resolved project path next to the option', t => {

const output = lastFrame();
t.truthy(output);
const lines = output!.split('\n');
// The path is rendered dimmed, so the frame carries ANSI escapes whenever
// colour is on - which it is under CI. Compare against the plain text.
const lines = stripAnsi(output!).split('\n');
const stemIndex = lines.findIndex(line =>
line.includes('Current project directory'),
);
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
"declarationMap": true,
"sourceMap": true,
"types": ["node"],
"baseUrl": ".",
// TypeScript 7 removed `baseUrl` and rejects non-relative `paths`
// targets, so these resolve relative to this file instead.
"paths": {
"@/*": ["source/*"],
"@/*": ["./source/*"],
// The real `vscode` module only exists inside the extension host, so
// AVA (which loads specs through tsx, and tsx honours these paths)
// resolves it to a stub. Test-only: the extension is bundled from
// plugins/vscode/tsconfig.json with `--external:vscode`, and nothing
// under source/ imports it.
"vscode": ["plugins/vscode/test-stubs/vscode.ts"]
"vscode": ["./plugins/vscode/test-stubs/vscode.ts"]
}
},
"include": ["source/**/*"],
Expand Down
Loading