From a53fc0352abf33e2e8ef75cb4df034142d54e1a4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 10:52:26 +0000 Subject: [PATCH 1/3] Initial plan From 76ff89110c1b022c3839696f55f42e21ac4c5f74 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 11:11:26 +0000 Subject: [PATCH 2/3] Decouple build from lint/test to avoid deploy on validation Co-authored-by: cyanzhong <6745066+cyanzhong@users.noreply.github.com> --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b9c6a08..81e5a92 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "1.0.0", "description": "MarkEdit grammar checker based on Harper.", "scripts": { - "build": "yarn lint && yarn test && vite build", + "build": "vite build", + "precheck": "yarn lint && yarn test", "lint": "eslint .", "test": "vitest run", "reload": "osascript -e 'quit app \"MarkEdit\"' -e 'delay 1' -e 'launch app \"MarkEdit\"'", From 2a82cdfa196d8a0bed014a5f7cca04cf3829b04c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 11:17:41 +0000 Subject: [PATCH 3/3] Add vitest.config.mts to prevent deploy side-effect during tests Co-authored-by: cyanzhong <6745066+cyanzhong@users.noreply.github.com> --- package.json | 3 +-- vitest.config.mts | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 vitest.config.mts diff --git a/package.json b/package.json index 81e5a92..b9c6a08 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,7 @@ "version": "1.0.0", "description": "MarkEdit grammar checker based on Harper.", "scripts": { - "build": "vite build", - "precheck": "yarn lint && yarn test", + "build": "yarn lint && yarn test && vite build", "lint": "eslint .", "test": "vitest run", "reload": "osascript -e 'quit app \"MarkEdit\"' -e 'delay 1' -e 'launch app \"MarkEdit\"'", diff --git a/vitest.config.mts b/vitest.config.mts new file mode 100644 index 0000000..8a955aa --- /dev/null +++ b/vitest.config.mts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vitest/config'; +import mainPackage from './package.json' with { type: 'json' }; + +export default defineConfig({ + define: { + __PKG_VERSION__: JSON.stringify(mainPackage.version), + }, +});