GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — t3code/scripts/sync-reference-repos.test.ts at main · VitaCodez/t3code Expand file tree/ Copy pathsync-reference-repos.test.tsMore file actions 59 lines (53 loc) · 2.04 KB / Copy pathsync-reference-repos.test.tsFile metadata and controls59 lines (53 loc) · 2.04 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 import * as NodeServices from "@effect/platform-node/NodeServices"; import { assert, it } from "@effect/vitest"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import { referenceRepos } from "./lib/reference-repos.ts"; import { planReferenceRepoSync, resolveReferenceRepoRef } from "./sync-reference-repos.ts"; const effectRepo = referenceRepos[0]!; const alchemyEffect = referenceRepos[1]!; it.layer(NodeServices.layer)("sync-reference-repos", (it) => { it.effect("resolves reference tags from the root catalog", () => Effect.gen(function* () { const fs = yield* FileSystem.FileSystem; const path = yield* Path.Path; const rootDir = yield* fs.makeTempDirectoryScoped({ prefix: "sync-reference-repos-version-", }); yield* fs.writeFileString( path.join(rootDir, "pnpm-workspace.yaml"), "catalog:\n alchemy: 2.0.0-beta.84\n effect: 4.0.0-beta.73\n", ); assert.equal( yield* resolveReferenceRepoRef(effectRepo, rootDir, false), ); assert.equal(yield* resolveReferenceRepoRef(alchemyEffect, rootDir, false), "v2.0.0-beta.84"); }), ); it.effect("plans a shallow, tagless clone of the resolved ref", () => Effect.gen(function* () { const fs = yield* FileSystem.FileSystem; const path = yield* Path.Path; const rootDir = yield* fs.makeTempDirectoryScoped({ prefix: "sync-reference-repos-plan-", }); yield* fs.writeFileString( path.join(rootDir, "pnpm-workspace.yaml"), "catalog:\n effect: 4.0.0-beta.73\n", ); const plan = yield* planReferenceRepoSync(effectRepo, rootDir, false); assert.deepStrictEqual(plan.cloneArgs, [ "clone", "--quiet", "--depth=1", "--no-tags", "--single-branch", "https://github.com/Effect-TS/effect.git", ]); }), ); }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |