Skip to content

Commit 792d8f9

Browse files
committed
update scripts to delete problematic development proposal
1 parent 00e9a54 commit 792d8f9

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

Extension/.scripts/common.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const Git = async (...args: Parameters<Awaited<CommandFunction>>) => (awa
4848
export const GitClean = async (...args: Parameters<Awaited<CommandFunction>>) => (await new Command(await git, 'clean'))(...args);
4949

5050
export async function getModifiedIgnoredFiles() {
51-
const {code, error, stdio } = await GitClean('-Xd', '-n');
51+
const { code, error, stdio } = await GitClean('-Xd', '-n');
5252
if (code) {
5353
throw new Error(`\n${error.all().join('\n')}`);
5454
}
@@ -65,11 +65,11 @@ export async function rimraf(...paths: string[]) {
6565
}
6666
if (await filepath.isFolder(each)) {
6767
verbose(`Removing folder ${red(each)}`);
68-
all.push(rm(each, {recursive: true, force: true}));
68+
all.push(rm(each, { recursive: true, force: true }));
6969
continue;
7070
}
7171
verbose(`Removing file ${red(each)}`);
72-
all.push(rm(each, {force: true}));
72+
all.push(rm(each, { force: true }));
7373
}
7474
await Promise.all(all);
7575
}
@@ -345,3 +345,15 @@ export async function checkBinaries() {
345345
}
346346
return failing;
347347
}
348+
349+
export async function checkProposals() {
350+
let failing = false;
351+
352+
await rm(`${$root}/vscode.proposed.chatParticipantAdditions.d.ts`);
353+
failing = await assertAnyFile('vscode.proposed.chatParticipantAdditions.d.ts') && (quiet || warn(`The VSCode import file '${$root}/vscode.proposed.chatParticipantAdditions.d.ts' should not be present.`)) || failing;
354+
355+
if (!failing) {
356+
verbose('VSCode proposals appear to be in place.');
357+
}
358+
return failing;
359+
}

Extension/.scripts/verify.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See 'LICENSE' in the project root for license information.
44
* ------------------------------------------------------------------------------------------ */
55

6-
import { checkBinaries, checkCompiled, checkDTS, checkPrep, error, green } from './common';
6+
import { checkBinaries, checkCompiled, checkDTS, checkPrep, checkProposals, error, green } from './common';
77
const quiet = process.argv.includes('--quiet');
88

99
export async function main() {
@@ -50,3 +50,12 @@ export async function dts() {
5050
process.exit(1);
5151
}
5252
}
53+
54+
export async function proposals() {
55+
let failing = false;
56+
failing = (await checkProposals() && (quiet || error(`Issue with VSCode proposals. Run ${green('yarn prep')} to fix it.`))) || failing;
57+
58+
if (failing) {
59+
process.exit(1);
60+
}
61+
}

Extension/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6528,7 +6528,6 @@
65286528
"lint": "yarn install && eslint -c .eslintrc.js --report-unused-disable-directives src test ui .scripts",
65296529
"compile": "yarn install && (yarn verify prep --quiet || yarn prep) && yarn build",
65306530
"watch": "yarn install && (yarn verify prep --quiet || yarn prep) && tsc --build tsconfig.json --watch",
6531-
"watch-dev": "yarn install && yarn prep:dts-dev && tsc --build tsconfig.json --watch",
65326531
"rebuild": "yarn install && yarn clean && yarn prep && yarn build",
65336532
"vsix-prepublish": "yarn install && yarn clean && yarn webpack",
65346533
"webpack": "yarn install && (yarn verify prep --quiet || yarn prep) && tsc --build ui.tsconfig.json && webpack --mode production --env vscode_nls",
@@ -6539,10 +6538,8 @@
65396538
"translations-generate": "set NODE_OPTIONS=--no-experimental-fetch && gulp translations-generate",
65406539
"translations-import": "gulp translations-import",
65416540
"import-edge-strings": "ts-node -T ./.scripts/import_edge_strings.ts",
6542-
"prep:dts": "yarn verify dts --quiet || npx @vscode/dts main",
6543-
"prep:dts-dev": "yarn verify dts --quiet || (npx @vscode/dts main && npx @vscode/dts dev)",
6544-
"build": "yarn prep:dts && echo [Building TypeScript code] && tsc --build tsconfig.json",
6545-
"build-dev": "yarn prep:dts-dev && echo [Building TypeScript code with dev dependencies] && tsc --build tsconfig.json"
6541+
"prep:dts": "yarn verify dts --quiet || (npx @vscode/dts main && npx @vscode/dts dev && yarn verify proposals)",
6542+
"build": "yarn prep:dts && echo [Building TypeScript code] && tsc --build tsconfig.json"
65466543
},
65476544
"devDependencies": {
65486545
"@octokit/rest": "^20.1.1",

0 commit comments

Comments
 (0)