Make Data Explorer work on node v18 (#1654)

* Upgrade packages to enable npm i with node 18

* Fix crypto and querystring issue

* Fix webpack errors during npm start

* Upgrade monaco editor. Fix alias in webconfig

* Remove deprecated file-loader. Upgrade webpack to latest.

* Fix format

* Upgrade webpack, eslint and typescript

* Update p-retry and fluentui packages

* Revert monaco package upgrade

* Fix notebook compile errors

* Fix lint errors

* Update jest snapshots

* Fix unit tests

* Update node version to 18

* Fix compile error

* Fix compile error

* Fix format

* Turn off warning overlay for webpack devServer

* Fix format

* Re-add monaco webpack plugin and upgrade monaco-editor

* Update package-lock.json

* Fix build issue

* Move MonacoWebpackPlugin to previous place in webpack.config.js

* update package-lock.json

* Fix package-lock.json

* Update package-lock.json

* Fix export ChoiceItem not found warning for self serve. Remove warning turn off in webpack config.

* Update checkout and setup actions in for ci tests

* Disable Gallery callout

* Fix disable gallery header

* Totally disable New gallery callout

* Upgrade all github actions to latest
This commit is contained in:
Laurent Nguyen
2023-12-13 18:24:40 +00:00
committed by GitHub
parent 59a50d72fe
commit 1bf4683894
67 changed files with 34884 additions and 19953 deletions

View File

@@ -1,7 +1,7 @@
import * as Constants from "../Common/Constants";
import * as AuthorizationUtils from "./AuthorizationUtils";
import { AuthType } from "../AuthType";
import * as Constants from "../Common/Constants";
import { updateUserContext } from "../UserContext";
import * as AuthorizationUtils from "./AuthorizationUtils";
jest.mock("../Explorer/Explorer");
describe("AuthorizationUtils", () => {
@@ -29,11 +29,11 @@ describe("AuthorizationUtils", () => {
describe("decryptJWTToken()", () => {
it("should throw an error if token is undefined", () => {
expect(() => AuthorizationUtils.decryptJWTToken(undefined)).toThrowError();
expect(() => AuthorizationUtils.decryptJWTToken(undefined)).toThrow();
});
it("should throw an error if token is empty", () => {
expect(() => AuthorizationUtils.decryptJWTToken("")).toThrowError();
expect(() => AuthorizationUtils.decryptJWTToken("")).toThrow();
});
it("should throw an error if token is malformed", () => {
@@ -41,7 +41,7 @@ describe("AuthorizationUtils", () => {
AuthorizationUtils.decryptJWTToken(
"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImFQY3R3X29kdlJPb0VOZzNWb09sSWgydGlFcyIsImtpZCI6ImFQY3R3X29kdlJPb0VOZzNWb09sSWgydGlFcyJ9.",
),
).toThrowError();
).toThrow();
});
it("should return decrypted token payload", () => {

View File

@@ -48,8 +48,8 @@ describe("GalleryUtils", () => {
await GalleryUtils.favoriteItem(container, junoClient, galleryItem, onComplete);
expect(junoClient.favoriteNotebook).toBeCalledWith(galleryItem.id);
expect(onComplete).toBeCalledWith(galleryItem);
expect(junoClient.favoriteNotebook).toHaveBeenCalledWith(galleryItem.id);
expect(onComplete).toHaveBeenCalledWith(galleryItem);
});
it("unfavoriteItem unfavorites item", async () => {
@@ -62,8 +62,8 @@ describe("GalleryUtils", () => {
await GalleryUtils.unfavoriteItem(container, junoClient, galleryItem, onComplete);
expect(junoClient.unfavoriteNotebook).toBeCalledWith(galleryItem.id);
expect(onComplete).toBeCalledWith(galleryItem);
expect(junoClient.unfavoriteNotebook).toHaveBeenCalledWith(galleryItem.id);
expect(onComplete).toHaveBeenCalledWith(galleryItem);
});
it("deleteItem shows dialog in data explorer", () => {