Skip to content

Commit 3515f05

Browse files
committed
Update dependencies and fix Yarn 2 enable bug
1 parent 57ae0c6 commit 3515f05

File tree

7 files changed

+1980
-2252
lines changed

7 files changed

+1980
-2252
lines changed

.github/workflows/package.yml

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v3
2626

27+
- name: Enable Corepack
28+
run: corepack enable
29+
2730
- name: Enable Yarn 2
2831
run: yarn set version stable
2932

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v3
1212

13+
- name: Enable Corepack
14+
run: corepack enable
15+
1316
- name: Enable Yarn 2
1417
run: yarn set version stable
1518

package.json

+19-18
Original file line numberDiff line numberDiff line change
@@ -340,26 +340,27 @@
340340
"test": "yarn run pretest && node ./out/test/runTest.js"
341341
},
342342
"devDependencies": {
343-
"@types/glob": "^7.1.3",
344-
"@types/mocha": "^8.0.4",
345-
"@types/node": "^12.11.7",
346-
"@types/shell-quote": "^1.7.1",
343+
"@types/glob": "^8.1.0",
344+
"@types/mocha": "^10.0.6",
345+
"@types/node": "^16.11.7",
346+
"@types/shell-quote": "^1.7.5",
347347
"@types/vscode": "1.53.0",
348-
"@typescript-eslint/eslint-plugin": "^5.55.0",
349-
"@typescript-eslint/parser": "^5.55.0",
350-
"@vscode/test-electron": "^1.5.0",
351-
"@vscode/vsce": "^2.18.0",
352-
"eslint": "^7.19.0",
353-
"glob": "^7.1.6",
354-
"mocha": "^8.2.1",
355-
"sinon": "^13.0.1",
356-
"ts-loader": "^8.0.14",
357-
"typescript": "^4.1.3",
358-
"webpack": "^5.19.0",
359-
"webpack-cli": "^4.4.0"
348+
"@typescript-eslint/eslint-plugin": "^7.1.0",
349+
"@typescript-eslint/parser": "^7.1.0",
350+
"@vscode/test-electron": "^2.3.9",
351+
"@vscode/vsce": "^2.24.0",
352+
"eslint": "^8.57.0",
353+
"glob": "^8.1.0",
354+
"mocha": "^10.3.0",
355+
"sinon": "^17.0.1",
356+
"ts-loader": "^9.5.1",
357+
"typescript": "^5.3.3",
358+
"webpack": "^5.90.3",
359+
"webpack-cli": "^5.1.4"
360360
},
361361
"dependencies": {
362-
"shell-quote": "^1.7.3"
362+
"shell-quote": "^1.8.1",
363+
"tslib": "^2.6.2"
363364
},
364-
"packageManager": "yarn@3.4.1"
365+
"packageManager": "[email protected].0"
365366
}

src/backend/executor/process.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as child_process from 'child_process';
1+
import * as childProcess from 'child_process';
22
import * as os from 'os';
33
import { quote } from 'shell-quote';
44
import { Disposable, Event, EventEmitter, ExtensionContext, workspace } from 'vscode';
@@ -56,7 +56,7 @@ export class ScheduledProcess implements Disposable {
5656
public readonly executable: string;
5757
public readonly commandArgs: string[];
5858

59-
private activeProcess?: child_process.ChildProcess;
59+
private activeProcess?: childProcess.ChildProcess;
6060

6161
/** Contains parameters for the executor. All members are defined. */
6262
public readonly processParameters: ProcessParameters;
@@ -135,7 +135,7 @@ export class ScheduledProcess implements Disposable {
135135

136136
this._processStderr.fire(`>>> Starting process '${commonName}'\n`);
137137
this._processStderr.fire(`> ${this.commandLine}\n`);
138-
this.activeProcess = child_process.spawn(
138+
this.activeProcess = childProcess.spawn(
139139
this.executable,
140140
this.commandArgs,
141141
{ cwd: workspace.workspaceFolders[0].uri.fsPath }

src/test/parser/metadata.unit.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as fs from 'fs';
33
import * as path from 'path';
44
import { promisify } from 'util';
55

6-
import { parseMetadata } from '../../backend/parser';
6+
import { MetadataParseError, parseMetadata } from '../../backend/parser';
77
import { STATIC_FILE_PATH } from '../utils/constants';
88

99
suite('Unit Test: Metadata Parser', () => {
@@ -42,7 +42,7 @@ suite('Unit Test: Metadata Parser', () => {
4242
const testAndExpectCode = async (filename: string, code: string) => {
4343
await assert.rejects(
4444
() => parseMetadata(path.join(staticPath, filename)),
45-
(err) => {
45+
(err: MetadataParseError) => {
4646
assert.strictEqual(err.code, code, 'wrong error code');
4747
return true;
4848
},

src/test/suite/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function run(): Promise<void> {
1212
const testsRoot = path.resolve(__dirname, '..');
1313

1414
return new Promise((c, e) => {
15-
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
15+
glob.glob('**/**.test.js', { cwd: testsRoot }, (err: any, files: string[]) => {
1616
if (err) {
1717
return e(err);
1818
}

0 commit comments

Comments
 (0)