You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`error: found wildcard git version ${v}. package.json must pin the exact version of ${packageDetails.name} in the format <protocol>:<packagePath>#<commitHash>`)
162
+
varerror=newError(`found wildcard git version ${v}. \
163
+
package.json must pin the exact version of ${packageDetails.name} \
164
+
in the format <protocol>:<packagePath>#<commitHash>. \
165
+
commitHash is the full hash with 40 chars.`)
166
+
deleteerror.stack
167
+
throwerror
168
+
/* too complex
169
+
// guess commit hash of installed package
170
+
var stats = lstatSync(packageDetails.path)
171
+
if (stats.isSymbolicLink()) {
172
+
var linkTarget = readlinkSync(packageDetails.path)
173
+
if (linkTarget.startsWith(".pnpm")) {
174
+
var match = linkTarget.match(/^\.pnpm\/[^/]+@([0-9a-f]{10})_[0-9a-f]{32}\//)
175
+
if (match) {
176
+
gitCommit = match[1]
177
+
if (isDebug) console.log(`parsed gitCommit ${gitCommit} from pnpm symlink`)
178
+
}
179
+
}
180
+
}
181
+
*/
156
182
}
157
183
if(isGit){
158
184
return{full: v, protocol, location, gitCommit }
@@ -163,17 +189,32 @@ export function makePatch({
163
189
// -> use version number from package's package.json
console.log(`patch-package/makePatch: warning: using version ${version} from ${packageDetails.name}/package.json`)
192
+
console.log(`patch-package/makePatch: using version ${version} from ${packageDetails.name}/package.json`)
167
193
}
168
194
return{ version }
169
195
}
170
196
}
171
-
if(!v.match(/^[0-9]+\.[0-9]+\.[0-9]+/)){
172
-
thrownewError(`error: found wildcard version. package.json must pin the exact version of ${packageDetails.name} in the format <package>@<major>.<minor>.<patch>`)
0 commit comments