web: fix build on macos (by updating packages)

This commit is contained in:
Abdullah Atta
2024-12-30 10:13:40 +05:00
parent 690b157387
commit c4af2b2159
4 changed files with 2499 additions and 2322 deletions

View File

@@ -36,7 +36,7 @@ await fs.rm("./build/", { force: true, recursive: true });
if (args.rebuild || !existsSync(path.join(webAppPath, "build"))) { if (args.rebuild || !existsSync(path.join(webAppPath, "build"))) {
await exec( await exec(
"yarn nx build:desktop @notesnook/web", "npx nx build:desktop @notesnook/web",
path.join(__dirname, "..", "..", "..") path.join(__dirname, "..", "..", "..")
); );
} }
@@ -58,11 +58,13 @@ if (args.variant === "mas") {
await exec(`yarn run build`); await exec(`yarn run build`);
if (args.run) { if (args.run) {
await exec(`yarn electron-builder --dir --x64`); await exec(`yarn electron-builder --dir --${process.arch}`);
if (process.platform === "win32") { if (process.platform === "win32") {
await exec(`.\\output\\win-unpacked\\Notesnook.exe`); await exec(`.\\output\\win-unpacked\\Notesnook.exe`);
} else if (process.platform === "darwin") { } else if (process.platform === "darwin") {
await exec(`./output/mac/Notesnook.app/Contents/MacOS/Notesnook`); if (process.arch === "arm64")
await exec(`./output/mac-arm64/Notesnook.app/Contents/MacOS/Notesnook`);
else await exec(`./output/mac/Notesnook.app/Contents/MacOS/Notesnook`);
} else { } else {
await exec(`./output/linux-unpacked/Notesnook`); await exec(`./output/linux-unpacked/Notesnook`);
} }

View File

@@ -70,8 +70,8 @@ async function onChange(first) {
if (first) { if (first) {
await spawnAndWaitUntil( await spawnAndWaitUntil(
["yarn", "nx", "start:desktop", "@notesnook/web"], ["npm", "run", "start:desktop"],
path.join(__dirname, "..", "..", ".."), path.join(__dirname, "..", "..", "web"),
(data) => data.includes("Network: use --host to expose") (data) => data.includes("Network: use --host to expose")
); );
} }

File diff suppressed because it is too large Load Diff

View File

@@ -43,9 +43,9 @@
"@theme-ui/core": "^0.16.1", "@theme-ui/core": "^0.16.1",
"@trpc/client": "10.45.2", "@trpc/client": "10.45.2",
"@trpc/react-query": "10.45.2", "@trpc/react-query": "10.45.2",
"@zip.js/zip.js": "^2.7.32", "@zip.js/zip.js": "^2.7.54",
"async-mutex": "^0.4.0", "async-mutex": "^0.4.0",
"axios": "^1.3.4", "axios": "^1.7.9",
"clipboard-polyfill": "4.0.0", "clipboard-polyfill": "4.0.0",
"comlink": "^4.3.1", "comlink": "^4.3.1",
"cronosjs": "^1.7.1", "cronosjs": "^1.7.1",
@@ -55,11 +55,11 @@
"event-source-polyfill": "^1.0.25", "event-source-polyfill": "^1.0.25",
"fflate": "^0.8.0", "fflate": "^0.8.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"hash-wasm": "^4.9.0", "hash-wasm": "^4.12.0",
"hotkeys-js": "^3.8.3", "hotkeys-js": "^3.8.3",
"katex": "0.16.2", "katex": "0.16.2",
"mac-scrollbar": "^0.13.5", "mac-scrollbar": "^0.13.6",
"mutative": "^1.0.6", "mutative": "^1.1.0",
"pdfjs-dist": "3.6.172", "pdfjs-dist": "3.6.172",
"phone": "^3.1.14", "phone": "^3.1.14",
"platform": "^1.3.6", "platform": "^1.3.6",
@@ -69,12 +69,12 @@
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-dropzone": "^14.2.3", "react-dropzone": "^14.2.3",
"react-error-boundary": "^4.0.12", "react-error-boundary": "^4.0.12",
"react-freeze": "^1.0.3", "react-freeze": "^1.0.4",
"react-hot-toast": "^2.4.1", "react-hot-toast": "^2.4.1",
"react-loading-skeleton": "^3.3.1", "react-loading-skeleton": "^3.3.1",
"react-modal": "3.16.1", "react-modal": "3.16.3",
"react-qrcode-logo": "^2.9.0", "react-qrcode-logo": "^2.9.0",
"react-resizable-panels": "^2.0.17", "react-resizable-panels": "^2.1.7",
"react-scroll-sync": "^0.11.2", "react-scroll-sync": "^0.11.2",
"react-virtuoso": "^4.6.2", "react-virtuoso": "^4.6.2",
"snarkdown": "^2.0.0", "snarkdown": "^2.0.0",
@@ -82,51 +82,49 @@
"w3c-keyname": "^2.2.6", "w3c-keyname": "^2.2.6",
"wouter": "2.12.1", "wouter": "2.12.1",
"zustand": "4.4.7", "zustand": "4.4.7",
"zustand-mutative": "^1.0.1" "zustand-mutative": "^1.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.22.5", "@babel/core": "^7.22.5",
"@playwright/test": "^1.48.2", "@playwright/test": "^1.48.2",
"@swc/core": "^1.5.24", "@swc/plugin-react-remove-properties": "^6.0.2",
"@swc/plugin-react-remove-properties": "^2.0.4",
"@trpc/server": "10.45.2", "@trpc/server": "10.45.2",
"@types/babel__core": "^7.20.1", "@types/babel__core": "^7.20.1",
"@types/event-source-polyfill": "^1.0.1", "@types/event-source-polyfill": "^1.0.5",
"@types/file-saver": "^2.0.5", "@types/file-saver": "^2.0.7",
"@types/marked": "^4.0.7", "@types/marked": "^6.0.0",
"@types/node-fetch": "^2.5.10", "@types/node-fetch": "^2.6.12",
"@types/platform": "^1.3.4", "@types/platform": "^1.3.6",
"@types/react": "^18.2.39", "@types/react": "^18.2.39",
"@types/react-avatar-editor": "^13.0.2", "@types/react-avatar-editor": "^13.0.3",
"@types/react-dom": "^18.2.17", "@types/react-dom": "^18.2.17",
"@types/react-modal": "3.16.3", "@types/react-modal": "3.16.3",
"@types/react-scroll-sync": "^0.9.0", "@types/react-scroll-sync": "^0.9.0",
"@types/wicg-file-system-access": "^2020.9.6", "@types/wicg-file-system-access": "^2023.10.5",
"@vitejs/plugin-react-swc": "^3.7.0", "@vitejs/plugin-react-swc": "^3.7.2",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.19",
"better-sqlite3-multiple-ciphers": "^9.4.0", "better-sqlite3-multiple-ciphers": "^9.4.0",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"dotenv": "^10.0.0", "dotenv": "^16.4.7",
"esbuild": "^0.24.2", "esbuild": "^0.24.2",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"find-process": "^1.4.4", "find-process": "^1.4.4",
"happy-dom": "^8.9.0", "happy-dom": "^16.0.1",
"ip": "^1.1.8", "ip": "^2.0.1",
"lorem-ipsum": "^2.0.4", "lorem-ipsum": "^2.0.4",
"otplib": "^12.0.1", "otplib": "^12.0.1",
"rollup": "^4.18.0", "rollup-plugin-visualizer": "^5.13.1",
"rollup-plugin-visualizer": "^5.12.0", "vite": "^5.4.11",
"vite": "^5.2.12",
"vite-plugin-env-compatible": "^2.0.1", "vite-plugin-env-compatible": "^2.0.1",
"vite-plugin-pwa": "^0.20.0", "vite-plugin-pwa": "^0.21.1",
"vite-plugin-svgr": "^4.2.0", "vite-plugin-svgr": "^4.3.0",
"vitest": "^1.6.0", "vitest": "^2.1.8",
"workbox-core": "^7.0.0", "workbox-core": "^7.3.0",
"workbox-expiration": "^7.0.0", "workbox-expiration": "^7.3.0",
"workbox-precaching": "^7.0.0", "workbox-precaching": "^7.3.0",
"workbox-routing": "^7.0.0", "workbox-routing": "^7.3.0",
"workbox-strategies": "^7.0.0" "workbox-strategies": "^7.3.0"
}, },
"scripts": { "scripts": {
"start": "cross-env PLATFORM=web vite", "start": "cross-env PLATFORM=web vite",