Repository navigation
Releases: MindInitiatives/clipify
Release list
v1.2.0
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! 🎉
v1.1.0
Release Notes: Clipify v1.1.0
Overview
This release introduces major enhancements to the Clipify library, extending its functionality for better clipboard management and usability. These updates include support for handling files, retrieving clipboard items by key, improved expiry management, and more comprehensive event handling.
New Features
1. File Handling
- Added the ability to store files (e.g., images, documents) in clipboard history.
- New Method:
copyFileto add files to the clipboard history.
Example:const fileBlob = new Blob(["File content"], { type: "text/plain" }); clipboard.copyFile(fileBlob, "fileKey", 10000);
2. Retrieve Items by Key
- You can now retrieve specific clipboard items by their associated key.
Example:const item = clipboard.getHistory("noteKey"); console.log(item);
3. Enhanced Expiry Management
- Clipboard items (both text and files) can now have an associated expiry time, after which they are automatically removed.
- Expired items trigger an
expireevent.
4. Improved Event System
- Added
copyandexpireevents for both text and files. - Listen to clipboard actions in real-time:
clipboard.on("copy", (data) => console.log("Copied:", data)); clipboard.on("expire", (data) => console.log("Expired:", data));
Improvements
- History Management:
- Improved the handling of clipboard history to differentiate between text and file items.
- Streamlined methods to access the full clipboard history or specific entries.
- API Simplification:
- Unified the handling of text and files with clearer method names.
- Added optional keys to better identify and retrieve items.
- Documentation:
- Updated JSDoc comments for all methods.
- Enhanced README for easier onboarding.
Bug Fixes
- Fixed incorrect type checks for clipboard items, ensuring compatibility with diverse content types.
- Addressed an issue where expiry timers were not cleared for already-expired items.
- Resolved errors in browsers lacking
navigator.clipboardsupport by providing clear fallback messaging.
Breaking Changes
getHistorynow requires a key to retrieve specific items. The old index-based retrieval has been deprecated.- Migration: Replace
clipboard.getHistory(index)withclipboard.getHistory(key).
- Migration: Replace
Deprecations
- Index-based retrieval for clipboard history is deprecated and will be removed in the next major release. Please migrate to key-based retrieval.
How to Upgrade
- Update your package via NPM or Yarn:
npm update clipify
- Review the new API changes in the documentation.
Feedback
We appreciate your feedback! Please report issues or suggest features via our GitHub Issues.
Thank you for using Clipify! 🎉
v1.0.0
- Clipboard History: Store multiple clipboard items and retrieve them later.
- Sensitive Data Expiry: Automatically expiring sensitive data for security.
- Event-based Notifications: Listen for clipboard changes in real time.
- Multiple File Support: Support for storing various file types such as text, images, and documents.
- Data Access: Retrieve specific or recent clipboard items easily.
Full Changelog: https://github.com/MindInitiatives/clipify/commits/v1.0.0