GeezerVison is showing github.com — test(client-runtime): keep scoped key implementation private (#9955) · pingdotgg/t3code@f530d7b
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/client-runtime/src/environment
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/client-runtime/src/environment/knownEnvironment.test.ts -3Lines changed: 0 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | parseScopedProjectKey, |
7 | 7 | parseScopedThreadKey, |
8 | 8 | scopedProjectKey, |
9 | | - scopedRefKey, |
10 | 9 | scopedThreadKey, |
11 | 10 | scopeProjectRef, |
12 | 11 | scopeThreadRef, |
@@ -40,8 +39,6 @@ describe("scoped refs", () => { |
40 | 39 | const threadRef = scopeThreadRef(environmentId, ThreadId.make("thread-1")); |
41 | 40 |
|
42 | 41 | it("builds stable scoped project and thread keys", () => { |
43 | | - expect(scopedRefKey(projectRef)).toBe("environment-test:project-1"); |
44 | | - expect(scopedRefKey(threadRef)).toBe("environment-test:thread-1"); |
45 | 42 | expect(scopedProjectKey(projectRef)).toBe("environment-test:project-1"); |
46 | 43 | expect(scopedThreadKey(threadRef)).toBe("environment-test:thread-1"); |
47 | 44 | }); |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/client-runtime/src/environment/scoped.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -22,7 +22,7 @@ export function scopeThreadRef( |
22 | 22 | return { environmentId, threadId }; |
23 | 23 | } |
24 | 24 |
|
25 | | -export function scopedRefKey(ref: ScopedProjectRef | ScopedThreadRef): string { |
| 25 | +function scopedRefKey(ref: ScopedProjectRef | ScopedThreadRef): string { |
26 | 26 | const localId = "projectId" in ref ? ref.projectId : ref.threadId; |
27 | 27 | return `${ref.environmentId}:${localId}`; |
28 | 28 | } |
|