@pnpm/resolving.git-resolver 1100.0.4 → 1100.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,6 +101,7 @@ async function fromHostedGit(hosted, dispatcherOptions) {
|
|
|
101
101
|
fetchSpec: fetchSpec,
|
|
102
102
|
hosted: {
|
|
103
103
|
...hosted,
|
|
104
|
+
tarballtemplate: hosted.type === 'gitlab' ? gitlabTarballTemplate : hosted.tarballtemplate,
|
|
104
105
|
_fill: hosted._fill,
|
|
105
106
|
tarball: hosted.tarball,
|
|
106
107
|
},
|
|
@@ -108,6 +109,13 @@ async function fromHostedGit(hosted, dispatcherOptions) {
|
|
|
108
109
|
...parseGitParams(hosted.committish),
|
|
109
110
|
};
|
|
110
111
|
}
|
|
112
|
+
// hosted-git-info's default GitLab tarball URL contains an encoded slash
|
|
113
|
+
// (`%2F`) which survives into the virtual store directory name and makes
|
|
114
|
+
// Node refuse to import the package (ERR_INVALID_MODULE_SPECIFIER).
|
|
115
|
+
function gitlabTarballTemplate({ domain, user, project, committish }) {
|
|
116
|
+
const ref = committish ? encodeURIComponent(committish) : 'HEAD';
|
|
117
|
+
return `https://${domain}/${user}/${project}/-/archive/${ref}/${project}-${ref}.tar.gz`;
|
|
118
|
+
}
|
|
111
119
|
async function isRepoPublic(httpsUrl, dispatcherOptions) {
|
|
112
120
|
try {
|
|
113
121
|
const response = await fetchWithDispatcher(httpsUrl.replace(/\.git$/, ''), { method: 'HEAD', redirect: 'manual', retry: { retries: 0 }, dispatcherOptions });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/resolving.git-resolver",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.5",
|
|
4
4
|
"description": "Resolver for git-hosted packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"hosted-git-info": "npm:@pnpm/hosted-git-info@1.0.0",
|
|
31
31
|
"semver": "^7.7.4",
|
|
32
32
|
"@pnpm/error": "1100.0.0",
|
|
33
|
-
"@pnpm/
|
|
34
|
-
"@pnpm/
|
|
33
|
+
"@pnpm/resolving.resolver-base": "1100.1.2",
|
|
34
|
+
"@pnpm/network.fetch": "1100.0.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@jest/globals": "30.3.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/is-windows": "^1.0.2",
|
|
40
40
|
"@types/semver": "7.7.1",
|
|
41
41
|
"is-windows": "^1.0.2",
|
|
42
|
-
"@pnpm/resolving.git-resolver": "1100.0.
|
|
42
|
+
"@pnpm/resolving.git-resolver": "1100.0.5"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=22.13"
|