Repository navigation
Release Notes: Clipify v1.2.0
Overview
This release makes Clipify safer to run anywhere and smarter about managing
clipboard history — without breaking any existing code. Everything from v1.1.x
continues to work exactly as before. v1.2.0 adds history search, item pinning,
and tagging, makes the library safe to import in Node and server-side rendering
(SSR) environments, and fixes two cases where the code and documentation
disagreed.
New Features
1. Search History
- Find clipboard items by text, key, or tag — case-insensitive, most-recent-first.
- New Method:
search.
Example:
const results = clipboard.search("invoice");2. Pin Items
- Pin an item to protect it from expiry, so a TTL won't remove something you
want to keep. - New Methods:
pinandunpin.
Example:
clipboard.pin("greeting");
clipboard.unpin("greeting");3. Tag Items
- Attach freeform tags to items and retrieve them by tag. Tags are de-duplicated.
- New Methods:
tagandgetByTag.
Example:
clipboard.tag("greeting", "work", "important");
const workItems = clipboard.getByTag("work");4. SSR / Node Safety
- Clipify can now be imported and used on the server without crashing.
- Where there is no system clipboard,
copyrecords to history only,paste
returns the most recent history item, andisClipboardSupported()returns
falseinstead of throwing — so the same code runs on server and client.
Improvements
- Type Exports:
- The package now exports its public types (
ClipboardItem,
ClipboardOptions,ClipboardEventListener) for consumers.
- The package now exports its public types (
- History Item Shape:
ClipboardItemnow optionally carriespinnedandtagsfields.
- Process Hygiene:
- Expiry timers are now
unref'd so they don't keep a Node process alive.
- Expiry timers are now
- Documentation:
- README updated with the new search, pin, and tag APIs and SSR notes.
Bug Fixes
copyFileexpiry:copyFilenow accepts the optionalexpiryTime
argument that the README already documented (copyFile(blob, key, 10000)).
Existing two-argument calls are unaffected.- Resilient copy:
copyno longer throws when a system-clipboard write
fails (e.g. permission or focus errors); the item is still recorded in
history and thecopyevent still fires. - No more crashes without
navigator: previouslycopy,paste, and
isClipboardSupportedcould throw in environments lacking
navigator.clipboard; these now degrade gracefully.
Breaking Changes
- None. This is a fully backward-compatible release. All v1.1.x code
continues to work without modification.
Notes & What's Next
clearHistory()is unchanged from v1.1.x: it clears the entire history,
including pinned items. Pinning currently protects against expiry, not
against an explicitclearHistory()call.- The next major release (v2.0.0) will introduce "real pins" —
clearHistory()will preserve pinned items by default, with an explicit
override to wipe them — alongside other deliberate, documented API changes.
How to Upgrade
- Update your package via NPM or Yarn:
npm update clipify- No code changes are required. Explore the new
search,pin, andtag
methods in the documentation.
Feedback
We appreciate your feedback! Please report issues or suggest features via our
GitHub Issues.
Thank you for using Clipify! 🎉