language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/expand_properties.js | @@ -43,6 +43,6 @@ function expandProperties(pattern, callback) {
} else {
callback(pattern);
}
-};
+}
export default expandProperties; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/get_properties.js | @@ -35,6 +35,6 @@ function getProperties(obj) {
ret[propertyNames[i]] = get(obj, propertyNames[i]);
}
return ret;
-};
+}
export default getProperties; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/instrumentation.js | @@ -128,7 +128,7 @@ function instrument(name, payload, callback, binding) {
}
return tryCatchFinally(tryable, catchable, finalizer);
-};
+}
/**
Subscribes to a particular event or instrumented block of code.
@@ -166,7 +166,7 @@ function subscribe(pattern, object) {
cache = {};
return subscriber;
-};
+}
/**
Unsubscribes from a particular event or instrumented block of code.
@@ -187,7 +187,7 @@ function unsubscribe(subscriber) {
subscribers.splice(index, 1);
cache = {};
-};
+}
/**
Resets `Ember.Instrumentation` by flushing list of subscribers.
@@ -198,6 +198,6 @@ function unsubscribe(subscriber) {
function reset() {
subscribers = [];
cache = {};
-};
+}
export {instrument, subscribe, unsubscribe, reset}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/is_blank.js | @@ -26,6 +26,6 @@ import isEmpty from 'ember-metal/is_empty';
*/
function isBlank(obj) {
return isEmpty(obj) || (typeof obj === 'string' && obj.match(/\S/) === null);
-};
+}
export default isBlank; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/merge.js | @@ -19,6 +19,6 @@ function merge(original, updates) {
original[prop] = updates[prop];
}
return original;
-};
+}
export default merge; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/mixin.js | @@ -385,7 +385,7 @@ function mixin(obj) {
var args = a_slice.call(arguments, 1);
applyMixin(obj, args, false);
return obj;
-};
+}
/**
The `Ember.Mixin` class allows you to create mixins, whose properties can be
@@ -441,7 +441,7 @@ function mixin(obj) {
@class Mixin
@namespace Ember
*/
-function Mixin() { return initMixin(this, arguments); };
+function Mixin() { return initMixin(this, arguments); }
Mixin.prototype = {
properties: null,
@@ -611,7 +611,7 @@ REQUIRED.toString = function() { return '(Required Property)'; };
*/
function required() {
return REQUIRED;
-};
+}
Alias = function(methodName) {
this.methodName = methodName;
@@ -639,7 +639,7 @@ Alias.prototype = new Descriptor();
*/
function aliasMethod(methodName) {
return new Alias(methodName);
-};
+}
// ..........................................................
// OBSERVER HELPER
@@ -694,7 +694,7 @@ function observer() {
func.__ember_observes__ = paths;
return func;
-};
+}
/**
Specify a method that observes property changes.
@@ -726,7 +726,7 @@ function immediateObserver() {
}
return observer.apply(this, arguments);
-};
+}
/**
When observers fire, they are called with the arguments `obj`, `keyName`.
@@ -798,6 +798,6 @@ function beforeObserver() {
func.__ember_observesBefore__ = paths;
return func;
-};
+}
-export {IS_BINDING, mixin, Mixin, required, aliasMethod, observer, immediateObserver, beforeObserver}
+export {IS_BINDING, mixin, Mixin, required, aliasMethod, observer, immediateObserver, beforeObserver}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/observer.js | @@ -29,11 +29,11 @@ function addObserver(obj, _path, target, method) {
watch(obj, _path);
return this;
-};
+}
function observersFor(obj, path) {
return listenersFor(obj, changeEvent(path));
-};
+}
/**
@method removeObserver
@@ -48,7 +48,7 @@ function removeObserver(obj, _path, target, method) {
removeListener(obj, changeEvent(_path), target, method);
return this;
-};
+}
/**
@method addBeforeObserver
@@ -63,33 +63,33 @@ function addBeforeObserver(obj, _path, target, method) {
watch(obj, _path);
return this;
-};
+}
// Suspend observer during callback.
//
// This should only be used by the target of the observer
// while it is setting the observed path.
function _suspendBeforeObserver(obj, path, target, method, callback) {
return suspendListener(obj, beforeEvent(path), target, method, callback);
-};
+}
function _suspendObserver(obj, path, target, method, callback) {
return suspendListener(obj, changeEvent(path), target, method, callback);
-};
+}
function _suspendBeforeObservers(obj, paths, target, method, callback) {
var events = map.call(paths, beforeEvent);
return suspendListeners(obj, events, target, method, callback);
-};
+}
function _suspendObservers(obj, paths, target, method, callback) {
var events = map.call(paths, changeEvent);
return suspendListeners(obj, events, target, method, callback);
-};
+}
function beforeObserversFor(obj, path) {
return listenersFor(obj, beforeEvent(path));
-};
+}
/**
@method removeBeforeObserver
@@ -104,6 +104,6 @@ function removeBeforeObserver(obj, _path, target, method) {
removeListener(obj, beforeEvent(_path), target, method);
return this;
-};
+}
export {addObserver, observersFor, removeObserver, addBeforeObserver, _suspendBeforeObserver, _suspendObserver,_suspendBeforeObservers, _suspendObservers, beforeObserversFor, removeBeforeObserver}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/observer_set.js | @@ -21,7 +21,7 @@ import {sendEvent} from "ember-metal/events";
*/
function ObserverSet() {
this.clear();
-};
+}
ObserverSet.prototype.add = function(sender, keyName, eventName) {
var observerSet = this.observerSet, | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/properties.js | @@ -26,7 +26,7 @@ var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
@private
@constructor
*/
-function Descriptor() {};
+function Descriptor() {}
// ..........................................................
// DEFINING PROPERTIES API
@@ -147,6 +147,6 @@ function defineProperty(obj, keyName, desc, data, meta) {
if (obj.didDefineProperty) { obj.didDefineProperty(obj, keyName, value); }
return this;
-};
+}
export {Descriptor, defineProperty}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/property_events.js | @@ -154,7 +154,7 @@ function chainsDidChange(obj, keyName, m, suppressEvents) {
function overrideChains(obj, keyName, m) {
chainsDidChange(obj, keyName, m, true);
-};
+}
/**
@method beginPropertyChanges
@@ -195,7 +195,7 @@ function endPropertyChanges() {
function changeProperties(cb, binding) {
beginPropertyChanges();
tryFinally(cb, endPropertyChanges, binding);
-};
+}
function notifyBeforeObservers(obj, keyName) {
if (obj.isDestroying) { return; } | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/property_get.js | @@ -123,7 +123,7 @@ function normalizeTuple(target, path) {
if (!path || path.length===0) throw new EmberError('Path cannot be empty');
return [ target, path ];
-};
+}
function _getPath(root, path) {
var hasThis, parts, tuple, idx, len;
@@ -150,14 +150,14 @@ function _getPath(root, path) {
if (root && root.isDestroyed) { return undefined; }
}
return root;
-};
+}
function getWithDefault(root, key, defaultValue) {
var value = get(root, key);
if (value === undefined) { return defaultValue; }
return value;
-};
+}
export default get;
export {get, getWithDefault, normalizeTuple, _getPath}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/property_set.js | @@ -137,6 +137,6 @@ function setPath(root, path, value, tolerant) {
*/
function trySet(root, path, value) {
return set(root, path, value, true);
-};
+}
export {set, trySet}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/run_loop.js | @@ -616,6 +616,6 @@ run._addQueue = function(name, after) {
if (indexOf.call(run.queues, name) === -1) {
run.queues.splice(indexOf.call(run.queues, after)+1, 0, name);
}
-}
+};
-export default run
+export default run; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/set_properties.js | @@ -26,6 +26,6 @@ function setProperties(self, hash) {
}
});
return self;
-};
+}
export default setProperties; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/utils.js | @@ -132,7 +132,7 @@ function guidFor(obj) {
}
return ret;
}
-};
+}
// ..........................................................
// META
@@ -250,18 +250,18 @@ function meta(obj, writable) {
obj[META_KEY] = ret;
}
return ret;
-};
+}
function getMeta(obj, property) {
var _meta = meta(obj, false);
return _meta[property];
-};
+}
function setMeta(obj, property, value) {
var _meta = meta(obj, true);
_meta[property] = value;
return value;
-};
+}
/**
@deprecated
@@ -317,7 +317,7 @@ function metaPath(obj, path, writable) {
}
return value;
-};
+}
/**
Wraps the passed function so that `this._super` will point to the superFunc
@@ -347,7 +347,7 @@ function wrap(func, superFunc) {
superWrapper.__ember_listens__ = func.__ember_listens__;
return superWrapper;
-};
+}
var EmberArray;
@@ -380,8 +380,8 @@ function isArray(obj) {
if (typeof EmberArray === "undefined") {
modulePath = 'ember-runtime/mixins/array';
- if (requirejs._eak_seen[modulePath]) {
- EmberArray = requireModule(modulePath)['default'];
+ if (Ember.__loader.registry[modulePath]) {
+ EmberArray = Ember.__loader.require(modulePath)['default'];
}
}
@@ -390,7 +390,7 @@ function isArray(obj) {
if (EmberArray && EmberArray.detect(obj)) { return true; }
if ((obj.length !== undefined) && 'object'=== typeOf(obj)) { return true; }
return false;
-};
+}
/**
Forces the passed object to be part of an array. If the object is already
@@ -416,7 +416,7 @@ function isArray(obj) {
function makeArray(obj) {
if (obj === null || obj === undefined) { return []; }
return isArray(obj) ? obj : [obj];
-};
+}
/**
Checks to see if the `methodName` exists on the `obj`.
@@ -460,7 +460,7 @@ function tryInvoke(obj, methodName, args) {
if (canInvoke(obj, methodName)) {
return args ? applyStr(obj, methodName, args) : applyStr(obj, methodName);
}
-};
+}
// https://github.com/emberjs/ember.js/pull/1617
var needsFinallyFix = (function() {
@@ -689,8 +689,8 @@ function typeOf(item) {
// ES6TODO: Depends on Ember.Object which is defined in runtime.
if (typeof EmberObject === "undefined") {
modulePath = 'ember-runtime/system/object';
- if (requirejs._eak_seen[modulePath]) {
- EmberObject = requireModule(modulePath)['default'];
+ if (Ember.__loader.registry[modulePath]) {
+ EmberObject = Ember.__loader.require(modulePath)['default'];
}
}
@@ -705,7 +705,7 @@ function typeOf(item) {
}
return ret;
-};
+}
/**
Convenience method to inspect an object. This method will attempt to
@@ -739,7 +739,7 @@ function inspect(obj) {
}
}
return "{" + ret.join(", ") + "}";
-};
+}
// The following functions are intentionally minified to keep the functions
// below Chrome's function body size inlining limit of 600 chars.
@@ -755,7 +755,7 @@ function apply(t /* target */, m /* method */, a /* args */) {
case 5: return m.call(t, a[0], a[1], a[2], a[3], a[4]);
default: return m.apply(t, a);
}
-};
+}
function applyStr(t /* target */, m /* method */, a /* args */) {
var l = a && a.length;
@@ -768,6 +768,6 @@ function applyStr(t /* target */, m /* method */, a /* args */) {
case 5: return t[m](a[0], a[1], a[2], a[3], a[4]);
default: return t[m].apply(t, a);
}
-};
+}
export {generateGuid, GUID_KEY, GUID_PREFIX, guidFor, META_DESC, EMPTY_META, META_KEY, meta, getMeta, setMeta, metaPath, inspect, typeOf, tryCatchFinally, isArray, makeArray, canInvoke, tryInvoke, tryFinally, wrap, applyStr, apply}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/watch_key.js | @@ -32,7 +32,7 @@ function watchKey(obj, keyName, meta) {
} else {
watching[keyName] = (watching[keyName] || 0) + 1;
}
-};
+}
function unwatchKey(obj, keyName, meta) {
var m = meta || metaFor(obj), watching = m.watching;
@@ -64,6 +64,6 @@ function unwatchKey(obj, keyName, meta) {
} else if (watching[keyName] > 1) {
watching[keyName]--;
}
-};
+}
export {watchKey, unwatchKey}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/watch_path.js | @@ -28,7 +28,7 @@ function watchPath(obj, keyPath, meta) {
} else {
watching[keyPath] = (watching[keyPath] || 0) + 1;
}
-};
+}
function unwatchPath(obj, keyPath, meta) {
var m = meta || metaFor(obj), watching = m.watching;
@@ -39,6 +39,6 @@ function unwatchPath(obj, keyPath, meta) {
} else if (watching[keyPath] > 1) {
watching[keyPath]--;
}
-};
+}
export {watchPath, unwatchPath}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/lib/watching.js | @@ -36,12 +36,12 @@ function watch(obj, _keyPath, m) {
} else {
watchPath(obj, _keyPath, m);
}
-};
+}
function isWatching(obj, key) {
var meta = obj[META_KEY];
return (meta && meta.watching[key]) > 0;
-};
+}
watch.flushPending = flushPendingChains;
@@ -54,7 +54,7 @@ function unwatch(obj, _keyPath, m) {
} else {
unwatchPath(obj, _keyPath, m);
}
-};
+}
/**
Call on an object when you first beget it from another object. This will
@@ -78,7 +78,7 @@ function rewatch(obj) {
if (chains && chains.value() !== obj) {
m.chains = chains.copy(obj);
}
-};
+}
var NODE_STACK = [];
@@ -121,6 +121,6 @@ function destroy(obj) {
}
}
}
-};
+}
export {watch, isWatching, unwatch, rewatch, destroy}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-metal/tests/observer_test.js | @@ -3,7 +3,7 @@
import Ember from 'ember-metal/core';
import testBoth from 'ember-metal/tests/props_helper';
import {addObserver, removeObserver, addBeforeObserver, _suspendObserver, _suspendObservers, removeBeforeObserver} from "ember-metal/observer";
-import {propertyWillChange, propertyDidChange} from 'ember-metal/property_events'
+import {propertyWillChange, propertyDidChange} from 'ember-metal/property_events';
import {create} from 'ember-metal/platform';
import {defineProperty} from 'ember-metal/properties';
import {computed, cacheFor} from 'ember-metal/computed'; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-routing/lib/helpers/action.js | @@ -321,6 +321,6 @@ function actionHelper(actionName) {
var actionId = ActionHelper.registerAction(actionName, action, hash.allowedKeys);
return new SafeString('data-ember-action="' + actionId + '"');
-};
+}
export {ActionHelper, actionHelper}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-routing/lib/helpers/link_to.js | @@ -919,7 +919,7 @@ function linkToHelper(name) {
};
return viewHelper.call(this, LinkView, options);
-};
+}
if (Ember.FEATURES.isEnabled("query-params-new")) {
@@ -946,6 +946,6 @@ if (Ember.FEATURES.isEnabled("query-params-new")) {
function deprecatedLinkToHelper() {
Ember.warn("The 'linkTo' view helper is deprecated in favor of 'link-to'");
return linkToHelper.apply(this, arguments);
-};
+}
-export {LinkView, deprecatedLinkToHelper, linkToHelper}
+export {LinkView, deprecatedLinkToHelper, linkToHelper}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-routing/lib/helpers/outlet.js | @@ -118,6 +118,6 @@ function outletHelper(property, options) {
options.hash.currentViewBinding = '_view.outletSource._outlets.' + property;
return viewHelper.call(this, viewClass, options);
-};
+}
export {outletHelper, OutletView}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-routing/lib/helpers/render.js | @@ -104,7 +104,7 @@ function renderHelper(name, contextString, options) {
// create a new controller
context = handlebarsGet(options.contexts[1], contextString, options);
} else {
- throw EmberError("You must pass a templateName to render");
+ throw new EmberError("You must pass a templateName to render");
}
Ember.deprecate("Using a quoteless parameter with {{render}} is deprecated. Please update to quoted usage '{{render \"" + name + "\"}}.", options.types[0] !== 'ID');
@@ -171,6 +171,6 @@ function renderHelper(name, contextString, options) {
}
viewHelper.call(this, view, options);
-};
+}
export default renderHelper; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-routing/lib/main.js | @@ -58,7 +58,7 @@ Router.resolvePaths = resolvePaths;
EmberHandlebars.ActionHelper = ActionHelper;
EmberHandlebars.OutletView = OutletView;
-EmberHandlebars.registerHelper('render', renderHelper)
+EmberHandlebars.registerHelper('render', renderHelper);
EmberHandlebars.registerHelper('action', actionHelper);
EmberHandlebars.registerHelper('outlet', outletHelper);
EmberHandlebars.registerHelper('link-to', linkToHelper); | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/compare.js | @@ -126,6 +126,6 @@ function compare(v, w) {
default:
return 0;
}
-};
+}
export default compare; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/computed/array_computed.js | @@ -181,6 +181,6 @@ function arrayComputed (options) {
}
return cp;
-};
+}
-export {arrayComputed, ArrayComputedProperty}
+export {arrayComputed, ArrayComputedProperty}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/computed/reduce_computed_macros.js | @@ -46,7 +46,7 @@ function sum(dependentKey){
return accumulatedValue - item;
}
});
-};
+}
/**
A computed property that calculates the maximum value in the
@@ -94,7 +94,7 @@ function max (dependentKey) {
}
}
});
-};
+}
/**
A computed property that calculates the minimum value in the
@@ -142,7 +142,7 @@ function min(dependentKey) {
}
}
});
-};
+}
/**
Returns an array mapped via the callback
@@ -189,7 +189,7 @@ function map(dependentKey, callback) {
};
return arrayComputed(dependentKey, options);
-};
+}
/**
Returns an array mapped to the specified key.
@@ -222,7 +222,7 @@ function map(dependentKey, callback) {
function mapBy (dependentKey, propertyKey) {
var callback = function(item) { return get(item, propertyKey); };
return map(dependentKey + '.@each.' + propertyKey, callback);
-};
+}
/**
@method computed.mapProperty
@@ -293,7 +293,7 @@ function filter(dependentKey, callback) {
};
return arrayComputed(dependentKey, options);
-};
+}
/**
Filters the array by the property and value
@@ -332,7 +332,7 @@ function filterBy (dependentKey, propertyKey, value) {
}
return filter(dependentKey + '.@each.' + propertyKey, callback);
-};
+}
/**
@method computed.filterProperty
@@ -399,7 +399,7 @@ function uniq() {
}
});
return arrayComputed.apply(null, args);
-};
+}
/**
Alias for [Ember.computed.uniq](/api/#method_computed_uniq).
@@ -486,7 +486,7 @@ function intersect() {
}
});
return arrayComputed.apply(null, args);
-};
+}
/**
A computed property which returns a new array with all the
@@ -549,7 +549,7 @@ function setDiff(setAProperty, setBProperty) {
return array;
}
});
-};
+}
function binarySearch(array, item, low, high) {
var mid, midItem, res, guidMid, guidItem;
@@ -760,7 +760,7 @@ function sort(itemsKey, sortDefinition) {
return array;
}
});
-};
+}
-export {sum, min, max, map, sort, setDiff, mapBy, mapProperty, filter, filterBy, filterProperty, uniq, union, intersect}
+export {sum, min, max, map, sort, setDiff, mapBy, mapProperty, filter, filterBy, filterProperty, uniq, union, intersect}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/copy.js | @@ -69,6 +69,6 @@ function copy(obj, deep) {
if ('object' !== typeof obj || obj===null) return obj; // can't copy primitives
if (Copyable && Copyable.detect(obj)) return obj.copy(deep);
return _copy(obj, deep, deep ? [] : null, deep ? [] : null);
-};
+}
export default copy; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/core.js | @@ -27,6 +27,6 @@ function isEqual(a, b) {
return a.getTime() === b.getTime();
}
return a === b;
-};
+}
-export {isEqual}
+export {isEqual}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/ext/rsvp.js | @@ -1,3 +1,5 @@
+/* globals RSVP:true */
+
import Ember from "ember-metal/core";
import Logger from "ember-metal/logger";
| true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/mixins/freezable.js | @@ -91,4 +91,4 @@ var Freezable = Mixin.create({
var FROZEN_ERROR = "Frozen object cannot be modified.";
-export {Freezable, FROZEN_ERROR}
+export {Freezable, FROZEN_ERROR}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/system/array_proxy.js | @@ -6,8 +6,8 @@ import {computed} from "ember-metal/computed";
import {beforeObserver, observer} from "ember-metal/mixin";
import {beginPropertyChanges, endPropertyChanges} from "ember-metal/property_events";
import EmberError from "ember-metal/error";
-import EmberObject from "ember-runtime/system/object"
-import MutableArray from "ember-runtime/mixins/mutable_array"
+import EmberObject from "ember-runtime/system/object";
+import MutableArray from "ember-runtime/mixins/mutable_array";
import Enumerable from "ember-runtime/mixins/enumerable";
import {fmt} from "ember-runtime/system/string";
| true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/system/lazy_load.js | @@ -39,7 +39,7 @@ function onLoad(name, callback) {
if (object = loaded[name]) {
callback(object);
}
-};
+}
/**
Called when an Ember.js package (e.g Ember.Handlebars) has finished
@@ -63,6 +63,6 @@ function runLoadHooks(name, object) {
callback(object);
});
}
-};
+}
-export {onLoad, runLoadHooks}
+export {onLoad, runLoadHooks}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/system/native_array.js | @@ -190,5 +190,5 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Array) {
}
Ember.A = A; // ES6TODO: Setting A onto the object returned by ember-metal/core to avoid circles
-export {A, NativeArray}
+export {A, NativeArray};
export default NativeArray; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/system/set.js | @@ -116,7 +116,7 @@ import {computed} from "ember-metal/computed";
@uses Ember.Freezable
@since Ember 0.9
*/
-var Set = CoreObject.extend(MutableEnumerable, Copyable, Freezable,
+export default CoreObject.extend(MutableEnumerable, Copyable, Freezable,
{
// ..........................................................
@@ -463,6 +463,3 @@ var Set = CoreObject.extend(MutableEnumerable, Copyable, Freezable,
}
});
-
-
-export default Set; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/system/string.js | @@ -3,7 +3,7 @@
@submodule ember-runtime
*/
import Ember from "ember-metal/core"; // Ember.STRINGS, Ember.FEATURES
-import {isArray, inspect as EmberInspect} from "ember-metal/utils";
+import {isArray, inspect as emberInspect} from "ember-metal/utils";
var STRING_DASHERIZE_REGEXP = (/[ _]/g);
@@ -23,7 +23,7 @@ function fmt(str, formats) {
return str.replace(/%@([0-9]+)?/g, function(s, argIndex) {
argIndex = (argIndex) ? parseInt(argIndex, 10) - 1 : idx++;
s = formats[argIndex];
- return (s === null) ? '(null)' : (s === undefined) ? '' : EmberInspect(s);
+ return (s === null) ? '(null)' : (s === undefined) ? '' : emberInspect(s);
});
}
@@ -279,4 +279,4 @@ var EmberStringUtils = {
};
export default EmberStringUtils;
-export {fmt, loc, w, decamelize, dasherize, camelize, classify, underscore, capitalize}
+export {fmt, loc, w, decamelize, dasherize, camelize, classify, underscore, capitalize}; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/lib/system/subarray.js | @@ -26,7 +26,7 @@ function SubArray (length) {
} else {
this._operations = [];
}
-};
+}
SubArray.prototype = {
/**
@@ -170,7 +170,7 @@ SubArray.prototype = {
toString: function () {
var str = "";
- forEach(this._operations, function (operation) {
+ EnumerableUtils.forEach(this._operations, function (operation) {
str += " " + operation.type + ":" + operation.count;
});
return str.substring(1); | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/tests/mixins/deferred_test.js | @@ -1,3 +1,5 @@
+/* global Promise:true */
+
import Ember from 'ember-metal/core';
import run from 'ember-metal/run_loop';
import EmberObject from 'ember-runtime/system/object'; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-runtime/tests/mixins/promise_proxy_test.js | @@ -4,9 +4,8 @@ import {get} from "ember-metal/property_get";
import run from "ember-metal/run_loop";
import ObjectProxy from "ember-runtime/system/object_proxy";
import PromiseProxyMixin from "ember-runtime/mixins/promise_proxy";
-import RSVP from "ember-runtime/ext/rsvp";
-var EmberRSVP = RSVP;
-RSVP = requireModule("rsvp");
+import EmberRSVP from "ember-runtime/ext/rsvp";
+var RSVP = requireModule("rsvp"); // jshint ignore:line
var ObjectPromiseProxy;
| true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-testing/lib/setup_for_testing.js | @@ -46,6 +46,6 @@ function setupForTesting() {
jQuery(document).off('ajaxComplete', decrementAjaxPendingRequests);
jQuery(document).on('ajaxSend', incrementAjaxPendingRequests);
jQuery(document).on('ajaxComplete', decrementAjaxPendingRequests);
-};
+}
export default setupForTesting; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/system/event_dispatcher.js | @@ -171,7 +171,7 @@ var EventDispatcher = EmberObject.extend({
rootElement.on(event + '.ember', '[data-ember-action]', function(evt) {
//ES6TODO: Needed for ActionHelper (generally not available in ember-views test suite)
- if (!ActionHelper) { ActionHelper = requireModule("ember-routing/helpers/action")["ActionHelper"]; };
+ if (!ActionHelper) { ActionHelper = requireModule("ember-routing/helpers/action")["ActionHelper"]; }
var actionId = jQuery(evt.currentTarget).attr('data-ember-action'),
action = ActionHelper.registeredActions[actionId]; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/system/render_buffer.js | @@ -13,7 +13,7 @@ import jQuery from "ember-views/system/jquery";
function ClassSet() {
this.seen = {};
this.list = [];
-};
+}
ClassSet.prototype = {
@@ -96,7 +96,7 @@ var canSetNameOnInputs = (function() {
@param {String} tagName tag name (such as 'div' or 'p') used for the buffer
*/
var RenderBuffer = function(tagName) {
- return new _RenderBuffer(tagName);
+ return new _RenderBuffer(tagName); // jshint ignore:line
};
var _RenderBuffer = function(tagName) { | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/system/utils.js | @@ -1,3 +1,5 @@
+/* globals XMLSerializer */
+
import Ember from 'ember-metal/core'; // Ember.assert
/** | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/views/component.js | @@ -2,7 +2,7 @@ import Ember from "ember-metal/core"; // Ember.assert, Ember.Handlebars
import ComponentTemplateDeprecation from "ember-views/mixins/component_template_deprecation";
import TargetActionSupport from "ember-runtime/mixins/target_action_support";
-import {View} from "ember-views/views/view"
+import {View} from "ember-views/views/view";
import {get} from "ember-metal/property_get";
import {set} from "ember-metal/property_set"; | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/views/container_view.js | @@ -17,9 +17,9 @@ var forEach = EnumerableUtils.forEach;
import {computed} from "ember-metal/computed";
import run from "ember-metal/run_loop";
import {defineProperty} from "ember-metal/properties";
-import RenderBuffer from "ember-views/system/render_buffer";
+import renderBuffer from "ember-views/system/render_buffer";
import {observer, beforeObserver} from "ember-metal/mixin";
-import {A} from "ember-runtime/system/native_array";
+import {A as emberA} from "ember-runtime/system/native_array";
/**
@module ember
@@ -215,7 +215,7 @@ var ContainerView = View.extend(MutableArray, {
replace: function(idx, removedCount, addedViews) {
var addedCount = addedViews ? get(addedViews, 'length') : 0;
var self = this;
- Ember.assert("You can't add a child to a container that is already a child of another view", A(addedViews).every(function(item) { return !get(item, '_parentView') || get(item, '_parentView') === self; }));
+ Ember.assert("You can't add a child to a container that is already a child of another view", emberA(addedViews).every(function(item) { return !get(item, '_parentView') || get(item, '_parentView') === self; }));
this.arrayContentWillChange(idx, removedCount, addedCount);
this.childViewsWillChange(this._childViews, idx, removedCount);
@@ -376,7 +376,7 @@ merge(states.hasElement, {
for (i = 0, len = childViews.length; i < len; i++) {
childView = childViews[i];
- if (!buffer) { buffer = RenderBuffer(); buffer._hasElement = false; }
+ if (!buffer) { buffer = renderBuffer(); buffer._hasElement = false; }
if (childView.renderToBufferIfNeeded(buffer)) {
viewCollection.push(childView); | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/views/states.js | @@ -23,7 +23,7 @@ function cloneStates(from) {
}
return into;
-};
+}
var states = {
_default: _default, | true |
Other | emberjs | ember.js | e01b92b160b80cd036058c4e70b051bd4d5a197c.json | Fix JSHint issues. | packages_es6/ember-views/lib/views/view.js | @@ -8,7 +8,7 @@ import EmberError from "ember-metal/error";
import EmberObject from "ember-runtime/system/object";
import Evented from "ember-runtime/mixins/evented";
import ActionHandler from "ember-runtime/mixins/action_handler";
-import RenderBuffer from "ember-views/system/render_buffer";
+import renderBuffer from "ember-views/system/render_buffer";
import {get} from "ember-metal/property_get";
import {set} from "ember-metal/property_set";
import setProperties from "ember-metal/set_properties";
@@ -25,7 +25,7 @@ import {typeOf, isArray} from "ember-metal/utils";
import {isNone} from 'ember-metal/is_none';
import {Mixin} from 'ember-metal/mixin';
import Container from 'container/container';
-import {A} from "ember-runtime/system/native_array";
+import {A as emberA} from "ember-runtime/system/native_array";
import {instrument} from "ember-metal/instrumentation";
@@ -64,7 +64,7 @@ function clearCachedElement(view) {
}
var childViewsProperty = computed(function() {
- var childViews = this._childViews, ret = A(), view = this;
+ var childViews = this._childViews, ret = emberA(), view = this;
a_forEach(childViews, function(view) {
var currentChildViews;
@@ -203,7 +203,7 @@ var CoreView = EmberObject.extend(Evented, ActionHandler, {
tagName = 'div';
}
- var buffer = this.buffer = parentBuffer && parentBuffer.begin(tagName) || RenderBuffer(tagName);
+ var buffer = this.buffer = parentBuffer && parentBuffer.begin(tagName) || renderBuffer(tagName);
this.transitionTo('inBuffer', false);
this.beforeRender(buffer);
@@ -2083,10 +2083,10 @@ var View = CoreView.extend({
this._childViews = this._childViews.slice();
Ember.assert("Only arrays are allowed for 'classNameBindings'", typeOf(this.classNameBindings) === 'array');
- this.classNameBindings = A(this.classNameBindings.slice());
+ this.classNameBindings = emberA(this.classNameBindings.slice());
Ember.assert("Only arrays are allowed for 'classNames'", typeOf(this.classNames) === 'array');
- this.classNames = A(this.classNames.slice());
+ this.classNames = emberA(this.classNames.slice());
},
appendChild: function(view, options) {
@@ -2615,4 +2615,4 @@ View.applyAttributeBindings = function(elem, name, value) {
}
};
-export {CoreView, View, ViewCollection}
+export {CoreView, View, ViewCollection}; | true |
Other | emberjs | ember.js | 8c4c8cbfb11f554cd568d7f55c82b6da4732d315.json | Fix broken build due to unstubbed query params
For Stefan Penner.
/cc @rjackson | packages_es6/ember-routing/tests/system/route_test.js | @@ -39,6 +39,7 @@ test("default store utilizes the container to acquire the model factory", functi
};
route.container = container;
+ route.set('_qp', null);
equal(route.model({ post_id: 1}), post);
equal(route.findModel('post', 1), post, '#findModel returns the correct post'); | false |
Other | emberjs | ember.js | c97bde4268cb40d66b3aa0e2f8910beda3cbb23a.json | Fix issue with Travis using 2.1.0. | .travis.yml | @@ -1,6 +1,6 @@
---
rvm:
-- 2.1.0
+- 2.1
node_js:
- "0.10"
install: | false |
Other | emberjs | ember.js | 8bbcbed46aa807f52040c5bb185b6d64807fc363.json | fix readme inconsistencies | README.md | @@ -21,7 +21,7 @@ Here's how you create a binding between two objects:
```javascript
MyApp.president = Ember.Object.create({
- name: "Barack Obama"
+ name: 'Barack Obama'
});
MyApp.country = Ember.Object.create({
@@ -32,7 +32,7 @@ MyApp.country = Ember.Object.create({
// Later, after Ember has resolved bindings...
MyApp.country.get('presidentName');
-// "Barack Obama"
+// 'Barack Obama'
```
Bindings allow you to architect your application using the MVC
(Model-View-Controller) pattern, then rest easy knowing that data will
@@ -44,8 +44,8 @@ Computed properties allow you to treat a function like a property:
``` javascript
MyApp.President = Ember.Object.extend({
- firstName: "Barack",
- lastName: "Obama",
+ firstName: 'Barack',
+ lastName: 'Obama',
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
@@ -56,7 +56,7 @@ MyApp.President = Ember.Object.extend({
MyApp.president = MyApp.President.create();
MyApp.president.get('fullName');
-// "Barack Obama"
+// 'Barack Obama'
```
Treating a function like a property is useful because they can work with
@@ -69,8 +69,8 @@ about these dependencies like this:
``` javascript
MyApp.President = Ember.Object.extend({
- firstName: "Barack",
- lastName: "Obama",
+ firstName: 'Barack',
+ lastName: 'Obama',
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName'); | false |
Other | emberjs | ember.js | 6b47a7e6fe7723d86749b65dad92d2c6d9484866.json | Remove cruft from ViewTargetActionSupport test | packages_es6/ember-views/tests/mixins/view_target_action_support_test.js | @@ -3,16 +3,7 @@ import EmberObject from "ember-runtime/system/object";
import {View} from "ember-views/views/view";
import ViewTargetActionSupport from "ember-views/mixins/view_target_action_support";
-var originalLookup;
-
-module("ViewTargetActionSupport", {
- setup: function() {
- originalLookup = Ember.lookup;
- },
- teardown: function() {
- Ember.lookup = originalLookup;
- }
-});
+module("ViewTargetActionSupport");
test("it should return false if no action is specified", function() {
expect(1); | false |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages/ember/tests/routing/basic_test.js | @@ -259,23 +259,23 @@ test("The Homepage with explicit template name in renderTemplate and controller"
if(Ember.FEATURES.isEnabled("ember-routing-add-model-option")) {
test("Model passed via renderTemplate model is set as controller's content", function(){
Ember.TEMPLATES['bio'] = compile("<p>{{name}}</p>");
-
+
App.BioController = Ember.ObjectController.extend();
-
+
Router.map(function(){
this.route('home', { path: '/'});
});
-
+
App.HomeRoute = Ember.Route.extend({
renderTemplate: function(){
this.render('bio', {
- model: {name: 'emberjs'}
+ model: {name: 'emberjs'}
});
}
});
-
+
bootApplication();
-
+
equal(Ember.$('p:contains(emberjs)', '#qunit-fixture').length, 1, "Passed model was set as controllers content");
});
} | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages/rsvp/lib/main.js | @@ -2,7 +2,7 @@
@class RSVP
@module RSVP
*/
-define("rsvp/all",
+define("rsvp/all",
["./promise","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -22,7 +22,7 @@ define("rsvp/all",
return Promise.all(array, label);
};
});
-define("rsvp/all_settled",
+define("rsvp/all_settled",
["./promise","./utils","exports"],
function(__dependency1__, __dependency2__, __exports__) {
"use strict";
@@ -137,7 +137,7 @@ define("rsvp/all_settled",
return { state: 'rejected', reason: reason };
}
});
-define("rsvp/config",
+define("rsvp/config",
["./events","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -168,7 +168,7 @@ define("rsvp/config",
__exports__.config = config;
__exports__.configure = configure;
});
-define("rsvp/defer",
+define("rsvp/defer",
["./promise","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -217,7 +217,7 @@ define("rsvp/defer",
return deferred;
};
});
-define("rsvp/events",
+define("rsvp/events",
["exports"],
function(__exports__) {
"use strict";
@@ -421,7 +421,7 @@ define("rsvp/events",
}
};
});
-define("rsvp/filter",
+define("rsvp/filter",
["./all","./map","./utils","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
"use strict";
@@ -537,7 +537,7 @@ define("rsvp/filter",
__exports__["default"] = filter;
});
-define("rsvp/hash",
+define("rsvp/hash",
["./promise","./utils","exports"],
function(__dependency1__, __dependency2__, __exports__) {
"use strict";
@@ -675,7 +675,7 @@ define("rsvp/hash",
});
};
});
-define("rsvp/instrument",
+define("rsvp/instrument",
["./config","./utils","exports"],
function(__dependency1__, __dependency2__, __exports__) {
"use strict";
@@ -701,7 +701,7 @@ define("rsvp/instrument",
}
};
});
-define("rsvp/map",
+define("rsvp/map",
["./promise","./all","./utils","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
"use strict";
@@ -810,7 +810,7 @@ define("rsvp/map",
});
};
});
-define("rsvp/node",
+define("rsvp/node",
["./promise","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -923,7 +923,7 @@ define("rsvp/node",
};
};
});
-define("rsvp/promise",
+define("rsvp/promise",
["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __exports__) {
"use strict";
@@ -1552,7 +1552,7 @@ define("rsvp/promise",
publish(promise, promise._state = REJECTED);
}
});
-define("rsvp/promise/all",
+define("rsvp/promise/all",
["../utils","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -1653,7 +1653,7 @@ define("rsvp/promise/all",
}, label);
};
});
-define("rsvp/promise/cast",
+define("rsvp/promise/cast",
["exports"],
function(__exports__) {
"use strict";
@@ -1737,7 +1737,7 @@ define("rsvp/promise/cast",
}, label);
};
});
-define("rsvp/promise/race",
+define("rsvp/promise/race",
["../utils","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -1840,7 +1840,7 @@ define("rsvp/promise/race",
}, label);
};
});
-define("rsvp/promise/reject",
+define("rsvp/promise/reject",
["exports"],
function(__exports__) {
"use strict";
@@ -1888,7 +1888,7 @@ define("rsvp/promise/reject",
}, label);
};
});
-define("rsvp/promise/resolve",
+define("rsvp/promise/resolve",
["exports"],
function(__exports__) {
"use strict";
@@ -1933,7 +1933,7 @@ define("rsvp/promise/resolve",
}, label);
};
});
-define("rsvp/race",
+define("rsvp/race",
["./promise","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -1952,7 +1952,7 @@ define("rsvp/race",
return Promise.race(array, label);
};
});
-define("rsvp/reject",
+define("rsvp/reject",
["./promise","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -1973,7 +1973,7 @@ define("rsvp/reject",
return Promise.reject(reason, label);
};
});
-define("rsvp/resolve",
+define("rsvp/resolve",
["./promise","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -1995,7 +1995,7 @@ define("rsvp/resolve",
return Promise.resolve(value, label);
};
});
-define("rsvp/rethrow",
+define("rsvp/rethrow",
["exports"],
function(__exports__) {
"use strict";
@@ -2045,7 +2045,7 @@ define("rsvp/rethrow",
throw reason;
};
});
-define("rsvp/utils",
+define("rsvp/utils",
["exports"],
function(__exports__) {
"use strict";
@@ -2080,7 +2080,7 @@ define("rsvp/utils",
};
__exports__.keysOf = keysOf;
});
-define("rsvp",
+define("rsvp",
["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/filter","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __exports__) {
"use strict"; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/container/lib/container.js | @@ -412,7 +412,7 @@ Container.prototype = {
validateFullName(fullName);
if (this.parent) { illegalChildOperation('typeInjection'); }
- var fullNameType = fullName.split(':')[0];
+ var fullNameType = fullName.split(':')[0];
if(fullNameType === type) {
throw new Error('Cannot inject a `' + fullName + '` on other ' + type + '(s). Register the `' + fullName + '` as a different type and perform the typeInjection.');
} | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/container/tests/container_test.js | @@ -167,9 +167,9 @@ test("Throw exception when trying to inject `type:thing` on all type(s)", functi
PostController = factory();
container.register('controller:post', PostController);
-
+
throws(function(){
- container.typeInjection('controller', 'injected', 'controller:post');
+ container.typeInjection('controller', 'injected', 'controller:post');
}, 'Cannot inject a `controller:post` on other controller(s). Register the `controller:post` as a different type and perform the typeInjection.');
});
| true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-handlebars-compiler/lib/main.js | @@ -264,7 +264,7 @@ EmberHandlebars.Compiler.prototype.mustache = function(mustache) {
@for Ember.Handlebars
@static
@param {String} string The template to precompile
- @param {Boolean} asObject optional parameter, defaulting to true, of whether or not the
+ @param {Boolean} asObject optional parameter, defaulting to true, of whether or not the
compiled template should be returned as an Object or a String
*/
EmberHandlebars.precompile = function(string, asObject) { | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/lib/enumerable_utils.js | @@ -101,7 +101,7 @@ var utils = {
});
},
- /**
+ /**
* Adds an object to an array. If the array already includes the object this
* method has no effect.
*
@@ -164,7 +164,7 @@ var utils = {
* var array = [1,2,3];
* Ember.EnumerableUtils.replace(array, 10, 1, [4, 5]); // [1, 2, 3, 4, 5]
* ```
- *
+ *
* @method replace
* @param {Array} array The array the objects should be inserted into.
* @param {Number} idx Starting index in the array to replace. If *idx* >=
@@ -186,7 +186,7 @@ var utils = {
/**
* Calculates the intersection of two arrays. This method returns a new array
- * filled with the records that the two passed arrays share with each other.
+ * filled with the records that the two passed arrays share with each other.
* If there is no intersection, an empty array will be returned.
*
* ```javascript | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/lib/map.js | @@ -205,14 +205,14 @@ Map.create = function() {
Map.prototype = {
/**
This property will change as the number of objects in the map changes.
-
+
@property length
@type number
@default 0
*/
length: 0,
-
-
+
+
/**
Retrieve the value associated with a given key.
| true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/lib/merge.js | @@ -21,4 +21,4 @@ function merge(original, updates) {
return original;
};
-export default merge;
\ No newline at end of file
+export default merge; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/lib/vendor/backburner.amd.js | @@ -1,4 +1,4 @@
-define("backburner/queue",
+define("backburner/queue",
["exports"],
function(__exports__) {
"use strict";
@@ -108,7 +108,7 @@ define("backburner/queue",
__exports__.Queue = Queue;
});
-define("backburner/deferred_action_queues",
+define("backburner/deferred_action_queues",
["backburner/queue","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -210,7 +210,7 @@ define("backburner/deferred_action_queues",
__exports__.DeferredActionQueues = DeferredActionQueues;
});
-define("backburner",
+define("backburner",
["backburner/deferred_action_queues","exports"],
function(__dependency1__, __exports__) {
"use strict"; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/package.json | @@ -13,18 +13,18 @@
"directories": {
"lib": "lib"
},
-
+
"dependencies:development": {
"spade-qunit": "~> 1.0.0"
},
-
+
"bpm:build": {
-
+
"bpm_libs.js": {
"files": ["lib"],
"modes": "*"
},
-
+
"ember-metal/bpm_tests.js": {
"files": ["tests"],
"modes": ["debug"] | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/tests/map_test.js | @@ -122,33 +122,33 @@ function testMap(nameAndFunc) {
mapHasEntries([ ], map2);
});
-
+
test("length", function() {
//Add a key twice
equal(map.length, 0);
map.set(string, "a string");
equal(map.length, 1);
map.set(string, "the same string");
equal(map.length, 1);
-
+
//Add another
map.set(number, "a number");
equal(map.length, 2);
-
+
//Remove one that doesn't exist
map.remove('does not exist');
equal(map.length, 2);
-
+
//Check copy
var copy = map.copy();
equal(copy.length, 2);
-
+
//Remove a key twice
map.remove(number);
equal(map.length, 1);
map.remove(number);
equal(map.length, 1);
-
+
//Remove the last key
map.remove(string);
equal(map.length, 0); | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/tests/mixin/mergedProperties_test.js | @@ -17,7 +17,7 @@ test('defining mergedProperties should merge future version', function() {
});
var obj = mixin({}, MixinA, MixinB);
- deepEqual(get(obj, 'foo'),
+ deepEqual(get(obj, 'foo'),
{ a: true, b: true, c: true, d: true, e: true, f: true });
});
@@ -33,7 +33,7 @@ test('defining mergedProperties on future mixin should merged into past', functi
});
var obj = mixin({}, MixinA, MixinB);
- deepEqual(get(obj, 'foo'),
+ deepEqual(get(obj, 'foo'),
{ a: true, b: true, c: true, d: true, e: true, f: true });
});
| true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/tests/run_loop/run_bind_test.js | @@ -32,4 +32,4 @@ test('Ember.run.bind keeps the async callback arguments', function() {
};
asyncFunction(run.bind(asyncCallback, asyncCallback, 1));
-});
\ No newline at end of file
+}); | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-metal/tests/utils/generate_guid_test.js | @@ -4,6 +4,6 @@ module("Ember.generateGuid");
test("Prefix", function() {
var a = {};
-
+
ok( generateGuid(a, 'tyrell').indexOf('tyrell') > -1, "guid can be prefixed" );
}); | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/lib/ext/run_loop.js | @@ -7,7 +7,7 @@ import run from "ember-metal/run_loop";
// Add a new named queue after the 'actions' queue (where RSVP promises
// resolve), which is used in router transitions to prevent unnecessary
-// loading state entry if all context promises resolve on the
+// loading state entry if all context promises resolve on the
// 'actions' queue first.
var queues = run.queues; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/lib/location/api.js | @@ -184,15 +184,15 @@ var EmberLocation = {
/**
Returns the current `location.hash` by parsing location.href since browsers
inconsistently URL-decode `location.hash`.
-
+
https://bugzilla.mozilla.org/show_bug.cgi?id=483304
@private
@method getHash
*/
_getHash: function () {
// AutoLocation has it at _location, HashLocation at .location.
- // Being nice and not changing
+ // Being nice and not changing
var href = (this._location || this.location).href,
hashIndex = href.indexOf('#');
| true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/lib/location/auto_location.js | @@ -112,7 +112,7 @@ var AutoLocation = {
// Older browsers, especially IE, don't have origin
if (!origin) {
origin = location.protocol + '//' + location.hostname;
-
+
if (location.port) {
origin += ':' + location.port;
}
@@ -234,7 +234,7 @@ var AutoLocation = {
@private
Returns the current path as it should appear for HistoryLocation supported
- browsers. This may very well differ from the real current path (e.g. if it
+ browsers. This may very well differ from the real current path (e.g. if it
starts off as a hashed URL)
@method _getHistoryPath
@@ -307,7 +307,7 @@ var AutoLocation = {
/**
Selects the best location option based off browser support and returns an
instance of that Location class.
-
+
@see Ember.AutoLocation
@method create
*/
@@ -324,7 +324,7 @@ var AutoLocation = {
if (this._getSupportsHistory()) {
historyPath = this._getHistoryPath();
- // Since we support history paths, let's be sure we're using them else
+ // Since we support history paths, let's be sure we're using them else
// switch the location over to it.
if (currentPath === historyPath) {
implementationClass = this._HistoryLocation; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/lib/vendor/route-recognizer.amd.js | @@ -1,4 +1,4 @@
-define("route-recognizer",
+define("route-recognizer",
["exports"],
function(__exports__) {
"use strict"; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/lib/vendor/router.amd.js | @@ -1,4 +1,4 @@
-define("router/handler-info",
+define("router/handler-info",
["./utils","rsvp/promise","exports"],
function(__dependency1__, __dependency2__, __exports__) {
"use strict";
@@ -223,7 +223,7 @@ define("router/handler-info",
__exports__.UnresolvedHandlerInfoByParam = UnresolvedHandlerInfoByParam;
__exports__.UnresolvedHandlerInfoByObject = UnresolvedHandlerInfoByObject;
});
-define("router/router",
+define("router/router",
["route-recognizer","rsvp/promise","./utils","./transition-state","./transition","./transition-intent/named-transition-intent","./transition-intent/url-transition-intent","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __exports__) {
"use strict";
@@ -968,7 +968,7 @@ define("router/router",
__exports__["default"] = Router;
});
-define("router/transition-intent",
+define("router/transition-intent",
["./utils","exports"],
function(__dependency1__, __exports__) {
"use strict";
@@ -988,7 +988,7 @@ define("router/transition-intent",
__exports__["default"] = TransitionIntent;
});
-define("router/transition-intent/named-transition-intent",
+define("router/transition-intent/named-transition-intent",
["../transition-intent","../transition-state","../handler-info","../utils","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
"use strict";
@@ -1180,7 +1180,7 @@ define("router/transition-intent/named-transition-intent",
__exports__["default"] = NamedTransitionIntent;
});
-define("router/transition-intent/url-transition-intent",
+define("router/transition-intent/url-transition-intent",
["../transition-intent","../transition-state","../handler-info","../utils","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
"use strict";
@@ -1248,7 +1248,7 @@ define("router/transition-intent/url-transition-intent",
__exports__["default"] = URLTransitionIntent;
});
-define("router/transition-state",
+define("router/transition-state",
["./handler-info","./utils","rsvp/promise","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
"use strict";
@@ -1361,7 +1361,7 @@ define("router/transition-state",
__exports__["default"] = TransitionState;
});
-define("router/transition",
+define("router/transition",
["rsvp/promise","./handler-info","./utils","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
"use strict";
@@ -1619,7 +1619,7 @@ define("router/transition",
__exports__.logAbort = logAbort;
__exports__.TransitionAborted = TransitionAborted;
});
-define("router/utils",
+define("router/utils",
["exports"],
function(__exports__) {
"use strict";
@@ -1843,11 +1843,11 @@ define("router/utils",
__exports__.isParam = isParam;
__exports__.coerceQueryParamsToString = coerceQueryParamsToString;
});
-define("router",
+define("router",
["./router/router","exports"],
function(__dependency1__, __exports__) {
"use strict";
var Router = __dependency1__["default"];
__exports__["default"] = Router;
- });
\ No newline at end of file
+ }); | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/tests/helpers/action_test.js | @@ -1,6 +1,6 @@
import Ember from 'ember-metal/core'; // A, FEATURES, assert, TESTING_DEPRECATION
import {set} from "ember-metal/property_set";
-import run from "ember-metal/run_loop";
+import run from "ember-metal/run_loop";
import EventDispatcher from "ember-views/system/event_dispatcher";
import EmberObject from "ember-runtime/system/object"; | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/tests/location/auto_location_test.js | @@ -113,7 +113,7 @@ test("AutoLocation.create() should return a HistoryLocation instance when pushSt
test("AutoLocation.create() should return a HashLocation instance when pushStates are not supported, but hashchange events are and the URL is already in the HashLocation format", function() {
expect(2);
-
+
supportsHistory = false;
supportsHashChange = true;
@@ -127,7 +127,7 @@ test("AutoLocation.create() should return a HashLocation instance when pushState
test("AutoLocation.create() should return a NoneLocation instance when neither history nor hashchange is supported.", function() {
expect(2);
-
+
supportsHistory = false;
supportsHashChange = false;
@@ -141,7 +141,7 @@ test("AutoLocation.create() should return a NoneLocation instance when neither h
test("AutoLocation.create() should consider an index path (i.e. '/\') without any location.hash as OK for HashLocation", function() {
expect(2);
-
+
supportsHistory = false;
supportsHashChange = true;
@@ -163,10 +163,10 @@ test("AutoLocation.create() should consider an index path (i.e. '/\') without an
test("AutoLocation._getSupportsHistory() should use `history.pushState` existance as proof of support", function() {
expect(3);
-
+
AutoTestLocation._history.pushState = function () {};
equal(AutoTestLocation._getSupportsHistory(), true, 'Returns true if `history.pushState` exists');
-
+
delete AutoTestLocation._history.pushState;
equal(AutoTestLocation._getSupportsHistory(), false, 'Returns false if `history.pushState` does not exist');
@@ -176,7 +176,7 @@ test("AutoLocation._getSupportsHistory() should use `history.pushState` existanc
test("AutoLocation.create() should transform the URL for hashchange-only browsers viewing a HistoryLocation-formatted path", function() {
expect(4);
-
+
supportsHistory = false;
supportsHashChange = true;
@@ -203,7 +203,7 @@ test("AutoLocation.create() should transform the URL for hashchange-only browser
test("AutoLocation.create() should transform the URL for pushState-supported browsers viewing a HashLocation-formatted url", function() {
expect(4);
-
+
supportsHistory = true;
supportsHashChange = true;
@@ -230,7 +230,7 @@ test("AutoLocation.create() should transform the URL for pushState-supported bro
test("AutoLocation._getSupportsHistory() should handle false positive for Android 2.2/2.3, returning false", function() {
expect(1);
-
+
var fakeNavigator = {
userAgent: 'Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'
};
@@ -242,10 +242,10 @@ test("AutoLocation._getSupportsHistory() should handle false positive for Androi
test("AutoLocation._getSupportsHashChange() should use `onhashchange` event existance as proof of support", function() {
expect(2);
-
+
AutoTestLocation._window.onhashchange = null;
equal(AutoTestLocation._getSupportsHashChange(), true, 'Returns true if `onhashchange` exists');
-
+
AutoTestLocation._window = {
navigator: window.navigator,
document: {}
@@ -256,7 +256,7 @@ test("AutoLocation._getSupportsHashChange() should use `onhashchange` event exis
test("AutoLocation._getSupportsHashChange() should handle false positive for IE8 running in IE7 compatibility mode, returning false", function() {
expect(1);
-
+
AutoTestLocation._window = {
onhashchange: null,
document: {
@@ -269,7 +269,7 @@ test("AutoLocation._getSupportsHashChange() should handle false positive for IE8
test("AutoLocation._getPath() should normalize location.pathname, making sure it always returns a leading slash", function() {
expect(2);
-
+
AutoTestLocation._location = { pathname: 'test' };
equal(AutoTestLocation._getPath(), '/test', 'When there is no leading slash, one is added.');
@@ -279,20 +279,20 @@ test("AutoLocation._getPath() should normalize location.pathname, making sure it
test("AutoLocation._getHash() should be an alias to Ember.Location._getHash, otherwise it needs its own test!", function() {
expect(1);
-
+
equal(AutoTestLocation._getHash, EmberLocation._getHash);
});
test("AutoLocation._getQuery() should return location.search as-is", function() {
expect(1);
-
+
AutoTestLocation._location = { search: '?foo=bar' };
equal(AutoTestLocation._getQuery(), '?foo=bar');
});
test("AutoLocation._getFullPath() should return full pathname including query and hash", function() {
expect(1);
-
+
AutoTestLocation._location = {
href: 'http://test.com/about?foo=bar#foo',
pathname: '/about',
@@ -305,7 +305,7 @@ test("AutoLocation._getFullPath() should return full pathname including query an
test("AutoLocation._getHistoryPath() should return a normalized, HistoryLocation-supported path", function() {
expect(3);
-
+
AutoTestLocation._rootURL = '/app/';
AutoTestLocation._location = {
@@ -335,7 +335,7 @@ test("AutoLocation._getHistoryPath() should return a normalized, HistoryLocation
test("AutoLocation._getHashPath() should return a normalized, HashLocation-supported path", function() {
expect(3);
-
+
AutoTestLocation._rootURL = '/app/';
AutoTestLocation._location = { | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-routing/tests/system/dsl_test.js | @@ -25,4 +25,4 @@ test("should fail when using a reserved route name", function() {
this.resource('basic');
});
}, "'basic' cannot be used as a resource name.");
-});
\ No newline at end of file
+}); | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-runtime/README | @@ -1,12 +1,12 @@
-ember/runtime
+ember/runtime
== About Ember Runtime
-The Ember Runtime is a library that adds property bindings and observers
-to JavaScript. You can use the runtime in web pages, applications, and
+The Ember Runtime is a library that adds property bindings and observers
+to JavaScript. You can use the runtime in web pages, applications, and
everything in between to easily manage the state of your page with less code.
This library is a part of the Ember JavaScript Application Framework,
which is a full-stack MVC framework for building desktop-like applications on
the web.
-
\ No newline at end of file
+ | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-runtime/lib/computed/reduce_computed.js | @@ -773,7 +773,7 @@ ReduceComputedProperty.prototype.property = function () {
semantics. Dependent keys which end in `.[]` do not use "one at a time"
semantics. When an item is added or removed from such a dependency, the
computed property is completely recomputed.
-
+
When the computed property is completely recomputed, the `accumulatedValue`
is discarded, it starts with `initialValue` again, and each item is passed
to `addedItem` in turn. | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-runtime/lib/system/core_object.js | @@ -3,7 +3,7 @@
@submodule ember-runtime
*/
-import Ember from "ember-metal/core";
+import Ember from "ember-metal/core";
// Ember.ENV.MANDATORY_SETTER, Ember.assert, Ember.K, Ember.config
// NOTE: this object should never be included directly. Instead use `Ember.Object`. | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-runtime/lib/system/namespace.js | @@ -171,7 +171,7 @@ function classToString() {
if (this[NAME_KEY]) {
ret = this[NAME_KEY];
} else if (this._toString) {
- ret = this._toString;
+ ret = this._toString;
} else {
var str = superClassString(this);
if (str) { | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-runtime/package.json | @@ -20,14 +20,14 @@
"dependencies:development": {
"spade-qunit": "~> 1.0.0"
},
-
+
"bpm:build": {
-
+
"bpm_libs.js": {
"files": ["lib"],
"modes": "*"
},
-
+
"ember-runtime/bpm_tests.js": {
"files": ["tests"],
"modes": ["debug"] | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-runtime/tests/computed/compose_computed_test.js | @@ -11,7 +11,7 @@ import EmberObject from 'ember-runtime/system/object';
if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
var obj;
-
+
module('computed - composable', {
teardown: function () {
if (obj && obj.destroy) { | true |
Other | emberjs | ember.js | 5face717a12f9f2033dc0706050e26b51885d2d7.json | Trim trailing whitespace. | packages_es6/ember-views/package.json | @@ -20,14 +20,14 @@
"dependencies:development": {
"spade-qunit": "~> 1.0.0"
},
-
+
"bpm:build": {
-
+
"bpm_libs.js": {
"files": ["lib"],
"modes": "*"
},
-
+
"ember-views/bpm_tests.js": {
"files": ["tests"],
"modes": ["debug"] | true |
Other | emberjs | ember.js | d25e00060649eeed304a1b4a18d7d23b87682592.json | Enable `trailing` flag in .jshintrc | .jshintrc | @@ -62,5 +62,6 @@
"sub": true,
"strict": false,
"white": false,
- "eqnull": true
+ "eqnull": true,
+ "trailing": true
} | false |
Other | emberjs | ember.js | acefb532e2e5f51f32f593e3038e0ad20b91d913.json | Add count to array computed meta | packages_es6/ember-runtime/lib/computed/reduce_computed.js | @@ -262,7 +262,7 @@ DependentArraysObserver.prototype = {
forEach(itemPropertyKeys, removeObservers, this);
- changeMeta = createChangeMeta(dependentArray, item, itemIndex, this.instanceMeta.propertyName, this.cp);
+ changeMeta = new ChangeMeta(dependentArray, item, itemIndex, this.instanceMeta.propertyName, this.cp, normalizedRemoveCount);
this.setValue( removedItem.call(
this.instanceMeta.context, this.getValue(), item, changeMeta, this.instanceMeta.sugarMeta));
}
@@ -292,7 +292,7 @@ DependentArraysObserver.prototype = {
}, this);
}
- changeMeta = createChangeMeta(dependentArray, item, normalizedIndex + sliceIndex, this.instanceMeta.propertyName, this.cp);
+ changeMeta = new ChangeMeta(dependentArray, item, normalizedIndex + sliceIndex, this.instanceMeta.propertyName, this.cp, addedCount);
this.setValue( addedItem.call(
this.instanceMeta.context, this.getValue(), item, changeMeta, this.instanceMeta.sugarMeta));
}, this);
@@ -328,7 +328,7 @@ DependentArraysObserver.prototype = {
this.updateIndexes(c.observerContext.trackedArray, c.observerContext.dependentArray);
- changeMeta = createChangeMeta(c.array, c.obj, c.observerContext.index, this.instanceMeta.propertyName, this.cp, c.previousValues);
+ changeMeta = new ChangeMeta(c.array, c.obj, c.observerContext.index, this.instanceMeta.propertyName, this.cp, changedItems.length, c.previousValues);
this.setValue(
this.callbacks.removedItem.call(this.instanceMeta.context, this.getValue(), c.obj, changeMeta, this.instanceMeta.sugarMeta));
this.setValue(
@@ -352,27 +352,24 @@ function normalizeRemoveCount(index, length, removedCount) {
return Math.min(removedCount, length - index);
}
-function createChangeMeta(dependentArray, item, index, propertyName, property, previousValues) {
- var meta = {
- arrayChanged: dependentArray,
- index: index,
- item: item,
- propertyName: propertyName,
- property: property
- };
+function ChangeMeta(dependentArray, item, index, propertyName, property, changedCount, previousValues){
+ this.arrayChanged = dependentArray;
+ this.index = index;
+ this.item = item;
+ this.propertyName = propertyName;
+ this.property = property;
+ this.changedCount = changedCount;
if (previousValues) {
// previous values only available for item property changes
- meta.previousValues = previousValues;
+ this.previousValues = previousValues;
}
-
- return meta;
}
function addItems (dependentArray, callbacks, cp, propertyName, meta) {
forEach(dependentArray, function (item, index) {
meta.setValue( callbacks.addedItem.call(
- this, meta.getValue(), item, createChangeMeta(dependentArray, item, index, propertyName, cp), meta.sugarMeta));
+ this, meta.getValue(), item, new ChangeMeta(dependentArray, item, index, propertyName, cp, dependentArray.length), meta.sugarMeta));
}, this);
}
| true |
Other | emberjs | ember.js | acefb532e2e5f51f32f593e3038e0ad20b91d913.json | Add count to array computed meta | packages_es6/ember-runtime/tests/computed/reduce_computed_test.js | @@ -713,6 +713,32 @@ test("changeMeta includes item and index", function() {
deepEqual(callbackItems, expected, "items removed from the array had observers removed");
});
+test("changeMeta includes changedCount and arrayChanged", function() {
+ var callbackLetters = [];
+ var obj = EmberObject.createWithMixins({
+ letters: Ember.A(['a', 'b']),
+ lettersArrayComputed: arrayComputed('letters', {
+ addedItem: function (array, item, changeMeta, instanceMeta) {
+ callbackItems.push('add:' + changeMeta.changedCount + ":" + changeMeta.arrayChanged.join(''));
+ },
+ removedItem: function (array, item, changeMeta, instanceMeta) {
+ callbackItems.push('remove:' + changeMeta.changedCount + ":" + changeMeta.arrayChanged.join(''));
+ }
+ })
+ });
+
+ var letters = get(obj, 'letters');
+
+ obj.get('lettersArrayComputed');
+ letters.pushObject('c');
+ letters.popObject();
+ letters.replace(0, 1, ['d']);
+ letters.removeAt(0, letters.length);
+
+ var expected = ["add:2:ab", "add:2:ab", "add:1:abc", "remove:1:abc", "remove:1:ab", "add:1:db", "remove:2:db", "remove:2:db"];
+ deepEqual(callbackItems, expected, "changeMeta has count and changed");
+});
+
test("when initialValue is undefined, everything works as advertised", function() {
var chars = EmberObject.createWithMixins({
letters: Ember.A(), | true |
Other | emberjs | ember.js | b81280109245fbab440c2a9cc7618c403cef2b25.json | Remove dup changelog entry. | CHANGELOG.md | @@ -28,7 +28,6 @@
* [SECURITY] Ensure that `ember-routing-auto-location` cannot be forced to redirect to another domain.
* [BUGFIX beta] Handle ES6 transpiler errors.
* [BUGFIX beta] Ensure namespaces are cleaned up.
-* Many documentation updates.
* [FEATURE ember-handlebars-log-primitives]
* [FEATURE ember-testing-routing-helpers]
* [FEATURE ember-testing-triggerEvent-helper] | false |
Other | emberjs | ember.js | b7163c5970ebde48d304cb301ae112337427ca47.json | Update CHANGELOG.md for 1.6.0-beta.1. | CHANGELOG.md | @@ -1,28 +1,34 @@
# Ember Changelog
-### Ember 1.5.0-beta.4 (March 10, 2014)
-
+### Ember 1.6.0-beta.1 (March 31, 2014)
+
+* [BUGFIX] Add `which` attribute to event triggered by keyEvent test helper.
+* [Performance] Improve cache lookup throughput.
+* [FEATURE ember-routing-add-model-option]
+* [FEATURE ember-runtime-test-friendly-promises]
+* [FEATURE ember-metal-computed-empty-array]
+
+### Ember 1.5.0 (March 29, 2014)
+
+* [BUGFIX beta] Move reduceComputed instanceMetas into object's meta.
+* [BUGFIX beta] Total invalidation of arrayComputed by non-array dependencies should be synchronous.
+* [BUGFIX] run.bind keeps the arguments from the callback.
+* [BUGFIX] Do not attach new listeners on each setupForTesting call.
+* [BUGFIX] Ember.copy now supports Date.
+* [BUGFIX] Add `which` attribute to event triggered by test helper.
+* [BUGFIX beta] The `each` helper checks that the metamorph tags have the same parent.
* Allow Ember Inspector to access models with custom resolver.
* [BUGFIX] Allow components with layoutName specified by parent class to specify templateName.
* [BUGFIX] Don't raise error when a destroyed array is assigned to ArrayProxy.
* [BUGFIX] Use better ajax events for ember-testing counters.
* [BUGFIX] Move AJAX listeners into Ember.setupForTesting.
-
-### Ember 1.5.0-beta.3 (March 1, 2014)
-
* [BUGFIX] PromiseProxyMixin reset isFulfilled and isRejected.
* Use documentElement instead of body for ember-extension detection.
* Many documentation updates.
-
-### Ember 1.5.0-beta.2 (February 23, 2014)
-
* [SECURITY] Ensure that `ember-routing-auto-location` cannot be forced to redirect to another domain.
* [BUGFIX beta] Handle ES6 transpiler errors.
* [BUGFIX beta] Ensure namespaces are cleaned up.
* Many documentation updates.
-
-### Ember 1.5.0-beta.1 (February 14, 2014)
-
* [FEATURE ember-handlebars-log-primitives]
* [FEATURE ember-testing-routing-helpers]
* [FEATURE ember-testing-triggerEvent-helper] | false |
Other | emberjs | ember.js | 15d5a9e305c828baf3eac36d61acd6f03f8db02f.json | Add support for required property in checkbox | packages_es6/ember-handlebars/lib/controls/checkbox.js | @@ -37,7 +37,7 @@ var Checkbox = View.extend({
tagName: 'input',
attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name',
- 'autofocus', 'form'],
+ 'autofocus', 'required', 'form'],
type: "checkbox",
checked: false, | false |
Other | emberjs | ember.js | fa94f3cb0a64aaebeff1b7ddd232b2f9406861b9.json | Fix exports from ES6ing of ember-application.
Fixes #4593. | packages/ember/lib/main.js | @@ -1,3 +1,4 @@
+// ensure that minispade loads the following modules first
require('ember-metal');
require('ember-runtime');
require('ember-handlebars-compiler');
@@ -7,6 +8,17 @@ require('ember-routing');
require('ember-application');
require('ember-extension-support');
+
+// ensure that the global exports have occurred for above
+// required packages
+requireModule('ember-metal');
+requireModule('ember-runtime');
+requireModule('ember-handlebars');
+requireModule('ember-views');
+requireModule('ember-routing');
+requireModule('ember-application');
+requireModule('ember-extension-support');
+
// do this to ensure that Ember.Test is defined properly on the global
// if it is present.
if (Ember.__loader.registry['ember-testing']) { | true |
Other | emberjs | ember.js | fa94f3cb0a64aaebeff1b7ddd232b2f9406861b9.json | Fix exports from ES6ing of ember-application.
Fixes #4593. | packages_es6/ember-application/lib/main.js | @@ -1,3 +1,4 @@
+import Ember from "ember-metal/core";
import {runLoadHooks} from "ember-runtime/system/lazy_load";
/** | true |
Other | emberjs | ember.js | edab6450f9fd5078f970471ea572271058fe1f46.json | expose asObject to precompile function
expose the pre-existing functionality to precompile as an object/string | packages_es6/ember-handlebars-compiler/lib/main.js | @@ -264,8 +264,10 @@ EmberHandlebars.Compiler.prototype.mustache = function(mustache) {
@for Ember.Handlebars
@static
@param {String} string The template to precompile
+ @param {Boolean} asObject optional parameter, defaulting to true, of whether or not the
+ compiled template should be returned as an Object or a String
*/
-EmberHandlebars.precompile = function(string) {
+EmberHandlebars.precompile = function(string, asObject) {
var ast = Handlebars.parse(string);
var options = {
@@ -281,8 +283,10 @@ EmberHandlebars.precompile = function(string) {
stringParams: true
};
+ asObject = asObject === undefined ? true : asObject;
+
var environment = new EmberHandlebars.Compiler().compile(ast, options);
- return new EmberHandlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
+ return new EmberHandlebars.JavaScriptCompiler().compile(environment, options, undefined, asObject);
};
// We don't support this for Handlebars runtime-only | true |
Other | emberjs | ember.js | edab6450f9fd5078f970471ea572271058fe1f46.json | expose asObject to precompile function
expose the pre-existing functionality to precompile as an object/string | packages_es6/ember-handlebars-compiler/tests/precompile_type_test.js | @@ -0,0 +1,21 @@
+import EmberHandlebars from "ember-handlebars-compiler";
+var precompile = EmberHandlebars.precompile,
+ template = 'Hello World',
+ result;
+
+module("Ember.Handlebars.precompileType");
+
+test("precompile creates a function when asObject isn't defined", function(){
+ result = precompile(template);
+ equal(typeof(result), "function");
+});
+
+test("precompile creates a function when asObject is true", function(){
+ result = precompile(template, true);
+ equal(typeof(result), "function");
+});
+
+test("precompile creates a string when asObject is false", function(){
+ result = precompile(template, false);
+ equal(typeof(result), "string");
+}); | true |
Other | emberjs | ember.js | 3218b6aaea40490d19c7891dfeb865802e1d1f6a.json | fix doc typo | packages/rsvp/lib/main.js | @@ -194,7 +194,7 @@ define("rsvp/defer",
deferred.resolve("Success!");
- defered.promise.then(function(value){
+ deferred.promise.then(function(value){
// value here is "Success!"
});
``` | false |
Other | emberjs | ember.js | e63f618538f783bb6fa100178ad79b690e1dec0d.json | Require ember-testing if present.
This ensures that the globals are setup properly if `ember-testing` is
present in the build. | packages/ember/lib/main.js | @@ -4,6 +4,12 @@ require('ember-extension-support');
// ES6TODO: resolve this via import once ember-application package is ES6'ed
requireModule('ember-extension-support');
+// do this to ensure that Ember.Test is defined properly on the global
+// if it is present.
+if (Ember.__loader.registry['ember-testing']) {
+ requireModule('ember-testing');
+}
+
/**
Ember
| false |
Other | emberjs | ember.js | aa23098fc3c957a6a4fb9ddf345e5701930e0136.json | Generate independent module files.
This allows us to generate custom builds with specific modules embedded
without requiring the full package.
Specifically, this will allow us to generate an
`ember-template-compiler.js` without duplicating all of the details that
exist in `ember-metal/core`. | bin/transpile-packages.js | @@ -11,6 +11,7 @@ function ES6Package(packageName, dependencies){
this.dependencies = dependencies;
this.inputPath = path.join('packages_es6', packageName);
this.outputPath = path.join('packages', packageName);
+ this.independentModulePath = 'dist/modules';
}
ES6Package.prototype = {
@@ -44,23 +45,26 @@ ES6Package.prototype = {
dirname = path.dirname(filename.replace(basePath +'/', '')),
isTest = basePath.match(/\/tests$/),
moduleName = path.join(this.packageName, isTest ? 'tests' : '', dirname, basenameNoExt),
- compiler;
+ compiler, output;
if (moduleName === path.join(this.packageName, 'main')) {
moduleName = this.packageName;
}
try {
compiler = new Compiler(fs.readFileSync(filename), moduleName);
- return {name: moduleName, compiled: compiler.toAMD()};
+ output = compiler.toAMD();
} catch (e) {
console.log('An error was raised while compiling "' + filename + '".');
console.log(' ' + e.message);
process.exit(1);
}
- var compiler = new Compiler(fs.readFileSync(filename), moduleName);
- return {name: moduleName, compiled: compiler.toAMD()};
+ var modulePath = path.join(this.independentModulePath, this.packageName, dirname);
+ this.mkdirp(modulePath);
+ fs.writeFileSync(path.join(modulePath, path.basename(filename)), output);
+
+ return {name: moduleName, compiled: output};
},
processLib: function(){ | false |
Other | emberjs | ember.js | 2cec8f99f4a993d5a128ee682b061be9a3cfd496.json | Remove references to `window`.
These references are already setup properly using `this` which will work
even in non-browser environments or when we do not want to be working in
globals mode (for example when supplying `Ember.lookup` or
`Ember.exports` as mentioned in https://github.com/emberjs/ember.js/commit/305202f). | packages/loader/lib/main.js | @@ -1,7 +1,7 @@
var define, requireModule, require, requirejs, Ember;
(function() {
- Ember = window.Ember = window.Ember || {};
+ Ember = this.Ember = this.Ember || {};
if (typeof Ember === 'undefined') { Ember = {} };
if (typeof Ember.__loader === 'undefined') { | true |
Other | emberjs | ember.js | 2cec8f99f4a993d5a128ee682b061be9a3cfd496.json | Remove references to `window`.
These references are already setup properly using `this` which will work
even in non-browser environments or when we do not want to be working in
globals mode (for example when supplying `Ember.lookup` or
`Ember.exports` as mentioned in https://github.com/emberjs/ember.js/commit/305202f). | packages_es6/ember-metal/lib/core.js | @@ -25,9 +25,6 @@
@version VERSION_STRING_PLACEHOLDER
*/
-// We need to make sure to operate on the same object if window.Ember already
-// existed.
-Ember = window.Ember;
if ('undefined' === typeof Ember) {
// Create core object. Make it act like an instance of Ember.Namespace so that
// objects assigned to it are given a sane string representation.
@@ -212,6 +209,4 @@ if ('undefined' === typeof Ember.deprecateFunc) {
*/
Ember.uuid = 0;
-window.Em = window.Ember = Ember;
-
export default Ember; | true |
Other | emberjs | ember.js | dbbc9aa0fe9d22efaae1f1574bc465d2ea10e4c4.json | Update CHANGELOG for 1.5.0-beta.4. | CHANGELOG.md | @@ -1,5 +1,13 @@
# Ember Changelog
+### Ember 1.5.0-beta.4 (March 10, 2014)
+
+* Allow Ember Inspector to access models with custom resolver.
+* [BUGFIX] Allow components with layoutName specified by parent class to specify templateName.
+* [BUGFIX] Don't raise error when a destroyed array is assigned to ArrayProxy.
+* [BUGFIX] Use better ajax events for ember-testing counters.
+* [BUGFIX] Move AJAX listeners into Ember.setupForTesting.
+
### Ember 1.5.0-beta.3 (March 1, 2014)
* [BUGFIX] PromiseProxyMixin reset isFulfilled and isRejected. | false |
Other | emberjs | ember.js | b1fe599c68339d69a34ce78f5b4611a5b30c34ec.json | Use cache api in reduceComputed. | packages/ember-metal/lib/computed.js | @@ -570,7 +570,7 @@ Ember.computed = function(func) {
to return
@return {Object} the cached value
*/
-Ember.cacheFor = function cacheFor(obj, key) {
+var cacheFor = Ember.cacheFor = function cacheFor(obj, key) {
var meta = obj[META_KEY],
cache = meta && meta.cache,
ret = cache && cache[key];
@@ -579,6 +579,24 @@ Ember.cacheFor = function cacheFor(obj, key) {
return ret;
};
+cacheFor.set = function(cache, key, value) {
+ if (value === undefined) {
+ cache[key] = UNDEFINED;
+ } else {
+ cache[key] = value;
+ }
+};
+
+cacheFor.get = function(cache, key) {
+ var ret = cache[key];
+ if (ret === UNDEFINED) { return undefined; }
+ return ret;
+};
+
+cacheFor.remove = function(cache, key) {
+ cache[key] = undefined;
+};
+
function getProperties(self, propertyNames) {
var ret = {};
for(var i = 0; i < propertyNames.length; i++) { | true |
Other | emberjs | ember.js | b1fe599c68339d69a34ce78f5b4611a5b30c34ec.json | Use cache api in reduceComputed. | packages/ember-runtime/lib/computed/reduce_computed.js | @@ -6,6 +6,10 @@ var e_get = Ember.get,
set = Ember.set,
guidFor = Ember.guidFor,
metaFor = Ember.meta,
+ cacheFor = Ember.cacheFor,
+ cacheSet = cacheFor.set,
+ cacheGet = cacheFor.get,
+ cacheRemove = cacheFor.remove,
propertyWillChange = Ember.propertyWillChange,
propertyDidChange = Ember.propertyDidChange,
addBeforeObserver = Ember.addBeforeObserver,
@@ -411,8 +415,9 @@ function ReduceComputedPropertyInstanceMeta(context, propertyName, initialValue)
ReduceComputedPropertyInstanceMeta.prototype = {
getValue: function () {
- if (this.propertyName in this.cache) {
- return this.cache[this.propertyName];
+ var value = cacheGet(this.cache, this.propertyName);
+ if (value !== undefined) {
+ return value;
} else {
return this.initialValue;
}
@@ -421,7 +426,7 @@ ReduceComputedPropertyInstanceMeta.prototype = {
setValue: function(newValue, triggerObservers) {
// This lets sugars force a recomputation, handy for very simple
// implementations of eg max.
- if (newValue === this.cache[this.propertyName]) {
+ if (newValue === cacheGet(this.cache, this.propertyName)) {
return;
}
@@ -430,9 +435,9 @@ ReduceComputedPropertyInstanceMeta.prototype = {
}
if (newValue === undefined) {
- delete this.cache[this.propertyName];
+ cacheRemove(this.cache, this.propertyName);
} else {
- this.cache[this.propertyName] = newValue;
+ cacheSet(this.cache, this.propertyName, newValue);
}
if (triggerObservers) { | true |
Other | emberjs | ember.js | 247c9d0ecaa00b398eb0112c6ce1e326903ecaa3.json | Remove unused distros from Assetfile.
This takes `rake dist` from 25 seconds to 13 seconds. | Assetfile | @@ -1,9 +1,7 @@
require 'ember-dev'
distros = {
- "runtime" => %w(ember-metal rsvp container ember-runtime),
"template-compiler" => %w(ember-handlebars-compiler),
- "data-deps" => %w(ember-metal rsvp container ember-runtime),
"full" => %w(ember-metal rsvp container ember-runtime ember-views metamorph handlebars ember-handlebars-compiler ember-handlebars ember-routing ember-application ember-extension-support)
}
| false |
Other | emberjs | ember.js | 1a13d839f301e2e0f7e6dd6f64b673e18d6423a2.json | Update CHANGELOG for 1.5.0-beta.3. | CHANGELOG.md | @@ -1,5 +1,10 @@
# Ember Changelog
+### Ember 1.5.0-beta.3 (March 1, 2014)
+
+* [BUGFIX] PromiseProxyMixin reset isFulfilled and isRejected.
+* Use documentElement instead of body for ember-extension detection.
+* Many documentation updates.
### Ember 1.5.0-beta.2 (February 23, 2014)
| false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.