dist/globals/ember-data.prod.js in ember-data-source-2.6.0.beta.4 vs dist/globals/ember-data.prod.js in ember-data-source-2.6.0

- old
+ new

@@ -4,11 +4,11 @@ /*! * @overview Ember Data * @copyright Copyright 2011-2016 Tilde Inc. and contributors. * Portions Copyright 2011 LivingSocial Inc. * @license Licensed under MIT license (see license.js) - * @version 2.6.0-beta.4 + * @version 2.6.0 */ var loader, define, requireModule, require, requirejs; (function(global) { @@ -21,10 +21,34 @@ requireModule: requireModule, require: require, requirejs: requirejs }; + requirejs = require = requireModule = function(name) { + stats.require++; + return findModule(name, '(require)').module.exports; + }; + + function resetStats() { + stats = { + define: 0, + require: 0, + reify: 0, + build: 0, + modules: 0, + exports: 0, + ensureBuild: 0, + resolve: 0, + resolveRelative: 0, + findModule: 0, + }; + requirejs._stats = stats; + } + + var stats; + resetStats(); + loader = { noConflict: function(aliases) { var oldName, newName; for (oldName in aliases) { @@ -62,10 +86,11 @@ } var defaultDeps = ['require', 'exports', 'module']; function Module(name, deps, callback, alias) { + stats.modules ++; this.id = uuid++; this.name = name; this.deps = !deps.length && callback.length ? defaultDeps : deps; this.module = { exports: {} }; this.callback = callback; @@ -84,10 +109,11 @@ exports['default'] = exports; } }; Module.prototype.exports = function() { + stats.exports ++; if (this.finalized) { return this.module.exports; } else { if (loader.wrapModules) { this.callback = loader.wrapModules(this.name, this.callback); @@ -107,10 +133,11 @@ this.state = undefined; this.module = { exports: {}}; }; Module.prototype.reify = function() { + stats.reify++; var deps = this.deps; var dep; var reified = this.reified; for (var i = 0; i < deps.length; i++) { @@ -139,18 +166,21 @@ } return r; }; Module.prototype.build = function() { + stats.ensureBuild++; if (this.state === FAILED || this.state === LOADED) { return; } + stats.build++; this.state = FAILED; this.reify() this.exports(); this.state = LOADED; }; define = function(name, deps, callback) { + stats.define++; if (arguments.length < 2) { unsupportedModule(arguments.length); } if (!_isArray(deps)) { @@ -180,15 +210,12 @@ function missingModule(name, referrer) { throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`'); } - requirejs = require = requireModule = function(name) { - return findModule(name, '(require)').module.exports; - }; - function findModule(name, referrer) { + stats.findModule++; var mod = registry[name] || registry[name + '/index']; while (mod && mod.isAlias) { mod = registry[mod.name]; } @@ -198,11 +225,13 @@ mod.build(); return mod; } function resolve(child, name) { + stats.resolve++; if (child.charAt(0) !== '.') { return child; } + stats.resolveRelative++; var parts = child.split('/'); var nameParts = name.split('/'); var parentBase = nameParts.slice(0, -1); @@ -231,10 +260,11 @@ requirejs.unsee = function(moduleName) { findModule(moduleName, '(unsee)').unsee(); }; requirejs.clear = function() { + resetStats(); requirejs.entries = requirejs._eak_seen = registry = {}; seen = {}; }; // prime @@ -8669,10 +8699,12 @@ _fetchAll: function (typeClass, array, options) { options = options || {}; var adapter = this.adapterFor(typeClass.modelName); var sinceToken = this.typeMapFor(typeClass).metadata.since; + set(array, 'isUpdating', true); + if (options.reload) { return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)((0, _emberDataPrivateSystemStoreFinders._findAll)(adapter, this, typeClass, sinceToken, options)); } var snapshotArray = array.createSnapshot(options); if (adapter.shouldReloadAll(this, snapshotArray)) { @@ -15868,10 +15900,10 @@ */ deserialize: null }); }); define("ember-data/version", ["exports"], function (exports) { - exports.default = "2.6.0-beta.4"; + exports.default = "2.6.0"; }); define("ember-inflector", ["exports", "ember", "ember-inflector/lib/system", "ember-inflector/lib/ext/string"], function (exports, _ember, _emberInflectorLibSystem, _emberInflectorLibExtString) { _emberInflectorLibSystem.Inflector.defaultRules = _emberInflectorLibSystem.defaultRules; _ember.default.Inflector = _emberInflectorLibSystem.Inflector;