From b453ad590260e9a3bb612f628a5bc7615eed5e93 Mon Sep 17 00:00:00 2001 From: Chris Garrett Date: Wed, 23 Oct 2019 17:47:39 -0700 Subject: [PATCH] [FEATURE] Adds support for parenless data decorators Adds support for `@attr`, `@belongsTo`, `@hasMany` without parens --- .eslintrc.js | 5 +- config/ember-try.js | 9 + index.js | 3 +- tests/unit/action-test.js | 1 + tests/unit/data-test.js | 40 + vendor/ember-decorators-polyfill/index.js | 894 ++++++++++++---------- yarn.lock | 543 +++++++------ 7 files changed, 839 insertions(+), 656 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a9ea48d..01e178e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,7 +3,10 @@ module.exports = { parser: 'babel-eslint', parserOptions: { ecmaVersion: 2017, - sourceType: 'module' + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true + } }, plugins: [ 'ember' diff --git a/config/ember-try.js b/config/ember-try.js index 20e7c98..c2d1e96 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -42,6 +42,15 @@ module.exports = function() { } } }, + { + name: 'ember-lts-3.12', + npm: { + devDependencies: { + 'ember-data': '~3.12.0', + 'ember-source': '~3.12.0' + } + } + }, { name: 'ember-release', npm: { diff --git a/index.js b/index.js index 94bc3e6..c4ad8ca 100644 --- a/index.js +++ b/index.js @@ -9,8 +9,9 @@ module.exports = { let checker = new VersionChecker(this.project); let emberVersion = checker.forEmber(); + let emberDataVersion = checker.for('ember-data'); - this.shouldPolyfill = emberVersion.lt('3.10.0-alpha.1'); + this.shouldPolyfill = emberVersion.lt('3.10.0-alpha.0') || emberDataVersion.lt('3.10.0-alpha.0'); }, included() { diff --git a/tests/unit/action-test.js b/tests/unit/action-test.js index 678cf08..ca719fe 100644 --- a/tests/unit/action-test.js +++ b/tests/unit/action-test.js @@ -6,6 +6,7 @@ import { setupRenderingTest, skip } from 'ember-qunit'; import { render, click, findAll } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; + function registerComponent( test, name, diff --git a/tests/unit/data-test.js b/tests/unit/data-test.js index d0548f3..1e00657 100644 --- a/tests/unit/data-test.js +++ b/tests/unit/data-test.js @@ -67,4 +67,44 @@ module('ember-data', function(hooks) { assert.equal(names, expectedNames, 'The correct records are in the array'); }); + + test('@attr can be used without parens', async function(assert) { + let Post = class extends DS.Model { + @DS.attr name; + }; + + register(`model:post`, Post); + stubAdapter(); + + let store = getService('store'); + let posts = await store.peekAll('post'); + let names = posts + .toArray() + .map(post => get(post, 'name')) + .join(); + + assert.equal(names, expectedNames, 'The correct records are in the array'); + }); + + if (gte('ember-data', '3.11.0')) { + test('@attr works with module imports without parens', async function(assert) { + let { default: Model, attr } = window.require('@ember-data/model'); + + let Post = class extends Model { + @attr name; + }; + + register(`model:post`, Post); + stubAdapter(); + + let store = getService('store'); + let posts = await store.peekAll('post'); + let names = posts + .toArray() + .map(post => get(post, 'name')) + .join(); + + assert.equal(names, expectedNames, 'The correct records are in the array'); + }); + } }); diff --git a/vendor/ember-decorators-polyfill/index.js b/vendor/ember-decorators-polyfill/index.js index df977b1..f120e6e 100644 --- a/vendor/ember-decorators-polyfill/index.js +++ b/vendor/ember-decorators-polyfill/index.js @@ -5,535 +5,587 @@ import { HAS_NATIVE_COMPUTED_GETTERS, HAS_DESCRIPTOR_TRAP, gte, + lte, } from 'ember-compatibility-helpers'; (function() { - const { - wrap, - assign, - computed: emberComputed, - ComputedProperty, - defineProperty, - inject: { controller: injectController, service: injectService }, - } = Ember; - - // ***** UTILITIES ***** - - const DESCRIPTOR = '__DESCRIPTOR__'; - - function isCPGetter(getter) { - // Hack for descriptor traps, we want to be able to tell if the function - // is a descriptor trap before we call it at all + function isFieldDescriptor(possibleDesc) { + let [target, key, desc] = possibleDesc; + return ( - getter !== null && - typeof getter === 'function' && - getter.toString().indexOf('CPGETTER_FUNCTION') !== -1 + possibleDesc.length === 3 && + typeof target === 'object' && + target !== null && + typeof key === 'string' && + ((typeof desc === 'object' && + desc !== null && + 'enumerable' in desc && + 'configurable' in desc) || + desc === undefined) // TS compatibility ); } - function isDescriptorTrap(possibleDesc) { - if (HAS_DESCRIPTOR_TRAP && DEBUG) { + if (lte('3.10.0-alpha.0')) { + const { + wrap, + assign, + computed: emberComputed, + ComputedProperty, + defineProperty, + inject: { controller: injectController, service: injectService }, + } = Ember; + + // ***** UTILITIES ***** + + const DESCRIPTOR = '__DESCRIPTOR__'; + + function isCPGetter(getter) { + // Hack for descriptor traps, we want to be able to tell if the function + // is a descriptor trap before we call it at all return ( - possibleDesc !== null && - typeof possibleDesc === 'object' && - possibleDesc[DESCRIPTOR] !== undefined + getter !== null && + typeof getter === 'function' && + getter.toString().indexOf('CPGETTER_FUNCTION') !== -1 ); - } else { - throw new Error('Cannot call `isDescriptorTrap` in production'); } - } - function getInheritedComputedDescriptor(obj, keyName) { - let meta = Ember.meta(obj); - let parentSource = meta && meta.parent ? meta.parent.source : undefined; - while (parentSource) { - let computedDesc = computedDescriptorFor(parentSource, keyName); - if (computedDesc) { - return computedDesc; + function isDescriptorTrap(possibleDesc) { + if (HAS_DESCRIPTOR_TRAP && DEBUG) { + return ( + possibleDesc !== null && + typeof possibleDesc === 'object' && + possibleDesc[DESCRIPTOR] !== undefined + ); + } else { + throw new Error('Cannot call `isDescriptorTrap` in production'); } - parentSource = parentSource.parent - ? parentSource.parent.source - : undefined; } - } - - function isComputedDescriptor(possibleDesc) { - return ( - possibleDesc !== null && - typeof possibleDesc === 'object' && - possibleDesc.isDescriptor - ); - } - function computedDescriptorFor(obj, keyName) { - assert('Cannot call `descriptorFor` on null', obj !== null); - assert('Cannot call `descriptorFor` on undefined', obj !== undefined); - assert( - `Cannot call \`descriptorFor\` on ${typeof obj}`, - typeof obj === 'object' || typeof obj === 'function' - ); - - if (HAS_NATIVE_COMPUTED_GETTERS) { + function getInheritedComputedDescriptor(obj, keyName) { let meta = Ember.meta(obj); - - if (meta !== undefined && typeof meta._descriptors === 'object') { - // TODO: Just return the standard descriptor - if (gte('3.8.0')) { - return meta._descriptors.get(keyName); - } else { - return meta._descriptors[keyName]; + let parentSource = meta && meta.parent ? meta.parent.source : undefined; + while (parentSource) { + let computedDesc = computedDescriptorFor(parentSource, keyName); + if (computedDesc) { + return computedDesc; } + parentSource = parentSource.parent + ? parentSource.parent.source + : undefined; } - } else if (Object.hasOwnProperty.call(obj, keyName)) { - let { - value: possibleDesc, - get: possibleCPGetter, - } = Object.getOwnPropertyDescriptor(obj, keyName); + } - if (DEBUG && HAS_DESCRIPTOR_TRAP && isCPGetter(possibleCPGetter)) { - possibleDesc = possibleCPGetter.call(obj); + function isComputedDescriptor(possibleDesc) { + return ( + possibleDesc !== null && + typeof possibleDesc === 'object' && + possibleDesc.isDescriptor + ); + } + + function computedDescriptorFor(obj, keyName) { + assert('Cannot call `descriptorFor` on null', obj !== null); + assert('Cannot call `descriptorFor` on undefined', obj !== undefined); + assert( + `Cannot call \`descriptorFor\` on ${typeof obj}`, + typeof obj === 'object' || typeof obj === 'function' + ); - if (isDescriptorTrap(possibleDesc)) { - return possibleDesc[DESCRIPTOR]; + if (HAS_NATIVE_COMPUTED_GETTERS) { + let meta = Ember.meta(obj); + + if (meta !== undefined && typeof meta._descriptors === 'object') { + // TODO: Just return the standard descriptor + if (gte('3.8.0')) { + return meta._descriptors.get(keyName); + } else { + return meta._descriptors[keyName]; + } + } + } else if (Object.hasOwnProperty.call(obj, keyName)) { + let { + value: possibleDesc, + get: possibleCPGetter, + } = Object.getOwnPropertyDescriptor(obj, keyName); + + if (DEBUG && HAS_DESCRIPTOR_TRAP && isCPGetter(possibleCPGetter)) { + possibleDesc = possibleCPGetter.call(obj); + + if (isDescriptorTrap(possibleDesc)) { + return possibleDesc[DESCRIPTOR]; + } } - } - return isComputedDescriptor(possibleDesc) ? possibleDesc : undefined; + return isComputedDescriptor(possibleDesc) ? possibleDesc : undefined; + } } - } - function isFieldDescriptor(possibleDesc) { - let [target, key, desc] = possibleDesc; + const DECORATOR_COMPUTED_FN = new WeakMap(); + const DECORATOR_PARAMS = new WeakMap(); + const DECORATOR_MODIFIERS = new WeakMap(); - return ( - possibleDesc.length === 3 && - typeof target === 'object' && - target !== null && - typeof key === 'string' && - ((typeof desc === 'object' && - desc !== null && - 'enumerable' in desc && - 'configurable' in desc) || - desc === undefined) // TS compatibility - ); - } + // eslint-disable-next-line no-inner-declarations + function buildComputedDesc(dec, prototype, key, desc) { + let fn = DECORATOR_COMPUTED_FN.get(dec); + let params = DECORATOR_PARAMS.get(dec); + let modifiers = DECORATOR_MODIFIERS.get(dec); - const DECORATOR_COMPUTED_FN = new WeakMap(); - const DECORATOR_PARAMS = new WeakMap(); - const DECORATOR_MODIFIERS = new WeakMap(); + let computedDesc = fn(prototype, key, desc, params); - // eslint-disable-next-line no-inner-declarations - function buildComputedDesc(dec, prototype, key, desc) { - let fn = DECORATOR_COMPUTED_FN.get(dec); - let params = DECORATOR_PARAMS.get(dec); - let modifiers = DECORATOR_MODIFIERS.get(dec); + assert( + `computed decorators must return an instance of an Ember ComputedProperty descriptor, received ${computedDesc}`, + isComputedDescriptor(computedDesc) + ); - let computedDesc = fn(prototype, key, desc, params); + if (modifiers) { + modifiers.forEach(m => { + if (Array.isArray(m)) { + computedDesc[m[0]](...m[1]); + } else { + computedDesc[m](); + } + }); + } - assert( - `computed decorators must return an instance of an Ember ComputedProperty descriptor, received ${computedDesc}`, - isComputedDescriptor(computedDesc) - ); + return computedDesc; + } + + class DecoratorDescriptor extends ComputedProperty { + setup(obj, key, meta) { + if (!this._computedDesc) { + this._computedDesc = buildComputedDesc(this, obj, key, {}); + } - if (modifiers) { - modifiers.forEach(m => { - if (Array.isArray(m)) { - computedDesc[m[0]](...m[1]); + if (gte('3.6.0')) { + this._computedDesc.setup(obj, key, meta); + } else if (gte('3.1.0')) { + let meta = Ember.meta(obj); + let desc = this._computedDesc; + + Object.defineProperty(obj, key, { + configurable: true, + enumerable: true, + get() { + return desc.get(this, key); + }, + }); + + meta.writeDescriptors(key, this._computedDesc); } else { - computedDesc[m](); + Object.defineProperty(obj, key, { + configurable: true, + writable: true, + enumerable: true, + value: this._computedDesc, + }); } - }); - } + } - return computedDesc; - } + _addModifier(modifier) { + let modifiers = DECORATOR_MODIFIERS.get(this); - class DecoratorDescriptor extends ComputedProperty { - setup(obj, key, meta) { - if (!this._computedDesc) { - this._computedDesc = buildComputedDesc(this, obj, key, {}); + if (modifiers === undefined) { + modifiers = []; + DECORATOR_MODIFIERS.set(this, modifiers); + } + + modifiers.push(modifier); } - if (gte('3.6.0')) { - this._computedDesc.setup(obj, key, meta); - } else if (gte('3.1.0')) { - let meta = Ember.meta(obj); - let desc = this._computedDesc; - - Object.defineProperty(obj, key, { - configurable: true, - enumerable: true, - get() { - return desc.get(this, key); - }, - }); + get() { + return this._innerComputed.get.apply(this, arguments); + } - meta.writeDescriptors(key, this._computedDesc); - } else { - Object.defineProperty(obj, key, { - configurable: true, - writable: true, - enumerable: true, - value: this._computedDesc, - }); + set() { + return this._innerComputed.get.apply(this, arguments); } - } - _addModifier(modifier) { - let modifiers = DECORATOR_MODIFIERS.get(this); + readOnly() { + this._addModifier('readOnly'); + return this; + } - if (modifiers === undefined) { - modifiers = []; - DECORATOR_MODIFIERS.set(this, modifiers); + volatile() { + this._addModifier('volatile'); + return this; } - modifiers.push(modifier); - } + property(...keys) { + this._addModifier(['property', keys]); + return this; + } - get() { - return this._innerComputed.get.apply(this, arguments); - } + meta(...args) { + this._addModifier(['meta', args]); + return this; + } - set() { - return this._innerComputed.get.apply(this, arguments); - } + get _dependentKeys() { + let params = DECORATOR_PARAMS.get(this) || []; - readOnly() { - this._addModifier('readOnly'); - return this; + return params.filter(item => typeof item === 'string'); + } } - volatile() { - this._addModifier('volatile'); - return this; - } + DecoratorDescriptor.prototype.isDescriptor = true; + DecoratorDescriptor.prototype.__IS_POLYFILLED_COMPUTED = true; - property(...keys) { - this._addModifier(['property', keys]); - return this; + function computedDecorator(fn, params) { + let dec = function(prototype, key, desc) { + assert( + `ES6 property getters/setters only need to be decorated once, '${key}' was decorated on both the getter and the setter`, + !computedDescriptorFor(prototype, key) + ); + + let computedDesc = buildComputedDesc(dec, prototype, key, desc); + + if (!HAS_NATIVE_COMPUTED_GETTERS) { + // Until recent versions of Ember, computed properties would be defined + // by just setting them. We need to blow away any predefined properties + // (getters/setters, etc.) to allow Ember.defineProperty to work correctly. + Object.defineProperty(prototype, key, { + configurable: true, + writable: true, + enumerable: true, + value: undefined, + }); + } + + defineProperty(prototype, key, computedDesc); + + // There's currently no way to disable redefining the property when decorators + // are run, so return the property descriptor we just assigned + return Object.getOwnPropertyDescriptor(prototype, key); + }; + + Object.setPrototypeOf(dec, DecoratorDescriptor.prototype); + DECORATOR_COMPUTED_FN.set(dec, fn); + DECORATOR_PARAMS.set(dec, params); + return dec; } - meta(...args) { - this._addModifier(['meta', args]); - return this; + function computedDecoratorWithParams(fn) { + return function(...params) { + if (isFieldDescriptor(params)) { + return Function.apply.call(computedDecorator(fn), undefined, params); + } else { + return computedDecorator(fn, params); + } + }; } - get _dependentKeys() { - let params = DECORATOR_PARAMS.get(this) || []; + function computedDecoratorWithRequiredParams(fn, name) { + return function(...params) { + assert( + `The @${name || fn.name} decorator requires parameters`, + !isFieldDescriptor(params) && params.length > 0 + ); - return params.filter(item => typeof item === 'string'); + return computedDecorator(fn, params); + }; } - } - DecoratorDescriptor.prototype.isDescriptor = true; - DecoratorDescriptor.prototype.__IS_POLYFILLED_COMPUTED = true; - - function computedDecorator(fn, params) { - let dec = function(prototype, key, desc) { - assert( - `ES6 property getters/setters only need to be decorated once, '${key}' was decorated on both the getter and the setter`, - !computedDescriptorFor(prototype, key) + function legacyMacro(fn, fnName) { + let decorator = computedDecoratorWithRequiredParams( + (prototype, key, desc, params) => { + return fn(...params); + }, + fnName ); - let computedDesc = buildComputedDesc(dec, prototype, key, desc); - - if (!HAS_NATIVE_COMPUTED_GETTERS) { - // Until recent versions of Ember, computed properties would be defined - // by just setting them. We need to blow away any predefined properties - // (getters/setters, etc.) to allow Ember.defineProperty to work correctly. - Object.defineProperty(prototype, key, { - configurable: true, - writable: true, - enumerable: true, - value: undefined, - }); + if (DEBUG) { + let desc = Object.getOwnPropertyDescriptor(decorator, 'name'); + // Pre ES2015 non standard implementation, "Function.name" is non configurable field + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name + if (desc && desc.configurable) { + Object.defineProperty(decorator, 'name', { + value: fnName, + }); + } } - defineProperty(prototype, key, computedDesc); + return decorator; + } - // There's currently no way to disable redefining the property when decorators - // are run, so return the property descriptor we just assigned - return Object.getOwnPropertyDescriptor(prototype, key); - }; + // ***** COMPUTED ***** - Object.setPrototypeOf(dec, DecoratorDescriptor.prototype); - DECORATOR_COMPUTED_FN.set(dec, fn); - DECORATOR_PARAMS.set(dec, params); - return dec; - } + Ember.ComputedProperty = DecoratorDescriptor; + Ember.computed = computedDecoratorWithParams( + (prototype, key, desc, params = []) => { + assert( + `@computed can only be used on accessors or fields, attempted to use it with ${key} but that was a method. Try converting it to a getter (e.g. \`get ${key}() {}\`)`, + !(desc && typeof desc.value === 'function') + ); - function computedDecoratorWithParams(fn) { - return function(...params) { - if (isFieldDescriptor(params)) { - return Function.apply.call(computedDecorator(fn), undefined, params); - } else { - return computedDecorator(fn, params); - } - }; - } + assert( + `@computed can only be used on empty fields. ${key} has an initial value (e.g. \`${key} = someValue\`)`, + !(desc && desc.initializer) + ); - function computedDecoratorWithRequiredParams(fn, name) { - return function(...params) { - assert( - `The @${name || fn.name} decorator requires parameters`, - !isFieldDescriptor(params) && params.length > 0 - ); + let lastArg = params[params.length - 1]; + let get, set; - return computedDecorator(fn, params); - }; - } + assert( + `computed properties should not be passed to @computed directly`, + !( + (typeof lastArg === 'function' || typeof lastArg === 'object') && + lastArg instanceof ComputedProperty + ) + ); - function legacyMacro(fn, fnName) { - let decorator = computedDecoratorWithRequiredParams( - (prototype, key, desc, params) => { - return fn(...params); - }, - fnName - ); + if (typeof lastArg === 'function') { + params.pop(); + get = lastArg; + } - if (DEBUG) { - let desc = Object.getOwnPropertyDescriptor(decorator, 'name'); - // Pre ES2015 non standard implementation, "Function.name" is non configurable field - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name - if (desc && desc.configurable) { - Object.defineProperty(decorator, 'name', { - value: fnName, - }); - } - } + if (typeof lastArg === 'object' && lastArg !== null) { + params.pop(); + get = lastArg.get; + set = lastArg.set; + } - return decorator; - } + assert( + `Attempted to apply a computed property that already has a getter/setter to a ${key}, but it is a method or an accessor. If you passed @computed a function or getter/setter (e.g. \`@computed({ get() { ... } })\`), then it must be applied to a field`, + !( + desc && + (typeof get === 'function' || typeof set === 'function') && + (typeof desc.get === 'function' || typeof desc.get === 'function') + ) + ); - // ***** COMPUTED ***** + let usedClassDescriptor = false; - Ember.ComputedProperty = DecoratorDescriptor; - Ember.computed = computedDecoratorWithParams( - (prototype, key, desc, params = []) => { - assert( - `@computed can only be used on accessors or fields, attempted to use it with ${key} but that was a method. Try converting it to a getter (e.g. \`get ${key}() {}\`)`, - !(desc && typeof desc.value === 'function') - ); + if (get === undefined && set === undefined) { + usedClassDescriptor = true; + get = desc.get; + set = desc.set; + } - assert( - `@computed can only be used on empty fields. ${key} has an initial value (e.g. \`${key} = someValue\`)`, - !(desc && desc.initializer) - ); + assert( + `Attempted to use @computed on ${key}, but it did not have a getter or a setter. You must either pass a get a function or getter/setter to @computed directly (e.g. \`@computed({ get() { ... } })\`) or apply @computed directly to a getter/setter`, + typeof get === 'function' || typeof set === 'function' + ); - let lastArg = params[params.length - 1]; - let get, set; + if (desc !== undefined) { + // Unset the getter and setter so the descriptor just has a plain value + desc.get = undefined; + desc.set = undefined; + } + let superDesc = getInheritedComputedDescriptor(prototype, key); + if (superDesc && superDesc instanceof ComputedProperty) { + get = wrap(get, superDesc._getter); + if (typeof superDesc._setter === 'function') { + set = wrap(set, superDesc._setter); + } + } - assert( - `computed properties should not be passed to @computed directly`, - !( - (typeof lastArg === 'function' || typeof lastArg === 'object') && - lastArg instanceof ComputedProperty - ) - ); + let setter = set; + + if (usedClassDescriptor === true && typeof set === 'function') { + // Because the setter was defined using class syntax, it cannot have the + // same `set(key, value)` signature, and it may not return a value. We + // convert the call internally to pass the value as the first parameter, + // and check to see if the return value is undefined and if so call the + // getter again to get the value explicitly. + setter = function(key, value) { + let ret = set.call(this, value); + return typeof ret === 'undefined' ? get.call(this) : ret; + }; + } - if (typeof lastArg === 'function') { - params.pop(); - get = lastArg; + return emberComputed(...params, { get, set: setter }); } + ); - if (typeof lastArg === 'object' && lastArg !== null) { - params.pop(); - get = lastArg.get; - set = lastArg.set; - } + // ***** COMPUTED MACROS ***** - assert( - `Attempted to apply a computed property that already has a getter/setter to a ${key}, but it is a method or an accessor. If you passed @computed a function or getter/setter (e.g. \`@computed({ get() { ... } })\`), then it must be applied to a field`, - !( - desc && - (typeof get === 'function' || typeof set === 'function') && - (typeof desc.get === 'function' || typeof desc.get === 'function') - ) - ); - - let usedClassDescriptor = false; + Ember.computed.alias = legacyMacro(emberComputed.alias, 'alias'); + Ember.computed.and = legacyMacro(emberComputed.and, 'and'); + Ember.computed.bool = legacyMacro(emberComputed.bool, 'bool'); + Ember.computed.collect = legacyMacro(emberComputed.collect, 'collect'); + Ember.computed.deprecatingAlias = legacyMacro( + emberComputed.deprecatingAlias, + 'deprecatingAlias' + ); + Ember.computed.empty = legacyMacro(emberComputed.empty, 'empty'); + Ember.computed.equal = legacyMacro(emberComputed.equal, 'equal'); + Ember.computed.filter = legacyMacro(emberComputed.filter, 'filter'); + Ember.computed.filterBy = legacyMacro(emberComputed.filterBy, 'filterBy'); + Ember.computed.gt = legacyMacro(emberComputed.gt, 'gt'); + Ember.computed.gte = legacyMacro(emberComputed.gte, 'gte'); + Ember.computed.intersect = legacyMacro(emberComputed.intersect, 'intersect'); + Ember.computed.lt = legacyMacro(emberComputed.lt, 'lt'); + Ember.computed.lte = legacyMacro(emberComputed.lte, 'lte'); + Ember.computed.map = legacyMacro(emberComputed.map, 'map'); + Ember.computed.mapBy = legacyMacro(emberComputed.mapBy, 'mapBy'); + Ember.computed.match = legacyMacro(emberComputed.match, 'match'); + Ember.computed.max = legacyMacro(emberComputed.max, 'max'); + Ember.computed.min = legacyMacro(emberComputed.min, 'min'); + Ember.computed.none = legacyMacro(emberComputed.none, 'none'); + Ember.computed.not = legacyMacro(emberComputed.not, 'not'); + Ember.computed.notEmpty = legacyMacro(emberComputed.notEmpty, 'notEmpty'); + Ember.computed.oneWay = legacyMacro(emberComputed.oneWay, 'oneWay'); + Ember.computed.or = legacyMacro(emberComputed.or, 'or'); + Ember.computed.reads = legacyMacro(emberComputed.reads, 'reads'); + Ember.computed.readOnly = legacyMacro(emberComputed.readOnly, 'readOnly'); + Ember.computed.setDiff = legacyMacro(emberComputed.setDiff, 'setDiff'); + Ember.computed.sort = legacyMacro(emberComputed.sort, 'sort'); + Ember.computed.sum = legacyMacro(emberComputed.sum, 'sum'); + Ember.computed.union = legacyMacro(emberComputed.union, 'union'); + Ember.computed.uniq = legacyMacro(emberComputed.uniq, 'uniq'); + Ember.computed.uniqBy = legacyMacro(emberComputed.uniqBy, 'uniqBy'); + + // ***** INJECTIONS ***** + + Ember.inject.controller = computedDecoratorWithParams( + (prototype, key, desc, params) => { + return injectController.apply(this, params); + } + ); - if (get === undefined && set === undefined) { - usedClassDescriptor = true; - get = desc.get; - set = desc.set; + Ember.inject.service = computedDecoratorWithParams( + (prototype, key, desc, params) => { + return injectService.apply(this, params); } + ); - assert( - `Attempted to use @computed on ${key}, but it did not have a getter or a setter. You must either pass a get a function or getter/setter to @computed directly (e.g. \`@computed({ get() { ... } })\`) or apply @computed directly to a getter/setter`, - typeof get === 'function' || typeof set === 'function' - ); + // ***** ACTION ***** - if (desc !== undefined) { - // Unset the getter and setter so the descriptor just has a plain value - desc.get = undefined; - desc.set = undefined; - } - let superDesc = getInheritedComputedDescriptor(prototype, key); - if (superDesc && superDesc instanceof ComputedProperty) { - get = wrap(get, superDesc._getter); - if (typeof superDesc._setter === 'function') { - set = wrap(set, superDesc._setter); - } + let BINDINGS_MAP = new WeakMap(); + + function setupAction(target, key, actionFn) { + if ( + target.constructor !== undefined && + typeof target.constructor.proto === 'function' + ) { + target.constructor.proto(); } - let setter = set; - - if (usedClassDescriptor === true && typeof set === 'function') { - // Because the setter was defined using class syntax, it cannot have the - // same `set(key, value)` signature, and it may not return a value. We - // convert the call internally to pass the value as the first parameter, - // and check to see if the return value is undefined and if so call the - // getter again to get the value explicitly. - setter = function(key, value) { - let ret = set.call(this, value); - return typeof ret === 'undefined' ? get.call(this) : ret; - }; + if (!target.hasOwnProperty('actions')) { + let parentActions = target.actions; + // we need to assign because of the way mixins copy actions down when inheriting + target.actions = parentActions ? assign({}, parentActions) : {}; } - return emberComputed(...params, { get, set: setter }); - } - ); - - // ***** COMPUTED MACROS ***** - - Ember.computed.alias = legacyMacro(emberComputed.alias, 'alias'); - Ember.computed.and = legacyMacro(emberComputed.and, 'and'); - Ember.computed.bool = legacyMacro(emberComputed.bool, 'bool'); - Ember.computed.collect = legacyMacro(emberComputed.collect, 'collect'); - Ember.computed.deprecatingAlias = legacyMacro( - emberComputed.deprecatingAlias, - 'deprecatingAlias' - ); - Ember.computed.empty = legacyMacro(emberComputed.empty, 'empty'); - Ember.computed.equal = legacyMacro(emberComputed.equal, 'equal'); - Ember.computed.filter = legacyMacro(emberComputed.filter, 'filter'); - Ember.computed.filterBy = legacyMacro(emberComputed.filterBy, 'filterBy'); - Ember.computed.gt = legacyMacro(emberComputed.gt, 'gt'); - Ember.computed.gte = legacyMacro(emberComputed.gte, 'gte'); - Ember.computed.intersect = legacyMacro(emberComputed.intersect, 'intersect'); - Ember.computed.lt = legacyMacro(emberComputed.lt, 'lt'); - Ember.computed.lte = legacyMacro(emberComputed.lte, 'lte'); - Ember.computed.map = legacyMacro(emberComputed.map, 'map'); - Ember.computed.mapBy = legacyMacro(emberComputed.mapBy, 'mapBy'); - Ember.computed.match = legacyMacro(emberComputed.match, 'match'); - Ember.computed.max = legacyMacro(emberComputed.max, 'max'); - Ember.computed.min = legacyMacro(emberComputed.min, 'min'); - Ember.computed.none = legacyMacro(emberComputed.none, 'none'); - Ember.computed.not = legacyMacro(emberComputed.not, 'not'); - Ember.computed.notEmpty = legacyMacro(emberComputed.notEmpty, 'notEmpty'); - Ember.computed.oneWay = legacyMacro(emberComputed.oneWay, 'oneWay'); - Ember.computed.or = legacyMacro(emberComputed.or, 'or'); - Ember.computed.reads = legacyMacro(emberComputed.reads, 'reads'); - Ember.computed.readOnly = legacyMacro(emberComputed.readOnly, 'readOnly'); - Ember.computed.setDiff = legacyMacro(emberComputed.setDiff, 'setDiff'); - Ember.computed.sort = legacyMacro(emberComputed.sort, 'sort'); - Ember.computed.sum = legacyMacro(emberComputed.sum, 'sum'); - Ember.computed.union = legacyMacro(emberComputed.union, 'union'); - Ember.computed.uniq = legacyMacro(emberComputed.uniq, 'uniq'); - Ember.computed.uniqBy = legacyMacro(emberComputed.uniqBy, 'uniqBy'); - - // ***** INJECTIONS ***** - - Ember.inject.controller = computedDecoratorWithParams( - (prototype, key, desc, params) => { - return injectController.apply(this, params); - } - ); + target.actions[key] = actionFn; - Ember.inject.service = computedDecoratorWithParams( - (prototype, key, desc, params) => { - return injectService.apply(this, params); - } - ); + return { + get() { + let bindings = BINDINGS_MAP.get(this); - // ***** ACTION ***** + if (bindings === undefined) { + bindings = new Map(); + BINDINGS_MAP.set(this, bindings); + } - let BINDINGS_MAP = new WeakMap(); + let fn = bindings.get(actionFn); - function setupAction(target, key, actionFn) { - if ( - target.constructor !== undefined && - typeof target.constructor.proto === 'function' - ) { - target.constructor.proto(); + if (fn === undefined) { + fn = actionFn.bind(this); + bindings.set(actionFn, fn); + } + + return fn; + }, + }; } - if (!target.hasOwnProperty('actions')) { - let parentActions = target.actions; - // we need to assign because of the way mixins copy actions down when inheriting - target.actions = parentActions ? assign({}, parentActions) : {}; + class ActionDecoratorDescriptor extends ComputedProperty { + setup(obj, key, meta) { + assert( + 'The action() decorator must be passed a method when used in classic classes', + typeof this.__ACTION_FN__ === 'function' + ); + + Object.defineProperty( + obj, + key, + setupAction(obj, key, this.__ACTION_FN__) + ); + } + + get(obj, key) { + return obj[key]; + } } - target.actions[key] = actionFn; + Ember._action = function(target, key, desc) { + let actionFn; - return { - get() { - let bindings = BINDINGS_MAP.get(this); + if (!isFieldDescriptor([target, key, desc])) { + actionFn = target; - if (bindings === undefined) { - bindings = new Map(); - BINDINGS_MAP.set(this, bindings); - } + let decorator = function(target, key, desc) { + assert( + 'The @action decorator may only be passed a method when used in classic classes. You should decorate methods directly in native classes', + false + ); + }; - let fn = bindings.get(actionFn); + decorator.__ACTION_FN__ = actionFn; - if (fn === undefined) { - fn = actionFn.bind(this); - bindings.set(actionFn, fn); - } + Object.setPrototypeOf(decorator, ActionDecoratorDescriptor.prototype); - return fn; - }, - }; - } + return decorator; + } + + actionFn = desc.value; - class ActionDecoratorDescriptor extends ComputedProperty { - setup(obj, key, meta) { assert( - 'The action() decorator must be passed a method when used in classic classes', - typeof this.__ACTION_FN__ === 'function' + 'The @action decorator must be applied to methods when used in native classes', + typeof actionFn === 'function' ); - Object.defineProperty( - obj, - key, - setupAction(obj, key, this.__ACTION_FN__) - ); - } + return setupAction(target, key, actionFn); + }; + } + + if (lte('ember-data', '3.13.0-alpha.0')) { + let mainRequire = require; - get(obj, key) { - return obj[key]; + function computedMacroWithOptionalParams(fn) { + return (...maybeDesc) => + (isFieldDescriptor(maybeDesc) + ? Function.apply.call(fn(), undefined, maybeDesc) + : Function.apply.call(fn, undefined, maybeDesc)) } - } - Ember._action = function(target, key, desc) { - let actionFn; + window.require = require = function patchDataDecorators(moduleName) { + let DS; - if (!isFieldDescriptor([target, key, desc])) { - actionFn = target; + try { + DS = mainRequire('ember-data').default; + } catch (e) { + return mainRequire(moduleName); + } - let decorator = function(target, key, desc) { - assert( - 'The @action decorator may only be passed a method when used in classic classes. You should decorate methods directly in native classes', - false + let { + attr: dataAttr, + belongsTo: dataBelongsTo, + hasMany: dataHasMany, + } = DS; + + let attr = computedMacroWithOptionalParams(dataAttr); + let belongsTo = computedMacroWithOptionalParams(dataBelongsTo); + let hasMany = computedMacroWithOptionalParams(dataHasMany); + + DS.attr = attr; + DS.belongsTo = belongsTo; + DS.hasMany = hasMany; + + if (mainRequire.entries['@ember-data/model/index']) { + let newExports = Object.assign( + {}, + mainRequire.entries['@ember-data/model/index'].module.exports, + { attr, belongsTo, hasMany } ); - }; - decorator.__ACTION_FN__ = actionFn; + mainRequire.entries['@ember-data/model/index'].module.exports = newExports; + } - Object.setPrototypeOf(decorator, ActionDecoratorDescriptor.prototype); + window.require = require = mainRequire; - return decorator; + return mainRequire(moduleName); } - - actionFn = desc.value; - - assert( - 'The @action decorator must be applied to methods when used in native classes', - typeof actionFn === 'function' - ); - - return setupAction(target, key, actionFn); - }; + } })(); diff --git a/yarn.lock b/yarn.lock index 68fb265..7fcbc2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -362,6 +362,14 @@ "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.11" +"@babel/plugin-transform-block-scoping@^7.5.5": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz#6e854e51fbbaa84351b15d4ddafe342f3a5d542a" + integrity sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.13" + "@babel/plugin-transform-classes@^7.4.3": version "7.4.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz#adc7a1137ab4287a555d429cc56ecde8f40c062c" @@ -575,10 +583,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typescript@^7.1.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.0.tgz#0389ec53a34e80f99f708c4ca311181449a68eb1" - integrity sha512-U7/+zKnRZg04ggM/Bm+xmu2B/PrwyDQTT/V89FXWYWNMxBDwSx56u6jtk9SEbfLFbZaEI72L+5LPvQjeZgFCrQ== +"@babel/plugin-transform-typescript@~7.4.0": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.5.tgz#ab3351ba35307b79981993536c93ff8be050ba28" + integrity sha512-RPB/YeGr4ZrFKNwfuQRlMf2lxoCUaU01MTw39/OFE/RiL8HDjtn68BwEPft1P7JN4akyEmjGWAMNldOV7o9V2g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-typescript" "^7.2.0" @@ -685,7 +693,7 @@ globals "^11.1.0" lodash "^4.17.11" -"@babel/types@^7.0.0", "@babel/types@^7.1.5", "@babel/types@^7.2.0", "@babel/types@^7.2.2", "@babel/types@^7.4.0": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2", "@babel/types@^7.4.0": version "7.4.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.0.tgz#670724f77d24cce6cc7d8cf64599d511d164894c" integrity sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA== @@ -702,6 +710,97 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@ember-data/-build-infra@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@ember-data/-build-infra/-/-build-infra-3.13.1.tgz#e31247b72a4c61b837286d0ef0829f4128466601" + integrity sha512-bDvnQVPAaQf2UuRsU/6ha444hwdUsUeV5vNsc7U2i6ffzSYiF9y8yQhOoW0JgTUwz0mnASRscOO6QKEUJOTkKA== + dependencies: + "@babel/plugin-transform-block-scoping" "^7.5.5" + "@ember/edition-utils" "^1.1.1" + babel-plugin-debug-macros "^0.3.2" + babel-plugin-feature-flags "^0.3.1" + babel-plugin-filter-imports "^3.0.0" + babel6-plugin-strip-class-callcheck "^6.0.0" + broccoli-debug "^0.6.5" + broccoli-file-creator "^2.1.1" + broccoli-funnel "^2.0.2" + broccoli-merge-trees "^3.0.2" + broccoli-rollup "^4.1.1" + calculate-cache-key-for-tree "^2.0.0" + chalk "^2.4.1" + ember-cli-path-utils "^1.0.0" + ember-cli-string-utils "^1.1.0" + ember-cli-version-checker "^3.1.2" + esm "^3.2.25" + git-repo-info "^2.0.0" + glob "^7.1.4" + npm-git-info "^1.0.3" + rimraf "^2.6.2" + rsvp "^4.8.5" + silent-error "^1.1.1" + +"@ember-data/adapter@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@ember-data/adapter/-/adapter-3.13.1.tgz#2cb9becd3b8ac844e1ae97b408d2c3118a695f5c" + integrity sha512-IpdebSh8B4HlLwkpmpOJUE63U0Q0itI3StsGzZ5i/DIKD6WsMFdux7v8fxRqkW4ZwQDjQdEAtNUUWRILQcWDFw== + dependencies: + "@ember-data/-build-infra" "3.13.1" + "@ember/edition-utils" "^1.1.1" + ember-cli-babel "^7.8.0" + ember-cli-test-info "^1.0.0" + ember-cli-typescript "^2.0.2" + +"@ember-data/canary-features@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@ember-data/canary-features/-/canary-features-3.13.1.tgz#c60302d498153fbefe9f1a6d30b9a23d997cbc49" + integrity sha512-zfLpzcTxux5UPA/E0snGJqbM3yPtcQgWcen45Rcj9AcQNsnYiw/r9HV0uTHzRzeyH7lDMplyvLdQedvyk8K88w== + dependencies: + ember-cli-babel "^7.8.0" + +"@ember-data/model@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@ember-data/model/-/model-3.13.1.tgz#6364d5ed3f8997a35d39b5b97a3519b2df63870b" + integrity sha512-lm6AWuBSNp6zMPIjJGN6Dh7u4DJDd8ejOPaS3Cv7r7pgR1ROxRmrjMcgxFdqMY51a/MREj0BfTMWSHKsftcCYA== + dependencies: + "@ember-data/-build-infra" "3.13.1" + "@ember-data/store" "3.13.1" + "@ember/edition-utils" "^1.1.1" + ember-cli-babel "^7.8.0" + ember-cli-string-utils "^1.1.0" + ember-cli-test-info "^1.0.0" + ember-cli-typescript "^2.0.2" + ember-compatibility-helpers "^1.2.0" + inflection "1.12.0" + +"@ember-data/serializer@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@ember-data/serializer/-/serializer-3.13.1.tgz#0d1f844caa4e98f6f6c7f28341fa6660b7e568c3" + integrity sha512-DhTtsvED0KSLy21zBw5NVnSnaJgLEv5vvLUPN1JQyY47Q+auQXi2JXzgTV8mYdTl4Xbe6GYygC0jyPUA4rM8IA== + dependencies: + "@ember-data/-build-infra" "3.13.1" + "@ember-data/store" "3.13.1" + ember-cli-babel "^7.8.0" + ember-cli-test-info "^1.0.0" + ember-cli-typescript "^2.0.2" + +"@ember-data/store@3.13.1": + version "3.13.1" + resolved "https://registry.yarnpkg.com/@ember-data/store/-/store-3.13.1.tgz#e74cad3f5650451f90740b3b3e5f4ed0f6213127" + integrity sha512-7Inhnl3J6yFYE6autfOUPyrNJ63S28OXUM3k4O0pOlvWQbsEPNoELMNPUvjatxRB608qg5Yloh/kVxbdZsM/4w== + dependencies: + "@ember-data/-build-infra" "3.13.1" + "@ember-data/adapter" "3.13.1" + "@ember-data/canary-features" "3.13.1" + ember-cli-babel "^7.8.0" + ember-cli-path-utils "^1.0.0" + ember-cli-typescript "^2.0.2" + heimdalljs "^0.3.0" + +"@ember/edition-utils@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.1.1.tgz#d5732c3da593f202e6e1ac6dbee56a758242403f" + integrity sha512-GEhri78jdQp/xxPpM6z08KlB0wrHfnfrJ9dmQk7JeQ4XCiMzXsJci7yooQgg/IcTKCM/PxE/IkGCQAo80adMkw== + "@ember/optional-features@^0.6.3": version "0.6.4" resolved "https://registry.yarnpkg.com/@ember/optional-features/-/optional-features-0.6.4.tgz#8199f853c1781234fcb1f05090cddd0b822bff69" @@ -814,14 +913,12 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== -"@types/acorn@^4.0.3": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.5.tgz#e29fdf884695e77be4e99e67d748f5147255752d" - integrity sha512-603sPiZ4GVRHPvn6vNgEAvJewKsy+zwRWYS2MeIMemgoAtcjlw2G3lALxrb9OPA17J28bkB71R33yXlQbUatCA== - dependencies: - "@types/estree" "*" +"@types/broccoli-plugin@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@types/broccoli-plugin/-/broccoli-plugin-1.3.0.tgz#38f8462fecaebc4e09a32e4d4ed1b9808f75bbca" + integrity sha512-SLk4/hFc2kGvgwNFrpn2O1juxFOllcHAywvlo7VwxfExLzoz1GGJ0oIZCwj5fwSpvHw4AWpZjJ1fUvb62PDayQ== -"@types/estree@*", "@types/estree@0.0.39": +"@types/estree@*": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== @@ -850,21 +947,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.0.tgz#b0df8d6ef9b5001b2be3a94d909ce3c29a80f9e1" integrity sha512-rx29MMkRdVmzunmiA4lzBYJNnXsW/PhG4kMBy2ATsYaDjGGR75dCFEVVROKpNwlVdcUX3xxlghKQOeDPBJobng== -"@types/node@^9.6.0": - version "9.6.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.47.tgz#655b4a1cc52c8ab08f48cc055061990d6846bc97" - integrity sha512-56wEJWXZs+3XXoTe/OCpdZ6czrONhy+6hT0GdPOb7HvudLTMJ1T5tuZPs37K5cPR5t+J9+vLPFDQgUQ8NWJE1w== +"@types/symlink-or-copy@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/symlink-or-copy/-/symlink-or-copy-1.2.0.tgz#4151a81b4052c80bc2becbae09f3a9ec010a9c7a" + integrity sha512-Lja2xYuuf2B3knEsga8ShbOdsfNOtzT73GyJmZyY7eGl2+ajOqrs8yM5ze0fsSoYwvA6bw7/Qr7OZ7PEEmYwWg== abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abortcontroller-polyfill@^1.2.5: - version "1.3.0" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.3.0.tgz#de69af32ae926c210b7efbcc29bf644ee4838b00" - integrity sha512-lbWQgf+eRvku3va8poBlDBO12FigTQr9Zb7NIjXrePrhxWVKdCP2wbDl1tLDaYa18PWTom3UEWwdH13S46I+yA== - accepts@~1.3.4, accepts@~1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" @@ -873,13 +965,6 @@ accepts@~1.3.4, accepts@~1.3.5: mime-types "~2.1.18" negotiator "0.6.1" -acorn-dynamic-import@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" - integrity sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg== - dependencies: - acorn "^5.0.0" - acorn-jsx@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" @@ -892,11 +977,16 @@ acorn@^3.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= -acorn@^5.0.0, acorn@^5.5.0, acorn@^5.5.3: +acorn@^5.5.0: version "5.7.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== +acorn@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== + after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" @@ -924,7 +1014,7 @@ amd-name-resolver@1.2.0: dependencies: ensure-posix-path "^1.0.1" -amd-name-resolver@^1.2.0, amd-name-resolver@^1.2.1, amd-name-resolver@^1.3.1: +amd-name-resolver@^1.2.1, amd-name-resolver@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/amd-name-resolver/-/amd-name-resolver-1.3.1.tgz#ffe71c683c6e7191fc4ae1bb3aaed15abea135d9" integrity sha512-26qTEWqZQ+cxSYygZ4Cf8tsjDBLceJahhtewxtKZA3SRa4PluuqYCuheemDQD+7Mf5B7sr+zhTDWAHDh02a1Dw== @@ -1341,6 +1431,20 @@ babel-plugin-debug-macros@^0.3.0: dependencies: semver "^5.3.0" +babel-plugin-debug-macros@^0.3.2: + version "0.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-debug-macros/-/babel-plugin-debug-macros-0.3.3.tgz#29c3449d663f61c7385f5b8c72d8015b069a5cb7" + integrity sha512-E+NI8TKpxJDBbVkdWkwHrKgJi696mnRL8XYrOPYw82veNHPDORM9WIQifl6TpIo8PNy2tU2skPqbfkmHXrHKQA== + dependencies: + semver "^5.3.0" + +babel-plugin-ember-modules-api-polyfill@^2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.12.0.tgz#a5e703205ba4e625a7fab9bb1aea64ef3222cf75" + integrity sha512-ZQU4quX0TJ1yYyosPy5PFigKdCFEVHJ6H0b3hwjxekIP9CDwzk0OhQuKhCOPti+d52VWjjCjxu2BrXEih29mFw== + dependencies: + ember-rfc176-data "^0.3.12" + babel-plugin-ember-modules-api-polyfill@^2.6.0, babel-plugin-ember-modules-api-polyfill@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.8.0.tgz#70244800f750bf1c9f380910c1b2eed1db80ab4a" @@ -1353,12 +1457,12 @@ babel-plugin-feature-flags@^0.3.1: resolved "https://registry.yarnpkg.com/babel-plugin-feature-flags/-/babel-plugin-feature-flags-0.3.1.tgz#9c827cf9a4eb9a19f725ccb239e85cab02036fc1" integrity sha1-nIJ8+aTrmhn3JcyyOehcqwIDb8E= -babel-plugin-filter-imports@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/babel-plugin-filter-imports/-/babel-plugin-filter-imports-2.0.4.tgz#9209b708ed3b228349c4e6f660358bf02685e803" - integrity sha512-Ra4VylqMFsmTJCUeLRJ/OP2ZqO0cCJQK2HKihNTnoKP4f8IhxHKL4EkbmfkwGjXCeDyXd0xQ6UTK8Nd+h9V/SQ== +babel-plugin-filter-imports@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-filter-imports/-/babel-plugin-filter-imports-3.0.0.tgz#a849683837ad29960da17492fb32789ab6b09a11" + integrity sha512-p/chjzVTgCxUqyLM0q/pfWVZS7IJTwGQMwNg0LOvuQpKiTftQgZDtkGB8XvETnUw19rRcL7bJCTopSwibTN2tA== dependencies: - "@babel/types" "^7.1.5" + "@babel/types" "^7.4.0" lodash "^4.17.11" babel-plugin-htmlbars-inline-precompile@^0.2.5: @@ -1722,11 +1826,6 @@ babel6-plugin-strip-class-callcheck@^6.0.0: resolved "https://registry.yarnpkg.com/babel6-plugin-strip-class-callcheck/-/babel6-plugin-strip-class-callcheck-6.0.0.tgz#de841c1abebbd39f78de0affb2c9a52ee228fddf" integrity sha1-3oQcGr6705943gr/ssmlLuIo/d8= -babel6-plugin-strip-heimdall@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/babel6-plugin-strip-heimdall/-/babel6-plugin-strip-heimdall-6.0.1.tgz#35f80eddec1f7fffdc009811dfbd46d9965072b6" - integrity sha1-NfgO3ewff//cAJgR371G2ZZQcrY= - babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -1945,6 +2044,23 @@ broccoli-babel-transpiler@^7.1.1, broccoli-babel-transpiler@^7.1.2: rsvp "^4.8.4" workerpool "^3.1.1" +broccoli-babel-transpiler@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-7.3.0.tgz#a0ad3a37dbf74469664bbca403d652070c2c1317" + integrity sha512-tsXNvDf3gp6g8rGkz234AhbaIRUsCdd6CM3ikfkJVB0EpC8ZAczGsFKTjENLy1etx4s7FkruW/QjI7Wfdhx6Ng== + dependencies: + "@babel/core" "^7.3.3" + "@babel/polyfill" "^7.0.0" + broccoli-funnel "^2.0.2" + broccoli-merge-trees "^3.0.2" + broccoli-persistent-filter "^2.2.1" + clone "^2.1.2" + hash-for-dep "^1.4.7" + heimdalljs-logger "^0.1.9" + json-stable-stringify "^1.0.1" + rsvp "^4.8.4" + workerpool "^3.1.1" + broccoli-builder@^0.18.14: version "0.18.14" resolved "https://registry.yarnpkg.com/broccoli-builder/-/broccoli-builder-0.18.14.tgz#4b79e2f844de11a4e1b816c3f49c6df4776c312d" @@ -2255,22 +2371,30 @@ broccoli-plugin@^1.0.0, broccoli-plugin@^1.1.0, broccoli-plugin@^1.2.0, broccoli rimraf "^2.3.4" symlink-or-copy "^1.1.8" -broccoli-rollup@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/broccoli-rollup/-/broccoli-rollup-2.1.1.tgz#0b77dc4b7560a53e998ea85f3b56772612d4988d" - integrity sha512-aky/Ovg5DbsrsJEx2QCXxHLA6ZR+9u1TNVTf85soP4gL8CjGGKQ/JU8R3BZ2ntkWzo6/83RCKzX6O+nlNKR5MQ== +broccoli-plugin@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-2.1.0.tgz#2fab6c578219cfcc64f773e9616073313fc8b334" + integrity sha512-ElE4caljW4slapyEhSD9jU9Uayc8SoSABWdmY9SqbV8DHNxU6xg1jJsPcMm+cXOvggR3+G+OXAYQeFjWVnznaw== dependencies: - "@types/node" "^9.6.0" - amd-name-resolver "^1.2.0" - broccoli-plugin "^1.2.1" - fs-tree-diff "^0.5.2" - heimdalljs "^0.2.1" - heimdalljs-logger "^0.1.7" - magic-string "^0.24.0" - node-modules-path "^1.0.1" - rollup "^0.57.1" + promise-map-series "^0.2.1" + quick-temp "^0.1.3" + rimraf "^2.3.4" symlink-or-copy "^1.1.8" - walk-sync "^0.3.1" + +broccoli-rollup@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/broccoli-rollup/-/broccoli-rollup-4.1.1.tgz#7531a24d88ddab9f1bace1c6ee6e6ca74a38d36f" + integrity sha512-hkp0dB5chiemi32t6hLe5bJvxuTOm1TU+SryFlZIs95KT9+94uj0C8w6k6CsZ2HuIdIZg6D252t4gwOlcTXrpA== + dependencies: + "@types/broccoli-plugin" "^1.3.0" + broccoli-plugin "^2.0.0" + fs-tree-diff "^2.0.1" + heimdalljs "^0.2.6" + node-modules-path "^1.0.1" + rollup "^1.12.0" + rollup-pluginutils "^2.8.1" + symlink-or-copy "^1.2.0" + walk-sync "^1.1.3" broccoli-slow-trees@^3.0.1: version "3.0.1" @@ -2315,17 +2439,6 @@ broccoli-stew@^2.0.0: symlink-or-copy "^1.2.0" walk-sync "^0.3.3" -broccoli-templater@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/broccoli-templater/-/broccoli-templater-2.0.2.tgz#285a892071c0b3ad5ebc275d9e8b3465e2d120d6" - integrity sha512-71KpNkc7WmbEokTQpGcbGzZjUIY1NSVa3GB++KFKAfx5SZPUozCOsBlSTwxcv8TLoCAqbBnsX5AQPgg6vJ2l9g== - dependencies: - broccoli-plugin "^1.3.1" - fs-tree-diff "^0.5.9" - lodash.template "^4.4.0" - rimraf "^2.6.2" - walk-sync "^0.3.3" - broccoli-uglify-sourcemap@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/broccoli-uglify-sourcemap/-/broccoli-uglify-sourcemap-2.2.0.tgz#2ff49389bdf342a550c3596750ba2dde95a8f7d4" @@ -2376,7 +2489,7 @@ browserslist@^3.2.6: caniuse-lite "^1.0.30000844" electron-to-chromium "^1.3.47" -browserslist@^4.0.0, browserslist@^4.5.1, browserslist@^4.5.2: +browserslist@^4.5.1, browserslist@^4.5.2: version "4.5.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.4.tgz#166c4ecef3b51737a42436ea8002aeea466ea2c7" integrity sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag== @@ -2458,13 +2571,20 @@ cacheable-request@^2.1.1: normalize-url "2.0.1" responselike "1.0.2" -calculate-cache-key-for-tree@^1.1.0, calculate-cache-key-for-tree@^1.2.0: +calculate-cache-key-for-tree@^1.1.0: version "1.2.3" resolved "https://registry.yarnpkg.com/calculate-cache-key-for-tree/-/calculate-cache-key-for-tree-1.2.3.tgz#5a5e4fcfa2d374a63e47fe967593f179e8282825" integrity sha512-PPQorvdNw8K8k7UftCeradwOmKDSDJs8wcqYTtJPEt3fHbZyK8QsorybJA+lOmk0dgE61vX6R+5Kd3W9h4EMGg== dependencies: json-stable-stringify "^1.0.1" +calculate-cache-key-for-tree@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/calculate-cache-key-for-tree/-/calculate-cache-key-for-tree-2.0.0.tgz#7ac57f149a4188eacb0a45b210689215d3fef8d6" + integrity sha512-Quw8a6y8CPmRd6eU+mwypktYCwUcf8yVFIRbNZ6tPQEckX9yd+EBVEPC/GSZZrMWH9e7Vz4pT7XhpmyApRByLQ== + dependencies: + json-stable-stringify "^1.0.1" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2494,17 +2614,7 @@ can-symlink@^1.0.0: dependencies: tmp "0.0.28" -caniuse-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" - integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - dependencies: - browserslist "^4.0.0" - caniuse-lite "^1.0.0" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000955: +caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000955: version "1.0.30000957" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" integrity sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ== @@ -2954,13 +3064,6 @@ dag-map@^2.0.2: resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68" integrity sha1-lxS0ct6CoYQ94vuptodpOMq0TGg= -date-time@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2" - integrity sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g== - dependencies: - time-zone "^1.0.0" - debug@2.6.9, debug@^2.1.0, debug@^2.1.1, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3167,7 +3270,7 @@ ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6 ember-cli-version-checker "^2.1.2" semver "^5.5.0" -ember-cli-babel@^7.1.2, ember-cli-babel@^7.2.0, ember-cli-babel@^7.7.3: +ember-cli-babel@^7.1.2, ember-cli-babel@^7.2.0: version "7.7.3" resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.7.3.tgz#f94709f6727583d18685ca6773a995877b87b8a0" integrity sha512-/LWwyKIoSlZQ7k52P+6agC7AhcOBqPJ5C2u27qXHVVxKvCtg6ahNuRk/KmfZmV4zkuw4EjTZxfJE1PzpFyHkXg== @@ -3194,6 +3297,33 @@ ember-cli-babel@^7.1.2, ember-cli-babel@^7.2.0, ember-cli-babel@^7.7.3: ensure-posix-path "^1.0.2" semver "^5.5.0" +ember-cli-babel@^7.8.0: + version "7.12.0" + resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.12.0.tgz#064997d199384be8c88d251f30ef67953d3bddc5" + integrity sha512-+EGQsbPvh19nNXHCm6rVBx2CdlxQlzxMyhey5hsGViDPriDI4PFYXYaFWdGizDrmZoDcG/Ywpeph3hl0NxGQTg== + dependencies: + "@babel/core" "^7.0.0" + "@babel/plugin-proposal-class-properties" "^7.3.4" + "@babel/plugin-proposal-decorators" "^7.3.0" + "@babel/plugin-transform-modules-amd" "^7.0.0" + "@babel/plugin-transform-runtime" "^7.2.0" + "@babel/polyfill" "^7.0.0" + "@babel/preset-env" "^7.0.0" + "@babel/runtime" "^7.2.0" + amd-name-resolver "^1.2.1" + babel-plugin-debug-macros "^0.3.0" + babel-plugin-ember-modules-api-polyfill "^2.12.0" + babel-plugin-module-resolver "^3.1.1" + broccoli-babel-transpiler "^7.3.0" + broccoli-debug "^0.6.4" + broccoli-funnel "^2.0.1" + broccoli-source "^1.1.0" + clone "^2.1.2" + ember-cli-babel-plugin-helpers "^1.1.0" + ember-cli-version-checker "^2.1.2" + ensure-posix-path "^1.0.2" + semver "^5.5.0" + ember-cli-broccoli-sane-watcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ember-cli-broccoli-sane-watcher/-/ember-cli-broccoli-sane-watcher-3.0.0.tgz#dc1812c047e1ceec4413d3c41b51a9ffc61b4cfe" @@ -3335,13 +3465,13 @@ ember-cli-test-loader@^2.2.0: dependencies: ember-cli-babel "^6.8.1" -ember-cli-typescript@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ember-cli-typescript/-/ember-cli-typescript-2.0.1.tgz#9c46729213b9e1d13f5c3ff8421d772134aa889e" - integrity sha512-xwSEQOUNM621Wt+XJWpbLhBIeqC/dM1lDS+oZQ2nSjxp4MLZkpKuiVBqdbBWcURbvv8ghoVQPfy8wYU4JIFkLA== +ember-cli-typescript@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ember-cli-typescript/-/ember-cli-typescript-2.0.2.tgz#464984131fbdc05655eb61d1c3cdd911d3137f0d" + integrity sha512-7I5azCTxOgRDN8aSSnJZIKSqr+MGnT+jLTUbBYqF8wu6ojs2DUnTePxUcQMcvNh3Q3B1ySv7Q/uZFSjdU9gSjA== dependencies: "@babel/plugin-proposal-class-properties" "^7.1.0" - "@babel/plugin-transform-typescript" "^7.1.0" + "@babel/plugin-transform-typescript" "~7.4.0" ansi-to-html "^0.6.6" debug "^4.0.0" ember-cli-babel-plugin-helpers "^1.0.0" @@ -3369,7 +3499,7 @@ ember-cli-version-checker@^2.0.0, ember-cli-version-checker@^2.1.0, ember-cli-ve resolve "^1.3.3" semver "^5.3.0" -ember-cli-version-checker@^3.0.0, ember-cli-version-checker@^3.1.3: +ember-cli-version-checker@^3.0.0, ember-cli-version-checker@^3.1.2, ember-cli-version-checker@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/ember-cli-version-checker/-/ember-cli-version-checker-3.1.3.tgz#7c9b4f5ff30fdebcd480b1c06c4de43bb51c522c" integrity sha512-PZNSvpzwWgv68hcXxyjREpj3WWb81A7rtYNQq1lLEgrWIchF8ApKJjWP3NBpHjaatwILkZAV8klair5WFlXAKg== @@ -3483,37 +3613,20 @@ ember-compatibility-helpers@^1.1.1, ember-compatibility-helpers@^1.2.0: semver "^5.4.1" ember-data@^3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-3.9.0.tgz#9f0d55829e107c57307777bd5cf1e36b088d5c40" - integrity sha512-yU9ptLTX9nmHt8cSuQc5K2tdZFmj0oZIYUt2/TIk0yN9e21oJBI8eOYH2N7KJSxptLWqysCmDh0Vcqs2eZnWUw== - dependencies: + version "3.13.1" + resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-3.13.1.tgz#a6b31703de9feaae19f2a0fccfc72185808174dd" + integrity sha512-1mxmnvwWXjqfjGXwukHhArJvH829pEdWXiOnZXIDLC2K1PfFHkXxBjONlssGRBPI2rS4Oaa2M6/47uAyZ4mkEA== + dependencies: + "@ember-data/-build-infra" "3.13.1" + "@ember-data/adapter" "3.13.1" + "@ember-data/model" "3.13.1" + "@ember-data/serializer" "3.13.1" + "@ember-data/store" "3.13.1" "@ember/ordered-set" "^2.0.3" "@glimmer/env" "^0.1.7" - babel-plugin-feature-flags "^0.3.1" - babel-plugin-filter-imports "^2.0.4" - babel6-plugin-strip-class-callcheck "^6.0.0" - babel6-plugin-strip-heimdall "^6.0.1" - broccoli-debug "^0.6.5" - broccoli-file-creator "^2.1.1" - broccoli-funnel "^2.0.1" - broccoli-merge-trees "^3.0.2" - broccoli-rollup "^2.1.1" - calculate-cache-key-for-tree "^1.2.0" - chalk "^2.4.1" - ember-cli-babel "^7.7.3" - ember-cli-path-utils "^1.0.0" - ember-cli-string-utils "^1.1.0" - ember-cli-test-info "^1.0.0" - ember-cli-typescript "^2.0.0" - ember-cli-version-checker "^3.1.3" - ember-fetch "^6.5.0" - ember-inflector "^3.0.0" - git-repo-info "^2.0.0" - heimdalljs "^0.3.0" - inflection "^1.12.0" - npm-git-info "^1.0.3" - resolve "^1.8.1" - silent-error "^1.1.1" + ember-cli-babel "^7.8.0" + ember-cli-typescript "^2.0.2" + ember-inflector "^3.0.1" ember-disable-prototype-extensions@^1.1.3: version "1.1.3" @@ -3527,28 +3640,10 @@ ember-export-application-global@^2.0.0: dependencies: ember-cli-babel "^6.0.0-beta.7" -ember-fetch@^6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/ember-fetch/-/ember-fetch-6.5.0.tgz#efed80b3dd2259b52efce7498659e9125235bfb7" - integrity sha512-B9KSeeO3xDNMQ22JqNwbmgnOprBzc8kNVfQMtzkAmugMb2aCmBZohAlQlwUUX5ODz8fHq2xfuZXDHD81Dzb0vg== - dependencies: - abortcontroller-polyfill "^1.2.5" - broccoli-concat "^3.2.2" - broccoli-debug "^0.6.5" - broccoli-merge-trees "^3.0.0" - broccoli-rollup "^2.1.1" - broccoli-stew "^2.0.0" - broccoli-templater "^2.0.1" - calculate-cache-key-for-tree "^1.1.0" - caniuse-api "^3.0.0" - ember-cli-babel "^6.8.2" - node-fetch "^2.3.0" - whatwg-fetch "^3.0.0" - -ember-inflector@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ember-inflector/-/ember-inflector-3.0.0.tgz#7e1ee8aaa0fa773ba0905d8b7c0786354d890ee1" - integrity sha512-tLWfYolZAkLnkTvvBkjizy4Wmj8yI8wqHZFK+leh0iScHiC3r1Yh5C4qO+OMGiBTMLwfTy+YqVoE/Nu3hGNkcA== +ember-inflector@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ember-inflector/-/ember-inflector-3.0.1.tgz#04be6df4d7e4000f6d6bd70787cdc995f77be4ab" + integrity sha512-fngrwMsnhkBt51KZgwNwQYxgURwV4lxtoHdjxf7RueGZ5zM7frJLevhHw7pbQNGqXZ3N+MRkhfNOLkdDK9kFdA== dependencies: ember-cli-babel "^6.6.0" @@ -3595,6 +3690,11 @@ ember-resolver@^5.0.1: ember-cli-version-checker "^3.0.0" resolve "^1.10.0" +ember-rfc176-data@^0.3.12: + version "0.3.12" + resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.12.tgz#90d82878e69e2ac9a5438e8ce14d12c6031c5bd2" + integrity sha512-g9HeZj/gU5bfIIrGXkP7MhS2b3Vu5DfNUrYr14hy99TgIvtZETO+96QF4WOEUXGjIJdfTRjerVnQlqngPQSv1g== + ember-rfc176-data@^0.3.5, ember-rfc176-data@^0.3.8: version "0.3.8" resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.8.tgz#d46bbef9a0d57c803217b258cfd2e90d8e191848" @@ -3881,6 +3981,11 @@ eslint@^4.0.0: table "4.0.2" text-table "~0.2.0" +esm@^3.2.25: + version "3.2.25" + resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" + integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== + esm@^3.2.4: version "3.2.22" resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.22.tgz#5062c2e22fee3ccfee4e8f20da768330da90d6e3" @@ -3928,10 +4033,10 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= -estree-walker@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.0.tgz#5d865327c44a618dde5699f763891ae31f257dae" - integrity sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw== +estree-walker@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" + integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== esutils@^2.0.2: version "2.0.2" @@ -4375,7 +4480,7 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" -fs-tree-diff@^0.5.2, fs-tree-diff@^0.5.3, fs-tree-diff@^0.5.4, fs-tree-diff@^0.5.6, fs-tree-diff@^0.5.7, fs-tree-diff@^0.5.9: +fs-tree-diff@^0.5.2, fs-tree-diff@^0.5.3, fs-tree-diff@^0.5.4, fs-tree-diff@^0.5.6, fs-tree-diff@^0.5.7: version "0.5.9" resolved "https://registry.yarnpkg.com/fs-tree-diff/-/fs-tree-diff-0.5.9.tgz#a4ec6182c2f5bd80b9b83c8e23e4522e6f5fd946" integrity sha512-872G8ax0kHh01m9n/2KDzgYwouKza0Ad9iFltBpNykvROvf2AGtoOzPJgGx125aolGPER3JuC7uZFrQ7bG1AZw== @@ -4395,6 +4500,17 @@ fs-tree-diff@^1.0.0, fs-tree-diff@^1.0.2: path-posix "^1.0.0" symlink-or-copy "^1.1.8" +fs-tree-diff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fs-tree-diff/-/fs-tree-diff-2.0.1.tgz#343e4745ab435ec39ebac5f9059ad919cd034afa" + integrity sha512-x+CfAZ/lJHQqwlD64pYM5QxWjzWhSjroaVsr8PW831zOApL55qPibed0c+xebaLWVr2BnHFoHdrwOv8pzt8R5A== + dependencies: + "@types/symlink-or-copy" "^1.2.0" + heimdalljs-logger "^0.1.7" + object-assign "^4.1.0" + path-posix "^1.0.0" + symlink-or-copy "^1.1.8" + fs-updater@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/fs-updater/-/fs-updater-1.0.4.tgz#2329980f99ae9176e9a0e84f7637538a182ce63b" @@ -4556,6 +4672,18 @@ glob@^7.0.4, glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.4: + version "7.1.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" + integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -4887,7 +5015,7 @@ indexof@0.0.1: resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= -inflection@^1.12.0: +inflection@1.12.0, inflection@^1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= @@ -5135,13 +5263,6 @@ is-redirect@^1.0.0: resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= -is-reference@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.2.tgz#01cf91517d21db66a34642287ed6e70d53dcbe5c" - integrity sha512-Kn5g8c7XHKejFOpTf2QN9YjiHHKl5xRj+2uAZf9iM2//nkBNi/NNeB5JMoun28nEaUVHyPUzqzhfRlfAirEjXg== - dependencies: - "@types/estree" "0.0.39" - is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" @@ -5422,11 +5543,6 @@ loader.js@^4.7.0: resolved "https://registry.yarnpkg.com/loader.js/-/loader.js-4.7.0.tgz#a1a52902001c83631efde9688b8ab3799325ef1f" integrity sha512-9M2KvGT6duzGMgkOcTkWb+PR/Q2Oe54df/tLgHGVmFpAmtqJ553xJh6N63iFYI2yjo2PeJXbS5skHi/QpJq4vA== -locate-character@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/locate-character/-/locate-character-2.0.5.tgz#f2d2614d49820ecb3c92d80d193b8db755f74c0f" - integrity sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg== - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -5737,11 +5853,6 @@ lodash.keys@~2.3.0: lodash._shimkeys "~2.3.0" lodash.isobject "~2.3.0" -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - lodash.merge@^4.3.1, lodash.merge@^4.6.0: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" @@ -5805,7 +5916,7 @@ lodash.templatesettings@~2.3.0: lodash._reinterpolate "~2.3.0" lodash.escape "~2.3.0" -lodash.uniq@^4.2.0, lodash.uniq@^4.5.0: +lodash.uniq@^4.2.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= @@ -5827,6 +5938,11 @@ lodash@^4.17.11, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.6.1: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +lodash@^4.17.13: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" @@ -5864,13 +5980,6 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" -magic-string@^0.24.0: - version "0.24.1" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.24.1.tgz#7e38e5f126cae9f15e71f0cf8e450818ca7d5a8f" - integrity sha512-YBfNxbJiixMzxW40XqJEIldzHyh5f7CZKalo1uZffevyrPEX8Qgo9s0dmcORLHdV47UyvJg8/zD+6hQG3qvJrA== - dependencies: - sourcemap-codec "^1.4.1" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -6192,11 +6301,6 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -node-fetch@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" - integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -6519,11 +6623,6 @@ package-json@^4.0.1: registry-url "^3.0.3" semver "^5.1.0" -parse-ms@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-1.0.1.tgz#56346d4749d78f23430ca0c713850aef91aa361d" - integrity sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0= - parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -6675,13 +6774,6 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -pretty-ms@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-3.2.0.tgz#87a8feaf27fc18414d75441467d411d6e6098a25" - integrity sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q== - dependencies: - parse-ms "^1.0.0" - printf@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/printf/-/printf-0.5.1.tgz#e0466788260859ed153006dc6867f09ddf240cf3" @@ -7038,11 +7130,6 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -require-relative@^0.8.7: - version "0.8.7" - resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" - integrity sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4= - require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -7136,30 +7223,21 @@ rimraf@^2.2.8, rimraf@^2.3.2, rimraf@^2.3.4, rimraf@^2.4.3, rimraf@^2.4.4, rimra dependencies: glob "^7.1.3" -rollup-pluginutils@^2.0.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz#203706edd43dfafeaebc355d7351119402fc83ad" - integrity sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ== +rollup-pluginutils@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" + integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== dependencies: - estree-walker "^0.6.0" - micromatch "^3.1.10" + estree-walker "^0.6.1" -rollup@^0.57.1: - version "0.57.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.57.1.tgz#0bb28be6151d253f67cf4a00fea48fb823c74027" - integrity sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA== - dependencies: - "@types/acorn" "^4.0.3" - acorn "^5.5.3" - acorn-dynamic-import "^3.0.0" - date-time "^2.1.0" - is-reference "^1.1.0" - locate-character "^2.0.5" - pretty-ms "^3.1.0" - require-relative "^0.8.7" - rollup-pluginutils "^2.0.1" - signal-exit "^3.0.2" - sourcemap-codec "^1.4.1" +rollup@^1.12.0: + version "1.25.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" + integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg== + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21, rsvp@^3.0.6, rsvp@^3.1.0, rsvp@^3.3.3: version "3.6.2" @@ -7171,6 +7249,11 @@ rsvp@^4.6.1, rsvp@^4.7.0, rsvp@^4.8.1, rsvp@^4.8.2, rsvp@^4.8.3, rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911" integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA== +rsvp@^4.8.5: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + rsvp@~3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.2.1.tgz#07cb4a5df25add9e826ebc67dcc9fd89db27d84a" @@ -7543,11 +7626,6 @@ source-map@~0.1.x: dependencies: amdefine ">=0.0.4" -sourcemap-codec@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz#c63ea927c029dd6bd9a2b7fa03b3fec02ad56e9f" - integrity sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg== - sourcemap-validator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/sourcemap-validator/-/sourcemap-validator-1.1.0.tgz#00454547d1682186e1498a7208e022e8dfa8738f" @@ -7837,11 +7915,6 @@ through@~2.2.0, through@~2.2.7: resolved "https://registry.yarnpkg.com/through/-/through-2.2.7.tgz#6e8e21200191d4eb6a99f6f010df46aa1c6eb2bd" integrity sha1-bo4hIAGR1OtqmfbwEN9Gqhxusr0= -time-zone@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d" - integrity sha1-mcW/VZWJZq9tBtg73zgA3IL67F0= - timed-out@^4.0.0, timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" @@ -8162,6 +8235,15 @@ walk-sync@^1.0.0: ensure-posix-path "^1.1.0" matcher-collection "^1.1.1" +walk-sync@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-1.1.4.tgz#81049f3d8095479b49574cfa5f558d7a252b127d" + integrity sha512-nowc9thB/Jg0KW4TgxoRjLLYRPvl3DB/98S89r4ZcJqq2B0alNcKDh6pzLkBSkPMzRSMsJghJHQi79qw0YWEkA== + dependencies: + "@types/minimatch" "^3.0.3" + ensure-posix-path "^1.1.0" + matcher-collection "^1.1.1" + walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" @@ -8208,11 +8290,6 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -whatwg-fetch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" - integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== - which@^1.2.14, which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"