Unverified 提交 28d1c608 authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Enable native git & bump to 0.33.0-beta.1 (#2095)

<!-- CURSOR_SUMMARY --> > [!NOTE] > **Enable native git by default** > > - Sets `enableNativeGit: true` in `DEFAULT_SETTINGS` within `src/main/settings.ts` so new users have native git enabled by default. > - Updates `package.json` version to `0.33.0-beta.1`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0f8b0c3a47fc48b6efe5ba844176b6844dc31eb5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Enabled native Git by default and bumped the app version to 0.33.0-beta.1. Default settings now set enableNativeGit to true so new installs use the system Git out of the box. <sup>Written for commit 0f8b0c3a47fc48b6efe5ba844176b6844dc31eb5. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
上级 56e79c5c
...@@ -233,11 +233,11 @@ export class PageObject { ...@@ -233,11 +233,11 @@ export class PageObject {
async setUp({ async setUp({
autoApprove = false, autoApprove = false,
nativeGit = false, disableNativeGit = false,
enableAutoFixProblems = false, enableAutoFixProblems = false,
}: { }: {
autoApprove?: boolean; autoApprove?: boolean;
nativeGit?: boolean; disableNativeGit?: boolean;
enableAutoFixProblems?: boolean; enableAutoFixProblems?: boolean;
} = {}) { } = {}) {
await this.baseSetup(); await this.baseSetup();
...@@ -245,7 +245,7 @@ export class PageObject { ...@@ -245,7 +245,7 @@ export class PageObject {
if (autoApprove) { if (autoApprove) {
await this.toggleAutoApprove(); await this.toggleAutoApprove();
} }
if (nativeGit) { if (disableNativeGit) {
await this.toggleNativeGit(); await this.toggleNativeGit();
} }
if (enableAutoFixProblems) { if (enableAutoFixProblems) {
......
...@@ -64,9 +64,9 @@ test("supabase migrations", async ({ po }) => { ...@@ -64,9 +64,9 @@ test("supabase migrations", async ({ po }) => {
// Skip this test on Windows because git isn't configured and // Skip this test on Windows because git isn't configured and
// the mac test will catch this regression. // the mac test will catch this regression.
testSkipIfWindows("supabase migrations with native git", async ({ po }) => { testSkipIfWindows("supabase migrations with native git", async ({ po }) => {
// Turning on native Git to catch this edge case: // Keep native Git on to catch this edge case:
// https://github.com/dyad-sh/dyad/issues/608 // https://github.com/dyad-sh/dyad/issues/608
await po.setUp({ autoApprove: true, nativeGit: true }); await po.setUp({ autoApprove: true, disableNativeGit: false });
await po.sendPrompt("tc=add-supabase"); await po.sendPrompt("tc=add-supabase");
// Connect to Supabase // Connect to Supabase
......
import { PageObject, testSkipIfWindows, Timeout } from "./helpers/test_helper"; import { PageObject, testSkipIfWindows, Timeout } from "./helpers/test_helper";
import { expect } from "@playwright/test"; import { expect } from "@playwright/test";
const runSwitchVersionTest = async (po: PageObject, nativeGit: boolean) => { const runSwitchVersionTest = async (
await po.setUp({ autoApprove: true, nativeGit }); po: PageObject,
disableNativeGit: boolean,
) => {
await po.setUp({ autoApprove: true, disableNativeGit });
await po.sendPrompt("tc=write-index"); await po.sendPrompt("tc=write-index");
await po.snapshotPreview({ name: `v2` }); await po.snapshotPreview({ name: `v2` });
...@@ -25,10 +28,10 @@ const runSwitchVersionTest = async (po: PageObject, nativeGit: boolean) => { ...@@ -25,10 +28,10 @@ const runSwitchVersionTest = async (po: PageObject, nativeGit: boolean) => {
}); });
}; };
testSkipIfWindows("switch versions", async ({ po }) => { testSkipIfWindows("switch versions (native git)", async ({ po }) => {
await runSwitchVersionTest(po, false); await runSwitchVersionTest(po, false);
}); });
testSkipIfWindows("switch versions with native git", async ({ po }) => { testSkipIfWindows("switch versions (isomorphic git)", async ({ po }) => {
await runSwitchVersionTest(po, true); await runSwitchVersionTest(po, true);
}); });
import { PageObject, testSkipIfWindows, Timeout } from "./helpers/test_helper"; import { PageObject, testSkipIfWindows, Timeout } from "./helpers/test_helper";
import { expect } from "@playwright/test"; import { expect } from "@playwright/test";
const runUndoTest = async (po: PageObject, nativeGit: boolean) => { const runUndoTest = async (po: PageObject, disableNativeGit: boolean) => {
await po.setUp({ autoApprove: true, nativeGit }); await po.setUp({ autoApprove: true, disableNativeGit });
await po.sendPrompt("tc=write-index"); await po.sendPrompt("tc=write-index");
await po.sendPrompt("tc=write-index-2"); await po.sendPrompt("tc=write-index-2");
...@@ -42,7 +42,7 @@ testSkipIfWindows("undo with native git", async ({ po }) => { ...@@ -42,7 +42,7 @@ testSkipIfWindows("undo with native git", async ({ po }) => {
}); });
testSkipIfWindows("undo after assistant with no code", async ({ po }) => { testSkipIfWindows("undo after assistant with no code", async ({ po }) => {
await po.setUp({ autoApprove: true, nativeGit: false }); await po.setUp({ autoApprove: true });
// First prompt - no code generated // First prompt - no code generated
await po.sendPrompt("tc=no-code-response"); await po.sendPrompt("tc=no-code-response");
......
...@@ -4,7 +4,7 @@ import * as eph from "electron-playwright-helpers"; ...@@ -4,7 +4,7 @@ import * as eph from "electron-playwright-helpers";
import path from "node:path"; import path from "node:path";
const runVersionIntegrityTest = async (po: PageObject, nativeGit: boolean) => { const runVersionIntegrityTest = async (po: PageObject, nativeGit: boolean) => {
await po.setUp({ autoApprove: true, nativeGit }); await po.setUp({ autoApprove: true, disableNativeGit: !nativeGit });
// Importing a simple app with a few files. // Importing a simple app with a few files.
await po.page.getByRole("button", { name: "Import App" }).click(); await po.page.getByRole("button", { name: "Import App" }).click();
......
{ {
"name": "dyad", "name": "dyad",
"productName": "dyad", "productName": "dyad",
"version": "0.32.0", "version": "0.33.0-beta.1",
"description": "Free, local, open-source AI app builder", "description": "Free, local, open-source AI app builder",
"main": ".vite/build/main.js", "main": ".vite/build/main.js",
"repository": { "repository": {
......
...@@ -36,6 +36,8 @@ const DEFAULT_SETTINGS: UserSettings = { ...@@ -36,6 +36,8 @@ const DEFAULT_SETTINGS: UserSettings = {
selectedTemplateId: DEFAULT_TEMPLATE_ID, selectedTemplateId: DEFAULT_TEMPLATE_ID,
isRunning: false, isRunning: false,
lastKnownPerformance: undefined, lastKnownPerformance: undefined,
// Enabled by default in 0.33.0-beta.1
enableNativeGit: true,
}; };
const SETTINGS_FILE = "user-settings.json"; const SETTINGS_FILE = "user-settings.json";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论