Update all frontend npm dependencies except Svelte and Vite (#3120)

* Upgrade node dependencies except Svelte 5 and its peer deps

* Fix lint errors

* Fix previous Rust deps upgrade breakage

* Fix demo artwork

* Allow profiling CI workflow to fail
This commit is contained in:
Keavon Chambers
2025-09-01 17:22:30 -07:00
committed by GitHub
parent be3de511f2
commit b5ebe78f5e
39 changed files with 2686 additions and 1598 deletions
@@ -1,11 +1,8 @@
/* eslint-disable max-classes-per-file */
import { writable } from "svelte/store";
import { type Editor } from "@graphite/editor";
import { type AppWindowPlatform, UpdatePlatform, UpdateViewportHolePunch, UpdateWindowState } from "@graphite/messages";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createAppWindowState(editor: Editor) {
const { subscribe, update } = writable({
platform: "Web" as AppWindowPlatform,
-1
View File
@@ -13,7 +13,6 @@ import {
} from "@graphite/messages";
import { type IconName } from "@graphite/utility-functions/icons";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createDialogState(editor: Editor) {
const { subscribe, update } = writable({
visible: false,
-1
View File
@@ -16,7 +16,6 @@ import {
UpdateGraphFadeArtwork,
} from "@graphite/messages";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createDocumentState(editor: Editor) {
const state = writable({
// Layouts
-1
View File
@@ -3,7 +3,6 @@ import { writable } from "svelte/store";
import { type Editor } from "@graphite/editor";
import { TriggerFontLoad } from "@graphite/messages";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createFontsState(editor: Editor) {
// TODO: Do some code cleanup to remove the need for this empty store
const { subscribe } = writable({});
+5 -6
View File
@@ -2,11 +2,15 @@ import { writable } from "svelte/store";
import { type Editor } from "@graphite/editor";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createFullscreenState(_: Editor) {
// Experimental Keyboard API: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/keyboard
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const keyboardLockApiSupported: Readonly<boolean> = "keyboard" in navigator && (navigator as any).keyboard && "lock" in (navigator as any).keyboard;
const { subscribe, update } = writable({
windowFullscreen: false,
keyboardLocked: false,
keyboardLockApiSupported,
});
function fullscreenModeChanged() {
@@ -46,17 +50,12 @@ export function createFullscreenState(_: Editor) {
});
}
// Experimental Keyboard API: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/keyboard
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const keyboardLockApiSupported: Readonly<boolean> = "keyboard" in navigator && (navigator as any).keyboard && "lock" in (navigator as any).keyboard;
return {
subscribe,
fullscreenModeChanged,
enterFullscreen,
exitFullscreen,
toggleFullscreen,
keyboardLockApiSupported,
};
}
export type FullscreenState = ReturnType<typeof createFullscreenState>;
@@ -27,7 +27,6 @@ import {
UpdateWirePathInProgress,
} from "@graphite/messages";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createNodeGraphState(editor: Editor) {
const { subscribe, update } = writable({
box: undefined as Box | undefined,
+2 -5
View File
@@ -1,5 +1,3 @@
/* eslint-disable max-classes-per-file */
import { writable } from "svelte/store";
import { type Editor } from "@graphite/editor";
@@ -20,7 +18,6 @@ import {
import { downloadFile, downloadFileBlob, upload } from "@graphite/utility-functions/files";
import { extractPixelData, rasterizeSVG } from "@graphite/utility-functions/rasterization";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createPortfolioState(editor: Editor) {
const { subscribe, update } = writable({
unsaved: false,
@@ -49,7 +46,7 @@ export function createPortfolioState(editor: Editor) {
editor.subscriptions.subscribeJsMessage(TriggerFetchAndOpenDocument, async (triggerFetchAndOpenDocument) => {
try {
const { name, filename } = triggerFetchAndOpenDocument;
const url = new URL(filename, document.location.href);
const url = new URL(`demo-artwork/${filename}`, document.location.href);
const data = await fetch(url);
const content = await data.text();
@@ -90,7 +87,7 @@ export function createPortfolioState(editor: Editor) {
return;
}
const imageData = await extractPixelData(new Blob([data.content.data], { type: data.type }));
const imageData = await extractPixelData(new Blob([new Uint8Array(data.content.data)], { type: data.type }));
editor.handle.pasteImage(data.filename, new Uint8Array(imageData.data), imageData.width, imageData.height);
});
editor.subscriptions.subscribeJsMessage(TriggerSaveDocument, (triggerSaveDocument) => {