@buildinternet/uploads 0.22.0 → 0.22.1

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/commands.js CHANGED
@@ -1026,6 +1026,8 @@ async function runAttachBranch(ctx, parsed, branch, run) {
1026
1026
  }
1027
1027
  if (!ctx.quiet && uploads.length > 0) {
1028
1028
  process.stderr.write(`>> find these later: uploads find gh.branch=${branch.toLowerCase()}\n`);
1029
+ process.stderr.write(`>> staged: these auto-attach to this branch's PR when it opens ` +
1030
+ `(or run \`uploads attach --promote\` after opening)\n`);
1029
1031
  }
1030
1032
  }
1031
1033
  return failures.length === 0 ? 0 : 1;
package/dist/github.js CHANGED
@@ -196,14 +196,19 @@ function escapeMarkdownText(s) {
196
196
  * `PATCH /v1/:workspace/files/:key` can set any valid metadata value. A
197
197
  * whitespace-only value passes that validation (length-1 printable ASCII), so
198
198
  * treat it as absent rather than rendering a dangling separator.
199
+ *
200
+ * Bare `/` is stored/searchable but omitted from captions (issue #375) —
201
+ * alone it is a stray character, and as a prefix next to `state` it is
202
+ * noise. Only exact `/` after trim is suppressed.
199
203
  */
200
204
  function metaCaptionParts(meta) {
201
205
  const parts = [];
202
- for (const value of [meta?.path, meta?.state]) {
203
- const trimmed = value?.trim();
204
- if (trimmed)
205
- parts.push(trimmed);
206
- }
206
+ const path = meta?.path?.trim();
207
+ if (path && path !== "/")
208
+ parts.push(path);
209
+ const state = meta?.state?.trim();
210
+ if (state)
211
+ parts.push(state);
207
212
  return parts;
208
213
  }
209
214
  /** `<sub>` caption body for an inline image, or null when there is nothing to say. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildinternet/uploads",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "CLI and client for uploads.sh — workspace-scoped image hosting for GitHub embeds",
5
5
  "type": "module",
6
6
  "sideEffects": false,