Skip to content

Commit 9f6a2a9

Browse files
committed
Upgrade 3rd party dependencies
This patch upgrades all those dependencies that we have an approval for. I also recreated jest snapshots, because the new vite version uses different tag names for certain elements and introduced an own JSDOM environment descendant to allow adding missing pieces to the global environment for our unit tests. Change-Id: I3f385ac803561e58ce8d32bd6331ae01c98274f5
1 parent c2abf3a commit 9f6a2a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+253
-477
lines changed

gui/extension/package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,21 +1620,22 @@
16201620
"dependencies": {
16211621
"anser": "2.1.1",
16221622
"antlr4ng": "1.1.6",
1623-
"regedit": "5.1.1",
1624-
"ws": "8.12.0"
1623+
"regedit": "5.1.2",
1624+
"ws": "8.14.2"
16251625
},
16261626
"devDependencies": {
1627-
"@types/node": "18.11.18",
1627+
"@types/node": "20.8.10",
16281628
"@types/vscode": "1.74.0",
1629-
"@types/ws": "8.5.4",
1630-
"@typescript-eslint/eslint-plugin": "5.48.2",
1631-
"@typescript-eslint/parser": "5.48.2",
1632-
"esbuild": "0.19.4",
1633-
"eslint": "8.42.0",
1634-
"eslint-plugin-import": "2.27.5",
1635-
"eslint-plugin-jsdoc": "46.2.6",
1629+
"@types/ws": "8.5.8",
1630+
"@typescript-eslint/eslint-plugin": "6.9.1",
1631+
"@typescript-eslint/parser": "6.9.1",
1632+
"esbuild": "0.19.5",
1633+
"eslint": "8.52.0",
1634+
"eslint-plugin-import": "2.29.0",
1635+
"eslint-plugin-jsdoc": "46.8.2",
16361636
"eslint-plugin-prefer-arrow": "1.2.3",
1637-
"typescript": "5.0.4"
1637+
"oci-mysql": "2.73.0",
1638+
"typescript": "5.2.2"
16381639
},
16391640
"scripts": {
16401641
"build-dev-package": "vsce package",

gui/extension/src/MDSCommandHandler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import {
2828
import { homedir } from "os";
2929
import { existsSync } from "fs";
3030

31+
import { models } from "oci-mysql";
32+
3133
import { ICompartment, IPortForwardingSessionTargetResourceDetails } from "../../frontend/src/communication/index.js";
3234
import { taskOutputChannel } from "./extension.js";
3335

@@ -39,7 +41,6 @@ import { OciComputeInstanceTreeItem } from "./tree-providers/OCITreeProvider/Oci
3941
import { OciDbSystemTreeItem } from "./tree-providers/OCITreeProvider/OciDbSystemTreeItem.js";
4042
import { OciLoadBalancerTreeItem } from "./tree-providers/OCITreeProvider/OciLoadBalancerTreeItem.js";
4143
import { OciConfigProfileTreeItem } from "./tree-providers/OCITreeProvider/OciProfileTreeItem.js";
42-
import { DbSystem } from "../../frontend/src/oci-typings/oci-mysql/lib/model/index.js";
4344

4445
import { DialogResponseClosure, IDictionary, MdsDialogType } from "../../frontend/src/app-logic/Types.js";
4546
import { DialogWebviewManager } from "./WebviewProviders/DialogWebviewProvider.js";
@@ -570,7 +571,7 @@ export class MDSCommandHandler {
570571
* @param profile The OCI profile
571572
* @param host The extension host
572573
*/
573-
private async showMdsHWClusterDialog(dbSystem: DbSystem, compartment: ICompartment,
574+
private async showMdsHWClusterDialog(dbSystem: models.DbSystem, compartment: ICompartment,
574575
profile: IMdsProfileData, host: ExtensionHost): Promise<void> {
575576

576577
const statusbarItem = window.createStatusBarItem();
@@ -724,7 +725,7 @@ export class MDSCommandHandler {
724725
* @param profile The OCI profile
725726
* @param host The extension host
726727
*/
727-
private async showMdsEndpointDialog(dbSystem: DbSystem, compartment: ICompartment,
728+
private async showMdsEndpointDialog(dbSystem: models.DbSystem, compartment: ICompartment,
728729
profile: IMdsProfileData, host: ExtensionHost): Promise<void> {
729730

730731
const statusbarItem = window.createStatusBarItem();

gui/extension/tests/e2e/lib/db.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,17 @@ export class Database {
444444
};
445445

446446
public static closeFinder = async (): Promise<void> => {
447-
const findWidget = await driver.wait(until.elementLocated(locator.findWidget.exists), constants.wait5seconds);
448-
const actions = await findWidget.findElements(locator.findWidget.actions);
449-
for (const action of actions) {
450-
if ((await action.getAttribute("title")).indexOf("Close") !== -1) {
451-
await action.click();
447+
await driver.wait(async () => {
448+
const findWidget = await driver.findElements(locator.findWidget.exists);
449+
if (findWidget.length > 0) {
450+
const closeButton = await findWidget[0].findElement(locator.findWidget.close);
451+
await driver.executeScript("arguments[0].click()", closeButton);
452+
453+
return (await driver.findElements(locator.findWidget.exists)).length === 0;
454+
} else {
455+
return true;
452456
}
453-
}
457+
}, constants.wait5seconds, "Widget was not closed");
454458
};
455459

456460
public static clickContextItem = async (item: string): Promise<void> => {
@@ -1491,7 +1495,6 @@ export class Database {
14911495
}
14921496

14931497
return [...new Set(els)] as string[];
1494-
14951498
};
14961499

14971500
public static isEditorStretched = async (): Promise<boolean> => {

gui/extension/tests/e2e/lib/locators.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const notebook = {
9393
lineNumber: By.css(".margin-view-overlays .line-numbers"),
9494
currentLine: By.className("current-line"),
9595
statementStart: By.className("statementStart"),
96-
autoCompleteListItem: By.css(".monaco-list .monaco-highlighted-label span"),
96+
autoCompleteListItem: By.css(".monaco-list .monaco-highlighted-label"),
9797
scrollBar: By.className("editor-scrollable"),
9898
result: {
9999
exists: By.className("zoneHost"),
@@ -180,6 +180,7 @@ export const findWidget = {
180180
matchesCount: By.className("matchesCount"),
181181
findMatch: By.css(".cdr.findMatch"),
182182
replacePart: By.className("replace-part"),
183+
close: By.xpath(".//div[contains(@title, 'Close')]"),
183184
};
184185

185186
export const mrsServiceDialog = {

gui/extension/tests/e2e/tests/ui-notebook.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,6 @@ describe("NOTEBOOKS", () => {
362362
await contentHost.findElement(locator.notebook.codeEditor.textArea).getAttribute("value"),
363363
).to.include("import from tester testing testing");
364364
await Database.closeFinder();
365-
expect(await finder.getAttribute("aria-hidden")).equals("true");
366-
367365
} finally {
368366
cleanEditor = true;
369367
}
@@ -477,12 +475,7 @@ describe("NOTEBOOKS", () => {
477475
await driver.findElement(locator.notebook.codeEditor.textArea).sendKeys(Key.SPACE);
478476
await commandExecutor.openSuggestionMenu();
479477
const els = await Database.getAutoCompleteMenuItems();
480-
expect(els).to.include("mysql");
481-
expect(els).to.include("performance_schema");
482-
expect(els).to.include("sakila");
483-
expect(els).to.include("sys");
484-
expect(els).to.include("world_x_cst");
485-
478+
expect(els.toString()).to.match(/(mysql|performace_schema|sakila|sys|world_x_cst|actor|address)/);
486479
});
487480

488481
});

gui/frontend/.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
src/app-wrapper/
2-
scripts/copy-oci-typings.js
3-
src/oci-typings/
42
unit-tests.jest.config.ts
53
src/tests/cssTransform.cjs
64
src/tests/fileTransform.cjs

gui/frontend/package.json

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,81 +23,76 @@
2323
"antlr4ng": "1.1.6",
2424
"classnames": "2.3.2",
2525
"color": "4.2.3",
26-
"d3": "7.7.0",
26+
"d3": "7.8.4",
2727
"idb": "7.1.1",
28-
"monaco-editor": "0.34.0",
29-
"preact": "10.11.3",
28+
"monaco-editor": "0.43.0",
29+
"preact": "10.18.1",
3030
"set-interval-async": "3.0.3",
31-
"tabulator-tables": "5.4.3",
32-
"ws": "8.12.0"
31+
"tabulator-tables": "5.5.2",
32+
"ws": "8.14.2"
3333
},
3434
"devDependencies": {
35-
"@esbuild-plugins/node-globals-polyfill": "0.1.1",
36-
"@esbuild-plugins/node-modules-polyfill": "0.1.4",
35+
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
36+
"@esbuild-plugins/node-modules-polyfill": "0.2.2",
3737
"@glen/jest-raw-loader": "2.0.0",
38-
"@preact/preset-vite": "2.5.0",
39-
"@swc/core": "1.3.62",
40-
"@swc/jest": "0.2.26",
41-
"@testing-library/jest-dom": "5.16.5",
42-
"@testing-library/preact": "3.2.2",
43-
"@types/color": "3.0.3",
44-
"@types/d3": "7.4.0",
45-
"@types/enzyme": "3.10.12",
46-
"@types/jest": "29.2.5",
47-
"@types/jsdom": "20.0.1",
48-
"@types/node": "18.11.18",
49-
"@types/resize-observer-browser": "0.1.7",
50-
"@types/selenium-webdriver": "4.1.10",
51-
"@types/set-interval-async": "1.0.0",
52-
"@types/tabulator-tables": "5.4.2",
38+
"@preact/preset-vite": "2.6.0",
39+
"@swc/core": "1.3.95",
40+
"@swc/jest": "0.2.29",
41+
"@testing-library/jest-dom": "6.1.4",
42+
"@testing-library/preact": "3.2.3",
43+
"@types/color": "3.0.5",
44+
"@types/d3": "7.4.2",
45+
"@types/enzyme": "3.10.15",
46+
"@types/jest": "29.5.7",
47+
"@types/jsdom": "21.1.4",
48+
"@types/node": "20.8.10",
49+
"@types/resize-observer-browser": "0.1.9",
50+
"@types/selenium-webdriver": "4.1.19",
51+
"@types/set-interval-async": "1.0.2",
52+
"@types/tabulator-tables": "5.5.3",
5353
"@types/ws": "8.5.4",
54-
"@typescript-eslint/eslint-plugin": "5.48.1",
55-
"@typescript-eslint/parser": "5.48.1",
54+
"@typescript-eslint/eslint-plugin": "5.62.0",
55+
"@typescript-eslint/parser": "5.62.0",
5656
"antlr4ng-cli": "1.0.2",
57-
"autoprefixer": "10.4.13",
57+
"autoprefixer": "10.4.16",
5858
"enzyme": "3.11.0",
5959
"enzyme-adapter-preact-pure": "4.1.0",
6060
"enzyme-to-json": "3.6.2",
61-
"es5-ext": "0.10.53",
62-
"eslint": "8.42.0",
61+
"eslint": "8.52.0",
6362
"eslint-config-preact": "1.3.0",
64-
"eslint-plugin-import": "2.27.5",
65-
"eslint-plugin-jsdoc": "46.2.6",
66-
"eslint-plugin-jsx-a11y": "6.7.1",
63+
"eslint-plugin-import": "2.29.0",
64+
"eslint-plugin-jsdoc": "46.8.2",
65+
"eslint-plugin-jsx-a11y": "6.8.0",
6766
"eslint-plugin-prefer-arrow": "1.2.3",
68-
"fake-indexeddb": "4.0.1",
67+
"fake-indexeddb": "5.0.1",
6968
"identity-obj-proxy": "3.0.0",
70-
"jest": "29.4.2",
71-
"jest-canvas-mock": "2.4.0",
72-
"jest-environment-jsdom": "29.4.2",
69+
"jest": "29.7.0",
70+
"jest-canvas-mock": "2.5.2",
71+
"jest-environment-jsdom": "29.7.0",
7372
"jest-html-reporter": "3.10.2",
7473
"monaco-typescript": "4.10.0",
7574
"mysql-promise": "5.0.0",
76-
"oci-bastion": "2.51.0",
77-
"oci-common": "2.51.0",
78-
"oci-core": "2.51.0",
79-
"oci-identity": "2.51.0",
80-
"oci-loadbalancer": "2.51.0",
81-
"oci-mysql": "2.51.0",
82-
"postcss": "8.4.21",
83-
"postcss-nesting": "11.1.0",
75+
"oci-bastion": "2.73.0",
76+
"oci-common": "2.73.0",
77+
"oci-core": "2.73.0",
78+
"oci-identity": "2.73.0",
79+
"oci-loadbalancer": "2.73.0",
80+
"oci-mysql": "2.73.0",
81+
"postcss": "8.4.31",
82+
"postcss-nesting": "12.0.1",
8483
"rollup-plugin-polyfill-node": "0.12.0",
8584
"run-my-sql-file": "1.0.0",
8685
"selenium-webdriver": "4.7.1",
87-
"terser": "5.18.0",
86+
"terser": "5.24.0",
8887
"ts-node": "10.9.1",
89-
"typescript": "4.9.5",
90-
"vite": "4.4.9",
88+
"typescript": "5.2.2",
89+
"vite": "4.5.0",
9190
"vite-plugin-monaco-editor": "1.1.0"
9291
},
93-
"overrides": {
94-
"@babel/plugin-transform-class-properties": "7.22.3",
95-
"@jest/expect": "29.5.0"
96-
},
9792
"browserslist": [
9893
">0.2%",
9994
"not dead",
10095
"not ie <= 11",
10196
"not op_mini all"
10297
]
103-
}
98+
}

gui/frontend/scripts/launch-dev-server.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
# along with this program; if not, write to the Free Software Foundation, Inc.,
2121
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2222

23-
node scripts/copy-oci-typings.js
24-
2523
port=$1
2624

2725
target_path=./src/parsing/mysql/generated

gui/frontend/scripts/production-build.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ rem You should have received a copy of the GNU General Public License
1919
rem along with this program; if not, write to the Free Software Foundation, Inc.,
2020
rem 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2121

22-
node scripts/copy-oci-typings.js
2322
node --no-warnings --loader ts-node/esm scripts/generate-mrs-grammar.ts
2423

2524
antlr4ng -Dlanguage=TypeScript -no-visitor -Xexact-output-dir -o src/parsing/mysql/generated src/parsing/mysql/*.g4

gui/frontend/scripts/production-build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
# along with this program; if not, write to the Free Software Foundation, Inc.,
2222
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323

24-
node scripts/copy-oci-typings.js
2524
node --no-warnings --loader ts-node/esm scripts/generate-mrs-grammar.ts
2625

2726
# Generate parsers only if something in the source folder changed.

gui/frontend/src/communication/Oci.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2222
*/
2323

24-
import { models as coreModels } from "../oci-typings/oci-core/index.js";
25-
import * as common from "../oci-typings/oci-common/index.js";
26-
import { models as bastionModels } from "../oci-typings/oci-bastion/index.js";
27-
import { models as mySQLModels } from "../oci-typings/oci-mysql/index.js";
28-
import { models as identityModels } from "../oci-typings/oci-identity/index.js";
29-
import { models as loadBalancerModels } from "../oci-typings/oci-loadbalancer/index.js";
24+
import { models as coreModels } from "oci-core";
25+
import * as common from "oci-common";
26+
import { models as bastionModels } from "oci-bastion";
27+
import { models as mySQLModels } from "oci-mysql";
28+
import { models as identityModels } from "oci-identity";
29+
import { models as loadBalancerModels } from "oci-loadbalancer";
3030

3131
export type IAuthenticationDetails = common.AuthenticationDetailsProvider;
3232

gui/frontend/src/components/Dialogs/AwaitableValueEditDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface IAwaitableDialogResult {
3737
* A dialog implementation that provides the necessary tools to allow derived dialogs to return their results to a
3838
* waiting customer directly. This allows to chain multiple dialogs together.
3939
*/
40-
export abstract class AwaitableValueEditDialog extends ComponentBase {
40+
export class AwaitableValueEditDialog extends ComponentBase {
4141
#dialogRef = createRef<ValueEditDialog>();
4242
#signal?: Semaphore<IAwaitableDialogResult>;
4343

gui/frontend/src/components/ui/CodeEditor/CodeEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export class CodeEditor extends ComponentBase<ICodeEditorProperties> {
418418
autoFindInSelection: "never",
419419
addExtraSpaceOnTop: false,
420420
},
421-
"cursorSmoothCaretAnimation": false,
421+
"cursorSmoothCaretAnimation": "off",
422422
"fontLigatures": true,
423423
wordWrap,
424424
wordWrapColumn,

gui/frontend/src/components/ui/CodeEditor/languages/msg/msg.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/* spell-checker: disable */
2525

26-
import { languages } from "monaco-editor/esm/vs/editor/editor.api";
26+
import { languages } from "monaco-editor/esm/vs/editor/editor.api.js";
2727
import { conf as tsConfig } from "monaco-editor/esm/vs/basic-languages/typescript/typescript";
2828

2929

@@ -35,27 +35,6 @@ export const language: languages.IMonarchLanguage = {
3535
defaultToken: "invalid",
3636
ignoreCase: true,
3737
start: "msg",
38-
39-
/* These keywords are dedicated to the msg language, but must be handled as part of each sub language.
40-
keywords: [
41-
"\\about",
42-
"\\?",
43-
"\\help",
44-
"\\h",
45-
"\\connect",
46-
"\\c",
47-
"\\disconnect",
48-
"\\exit",
49-
"\\option",
50-
"\\quit",
51-
"\\q",
52-
"\\reconnect",
53-
"\\show",
54-
"\\status",
55-
"\\s",
56-
"\\use",
57-
"\\u",
58-
],*/
5938
tokenizer: {
6039
msg: [], // No rules here for the moment.
6140
},

gui/frontend/src/parsing/mysql/MySQLParsingServices.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,6 @@ export class MySQLParsingServices {
972972
this.lexer.sqlModeFromString(sqlMode);
973973
this.parser.serverVersion = serverVersion;
974974
this.parser.sqlModes = this.lexer.sqlModes;
975-
976975
}
977976

978977
/**

0 commit comments

Comments
 (0)