Changesets · Branches · Tags · Compare
| Changeset | f98b68abc084aeb5757eb7572d87e4ce840a328161446ff478ad14ea468c3099 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-09-17 15:35 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-09-17 15:35 -07:00 |
| Parents | c44e8ca3a7d4, d0ef8f54cf49 |
1 file changed
modified packages/config-yaml/src/interfaces/slugs.ts +11 −4
| @@ -1,3 +1,5 @@ | ||
| 1 | +import os from "node:os"; | |
| 2 | + | |
| 1 | 3 | export interface PackageSlug { |
| 2 | 4 | ownerSlug: string; |
| 3 | 5 | packageSlug: string; |
| @@ -61,13 +63,18 @@ | ||
| 61 | 63 | fileUri: identifier.substring(7), |
| 62 | 64 | }; |
| 63 | 65 | } |
| 64 | - // Otherwise, it's a slug | |
| 65 | - else { | |
| 66 | + // support ~ by replacing with home directory | |
| 67 | + else if (identifier.startsWith("~")) { | |
| 66 | 68 | return { |
| 67 | - uriType: "slug", | |
| 68 | - fullSlug: decodeFullSlug(identifier), | |
| 69 | + uriType: "file", | |
| 70 | + fileUri: identifier.replace("~", os.homedir()), | |
| 69 | 71 | }; |
| 70 | 72 | } |
| 73 | + // Otherwise, it's a slug | |
| 74 | + return { | |
| 75 | + uriType: "slug", | |
| 76 | + fullSlug: decodeFullSlug(identifier), | |
| 77 | + }; | |
| 71 | 78 | } |
| 72 | 79 | |
| 73 | 80 | export enum VirtualTags { |