Skip to content

Commit 6035c9b

Browse files
committed
chore(create): revert pre-feature test placeholders + clarify integrity comment
Two PR review follow-ups: - `discovery.spec.ts` (#3137604410, #3137608041): the `@acme-corp` placeholder rename inadvertently touched pre-existing GitHub-URL tests that have nothing to do with the `@org` feature. Revert those four lines back to `acme-corp`; the new manifest-specific tests below keep `@your-org`. - `org-tarball.ts` (#3137690878): the `verifyIntegrity` comment claimed "don't silently accept" but the unknown-format branch does exactly that. Rewrite the comment to match reality — we skip verification for unknown integrity formats because `sha512-<base64>` is the universal case and erroring out on anything else would break extracts for no benefit.
1 parent bdba45d commit 6035c9b

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

packages/cli/src/create/__tests__/discovery.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ describe('GitHub template helpers', () => {
8585
});
8686

8787
it('should infer the repository name from GitHub templates', () => {
88-
expect(inferGitHubRepoName('github:your-org/fate-template')).toBe('fate-template');
89-
expect(inferGitHubRepoName('https://github.com/your-org/fate-template')).toBe('fate-template');
88+
expect(inferGitHubRepoName('github:acme-corp/fate-template')).toBe('fate-template');
89+
expect(inferGitHubRepoName('https://github.com/acme-corp/fate-template')).toBe('fate-template');
9090
});
9191

9292
it('should resolve GitHub templates to degit without reusing the original URL as destination', () => {
93-
const template = discoverTemplate('https://github.com/your-org/fate-template', ['my-app'], {
93+
const template = discoverTemplate('https://github.com/acme-corp/fate-template', ['my-app'], {
9494
rootDir: '/tmp/workspace',
9595
isMonorepo: false,
9696
monorepoScope: '',
@@ -106,7 +106,7 @@ describe('GitHub template helpers', () => {
106106
});
107107

108108
expect(template.command).toBe('degit');
109-
expect(template.args).toEqual(['your-org/fate-template', 'my-app']);
109+
expect(template.args).toEqual(['acme-corp/fate-template', 'my-app']);
110110
});
111111

112112
it('should keep manifest-resolved specifiers literal when skipShorthand=true', () => {

packages/cli/src/create/org-tarball.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ function verifyIntegrity(bytes: Uint8Array, integrity: string | undefined): void
3333
}
3434
const parsed = parseIntegrity(integrity);
3535
if (!parsed) {
36-
// Unknown format — don't fail hard, but don't silently accept either.
37-
// Registry responses normally include sha512; anything else is unusual.
36+
// Unknown integrity format — skip verification. Registry responses
37+
// normally advertise `sha512-<base64>`; anything else is unusual
38+
// enough that we'd rather let the extract continue than fail hard
39+
// on a format we don't understand.
3840
return;
3941
}
4042
const hash = createHash(parsed.algorithm);

0 commit comments

Comments
 (0)