pkg-pr-new 0.0.41 → 0.0.42
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.
- package/dist/index.js +7 -6
- package/index.ts +5 -5
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -130,8 +130,7 @@ const main = defineCommand({
|
|
|
130
130
|
|
|
131
131
|
const isPeerDepsEnabled = !!args.peerDeps;
|
|
132
132
|
const isOnlyTemplates = !!args["only-templates"];
|
|
133
|
-
|
|
134
|
-
const isBinaryApplication = !!args.binaryApplication;
|
|
133
|
+
const isBinaryApplication = !!args.bin;
|
|
135
134
|
const comment: Comment = args.comment as Comment;
|
|
136
135
|
const selectedPackageManager = args.packageManager as
|
|
137
136
|
| "npm"
|
|
@@ -222,8 +221,9 @@ const main = defineCommand({
|
|
|
222
221
|
await verifyCompactMode(pJson.name);
|
|
223
222
|
}
|
|
224
223
|
|
|
224
|
+
const formattedSha = isCompact ? abbreviateCommitHash(sha) : sha;
|
|
225
225
|
const depUrl = new URL(
|
|
226
|
-
`/${owner}/${repo}/${pJson.name}@${
|
|
226
|
+
`/${owner}/${repo}/${pJson.name}@${formattedSha}`,
|
|
227
227
|
apiUrl,
|
|
228
228
|
).href;
|
|
229
229
|
deps.set(pJson.name, depUrl);
|
|
@@ -232,7 +232,7 @@ const main = defineCommand({
|
|
|
232
232
|
const resource = await fetch(depUrl);
|
|
233
233
|
if (resource.ok) {
|
|
234
234
|
console.warn(
|
|
235
|
-
`${pJson.name}@${
|
|
235
|
+
`${pJson.name}@${formattedSha} was already published on ${depUrl}`,
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -315,7 +315,7 @@ const main = defineCommand({
|
|
|
315
315
|
|
|
316
316
|
const noDefaultTemplate = args.template === false;
|
|
317
317
|
|
|
318
|
-
if (!noDefaultTemplate) {
|
|
318
|
+
if (!noDefaultTemplate && templates.length === 0) {
|
|
319
319
|
const project = createDefaultTemplate(
|
|
320
320
|
Object.fromEntries(deps.entries()),
|
|
321
321
|
);
|