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
{{ message }}
Repository navigation
Commit c477b6f
Browse filesBrowse the repository at this point in the historyBrowse files
docs: fix transformResult example, which never worked as written
Browser-verified the local dist/ build against jQuery 4 and found the
readme's non-standard-payload example is broken: the default dataType is
"text", so $.ajax hands transformResult the raw response STRING and
`response.myData` is undefined. The built-in transformResult copes by
JSON.parse-ing string input, but a custom one replaces that — so the
documented snippet silently yields zero suggestions (or throws, depending
how the callback indexes the payload).
This is the same example that issue #891 was filed against; widening the
parameter type made it compile, which would have made a non-working
snippet type-check cleanly.
- readme: add `dataType: 'json'` to both snippets and explain the
string-vs-object distinction, with the JSON.parse alternative.
- test: cover the dataType: "json" path — asserts transformResult gets a
parsed object and maps a non-standard payload. The existing spec covers
the default "text" path (it calls result.split(",")), so both are now
pinned. 42 specs pass.
- docs/index.htm: version stamp said 2.0.2 while npm is on 2.0.5; bump it
and add a release-flow step so it stops drifting.
Verified in Chrome: local UMD, minified UMD and ESM bundles all register
and work on jQuery 4.0.0 (grouping, ghost hint, keyboard and mouse
selection, data round-trip, mockjax ajax lookup), and the live demo runs
the published 2.0.5 from jsDelivr on jQuery 3.7.1.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X29RAqzWDUD7UptThtJZGv
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,8 @@ The minified UMD is ~13 KB; the unminified is ~26 KB.
61
61
1. Bump `version` in `package.json`.
62
62
2.`npm install --package-lock-only` — keeps the lockfile's own `version` field in step. Easy to forget; 2.0.5 shipped with a lockfile still claiming 2.0.4 (harmless — `npm ci` doesn't validate it and the tarball excludes it — but it drifts).
63
63
3.`npm run build` — propagates the new version into the banner of each `dist/` JS file (via the build script) and syncs `devbridge-autocomplete.jquery.json`.
64
-
4. Commit as `chore(release): <version>`, then tag `v<version>` and push the tag — `.github/workflows/release.yml` fires on `v*`, re-runs the full CI sweep, publishes to npm with provenance (OIDC, no token), and opens the GitHub Release. Registry propagation lags the workflow by a minute or two, so `npm view` can still report the previous version right after a green run — confirm against `https://registry.npmjs.org/devbridge-autocomplete` before assuming the publish failed.
64
+
4. Update the version stamp in `docs/index.htm` (the `stamp__big` / `stamp__line3` spans, around line 33) — it's hand-maintained and visible on the live demo, so it drifts silently. It sat at 2.0.2 while npm was on 2.0.5.
65
+
5. Commit as `chore(release): <version>`, then tag `v<version>` and push the tag — `.github/workflows/release.yml` fires on `v*`, re-runs the full CI sweep, publishes to npm with provenance (OIDC, no token), and opens the GitHub Release. Registry propagation lags the workflow by a minute or two, so `npm view` can still report the previous version right after a green run — confirm against `https://registry.npmjs.org/devbridge-autocomplete` before assuming the publish failed.
0 commit comments