Skip to content

docs: refresh readme, package metadata and version header for 2.0.0 - #116

Merged
cesutherland merged 3 commits into
masterfrom
hsd/issue-108
Oct 30, 2026
Merged

cesutherland merged 3 commits into
masterfrom
hsd/issue-108

Conversation

@hsd-bot

@hsd-bot hsd-bot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Closes #108

Summary

  • Version header: js/license.js no longer hard-codes 1.0.3; make/build.js writes // js-imagediff <package.json version> as the first line of imagediff.js and imagediff.min.js. A new spec/VersionSpec.js checks that header when the specs run against a built file (npm run test:built, so npm run release and npm publish), keeping it in step with package.json.
  • README: node-canvas link points at Automattic; Node requirements (^18.12.0 || >=20.9.0) and node-canvas 3 install notes (prebuilt binaries, Cairo only when building from source); npm install imagediff / require usage; CLI long flags and exit status; Jasmine 2+ matcher snippet with an example expect; demo link moved to github.io (the github.com Pages domain no longer resolves); HUSL link → HSLuv; typo fix.
  • npm package: files allowlist — imagediff.js, imagediff.min.js, js/imagediff.js (the CLI requires it), bin/, browser/. npm pack --dry-run now lists 8 files: those plus LICENSE, README.md, package.json.
  • package.json: adds license: MIT, bugs, https repository URL, and homepage → the GitHub README.
  • Changelog: 2.0.0 entry with breaking changes first; replaced the <h3> HTML headings, which broke the list rendering, with Markdown headings.
  • bower.json deleted.

Decisions

  • Built files aren't rebuilt (as CONTRIBUTING says, that happens only at release). The committed imagediff.js keeps its 1.0.3 header until the release PR runs npm run release, and the new spec makes that run fail if the header doesn't match. I checked this locally: npm run release passes and both headers read 2.0.0-alpha.1. I then reverted the built files.
  • Version not bumped: package.json stays at 2.0.0-alpha.1. Bumping to 2.0.0 belongs to the release step, and the changelog entry is already headed 2.0.0.
  • Jasmine 1 test demo link dropped: humblesoftware.github.io/js-imagediff/test.html still uses Jasmine 1 (this.addMatchers). The README now links only the main demo and examples/. Updating the gh-pages branch is out of scope.
  • Changelog stays in the README, where the earlier entries are, rather than moving to a new CHANGELOG.md.
  • Commit split: the bower.json deletion ended up in the first commit (build: stamp the package version…) instead of the metadata commit. I didn't rewrite the pushed history to move it.

Testing

In the dev container: npm test passes (44 Node specs, 39 browser specs), and npm run release passes against both built files (45 Node specs, including the header check).

🤖 Generated with Claude Code

hsd-bot and others added 3 commits October 30, 2026 11:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ers need

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsd-bot

hsd-bot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

hsd review round 1

Verdict: approve.

This covers every item in #108:

  • Version header: js/license.js no longer hard-codes a version, and make/build.js stamps package.json's version into both built files. spec/VersionSpec.js runs only against a built file, so npm run release and npm publish both fail if the header doesn't match. The specs run from the source don't check it, since the source has no header.
  • README: Jasmine 2+ matcher usage, Automattic node-canvas 3, Node ^18.12.0 || >=20.9.0 (matches engines), the github.io demo link and the HSLuv link. The CLI flags and exit status match bin/imagediff.
  • npm package: the files allowlist covers everything main, bin and the browser field point at, plus js/imagediff.js, which the CLI requires.
  • package.json: license, bugs, repository and homepage are complete.
  • Changelog: the 2.0.0 entry lists breaking changes first. The other entries match what landed in earlier PRs (af7f5dc and the Jasmine 7 upgrade).
  • bower.json is removed. There are no code changes.

Verified in the dev container (hsd-js-imagediff-issue-108):

  • npm test passes: 44 Node specs and 39 browser specs.
  • npm pack --dry-run lists 8 files: LICENSE, README.md, bin/imagediff, browser/canvas.js, imagediff.js, imagediff.min.js, js/imagediff.js and package.json.
  • npm run release passes against both built files (45 specs each). Both headers read // js-imagediff 2.0.0-alpha.1. I then reverted the built files.

Non-blocking nits:

  • The committed imagediff.js and imagediff.min.js still say 1.0.3 until the release PR rebuilds them. This is intended, and the new spec makes the release fail if they aren't rebuilt.
  • The CLI's own usage message (bin/imagediff) still prints the old [-e|equal] form. That's code, so it's out of scope here.
  • The bower.json deletion is in the build: stamp… commit rather than the metadata commit. That's fine if the PR is squash-merged.

@hsd-bot

hsd-bot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

hsd: ready for human review after 1 review round(s). Agent sessions are still live in tmux -L hsd-js-imagediff attach -t issue-108-docs-refresh-readme-package-metadata-and.

@cesutherland
cesutherland merged commit 4a975da into master Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: refresh README, package metadata, and version header for 2.0.0

2 participants