Skip to content

Commit e4cf9c4

Browse files
committed
Deps -> Tracker
1 parent ab0f49e commit e4cf9c4

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

.jshintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
"check",
7171
"Match",
7272
"Tracker",
73-
"Deps",
7473
"EJSON",
7574
"Email",
7675
"Package",

package.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ Package.describe({
66
});
77

88
Package.onUse(function (api) {
9-
if (api.versionsFrom) {
10-
api.use('[email protected]');
11-
api.use('[email protected]');
12-
api.use('[email protected]');
13-
api.use('[email protected]');
14-
} else {
15-
api.use(['deps', 'underscore', 'check', 'random']);
16-
}
9+
api.use('[email protected]');
10+
api.use('[email protected]');
11+
api.use('[email protected]');
12+
api.use('[email protected]');
1713

1814
api.use('mdg:[email protected]', {unordered: true});
1915

simple-schema-context.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ SimpleSchemaValidationContext = function SimpleSchemaValidationContext(ss) {
2121
self._invalidKeys = [];
2222
//set up validation dependencies
2323
self._deps = {};
24-
self._depsAny = new Deps.Dependency();
24+
self._depsAny = new Tracker.Dependency();
2525
_.each(self._schemaKeys, function(name) {
26-
self._deps[name] = new Deps.Dependency();
26+
self._deps[name] = new Tracker.Dependency();
2727
});
2828
};
2929

@@ -182,12 +182,12 @@ SimpleSchemaValidationContext.prototype.keyIsInvalid = function simpleSchemaVali
182182
SimpleSchemaValidationContext.prototype.keyErrorMessage = function simpleSchemaValidationContextKeyErrorMessage(name) {
183183
var self = this, genericName = SimpleSchema._makeGeneric(name);
184184
self._deps[genericName] && self._deps[genericName].depend();
185-
185+
186186
var errorObj = self._getInvalidKeyObject(name, genericName);
187187
if (!errorObj) {
188188
return "";
189189
}
190-
190+
191191
return self._simpleSchema.messageForError(errorObj.type, errorObj.name, null, errorObj.value);
192192
};
193193

simple-schema.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ SimpleSchema = function(schemas, options) {
448448
// a place to store custom error messages for this schema
449449
self._messages = {};
450450

451-
self._depsMessages = new Deps.Dependency();
451+
self._depsMessages = new Tracker.Dependency();
452452
self._depsLabels = {};
453453

454454
_.each(self._schema, function(definition, fieldName) {
@@ -487,7 +487,7 @@ SimpleSchema = function(schemas, options) {
487487
self._autoValues[fieldName] = definition.autoValue;
488488
}
489489

490-
self._depsLabels[fieldName] = new Deps.Dependency();
490+
self._depsLabels[fieldName] = new Tracker.Dependency();
491491

492492
if (definition.blackbox === true) {
493493
self._blackboxKeys.push(fieldName);
@@ -567,7 +567,7 @@ SimpleSchema._makeGeneric = function(name) {
567567
return name.replace(/\.[0-9]+(?=\.|$)/g, '.$');
568568
};
569569

570-
SimpleSchema._depsGlobalMessages = new Deps.Dependency();
570+
SimpleSchema._depsGlobalMessages = new Tracker.Dependency();
571571

572572
// Inherit from Match.Where
573573
// This allow SimpleSchema instance to be recognized as a Match.Where instance as well
@@ -609,7 +609,7 @@ SimpleSchema.prototype.condition = function(obj) {
609609

610610
function logInvalidKeysForContext(context, name) {
611611
Meteor.startup(function() {
612-
Deps.autorun(function() {
612+
Tracker.autorun(function() {
613613
if (!context.isValid()) {
614614
console.log('SimpleSchema invalid keys for "' + name + '" context:', context.invalidKeys());
615615
}
@@ -627,7 +627,7 @@ SimpleSchema.prototype.namedContext = function(name) {
627627

628628
// In debug mode, log all invalid key errors to the browser console
629629
if (SimpleSchema.debug && Meteor.isClient) {
630-
Deps.nonreactive(function() {
630+
Tracker.nonreactive(function() {
631631
logInvalidKeysForContext(self._validationContexts[name], name);
632632
});
633633
}

0 commit comments

Comments
 (0)