Skip to content

Commit

Permalink
Merge pull request #704 from rage/svelte-deps
Browse files Browse the repository at this point in the history
Svelte deps
  • Loading branch information
nygrenh authored Dec 19, 2023
2 parents c38cd27 + 62673c3 commit 56c444d
Show file tree
Hide file tree
Showing 25 changed files with 4,373 additions and 3,680 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint"]
"recommendations": ["dbaeumer.vscode-eslint", "svelte.svelte-vscode"]
}
1,405 changes: 521 additions & 884 deletions backend/package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@types/archiver": "^5.3.2",
"@types/express": "^4.17.17",
"@types/ncp": "^2.0.5",
"archiver": "^5.3.1",
"@types/archiver": "^6.0.2",
"@types/express": "^4.17.21",
"@types/ncp": "^2.0.8",
"archiver": "^6.0.1",
"ncp": "^2.0.0",
"tsx": "^3.12.7",
"typescript": "^5.1.6"
"tsx": "^4.6.2",
"typescript": "^5.3.3"
},
"dependencies": {
"body-parser": "^1.20.2",
Expand Down
4,704 changes: 2,680 additions & 2,024 deletions package-lock.json

Large diffs are not rendered by default.

83 changes: 41 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"publisher": "moocfi",
"main": "./dist/extension",
"scripts": {
"install:all": "npm install && cd backend && npm ci && cd ../webview-ui && npm install",
"install:all": "npm install && cd backend && npm install && cd ../webview-ui && npm install",
"webview:start": "cd webview-ui && npm run dev",
"webview:build": "cd webview-ui && npm run build",
"watch": "tsc -watch -p ./",
Expand Down Expand Up @@ -450,64 +450,63 @@
"trailingComma": "all"
},
"dependencies": {
"del": "^7.0.0",
"del": "^7.1.0",
"du": "^1.0.0",
"fs-extra": "^11.1.1",
"handlebars": "^4.7.7",
"fs-extra": "^11.2.0",
"handlebars": "^4.7.8",
"lodash": "^4.17.21",
"p-limit": "^4.0.0",
"tree-kill": "^1.2.2",
"ts-results": "^3.3.0",
"typia": "^4.1.6",
"undici": "^5.23.0"
"typia": "^5.3.5",
"undici": "^6.0.1"
},
"devDependencies": {
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@babel/plugin-transform-modules-commonjs": "^7.22.5",
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/preset-env": "^7.22.9",
"@playwright/test": "^1.37.1",
"@types/chai": "^4.3.5",
"@types/chai-as-promised": "^7.1.5",
"@types/du": "^1.0.1",
"@types/fs-extra": "^11.0.1",
"@types/glob": "^8.0.0",
"@types/lodash": "^4.14.195",
"@types/mocha": "^10.0.1",
"@types/mock-fs": "^4.13.1",
"@types/node": "^20.4.2",
"@types/unzipper": "^0.10.6",
"@types/vscode": "^1.71.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.6",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/plugin-transform-react-jsx": "^7.23.4",
"@babel/preset-env": "^7.23.6",
"@playwright/test": "^1.40.1",
"@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8",
"@types/du": "^1.0.3",
"@types/fs-extra": "^11.0.4",
"@types/glob": "^8.1.0",
"@types/lodash": "^4.14.202",
"@types/mocha": "^10.0.6",
"@types/mock-fs": "^4.13.4",
"@types/node": "^20.10.5",
"@types/unzipper": "^0.10.9",
"@types/vscode": "^1.75.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vscode/test-electron": "^2.3.8",
"babel-loader": "^9.1.3",
"chai": "^4.3.7",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.3",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-custom-rules": "file:eslint-custom-rules",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-sort-class-members": "^1.18.0",
"glob": "^10.3.3",
"husky": "^8.0.2",
"lint-staged": "^13.2.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-sort-class-members": "^1.19.0",
"glob": "^10.3.10",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"mocha": "^10.2.0",
"mock-fs": "^5.2.0",
"prettier": "^3.0.0",
"prettier": "^3.1.1",
"raw-loader": "^4.0.2",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"ts-patch": "^3.0.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"ts-patch": "^3.1.1",
"typemoq": "^2.1.0",
"typescript": "^5.1.6",
"webpack": "^5.88.1",
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0",
"webpack-merge": "^5.10.0",
"xvfb-maybe": "^0.2.1"
},
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions playwright/pages/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export class CoursePage extends TmcPage {
}

async openWorkspace(): Promise<void> {
await this.webview.getByRole("button", { name: "Open workspace" }).click();
const yesButton = this.page.getByRole("button", { name: "Yes" });
await this.webview.getByRole("button", { name: "Open workspace" }).first().click();
const yesButton = this.page.getByRole("button", { name: "Yes" }).first();
try {
// click yes if prompted
await yesButton.waitFor({ timeout: 1000 });
Expand All @@ -23,13 +23,13 @@ export class CoursePage extends TmcPage {
}

async showExercises(): Promise<void> {
await this.webview.getByRole("button", { name: "Show exercises" }).click();
await this.webview.getByRole("button", { name: "Show exercises" }).first().click();
}

async openExercises(names: string[]): Promise<void> {
for (const name of names) {
await this.webview.getByRole("row", { name }).getByRole("checkbox").click();
}
await this.webview.getByRole("button", { name: "Open", exact: true }).click();
await this.webview.getByRole("button", { name: "Open", exact: true }).first().click();
}
}
2 changes: 1 addition & 1 deletion playwright/pages/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export class LoginPage extends TmcPage {
async login(user: string): Promise<void> {
await this.webview.getByRole("textbox", { name: "Email or username:" }).fill(user);
await this.webview.getByRole("textbox", { name: "Password:" }).first().fill(user);
await this.webview.getByRole("button", { name: "Log in" }).click();
await this.webview.getByRole("button", { name: "Log in" }).first().click();
}
}
2 changes: 1 addition & 1 deletion playwright/pages/my-courses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class MyCoursesPage extends TmcPage {
}

async addNewCourse(name: string): Promise<void> {
await this.webview.getByRole("button", { name: "Add new course" }).click();
await this.webview.getByRole("button", { name: "Add new course" }).first().click();

const selectOrganization = new SelectOrganization(this.page, this.webview);
await selectOrganization.select("Test Organization (test)");
Expand Down
5 changes: 4 additions & 1 deletion playwright/pages/test-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export class TestResultsPage extends TmcPage {
}

async submit(): Promise<void> {
await this.getWebview().getByRole("button", { name: "Send solution to server" }).click();
await this.getWebview()
.getByRole("button", { name: "Send solution to server" })
.first()
.click();
}

getWebview(): FrameLocator {
Expand Down
19 changes: 7 additions & 12 deletions src/actions/downloadOrUpdateExercises.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pLimit from "p-limit";
import { Ok, Result } from "ts-results";

import { TmcPanel } from "../panels/TmcPanel";
Expand All @@ -8,9 +7,6 @@ import { Logger } from "../utilities";

import { ActionContext } from "./types";

// Use this until using Langs version with file locks
const limit = pLimit(1);

interface DownloadResults {
successful: number[];
failed: number[];
Expand Down Expand Up @@ -39,14 +35,13 @@ export async function downloadOrUpdateExercises(
const downloadTemplate = !settings.getDownloadOldSubmission();
const downloadResult = await dialog.progressNotification(
"Downloading exercises...",
(progress) =>
limit(() =>
tmc.downloadExercises(exerciseIds, downloadTemplate, (download) => {
progress.report(download);
statuses.set(download.id, "closed");
TmcPanel.postMessage(wrapToMessage(download.id, "closed"));
}),
),
(progress) => {
return tmc.downloadExercises(exerciseIds, downloadTemplate, (download) => {
progress.report(download);
statuses.set(download.id, "closed");
TmcPanel.postMessage(wrapToMessage(download.id, "closed"));
});
},
);
if (downloadResult.err) {
postMessages(statuses);
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ const config = () => {
// using the incorrect import paths for .d.ts files:
// https://github.com/TypeStrong/ts-loader/issues/1501
preferRelative: true,
fallback: {
async_hooks: false,
},
},
node: {
__dirname: false,
Expand Down
Loading

0 comments on commit 56c444d

Please sign in to comment.