Releases: jagi/meteor-astronomy
Releases · jagi/meteor-astronomy
2.2.4
- Add Meteor methods' checks for the
audit-argument-checks
package
2.2.3
2.2.2
2.2.1
- Fix not returning value from deprecated functions (
getMethods
,getMethod
,hasMethod
) in the methods module
2.2.0
- New class property
meteorMethods
for defining Meteor methods that will be executed on the client and server like regular Meteor methods.
const User = Class.create({
name: User,
collection: Users,
fields: {
firstName: String,
lastName: String
},
meteorMethods: {
rename(first, last, invocation) {
// invocation.isSimulation;
// invocation.unblock();
this.firstName = first;
this.lastName = last;
this.save();
}
}
});
const u = User.findOne();
// Possible ways of invocations.
u.rename('John', 'Smith', (err, result) => {
});
u.callMethod('rename', 'John', 'Smith', (err, result) => {
});
u.applyMethod('rename', ['John', 'Smith'], (err, result) => {
});
You can read more about Meteor methods in docs
methods
have been renamed tohelpers
. You can still use themethods
property but it's deprecated and will be removed in the future Astronomy releases.
2.1.5
- Fix the
getChildren
class method to get children on all depths
Parent.find(selector, {
children: true // Get children, grand children and so on
});
Parent.find(selector, {
children: 1 // Get only direct children
});
Parent.find(selector, {
children: 2 // Get children and grand children
});
Parent.getChildren(/* default true */);
- Add methods' checks for the
audit-argument-checks
package - Fix #513 infinite check loop of nested class for index definitions
2.1.4
2.1.3
New features:
- Class level validation - having the
Post
class you can now validate by callingPost.validate(rawData)
orPost.validateAll(rawData)
- Ability to get check pattern - - having the
Post
class you can callconst pattern = Post.getCheckPattern()
to get pattern and use it in the checkcheck(doc, pattern)
Fixes:
- Fix #445 IE11 error with Number constructor
- Fix not cloning options passed to the
find()
method
2.1.2
- Fix problem with incorrect values resolving in child classes
- Add information about class name in
ValidationError
andresolveError
method
2.1.1
- Consistent ID generation on client and server (works with the
validated-method
package) - Allow non ID selectors on the client when in simulation
- Support nested indexes
- By default clone class constructor argument and values being set using the
set()
method. Right now, if you don't want to clone by default, you can do so with the following codenew Post(args, {clone: false})
andpost.set(args, {clone: false})
.