Skip to content

Commit c9f7bb1

Browse files
fix(mobile): correct GhosttyKit provenance
1 parent d5320a9 commit c9f7bb1

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎scripts/lib/third-party-licenses.test.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import * as NodeFSP from "node:fs/promises";
44
import * as NodeOS from "node:os";
55
import * as NodePath from "node:path";
6+
import * as NodeURL from "node:url";
67

78
import { afterEach, describe, expect, it } from "vite-plus/test";
89

@@ -13,6 +14,10 @@ import {
1314
} from "./third-party-licenses.js";
1415

1516
const tempDirectories: string[] = [];
17+
const REPOSITORY_ROOT = NodePath.resolve(
18+
NodePath.dirname(NodeURL.fileURLToPath(import.meta.url)),
19+
"../..",
20+
);
1621

1722
async function writeJson(path: string, value: unknown): Promise<void> {
1823
await NodeFSP.mkdir(NodePath.dirname(path), { recursive: true });
@@ -72,6 +77,21 @@ afterEach(async () => {
7277
});
7378

7479
describe("third-party license generation", () => {
80+
it("keeps the GhosttyKit notice pinned to the vendored framework revision", async () => {
81+
const [config, revision] = await Promise.all([
82+
NodeFSP.readFile(NodePath.join(REPOSITORY_ROOT, "third-party-licenses.config.json"), "utf8"),
83+
NodeFSP.readFile(
84+
NodePath.join(REPOSITORY_ROOT, "apps/mobile/modules/t3-terminal/Vendor/libghostty/VERSION"),
85+
"utf8",
86+
),
87+
]);
88+
89+
expect(config).toContain(revision.trim());
90+
expect(config).toContain(
91+
"https://github.com/Yash-Singh1/ghostty/tree/t3code/custom-io-ordered-feed",
92+
);
93+
});
94+
7595
it("collects production packages and custom asset notices", async () => {
7696
const fixture = await createFixture();
7797
const manifest = await generateThirdPartyLicenseManifest({

‎third-party-licenses.config.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@
8484
"bundles": ["ios", "mobile"],
8585
"license": "MIT",
8686
"name": "GhosttyKit",
87-
"sourceUrl": "https://github.com/Yash-Singh1/ghostty/tree/custom-io",
87+
"sourceUrl": "https://github.com/Yash-Singh1/ghostty/tree/t3code/custom-io-ordered-feed",
8888
"generatedNotices": [
8989
{
9090
"licenseId": "MIT",
9191
"copyrights": ["Copyright (c) 2024 Mitchell Hashimoto, Ghostty contributors"],
9292
"preamble": [
93-
"GhosttyKit\n\nThe iOS terminal renderer vendors GhosttyKit.xcframework, a libghostty build produced from T3's iOS 16 support fork. That fork was created from VVTerm's custom-I/O Ghostty fork.\n\nUpstream project: https://github.com/ghostty-org/ghostty\nCustom-I/O base fork: https://github.com/wiedymi/ghostty/tree/custom-io\nVendored source fork: https://github.com/Yash-Singh1/ghostty/tree/custom-io\nVendored revision: d36c3b8dffd0d756dd5e5f4933962f774a0e6753\nReference integration: https://github.com/vivy-company/vvterm"
93+
"GhosttyKit\n\nThe iOS terminal renderer vendors GhosttyKit.xcframework, a libghostty build produced from VVTerm's custom-I/O and live-padding Ghostty branch.\n\nUpstream project: https://github.com/ghostty-org/ghostty\nBased on: https://github.com/wiedymi/ghostty/tree/vvterm/custom-io-padding\nVendored source branch: https://github.com/Yash-Singh1/ghostty/tree/t3code/custom-io-ordered-feed\nVendored revision: cf8edc23f3a6a87a96e41a90013e89e987d34980\nReference integration: https://github.com/vivy-company/vvterm"
9494
]
9595
}
9696
]

0 commit comments

Comments
 (0)