pkg-pr-new 0.0.16 → 0.0.17

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.
Files changed (3) hide show
  1. package/dist/index.js +11 -6
  2. package/index.ts +10 -4
  3. package/package.json +1 -1
package/index.ts CHANGED
@@ -142,13 +142,19 @@ const main = defineCommand({
142
142
  await verifyCompactMode(pJson.name);
143
143
  }
144
144
 
145
- deps.set(
146
- pJson.name,
147
- new URL(
145
+ const depUrl = new URL(
148
146
  `/${owner}/${repo}/${pJson.name}@${abbreviatedSha}`,
149
147
  apiUrl,
150
- ).href,
148
+ ).href
149
+ deps.set(
150
+ pJson.name,
151
+ depUrl,
151
152
  );
153
+
154
+ const resource = await fetch(depUrl)
155
+ if (resource.ok) {
156
+ console.warn(`${pJson.name}@${abbreviatedSha} was already published on ${depUrl}`)
157
+ }
152
158
  }
153
159
 
154
160
  for (const templateDir of templates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkg-pr-new",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",