From d5e82be7504cdcd7dfe10532b97212f22a04f758 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 29 Aug 2023 13:48:52 -0400 Subject: [PATCH] feat(create-remix): allow dots in nested folder names in GitHub repo shorthand (#7277) --- .changeset/create-remix-folder-names-dot.md | 5 +++++ .../__tests__/create-remix-test.ts | 19 ++++++++++++++++++ .../__tests__/fixtures/nested-dir-repo.tar.gz | Bin 34304 -> 7078 bytes packages/create-remix/copy-template.ts | 6 +++++- packages/create-remix/index.ts | 4 +++- 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .changeset/create-remix-folder-names-dot.md diff --git a/.changeset/create-remix-folder-names-dot.md b/.changeset/create-remix-folder-names-dot.md new file mode 100644 index 00000000000..681d3020972 --- /dev/null +++ b/.changeset/create-remix-folder-names-dot.md @@ -0,0 +1,5 @@ +--- +"create-remix": patch +--- + +Allow dots in github repo shorthand notation folder names (i.e., `npx create-remix --template remix-run/examples/socket.io`) diff --git a/packages/create-remix/__tests__/create-remix-test.ts b/packages/create-remix/__tests__/create-remix-test.ts index bc15019c927..5c8d4c536b4 100644 --- a/packages/create-remix/__tests__/create-remix-test.ts +++ b/packages/create-remix/__tests__/create-remix-test.ts @@ -228,6 +228,25 @@ describe("create-remix CLI", () => { expect(fse.existsSync(path.join(projectDir, "app/root.tsx"))).toBeTruthy(); }); + it("works for GitHub username/repo/path combo (when dots exist in folder)", async () => { + let projectDir = getProjectDir("github-username-repo-path-dots"); + + let { status, stderr } = await execCreateRemix({ + args: [ + projectDir, + "--template", + "fake-remix-tester/nested-dir/folder.with.dots", + "--no-git-init", + "--no-install", + ], + }); + + expect(stderr.trim()).toBeFalsy(); + expect(status).toBe(0); + expect(fse.existsSync(path.join(projectDir, "package.json"))).toBeTruthy(); + expect(fse.existsSync(path.join(projectDir, "app/root.tsx"))).toBeTruthy(); + }); + it("fails for GitHub username/repo/path combo when path doesn't exist", async () => { let projectDir = getProjectDir("github-username-repo-path-missing"); diff --git a/packages/create-remix/__tests__/fixtures/nested-dir-repo.tar.gz b/packages/create-remix/__tests__/fixtures/nested-dir-repo.tar.gz index e0db0c2fc5806783dc9f6bd23af4b7eb78174646..f2511282e0136a20bc81ed7958cd88aab5a5c22c 100644 GIT binary patch literal 7078 zcma)=c{J4F`}adgXh_)^TPaym*_SCoTBz(XWJ}4OjCF>rWtpT%VPpx}m#i^%*+toz zVX_W0))}*Yo_^o+ea?CQdd}~^_qp!ty3TdI?sM*QpEo%1#Idl(Ew^KA+fe(r;x-|I zJ##-|&Z}9h_~pBXf7^=uEWejC+k1x4;T}Qk7g^sj90B*=wGc z5@YRP@j79t5cf)E>77i>wB>^m-N@`8a$gmU*!TEyG%4s8W~1IVpJuXumF?unW^ZrI zZR|UZ0>D}z@YPwz_@bkNz5igbRoWcEz_joo#lZ|W$6tNVy~gEIV*1FF{jQBAFNM#) z9&UJPqZYre5R5%$2j6XF_56NQ>Y|l!AI`{RH^mtxDSnwf&@<& zesd*9OHY~u^qrpxd4SYy9R}CX@{0cRD8f3bzu*QibmA8zL!|!_6_i(Y4>4$~=yc~y z>8eABzJEVqS0o0R>O~?QfF=9u#vy3~1*S}kh^Q*VndJj>V;M=MynEW0)C|Llf7q5j zGP|JJFCyiml-d8TTAW8dXv#B8OT(e4G%csc^I3_DT+;K#`N`hz@w%U^b2LiRA80#5 z1CkgkZ=8{yLI*c*qJ{I*`U|X!|9l-te-QX>a-jI@LfRD#t4zPokr^sk%mMxdCD8LuRay}LI>e)hnh z#}>&nU)wJLOde{fF+l}o_W&F%$XsGE!&dQdMMUBNasI=-hGamtX{%}+h`yk|o%G+OL108A2x9Rjmyl;tQOLJ;{70BM@`hsuN$Y;biZB=o6`$|b8m>352^Tx z{eJpU)#a1B-yu|eZRPqGt9#xl9Kz*|_b;#U>PUw@EVZ<8GZ{$V?!E?h%0F!SR`^Fz zwE2x$lV`=ID0+4~%X!arIW^h~lls`Uo(@Iy>w&dwo=l7A5kD7w*EPL*=GIMYmkK)vAY!z(=*zZJ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{HNa_@jo>9#rIxVs)J3+mfj)TOTEs; ze~rmM{Kwz*iTC&{^qswoXC8fHzDTql{iS>E@305=htG`Ly(N4sF$K1n{YiKa z-_YG^HvUG>@f&vUTe?J?2mfz({TKZIS^4fmXSUmYA8JwPByvwqhTapS!na1^9_WJq zXYUXDhfWd4qGPwK{`D)JiTNv?r=X6&ULxluz#YDjlgDNAsZ(IH;C&-`&l3JY&PTpS z+_OWuZX@S^Liw$==N!|6d@8{ljSwB`H*Iq$IS401rt2mRyR9cMtO zeNpQ=A(*Mj*V@YKWZ(*q52;ZbqMiko4rf#l&~3?}5FmH`Wh%zPg8= z(3Njc2j}+}66F1o1MIMj(2(XmPd$`xJ9(*sS0ra#vu<&>F4<~QP9eYijH3Bxy#JJjzi<3FqhJMnA z*PQioH8R)R^KYt!*t&`4!CT~-wOEt2InRyl1!w#^{6^M8o?G|=IW32K4c9mP9gwgF zyetRqY&kv_n*dCl4eSw&!0DQ5q`_!DTlxOTBwinJAkqoPnM6@bM0ir#T@0=ti^q}W~J-$v2fna z?!g({`4Ju7ZomKf3OGCL-M`$ghaB8&zBRf&IIhNh6&=Pkhu;asHZIBSoBa9};dE7a zd*!%t{XcHtPrmQ^cRuX;cZ9vW-T3#-N`a7%VgG%H$U8&6yW5R_-@Fv4{P$n%A03SI z_umuYf2`2}iZ}lIFM6u~>~-b;|2opw+rRPmUm75J&99dI{U`qSNLaq{=bvh(-p0fY O3T#kdg92|}3j9CcaU`?= diff --git a/packages/create-remix/copy-template.ts b/packages/create-remix/copy-template.ts index 6959d00d24d..cf10b6b432d 100644 --- a/packages/create-remix/copy-template.ts +++ b/packages/create-remix/copy-template.ts @@ -384,10 +384,14 @@ function isValidGithubRepoUrl( } function isGithubRepoShorthand(value: string) { + if (isUrl(value)) { + return false; + } // This supports :owner/:repo and :owner/:repo/nested/path, e.g. // remix-run/remix // remix-run/remix/templates/express - return /^[\w-]+\/[\w-]+(\/[\w-]+)*$/.test(value); + // remix-run/examples/socket.io + return /^[\w-]+\/[\w-]+(\/[\w-.]+)*$/.test(value); } function isGithubReleaseAssetUrl(url: string) { diff --git a/packages/create-remix/index.ts b/packages/create-remix/index.ts index d58788499bf..84e61b07dcf 100644 --- a/packages/create-remix/index.ts +++ b/packages/create-remix/index.ts @@ -317,7 +317,9 @@ async function copyTempDirToAppDirStep(ctx: Context) { let files1 = await getDirectoryFilesRecursive(ctx.tempDir); let files2 = await getDirectoryFilesRecursive(ctx.cwd); - let collisions = files1.filter((f) => files2.includes(f)); + let collisions = files1 + .filter((f) => files2.includes(f)) + .sort((a, b) => a.localeCompare(b)); if (collisions.length > 0) { let getFileList = (prefix: string) => {