- BREAKING: find hooks have been removed (due to Meteor 3 compatibility)
- Async hooks are now supported
- Meteor 3.0 is now the minimum required Meteor version
- Test suite minimum Meteor version is 2.12 to support new counts and to be fully compatible with Meteor 3
- Meteor
3.0-beta.0
is now a supported version, but not functionality wise (need to upgradecount
functions in tests)
- Updated
zodern:types
to v1.0.13 @storytellercz - Updated Meteor 3 supported version to
3.0-rc.10
for migration support, but will release full 3.0 supported version soon. @storytellercz - Fix loop in before.find when retuning false PR by rikvdlooi
- Updated
zodern:types
to v1.0.10 @storytellercz - Meteor
3.0-beta.0
is now a supported version, but not functionality wise (need to upgradecount
functions in code) @storytellercz
- Add direct async methods PR @alisnic
- Add support for async collection methods PR @jdgjsag67251
- Added additional Meteor version targets for Meteor
2.8.1
and3.0-alpha.15
@storytellercz - Updated tests targets to Meteor
2.8.1
and2.13.3
@storytellercz
- Fixed issue where after update did not use direct find PR @jdgjsag67251
- Automated issue comment PR @jankapunkt
- Add types definition PR @olragon
- Include
zodern:types
@storytellercz - Bump minimum required version to v2.3 due to
zodern:types
@storytellercz - Remove testing on Meteor 1.12 and add testing on Meteor 2.9 @storytellercz
- Fix: Replace and remove functions search indexes before splicing PR @jankapunkt
- Specify which fields of a document to pull into the before/after update hooks #256 @znewsham
- Added full CI suite for GitHub PR @jankapunkt
- Resolve conflict in Insert with autoform that resulted in lost callback #1710 @cpravetz
- Added GitHub action to run linter
- Updated dev dependencies
- Add compatibility to Meteor 2.3 while also maintaining backward compatibility.
- Testing now on Node 12 and 14
- Fix bug in upsert hook
after.update
not returning manipulated fields #258 @SimonSimCity
- Modernization of the package
- BREAKING CHANGE: Minimum required Meteor version is now 1.7.0.5
- Fixed selector not being able to be modified when String or MongoID is used
- Add
npm prune --production
to publication script to prevent addition of dev only packages to the bundle. Fixes issue #246
- BREAKING CHANGE: Minimum required Meteor version is now 1.6.1
- Fix unsafe
selector
inbefore.find
andbefore.findOne
when called without arguments. This is potentially a BREAKING CHANGE for those who are relying on the current behavior ofselector
inbefore.find
andbefore.findOne
- Align return values with original methods when a hook returns
false
- Always run
find
hooks when fetching documents forupdate
,upsert
andremove
hooks - Add support for update/upsert hooks to run on a different selector based on custom options when used together with a find hook that manipulates the selector based on custom options
- Fix Meteor.publish override, the previous override resulted in false positives of autopublish warning
- Use spacejam for headless testing, will make headless testing work locally
- Add support for the new modifiers $max, $min and $currentDate
- No longer fetch documents when no hooks are defined
- Fix conflict with sewdn:collection-behaviours package
- Updated dependencies and node version in tests
- If an async upsert operation returns an error, funnel it to the after.insert hook, fixes #185
- Add a note in the README concerning the use of
find
inupdate
andremove
, closes #191 - Handle mongo object _id (with result, ops, etc) in after insert by extracting the _id from ops, fixes meteor/meteor#7409
- Provide helper CollectionHooks.modify that gives the developer server access to the typically client-only LocalCollection._modify
- Fix doc having only _id property in after.insert triggered by an upsert when using $set, fixes #156
- Add support for
upsert
hooks. This is potentially a breaking change for those relying onbefore.update
forupsert
, as the behavior has changed to firebefore.upsert
instead, and eitherafter.insert
orafter.update
depending on the outcome of the upsert operation
- When creating a sub-class of Mongo.Collection, the constructor of the sub-class will now be able to inherit from the wrapped constructor
- Throwing an error in an async before hook will pass the error to the callback as the first argument
- Setting fetchPrevious to false should not prevent cloning options and modifier for use in after update hooks, fixes #97 and #138
- Move getUserId utility function to globally accessible CollectionHooks.getUserId
- Fix typo in update advice, where the local variable docIds was declared as docsIds and thus docIds was being leaked into global scope, causing weird side-effects as experienced in #109 (comment)
- Add MIT license file
- Add tests to verify direct update and insert by string _id (#89)
- Set api.versionsFrom to 1.0.3
- Add tests to verify hook functionality against CollectionFS (#84)
- Fix instances of direct calls returning raw data instead of the massaged versions (such as insert returning an object instead of _id) (#86, #73)
- Remove bind polyfill (#77)
- Use versionsFrom 0.9.1
- Fix
new Meteor.Collection
so as not to have to re-assign prototype
- Fix backward compatibility issue (meteor/meteor#2549)
- Update for Meteor 0.9.1
- Update for Meteor 0.9
- Store the value of
this.userId
from aMeteor.publish
function in an environment variable so it is preserved across yielding operations
- Allow specifying hook options on a per-collection basis
- Fix direct implementation and associated tests (#46)
- Implement second parameter
options
for all hooks (coll.before.update(func, {option: 123})
) - Add global
CollectionHooks.defaults
to specify options that apply to all or specific hooks - Add
fetchPrevious
option, which must be set tofalse
to prevent fetchingthis.previous
(which can also be set via globalCollectionHooks.defaults
) (#41)
- Eliminate unnecessary reduction in performance from iterating through individual documents when no hooks are defined. (#38)
- Add automated testing and additional tests for
userId
in publish functions. (#21) - Add functions for direct operations on underlying collection, ignoring hooks. (#3)
- Update argument/input logic of hooks for better compatibility with other packages. (#24)