From 7c9412ec606aaa2f46991e7734cc9686195fe745 Mon Sep 17 00:00:00 2001 From: Richard Giraud Date: Mon, 18 Nov 2024 06:28:08 -0700 Subject: [PATCH] fix(sfppackage): fix handling of URL-encoded whitespace in repository URL This updates git-parse-url to version 16.0.0. --- package-lock.json | 31 ++++++++++++------- package.json | 2 +- tests/core/package/SfpPackageInquirer.test.ts | 3 +- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 745fa1769..3266813ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "dotenv": "16.3.1", "fast-xml-parser": "4.2.7", "fs-extra": "^11.1.1", - "git-url-parse": "14.0.0", + "git-url-parse": "^16.0.0", "glob": "^10.3.3", "handlebars": "^4.7.7", "hot-shots": "^8.5.0", @@ -7300,20 +7300,22 @@ } }, "node_modules/git-up": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz", - "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-8.0.0.tgz", + "integrity": "sha512-uBI8Zdt1OZlrYfGcSVroLJKgyNNXlgusYFzHk614lTasz35yg2PVpL1RMy0LOO2dcvF9msYW3pRfUSmafZNrjg==", + "license": "MIT", "dependencies": { "is-ssh": "^1.4.0", - "parse-url": "^8.1.0" + "parse-url": "^9.2.0" } }, "node_modules/git-url-parse": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-14.0.0.tgz", - "integrity": "sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-16.0.0.tgz", + "integrity": "sha512-Y8iAF0AmCaqXc6a5GYgPQW9ESbncNLOL+CeQAJRhmWUOmnPkKpBYeWYp4mFd3LA5j53CdGDdslzX12yEBVHQQg==", + "license": "MIT", "dependencies": { - "git-up": "^7.0.0" + "git-up": "^8.0.0" } }, "node_modules/github-from-package": { @@ -11840,11 +11842,16 @@ } }, "node_modules/parse-url": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz", - "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-9.2.0.tgz", + "integrity": "sha512-bCgsFI+GeGWPAvAiUv63ZorMeif3/U0zaXABGJbOWt5OH2KCaPHF6S+0ok4aqM9RuIPGyZdx9tR9l13PsW4AYQ==", + "license": "MIT", "dependencies": { + "@types/parse-path": "^7.0.0", "parse-path": "^7.0.0" + }, + "engines": { + "node": ">=14.13.0" } }, "node_modules/pascal-case": { diff --git a/package.json b/package.json index 7beabde1f..541bb109f 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dotenv": "16.3.1", "fast-xml-parser": "4.5.0", "fs-extra": "^11.1.1", - "git-url-parse": "14.0.0", + "git-url-parse": "^16.0.0", "glob": "^10.3.3", "handlebars": "^4.7.7", "hot-shots": "^8.5.0", diff --git a/tests/core/package/SfpPackageInquirer.test.ts b/tests/core/package/SfpPackageInquirer.test.ts index 4a715aaa3..5635795ce 100644 --- a/tests/core/package/SfpPackageInquirer.test.ts +++ b/tests/core/package/SfpPackageInquirer.test.ts @@ -15,8 +15,7 @@ describe('validateArtifactsSourceRepository', () => { sfpPackageInquirer.validateArtifactsSourceRepository(); }); - // TODO: re-enable once https://github.com/flxbl-io/sfp/issues/137 is fixed - it.skip.failing('should accept a good repository SSH URL with a URL-encoded space', async () => { + it('should accept a good repository SSH URL with a URL-encoded space', async () => { const repositoryUrl = 'git@github.com:flxbl-io/sfp%20test.git'; let sfpPackage: SfpPackage = new SfpPackage();