From f36b687e230481c7337cecc32b628330486f2aed Mon Sep 17 00:00:00 2001 From: Amrutha Date: Sun, 20 Sep 2026 00:12:32 -0700 Subject: [PATCH] fix: ensure clean installs and tests on Windows and Linux --- electron/main/appBranding.test.ts | 6 +-- package-lock.json | 72 +++++++++++++++++++++++++++++++ package.json | 2 + 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/electron/main/appBranding.test.ts b/electron/main/appBranding.test.ts index 152dd33..a6ce975 100644 --- a/electron/main/appBranding.test.ts +++ b/electron/main/appBranding.test.ts @@ -1,4 +1,4 @@ -import { resolve } from "node:path"; +import { join, resolve } from "node:path"; import { describe, expect, it } from "vitest"; import { AGENT_LINK_SCHEMES, APP_DISPLAY_NAME, STORAGE_APPLICATION_NAME, agentIdFromDeepLink, nativeEnvironmentValue, storageDirectory } from "./appBranding"; @@ -6,8 +6,8 @@ describe("Errand native branding compatibility", () => { it("uses an independent Errand profile and keychain application name", () => { expect(APP_DISPLAY_NAME).toBe("Errand"); expect(STORAGE_APPLICATION_NAME).toBe("Errand"); - expect(storageDirectory("/Users/example/Library/Application Support")).toBe("/Users/example/Library/Application Support/Errand"); - expect(storageDirectory("/Users/example/Library/Application Support", "/tmp/errand-smoke/profile")).toBe("/tmp/errand-smoke/profile"); + expect(storageDirectory("/Users/example/Library/Application Support")).toBe(join("/Users/example/Library/Application Support", "Errand")); + expect(storageDirectory("/Users/example/Library/Application Support", "/tmp/errand-smoke/profile")).toBe(resolve("/tmp/errand-smoke/profile")); expect(storageDirectory("/Users/example/Library/Application Support", "custom-profile")).toBe(resolve("custom-profile")); }); diff --git a/package-lock.json b/package-lock.json index 2e893a8..be324e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "zod": "^3.25.76" }, "devDependencies": { + "@electron/get": "^5.1.0", "@eslint/js": "^9.39.1", "@resvg/resvg-js": "2.6.2", "@testing-library/jest-dom": "^6.9.1", @@ -37,6 +38,7 @@ "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", + "extract-zip": "^2.0.1", "globals": "^16.5.0", "js-yaml": "4.3.1", "jsdom": "^26.1.0", @@ -3018,6 +3020,17 @@ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "license": "MIT" }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.68.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.68.0.tgz", @@ -3943,6 +3956,16 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -5506,6 +5529,27 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "license": "MIT" }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5544,6 +5588,16 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -8373,6 +8427,13 @@ "url": "https://github.com/sponsors/jet2jet" } }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -11022,6 +11083,17 @@ "node": ">=12" } }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 826b4ed..ee7d616 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "zod": "^3.25.76" }, "devDependencies": { + "@electron/get": "^5.1.0", "@eslint/js": "^9.39.1", "@resvg/resvg-js": "2.6.2", "@testing-library/jest-dom": "^6.9.1", @@ -56,6 +57,7 @@ "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", + "extract-zip": "^2.0.1", "globals": "^16.5.0", "js-yaml": "4.3.1", "jsdom": "^26.1.0",