Skip to content

Commit

Permalink
Merge pull request #140 from Discookie/ericsson/fix-ci
Browse files Browse the repository at this point in the history
Update dependencies and fix Yarn 2 enable bug
  • Loading branch information
vodorok authored Apr 10, 2024
2 parents 57ae0c6 + eef200f commit 061b6f7
Show file tree
Hide file tree
Showing 7 changed files with 1,981 additions and 2,253 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Enable Corepack
run: corepack enable

- name: Enable Yarn 2
run: yarn set version stable

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Enable Corepack
run: corepack enable

- name: Enable Yarn 2
run: yarn set version stable

Expand Down
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,27 @@
"test": "yarn run pretest && node ./out/test/runTest.js"
},
"devDependencies": {
"@types/glob": "^7.1.3",
"@types/mocha": "^8.0.4",
"@types/node": "^12.11.7",
"@types/shell-quote": "^1.7.1",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.6",
"@types/node": "^16.11.7",
"@types/shell-quote": "^1.7.5",
"@types/vscode": "1.53.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@vscode/test-electron": "^1.5.0",
"@vscode/vsce": "^2.18.0",
"eslint": "^7.19.0",
"glob": "^7.1.6",
"mocha": "^8.2.1",
"sinon": "^13.0.1",
"ts-loader": "^8.0.14",
"typescript": "^4.1.3",
"webpack": "^5.19.0",
"webpack-cli": "^4.4.0"
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vscode/test-electron": "^2.3.9",
"@vscode/vsce": "^2.24.0",
"eslint": "^8.57.0",
"glob": "^8.1.0",
"mocha": "^10.3.0",
"sinon": "^17.0.1",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"shell-quote": "^1.7.3"
"shell-quote": "^1.8.1",
"tslib": "^2.6.2"
},
"packageManager": "yarn@3.4.1"
"packageManager": "[email protected].0"
}
6 changes: 3 additions & 3 deletions src/backend/executor/process.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as child_process from 'child_process';
import * as childProcess from 'child_process';
import * as os from 'os';
import { quote } from 'shell-quote';
import { Disposable, Event, EventEmitter, ExtensionContext, workspace } from 'vscode';
Expand Down Expand Up @@ -56,7 +56,7 @@ export class ScheduledProcess implements Disposable {
public readonly executable: string;
public readonly commandArgs: string[];

private activeProcess?: child_process.ChildProcess;
private activeProcess?: childProcess.ChildProcess;

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

this._processStderr.fire(`>>> Starting process '${commonName}'\n`);
this._processStderr.fire(`> ${this.commandLine}\n`);
this.activeProcess = child_process.spawn(
this.activeProcess = childProcess.spawn(
this.executable,
this.commandArgs,
{ cwd: workspace.workspaceFolders[0].uri.fsPath }
Expand Down
6 changes: 3 additions & 3 deletions src/test/parser/metadata.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as fs from 'fs';
import * as path from 'path';
import { promisify } from 'util';

import { parseMetadata } from '../../backend/parser';
import { MetadataParseError, parseMetadata } from '../../backend/parser';
import { STATIC_FILE_PATH } from '../utils/constants';

suite('Unit Test: Metadata Parser', () => {
Expand Down Expand Up @@ -42,7 +42,7 @@ suite('Unit Test: Metadata Parser', () => {
const testAndExpectCode = async (filename: string, code: string) => {
await assert.rejects(
() => parseMetadata(path.join(staticPath, filename)),
(err) => {
(err: MetadataParseError) => {
assert.strictEqual(err.code, code, 'wrong error code');
return true;
},
Expand All @@ -52,7 +52,7 @@ suite('Unit Test: Metadata Parser', () => {
const testAndExpectSyntaxError = async (filename: string) => {
await assert.rejects(
() => parseMetadata(path.join(staticPath, filename)),
(err) => {
(err: MetadataParseError) => {
assert.ok(err instanceof SyntaxError, 'wrong error type');
return true;
},
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function run(): Promise<void> {
const testsRoot = path.resolve(__dirname, '..');

return new Promise((c, e) => {
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
glob.glob('**/**.test.js', { cwd: testsRoot }, (err: any, files: string[]) => {
if (err) {
return e(err);
}
Expand Down
Loading

0 comments on commit 061b6f7

Please sign in to comment.