diff --git a/package.json b/package.json index 093ac1759e2..3942b8cf70d 100644 --- a/package.json +++ b/package.json @@ -74,15 +74,15 @@ }, "devDependencies": { "@babel/preset-env": "^7.9.5", - "@glimmer/compiler": "^0.53.0", + "@glimmer/compiler": "^0.54.0", "@glimmer/env": "^0.1.7", - "@glimmer/interfaces": "^0.53.0", - "@glimmer/node": "^0.53.0", - "@glimmer/opcode-compiler": "^0.53.0", - "@glimmer/program": "^0.53.0", - "@glimmer/reference": "^0.53.0", - "@glimmer/runtime": "^0.53.0", - "@glimmer/validator": "^0.53.0", + "@glimmer/interfaces": "^0.54.0", + "@glimmer/node": "^0.54.0", + "@glimmer/opcode-compiler": "^0.54.0", + "@glimmer/program": "^0.54.0", + "@glimmer/reference": "^0.54.0", + "@glimmer/runtime": "^0.54.0", + "@glimmer/validator": "^0.54.0", "@simple-dom/document": "^1.4.0", "@types/qunit": "^2.9.1", "@types/rsvp": "^4.0.3", diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/abstract.ts b/packages/@ember/-internals/glimmer/lib/component-managers/abstract.ts index 4bf8f7c69fd..6ccabd6838c 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/abstract.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/abstract.ts @@ -61,5 +61,5 @@ export default abstract class AbstractManager implements ComponentManager< // noop } - abstract getDestructor(bucket: T): Option; + abstract getDestroyable(bucket: T): Option; } diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/curly.ts b/packages/@ember/-internals/glimmer/lib/component-managers/curly.ts index 67a2e480423..d7fdb8fabba 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/curly.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/curly.ts @@ -22,7 +22,7 @@ import { WithJitStaticLayout, } from '@glimmer/interfaces'; import { RootReference, VersionedPathReference } from '@glimmer/reference'; -import { PrimitiveReference } from '@glimmer/runtime'; +import { PrimitiveReference, registerDestructor } from '@glimmer/runtime'; import { EMPTY_ARRAY, unwrapTemplate } from '@glimmer/util'; import { combine, Tag, validateTag, valueForTag } from '@glimmer/validator'; import { SimpleElement } from '@simple-dom/interface'; @@ -331,6 +331,10 @@ export default class CurlyComponentManager instance: component, template: state.template, }); + + registerDestructor(bucket, () => { + environment.extra.debugRenderTree.willDestroy(bucket); + }); } return bucket; @@ -453,20 +457,8 @@ export default class CurlyComponentManager } } - getDestructor(bucket: ComponentStateBucket): Option { - if (ENV._DEBUG_RENDER_TREE) { - return { - willDestroy() { - bucket.willDestroy(); - }, - destroy() { - bucket.environment.extra.debugRenderTree.willDestroy(bucket); - bucket.destroy(); - }, - }; - } else { - return bucket; - } + getDestroyable(bucket: ComponentStateBucket): Option { + return bucket; } } diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/custom.ts b/packages/@ember/-internals/glimmer/lib/component-managers/custom.ts index 4496d132c1f..a865ef2813f 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/custom.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/custom.ts @@ -1,3 +1,4 @@ +import { ENV } from '@ember/-internals/environment'; import { CUSTOM_TAG_FOR } from '@ember/-internals/metal'; import { Factory } from '@ember/-internals/owner'; import { HAS_NATIVE_PROXY } from '@ember/-internals/utils'; @@ -16,10 +17,9 @@ import { WithJitStaticLayout, } from '@glimmer/interfaces'; import { ComponentRootReference, PathReference } from '@glimmer/reference'; +import { registerDestructor } from '@glimmer/runtime'; import { unwrapTemplate } from '@glimmer/util'; import { consumeTag, createTag, isConstTagged, Tag } from '@glimmer/validator'; - -import { ENV } from '@ember/-internals/environment'; import { EmberVMEnvironment } from '../environment'; import RuntimeResolver from '../resolver'; import { OwnedTemplate } from '../template'; @@ -285,6 +285,10 @@ export default class CustomComponentManager instance: component, template: definition.template, }); + + registerDestructor(bucket, () => { + env.extra.debugRenderTree.willDestroy(bucket); + }); } return bucket; @@ -337,28 +341,8 @@ export default class CustomComponentManager return new ComponentRootReference(delegate.getContext(component), env); } - getDestructor(state: CustomComponentState): Option { - let destructor: Option = null; - - if (hasDestructors(state.delegate)) { - destructor = state; - } - - if (ENV._DEBUG_RENDER_TREE) { - let inner = destructor; - - destructor = { - destroy() { - state.env.extra.debugRenderTree.willDestroy(state); - - if (inner) { - inner.destroy(); - } - }, - }; - } - - return destructor; + getDestroyable(bucket: CustomComponentState): Option { + return bucket; } getCapabilities({ @@ -406,13 +390,9 @@ export class CustomComponentState { public args: CapturedArguments, public env: EmberVMEnvironment, public namedArgsProxy?: {} - ) {} - - destroy() { - const { delegate, component } = this; - + ) { if (hasDestructors(delegate)) { - delegate.destroyComponent(component); + registerDestructor(this, () => delegate.destroyComponent(component)); } } } diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/input.ts b/packages/@ember/-internals/glimmer/lib/component-managers/input.ts index e5c9ff5a9f1..71f7a381b34 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/input.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/input.ts @@ -12,6 +12,7 @@ import { VMArguments, } from '@glimmer/interfaces'; import { ComponentRootReference, ConstReference, VersionedPathReference } from '@glimmer/reference'; +import { registerDestructor } from '@glimmer/runtime'; import { CONSTANT_TAG, createTag, isConstTagged } from '@glimmer/validator'; import { EmberVMEnvironment } from '../environment'; import InternalComponentManager, { InternalDefinitionState } from './internal'; @@ -89,6 +90,8 @@ export default class InputComponentManager extends InternalComponentManager env.extra.debugRenderTree.willDestroy(state)); } return state; @@ -128,17 +131,8 @@ export default class InputComponentManager extends InternalComponentManager // set in getDynamicLayout template: undefined, }); + + registerDestructor(engine, () => { + environment.extra.debugRenderTree.willDestroy(controller); + environment.extra.debugRenderTree.willDestroy(bucket); + }); } return bucket; @@ -142,20 +146,8 @@ class MountManager extends AbstractManager return tag; } - getDestructor(bucket: EngineState): Option { - let { engine, environment, controller } = bucket; - - if (ENV._DEBUG_RENDER_TREE) { - return { - destroy() { - environment.extra.debugRenderTree.willDestroy(controller); - environment.extra.debugRenderTree.willDestroy(bucket); - engine.destroy(); - }, - }; - } else { - return engine; - } + getDestroyable(bucket: EngineState): Option { + return bucket.engine; } didRenderLayout(bucket: EngineState, bounds: Bounds): void { diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts b/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts index ab608f6f894..9fed9fde112 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts @@ -16,7 +16,7 @@ import { WithJitStaticLayout, } from '@glimmer/interfaces'; import { ComponentRootReference, VersionedPathReference } from '@glimmer/reference'; -import { EMPTY_ARGS } from '@glimmer/runtime'; +import { EMPTY_ARGS, registerDestructor } from '@glimmer/runtime'; import { unwrapTemplate } from '@glimmer/util'; import { CONSTANT_TAG, createTag, Tag } from '@glimmer/validator'; @@ -125,6 +125,16 @@ class OutletComponentManager extends AbstractManager { + state.environment.extra.debugRenderTree.willDestroy(state); + + if (state.engine) { + state.environment.extra.debugRenderTree.willDestroy(state.engine); + } + + state.environment.extra.debugRenderTree.willDestroy(state.outlet!); + }); } return state; @@ -191,19 +201,9 @@ class OutletComponentManager extends AbstractManager { + getDestroyable(state: OutletInstanceState): Option { if (ENV._DEBUG_RENDER_TREE) { - return { - destroy() { - state.environment.extra.debugRenderTree.willDestroy(state); - - if (state.engine) { - state.environment.extra.debugRenderTree.willDestroy(state.engine); - } - - state.environment.extra.debugRenderTree.willDestroy(state.outlet!); - }, - }; + return state; } else { return null; } diff --git a/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts b/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts index 7a586bf6ed7..c73f6d7b2ae 100644 --- a/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts +++ b/packages/@ember/-internals/glimmer/lib/component-managers/template-only.ts @@ -7,7 +7,7 @@ import { VMArguments, WithJitStaticLayout, } from '@glimmer/interfaces'; -import { NULL_REFERENCE } from '@glimmer/runtime'; +import { NULL_REFERENCE, registerDestructor } from '@glimmer/runtime'; import { unwrapTemplate } from '@glimmer/util'; import { CONSTANT_TAG, createTag } from '@glimmer/validator'; import { EmberVMEnvironment } from '../environment'; @@ -57,6 +57,7 @@ export default class TemplateOnlyComponentManager ): Option { if (ENV._DEBUG_RENDER_TREE) { let bucket = { environment }; + environment.extra.debugRenderTree.create(bucket, { type: 'component', name: name, @@ -64,6 +65,11 @@ export default class TemplateOnlyComponentManager instance: null, template, }); + + registerDestructor(bucket, () => { + bucket.environment.extra.debugRenderTree.willDestroy(bucket!); + }); + return bucket; } else { return null; @@ -84,13 +90,9 @@ export default class TemplateOnlyComponentManager } } - getDestructor(bucket: Option) { + getDestroyable(bucket: Option) { if (ENV._DEBUG_RENDER_TREE) { - return { - destroy() { - bucket!.environment.extra.debugRenderTree.willDestroy(bucket!); - }, - }; + return bucket; } else { return null; } diff --git a/packages/@ember/-internals/glimmer/lib/environment.ts b/packages/@ember/-internals/glimmer/lib/environment.ts index d9d78f54f3a..57f2eeb3b8b 100644 --- a/packages/@ember/-internals/glimmer/lib/environment.ts +++ b/packages/@ember/-internals/glimmer/lib/environment.ts @@ -1,8 +1,10 @@ import { ENV } from '@ember/-internals/environment'; import { get, set } from '@ember/-internals/metal'; import { Owner } from '@ember/-internals/owner'; +import { getDebugName } from '@ember/-internals/utils'; import { constructStyleDeprecationMessage } from '@ember/-internals/views'; -import { warn } from '@ember/debug'; +import { assert, deprecate, warn } from '@ember/debug'; +import { backburner, schedule } from '@ember/runloop'; import { DEBUG } from '@glimmer/env'; import { ElementBuilder, Environment, Option } from '@glimmer/interfaces'; import { @@ -14,8 +16,11 @@ import { DynamicAttribute, dynamicAttribute, EnvironmentDelegate, + setScheduleDestroy, + setScheduleDestroyed, SimpleDynamicAttribute, } from '@glimmer/runtime'; +import { setAutotrackingTransactionEnv, setPropertyDidChange } from '@glimmer/validator'; import { AttrNamespace as SimpleAttrNamespace, SimpleElement } from '@simple-dom/interface'; import installPlatformSpecificProtocolForURL from './protocol-for-url'; import { OwnedTemplate } from './template'; @@ -24,6 +29,51 @@ import toIterator from './utils/iterator'; import { isHTMLSafe } from './utils/string'; import toBool from './utils/to-bool'; +/////////// + +// Setup global environment + +// Autotracking + +setPropertyDidChange(() => backburner.ensureInstance()); + +if (DEBUG) { + setAutotrackingTransactionEnv!({ + assert(message) { + assert(message, false); + }, + + deprecate(message) { + deprecate(message, false, { + id: 'autotracking.mutation-after-consumption', + until: '4.0.0', + }); + }, + + debugMessage(obj, keyName) { + let dirtyString = keyName + ? `\`${keyName}\` on \`${getDebugName!(obj)}\`` + : `\`${getDebugName!(obj)}\``; + + return `You attempted to update ${dirtyString}, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.`; + }, + }); +} + +// Destruction + +setScheduleDestroy((destroyable, destructor) => { + schedule('actions', null, destructor, destroyable); +}); + +setScheduleDestroyed(finalizeDestructor => { + schedule('destroy', null, finalizeDestructor); +}); + +/////////// + +// Define environment delegate + export interface CompilerFactory { id: string; new (template: OwnedTemplate): any; diff --git a/packages/@ember/-internals/glimmer/lib/modifiers/action.ts b/packages/@ember/-internals/glimmer/lib/modifiers/action.ts index c3887b94bd8..b9001a590d1 100644 --- a/packages/@ember/-internals/glimmer/lib/modifiers/action.ts +++ b/packages/@ember/-internals/glimmer/lib/modifiers/action.ts @@ -6,11 +6,11 @@ import { join } from '@ember/runloop'; import { CapturedNamedArguments, CapturedPositionalArguments, - Destroyable, DynamicScope, ModifierManager, VMArguments, } from '@glimmer/interfaces'; +import { registerDestructor } from '@glimmer/runtime'; import { Tag } from '@glimmer/validator'; import { SimpleElement } from '@simple-dom/interface'; import { INVOKE } from '../helpers/mut'; @@ -93,6 +93,8 @@ export class ActionState { this.dom = dom; this.eventName = this.getEventName(); this.tag = tag; + + registerDestructor(this, () => ActionHelper.unregisterAction(this)); } getEventName() { @@ -179,10 +181,6 @@ export class ActionState { return shouldBubble; } - - destroy() { - ActionHelper.unregisterAction(this); - } } // implements ModifierManager @@ -281,7 +279,7 @@ export default class ActionModifierManager implements ModifierManager { public delegate: ModifierManagerDelegate, public modifier: ModifierInstance, public args: CapturedArguments - ) {} - - destroy() { - const { delegate, modifier, args } = this; - delegate.destroyModifier(modifier, args.value()); + ) { + registerDestructor(this, () => delegate.destroyModifier(modifier, args.value())); } } @@ -176,7 +174,7 @@ class InteractiveCustomModifierManager } } - getDestructor(state: CustomModifierState) { + getDestroyable(state: CustomModifierState) { return state; } } @@ -195,7 +193,7 @@ class NonInteractiveCustomModifierManager update() {} - getDestructor() { + getDestroyable() { return null; } } diff --git a/packages/@ember/-internals/glimmer/lib/modifiers/on.ts b/packages/@ember/-internals/glimmer/lib/modifiers/on.ts index 7c05cbbfa31..56db7bf1b63 100644 --- a/packages/@ember/-internals/glimmer/lib/modifiers/on.ts +++ b/packages/@ember/-internals/glimmer/lib/modifiers/on.ts @@ -1,7 +1,8 @@ import { Owner } from '@ember/-internals/owner'; import { assert } from '@ember/debug'; import { DEBUG } from '@glimmer/env'; -import { CapturedArguments, Destroyable, ModifierManager, VMArguments } from '@glimmer/interfaces'; +import { CapturedArguments, ModifierManager, VMArguments } from '@glimmer/interfaces'; +import { registerDestructor } from '@glimmer/runtime'; import { expect } from '@glimmer/util'; import { CONSTANT_TAG, Tag } from '@glimmer/validator'; import { SimpleElement } from '@simple-dom/interface'; @@ -169,12 +170,6 @@ export class OnModifierState { } } } - - destroy() { - let { element, eventName, callback, options } = this; - - removeEventListener(element, eventName, callback, options); - } } let adds = 0; @@ -368,6 +363,8 @@ export default class OnModifierManager implements ModifierManager removeEventListener(element, eventName, callback, options)); + state.shouldUpdate = false; } @@ -394,7 +391,7 @@ export default class OnModifierManager implements ModifierManager result!.destroy()); + inTransaction(env, () => destroy(result!)); } } } diff --git a/packages/@ember/-internals/glimmer/lib/resolver.ts b/packages/@ember/-internals/glimmer/lib/resolver.ts index 3550593bd7c..4172f3d3c65 100644 --- a/packages/@ember/-internals/glimmer/lib/resolver.ts +++ b/packages/@ember/-internals/glimmer/lib/resolver.ts @@ -20,7 +20,7 @@ import { PartialDefinition, } from '@glimmer/interfaces'; import { PartialDefinitionImpl } from '@glimmer/opcode-compiler'; -import { getDynamicVar, ModifierDefinition } from '@glimmer/runtime'; +import { getDynamicVar, ModifierDefinition, registerDestructor } from '@glimmer/runtime'; import { unwrapTemplate } from '@glimmer/util'; import { CurlyComponentDefinition } from './component-managers/curly'; import { CustomManagerDefinition, ManagerDelegate } from './component-managers/custom'; @@ -426,11 +426,11 @@ export default class RuntimeResolver implements JitRuntimeResolver helper.destroy(), true); + vm.associateDestroyable(helperDestroyable); } else if (DEBUG) { // Bind to null in case someone accidentally passed an unbound function // in, and attempts use `this` on it. diff --git a/packages/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.ts b/packages/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.ts index 937c6651573..7e28b47db32 100644 --- a/packages/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.ts +++ b/packages/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.ts @@ -1,6 +1,7 @@ import { clearElementView, clearViewElement, getViewElement } from '@ember/-internals/views'; import { CapturedNamedArguments } from '@glimmer/interfaces'; import { ComponentRootReference, VersionedReference } from '@glimmer/reference'; +import { registerDestructor } from '@glimmer/runtime'; import { Revision, valueForTag } from '@glimmer/validator'; import { EmberVMEnvironment } from '../environment'; import { Renderer } from '../renderer'; @@ -53,6 +54,9 @@ export default class ComponentStateBucket { this.classRef = null; this.argsRevision = args === null ? 0 : valueForTag(args.tag); this.rootRef = new ComponentRootReference(component, environment); + + registerDestructor(this, () => this.willDestroy(), true); + registerDestructor(this, () => this.component.destroy()); } willDestroy() { @@ -73,10 +77,6 @@ export default class ComponentStateBucket { component.renderer.unregister(component); } - destroy() { - this.component.destroy(); - } - finalize() { let { finalizer } = this; finalizer(); diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/append-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/append-test.js index bffe0041669..574f11f6d9f 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/append-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/append-test.js @@ -269,10 +269,10 @@ class AbstractAppendTest extends RenderingTestCase { ['x-child', 'willDestroyElement'], ['x-child', 'willClearRender'], - ['x-child', 'didDestroyElement'], ['x-parent', 'didDestroyElement'], - ['x-parent', 'willDestroy'], + + ['x-child', 'didDestroyElement'], ['x-child', 'willDestroy'], ], 'destroy' diff --git a/packages/@ember/-internals/meta/lib/meta.ts b/packages/@ember/-internals/meta/lib/meta.ts index 91e1a2b335a..af3eb3a7bd7 100644 --- a/packages/@ember/-internals/meta/lib/meta.ts +++ b/packages/@ember/-internals/meta/lib/meta.ts @@ -1,6 +1,7 @@ import { symbol, toString } from '@ember/-internals/utils'; import { assert } from '@ember/debug'; import { DEBUG } from '@glimmer/env'; +import { isDestroyed } from '@glimmer/runtime'; import { UpdatableTag } from '@glimmer/validator'; type ObjMap = { [key: string]: T }; @@ -58,15 +59,6 @@ if (DEBUG) { export const UNDEFINED = symbol('undefined'); -// FLAGS -const enum MetaFlags { - NONE = 0, - SOURCE_DESTROYING = 1 << 0, - SOURCE_DESTROYED = 1 << 1, - META_DESTROYED = 1 << 2, - INITIALIZING = 1 << 3, -} - const enum ListenerKind { ADD = 0, ONCE = 1, @@ -96,7 +88,7 @@ let currentListenerVersion = 1; export class Meta { _descriptors: Map | undefined; _mixins: any | undefined; - _flags: MetaFlags; + _isInit: boolean; _lazyChains: ObjMap> | undefined; source: object; proto: object | undefined; @@ -121,7 +113,7 @@ export class Meta { // initial value for all flags right now is false // see FLAGS const for detailed list of flags used - this._flags = MetaFlags.NONE; + this._isInit = false; // used only internally this.source = obj; @@ -140,60 +132,21 @@ export class Meta { } setInitializing() { - this._flags |= MetaFlags.INITIALIZING; + this._isInit = true; } unsetInitializing() { - this._flags ^= MetaFlags.INITIALIZING; + this._isInit = false; } isInitializing() { - return this._hasFlag(MetaFlags.INITIALIZING); + return this._isInit; } isPrototypeMeta(obj: object) { return this.proto === this.source && this.source === obj; } - destroy() { - if (DEBUG) { - counters!.deleteCalls++; - } - - if (this.isMetaDestroyed()) { - return; - } - this.setMetaDestroyed(); - } - - isSourceDestroying() { - return this._hasFlag(MetaFlags.SOURCE_DESTROYING); - } - - setSourceDestroying() { - this._flags |= MetaFlags.SOURCE_DESTROYING; - } - - isSourceDestroyed() { - return this._hasFlag(MetaFlags.SOURCE_DESTROYED); - } - - setSourceDestroyed() { - this._flags |= MetaFlags.SOURCE_DESTROYED; - } - - isMetaDestroyed() { - return this._hasFlag(MetaFlags.META_DESTROYED); - } - - setMetaDestroyed() { - this._flags |= MetaFlags.META_DESTROYED; - } - - _hasFlag(flag: number) { - return (this._flags & flag) === flag; - } - _getOrCreateOwnMap(key: string) { return this[key] || (this[key] = Object.create(null)); } @@ -258,12 +211,12 @@ export class Meta { addMixin(mixin: any) { assert( - this.isMetaDestroyed() + isDestroyed(this.source) ? `Cannot add mixins of \`${toString(mixin)}\` on \`${toString( this.source )}\` call addMixin after it has been destroyed.` : '', - !this.isMetaDestroyed() + !isDestroyed(this.source) ); let set = this._getOrCreateOwnSet('_mixins'); set.add(mixin); @@ -294,12 +247,12 @@ export class Meta { writeDescriptors(subkey: string, value: any) { assert( - this.isMetaDestroyed() + isDestroyed(this.source) ? `Cannot update descriptors for \`${subkey}\` on \`${toString( this.source )}\` after it has been destroyed.` : '', - !this.isMetaDestroyed() + !isDestroyed(this.source) ); let map = this._descriptors || (this._descriptors = new Map()); map.set(subkey, value); diff --git a/packages/@ember/-internals/metal/index.ts b/packages/@ember/-internals/metal/index.ts index ad4de138078..2db4dd0c322 100644 --- a/packages/@ember/-internals/metal/index.ts +++ b/packages/@ember/-internals/metal/index.ts @@ -50,7 +50,6 @@ export { default as getProperties } from './lib/get_properties'; export { default as setProperties } from './lib/set_properties'; export { default as expandProperties } from './lib/expand_properties'; -export { destroy } from './lib/destroy'; export { ASYNC_OBSERVERS, SYNC_OBSERVERS, diff --git a/packages/@ember/-internals/metal/lib/computed.ts b/packages/@ember/-internals/metal/lib/computed.ts index 6d663273e93..94298748865 100644 --- a/packages/@ember/-internals/metal/lib/computed.ts +++ b/packages/@ember/-internals/metal/lib/computed.ts @@ -2,6 +2,7 @@ import { Meta, meta as metaFor } from '@ember/-internals/meta'; import { inspect, isEmberArray, toString } from '@ember/-internals/utils'; import { assert, deprecate, warn } from '@ember/debug'; import EmberError from '@ember/error'; +import { isDestroyed } from '@glimmer/runtime'; import { combine, consumeTag, @@ -614,7 +615,7 @@ export class ComputedProperty extends ComputedDescriptor { // should be allowed, even after the object has been destroyed, which is why we check _dependentKeys. assert( `Attempted to access the computed ${obj}.${keyName} on a destroyed object, which is not allowed`, - this._dependentKeys === undefined || !metaFor(obj).isMetaDestroyed() + this._dependentKeys === undefined || !isDestroyed(obj) ); let upstreamTag: Tag | undefined = undefined; diff --git a/packages/@ember/-internals/metal/lib/destroy.ts b/packages/@ember/-internals/metal/lib/destroy.ts deleted file mode 100644 index 71e7011aaf0..00000000000 --- a/packages/@ember/-internals/metal/lib/destroy.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Meta, peekMeta } from '@ember/-internals/meta/lib/meta'; -import { assert } from '@ember/debug'; -import { schedule } from '@ember/runloop'; -import { destroyObservers } from './observer'; - -/** - Enqueues finalization on an object so that it can be garbage collected. - Multiple calls will have no effect. - - @method destroy - @for Ember - @param {Object} obj the object to destroy - @return {boolean} true if the object went from not destroying to destroying. - @private -*/ -export function destroy(obj: object): boolean { - assert('Cannot call `destroy` on null', obj !== null); - assert('Cannot call `destroy` on undefined', obj !== undefined); - assert( - `Cannot call \`destroy\` on ${typeof obj}`, - typeof obj === 'object' || typeof obj === 'function' - ); - - const m = peekMeta(obj); - if (m === null || m.isSourceDestroying()) { - return false; - } - m.setSourceDestroying(); - destroyObservers(obj); - schedule('destroy', m, finalize); - return true; -} - -function finalize(this: Meta) { - this.setSourceDestroyed(); - this.destroy(); -} diff --git a/packages/@ember/-internals/metal/lib/observer.ts b/packages/@ember/-internals/metal/lib/observer.ts index 097eacdd0c1..4d49087d507 100644 --- a/packages/@ember/-internals/metal/lib/observer.ts +++ b/packages/@ember/-internals/metal/lib/observer.ts @@ -1,6 +1,7 @@ import { ENV } from '@ember/-internals/environment'; import { peekMeta } from '@ember/-internals/meta'; import { schedule } from '@ember/runloop'; +import { registerDestructor } from '@glimmer/runtime'; import { combine, CURRENT_TAG, Tag, validateTag, valueForTag } from '@glimmer/validator'; import { getChainTagsForKey } from './chain-tags'; import changeEvent from './change_event'; @@ -83,6 +84,7 @@ function getOrCreateActiveObserversFor(target: object, sync: boolean) { if (!observerMap.has(target)) { observerMap.set(target, new Map()); + registerDestructor(target, () => destroyObservers(target), true); } return observerMap.get(target)!; @@ -184,12 +186,6 @@ export function flushAsyncObservers(shouldSchedule = true) { ASYNC_OBSERVERS.forEach((activeObservers, target) => { let meta = peekMeta(target); - // if observer target is destroyed remove observers - if (meta && (meta.isSourceDestroying() || meta.isMetaDestroyed())) { - ASYNC_OBSERVERS.delete(target); - return; - } - activeObservers.forEach((observer, eventName) => { if (!validateTag(observer.tag, observer.lastRevision)) { let sendObserver = () => { @@ -219,11 +215,6 @@ export function flushSyncObservers() { SYNC_OBSERVERS.forEach((activeObservers, target) => { let meta = peekMeta(target); - if (meta && (meta.isSourceDestroying() || meta.isMetaDestroyed())) { - SYNC_OBSERVERS.delete(target); - return; - } - activeObservers.forEach((observer, eventName) => { if (!observer.suspended && !validateTag(observer.tag, observer.lastRevision)) { try { diff --git a/packages/@ember/-internals/metal/lib/tags.ts b/packages/@ember/-internals/metal/lib/tags.ts index 48d670391f0..5cd76e5746f 100644 --- a/packages/@ember/-internals/metal/lib/tags.ts +++ b/packages/@ember/-internals/metal/lib/tags.ts @@ -1,51 +1,8 @@ -import { meta as metaFor } from '@ember/-internals/meta'; -import { - getDebugName, - isObject, - setupMandatorySetter, - symbol, - toString, -} from '@ember/-internals/utils'; -import { assert, deprecate } from '@ember/debug'; -import { backburner } from '@ember/runloop'; +import { isObject, setupMandatorySetter, symbol, toString } from '@ember/-internals/utils'; +import { assert } from '@ember/debug'; import { DEBUG } from '@glimmer/env'; -import { - CONSTANT_TAG, - dirtyTagFor, - setAutotrackingTransactionEnv, - setPropertyDidChange, - Tag, - tagFor, -} from '@glimmer/validator'; - -///////// - -// Setup tracking environment - -setPropertyDidChange(() => backburner.ensureInstance()); - -if (DEBUG) { - setAutotrackingTransactionEnv!({ - assert(message) { - assert(message, false); - }, - - deprecate(message) { - deprecate(message, false, { - id: 'autotracking.mutation-after-consumption', - until: '4.0.0', - }); - }, - - debugMessage(obj, keyName) { - let dirtyString = keyName - ? `\`${keyName}\` on \`${getDebugName!(obj)}\`` - : `\`${getDebugName!(obj)}\``; - - return `You attempted to update ${dirtyString}, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.`; - }, - }); -} +import { isDestroyed } from '@glimmer/runtime'; +import { CONSTANT_TAG, dirtyTagFor, Tag, tagFor } from '@glimmer/validator'; ///////// @@ -84,13 +41,11 @@ export function tagForProperty( export function tagForObject(obj: unknown | null): Tag { if (isObject(obj)) { if (DEBUG) { - let meta = metaFor(obj); - assert( - meta.isMetaDestroyed() - ? `Cannot create a new tag for \`${toString(meta.source)}\` after it has been destroyed.` + isDestroyed(obj) + ? `Cannot create a new tag for \`${toString(obj)}\` after it has been destroyed.` : '', - !meta.isMetaDestroyed() + !isDestroyed(obj) ); } diff --git a/packages/@ember/-internals/metal/tests/accessors/get_test.js b/packages/@ember/-internals/metal/tests/accessors/get_test.js index 30596be0db0..9ce0df73801 100644 --- a/packages/@ember/-internals/metal/tests/accessors/get_test.js +++ b/packages/@ember/-internals/metal/tests/accessors/get_test.js @@ -1,9 +1,9 @@ import { ENV } from '@ember/-internals/environment'; import { Object as EmberObject } from '@ember/-internals/runtime'; -import { destroy } from '@ember/-internals/metal'; import { get, set, getWithDefault, Mixin, observer, computed } from '../..'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; import { run } from '@ember/runloop'; +import { destroy } from '@glimmer/runtime'; import { track } from '@glimmer/validator'; function aget(x, y) { diff --git a/packages/@ember/-internals/metal/tests/alias_test.js b/packages/@ember/-internals/metal/tests/alias_test.js index f89531c25f4..4410748bf89 100644 --- a/packages/@ember/-internals/metal/tests/alias_test.js +++ b/packages/@ember/-internals/metal/tests/alias_test.js @@ -2,7 +2,6 @@ import { alias, computed, defineProperty, - destroy, get, set, addObserver, @@ -11,6 +10,7 @@ import { } from '..'; import { Object as EmberObject } from '@ember/-internals/runtime'; import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; +import { destroy } from '@glimmer/runtime'; import { valueForTag, validateTag } from '@glimmer/validator'; let obj, count; diff --git a/packages/@ember/-internals/metal/tests/computed_test.js b/packages/@ember/-internals/metal/tests/computed_test.js index 3863b219df3..2e64aa8c56d 100644 --- a/packages/@ember/-internals/metal/tests/computed_test.js +++ b/packages/@ember/-internals/metal/tests/computed_test.js @@ -2,7 +2,6 @@ import { Object as EmberObject } from '@ember/-internals/runtime'; import { computed, defineProperty, - destroy, getCachedValueFor, isClassicDecorator, isComputed, @@ -10,8 +9,9 @@ import { set, addObserver, } from '..'; -import { meta as metaFor } from '@ember/-internals/meta'; +import { run } from '@ember/runloop'; import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; +import { destroy } from '@glimmer/runtime'; let obj, objA, objB, count, func; @@ -605,8 +605,7 @@ moduleFor( } ['@test throws an assertion if an uncached `get` is called after object is destroyed']() { - let meta = metaFor(obj); - meta.destroy(); + run(() => destroy(obj)); obj.toString = () => ''; @@ -619,7 +618,6 @@ moduleFor( ['@test does not throw an assertion if an uncached `get` is called on computed without dependencies after object is destroyed']( assert ) { - let meta = metaFor(obj); defineProperty( obj, 'foo', @@ -628,7 +626,7 @@ moduleFor( }) ); - meta.destroy(); + run(() => destroy(obj)); assert.equal(get(obj, 'foo'), 'baz', 'CP calculated successfully'); } diff --git a/packages/@ember/-internals/metal/tests/mixin/observer_test.js b/packages/@ember/-internals/metal/tests/mixin/observer_test.js index 36c79d16c98..fd21971bb98 100644 --- a/packages/@ember/-internals/metal/tests/mixin/observer_test.js +++ b/packages/@ember/-internals/metal/tests/mixin/observer_test.js @@ -1,5 +1,6 @@ -import { set, get, destroy, observer, mixin, Mixin } from '../..'; +import { set, get, observer, mixin, Mixin } from '../..'; import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; +import { destroy } from '@glimmer/runtime'; let obj; diff --git a/packages/@ember/-internals/metal/tests/observer_test.js b/packages/@ember/-internals/metal/tests/observer_test.js index bc342f7d0ae..a26e3bfc5ef 100644 --- a/packages/@ember/-internals/metal/tests/observer_test.js +++ b/packages/@ember/-internals/metal/tests/observer_test.js @@ -1,6 +1,5 @@ import { ENV } from '@ember/-internals/environment'; import { - destroy, changeProperties, addObserver, removeObserver, @@ -18,6 +17,7 @@ import { } from '..'; import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; import { FUNCTION_PROTOTYPE_EXTENSIONS } from '@ember/deprecated-features'; +import { destroy } from '@glimmer/runtime'; function K() {} diff --git a/packages/@ember/-internals/metal/tests/performance_test.js b/packages/@ember/-internals/metal/tests/performance_test.js index 0a6020714f4..eca683e5e99 100644 --- a/packages/@ember/-internals/metal/tests/performance_test.js +++ b/packages/@ember/-internals/metal/tests/performance_test.js @@ -2,7 +2,6 @@ import { set, get, computed, - destroy, defineProperty, notifyPropertyChange, beginPropertyChanges, @@ -10,6 +9,7 @@ import { addObserver, } from '..'; import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; +import { destroy } from '@glimmer/runtime'; let obj; diff --git a/packages/@ember/-internals/runtime/lib/system/core_object.js b/packages/@ember/-internals/runtime/lib/system/core_object.js index 186a52c6f8f..a37603e7196 100644 --- a/packages/@ember/-internals/runtime/lib/system/core_object.js +++ b/packages/@ember/-internals/runtime/lib/system/core_object.js @@ -14,8 +14,7 @@ import { HAS_NATIVE_PROXY, isInternalSymbol, } from '@ember/-internals/utils'; -import { schedule } from '@ember/runloop'; -import { meta, peekMeta } from '@ember/-internals/meta'; +import { meta } from '@ember/-internals/meta'; import { PROXY_CONTENT, sendEvent, @@ -24,7 +23,6 @@ import { applyMixin, defineProperty, descriptorForProperty, - destroy, classToString, isClassicDecorator, DEBUG_INJECTION_FUNCTIONS, @@ -32,6 +30,7 @@ import { import ActionHandler from '../mixins/action_handler'; import { assert } from '@ember/debug'; import { DEBUG } from '@glimmer/env'; +import { destroy, isDestroying, isDestroyed, registerDestructor } from '@glimmer/runtime'; const reopen = Mixin.prototype.reopen; @@ -280,6 +279,8 @@ class CoreObject { FACTORY_FOR.set(self, initFactory); } + registerDestructor(self, () => self.willDestroy()); + // disable chains let m = meta(self); @@ -503,7 +504,7 @@ class CoreObject { @public */ get isDestroyed() { - return peekMeta(this).isSourceDestroyed(); + return isDestroyed(this); } set isDestroyed(value) { @@ -521,7 +522,7 @@ class CoreObject { @public */ get isDestroying() { - return peekMeta(this).isSourceDestroying(); + return isDestroying(this); } set isDestroying(value) { @@ -543,10 +544,7 @@ class CoreObject { @public */ destroy() { - if (destroy(this)) { - schedule('actions', this, this.willDestroy); - return; - } + destroy(this); return this; } diff --git a/packages/@ember/-internals/runtime/tests/ext/function_test.js b/packages/@ember/-internals/runtime/tests/ext/function_test.js index 7ac5729f286..f2059da1930 100644 --- a/packages/@ember/-internals/runtime/tests/ext/function_test.js +++ b/packages/@ember/-internals/runtime/tests/ext/function_test.js @@ -1,9 +1,10 @@ import { ENV } from '@ember/-internals/environment'; -import { Mixin, mixin, get, set, destroy } from '@ember/-internals/metal'; +import { Mixin, mixin, get, set } from '@ember/-internals/metal'; import EmberObject from '../../lib/system/object'; import Evented from '../../lib/mixins/evented'; import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; import { FUNCTION_PROTOTYPE_EXTENSIONS } from '@ember/deprecated-features'; +import { destroy } from '@glimmer/runtime'; moduleFor( 'Function.prototype.observes() helper', diff --git a/packages/@ember/-internals/runtime/tests/mutable-array/removeObjects-test.js b/packages/@ember/-internals/runtime/tests/mutable-array/removeObjects-test.js index d010061e824..6d6c38b1dca 100644 --- a/packages/@ember/-internals/runtime/tests/mutable-array/removeObjects-test.js +++ b/packages/@ember/-internals/runtime/tests/mutable-array/removeObjects-test.js @@ -1,7 +1,8 @@ -import { destroy, get } from '@ember/-internals/metal'; +import { get } from '@ember/-internals/metal'; import { AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; import { runArrayTests, newFixture, newObjectsFixture } from '../helpers/array'; import { A as emberA } from '../../lib/mixins/array'; +import { destroy } from '@glimmer/runtime'; class RemoveObjectsTests extends AbstractTestCase { '@test should return receiver'() { diff --git a/packages/@ember/-internals/runtime/tests/system/object/create_test.js b/packages/@ember/-internals/runtime/tests/system/object/create_test.js index 8e4ec52e38a..8911d422548 100644 --- a/packages/@ember/-internals/runtime/tests/system/object/create_test.js +++ b/packages/@ember/-internals/runtime/tests/system/object/create_test.js @@ -1,8 +1,9 @@ import { getOwner, setOwner } from '@ember/-internals/owner'; -import { computed, Mixin, observer, addObserver, destroy, alias } from '@ember/-internals/metal'; +import { computed, Mixin, observer, addObserver, alias } from '@ember/-internals/metal'; import { DEBUG } from '@glimmer/env'; import EmberObject from '../../../lib/system/object'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; +import { destroy } from '@glimmer/runtime'; moduleFor( 'EmberObject.create', diff --git a/packages/ember/index.js b/packages/ember/index.js index e092ae6334a..4cc5462eab1 100644 --- a/packages/ember/index.js +++ b/packages/ember/index.js @@ -138,6 +138,7 @@ import EngineInstance from '@ember/engine/instance'; import { assign, merge } from '@ember/polyfills'; import { LOGGER, EMBER_EXTEND_PROTOTYPES, JQUERY_INTEGRATION } from '@ember/deprecated-features'; import templateOnlyComponent from '@ember/component/template-only'; +import { destroy } from '@glimmer/runtime'; // ****@ember/-internals/environment**** @@ -322,7 +323,7 @@ Ember.platform = { hasPropertyAccessors: true, }; Ember.defineProperty = metal.defineProperty; -Ember.destroy = metal.destroy; +Ember.destroy = destroy; Ember.libraries = metal.libraries; Ember.getProperties = metal.getProperties; Ember.setProperties = metal.setProperties; diff --git a/packages/ember/tests/reexports_test.js b/packages/ember/tests/reexports_test.js index 15f92fdb020..efd08df6407 100644 --- a/packages/ember/tests/reexports_test.js +++ b/packages/ember/tests/reexports_test.js @@ -173,7 +173,7 @@ let allExports = [ ['platform.defineProperty', null, { value: true }], ['platform.hasPropertyAccessors', null, { value: true }], ['defineProperty', '@ember/-internals/metal'], - ['destroy', '@ember/-internals/metal', 'destroy'], + ['destroy', '@glimmer/runtime', 'destroy'], ['libraries', '@ember/-internals/metal'], ['getProperties', '@ember/-internals/metal'], ['setProperties', '@ember/-internals/metal'], diff --git a/yarn.lock b/yarn.lock index 7e9e447915c..b960d944188 100644 --- a/yarn.lock +++ b/yarn.lock @@ -913,142 +913,142 @@ resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.2.0.tgz#a039f542dc14c8e8299c81cd5abba95e2459cfa6" integrity sha512-VmVq/8saCaPdesQmftPqbFtxJWrzxNGSQ+e8x8LLe3Hjm36pJ04Q8LeORGZkAeOhldoUX9seLGmSaHeXkIqoog== -"@glimmer/compiler@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.53.0.tgz#313b2b7138add2d7fb28737b324a5395f076a794" - integrity sha512-Fn/OD4irLHzj1kAtOYK6NDffcEl+nZu8Gg9F3TeKBT3nZJquJc7wL/gydvN34waIEo88o42HpiG1IiXVXdAIrQ== - dependencies: - "@glimmer/interfaces" "^0.53.0" - "@glimmer/syntax" "^0.53.0" - "@glimmer/util" "^0.53.0" - "@glimmer/wire-format" "^0.53.0" +"@glimmer/compiler@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.54.0.tgz#25c794495ef0ed0cc4014eb1b160a859d8b602a7" + integrity sha512-/+xi54syHB5VtDuo6lWjZpTLaIwVfk6iWkPoRrSvQT93PN663fvTlJlW2NgI5q+h/WAJgGUoTMGYdGQGd9vFAw== + dependencies: + "@glimmer/interfaces" "^0.54.0" + "@glimmer/syntax" "^0.54.0" + "@glimmer/util" "^0.54.0" + "@glimmer/wire-format" "^0.54.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/encoder@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.53.0.tgz#bb9cc47a6dbe6d1d948d72f737879b1a3fa3a01c" - integrity sha512-Xa3Bo+FQIql+qIYEC/JyEm43Fla2yOmTRNIEuCOx/540XcnzWrbYheRg8etH9nbqdI0AWYi/jXPptGKPDzz4AA== +"@glimmer/encoder@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.54.0.tgz#8fe9a175a91081661e47862ca55dcbc330e86907" + integrity sha512-nqFhqYy6G4cf85e6cyahUVESOSz+uCAVa2nMrGhciV259JYbRGI+3xVnuQCQW5UPYjERz0idGTi0tNVApLB/Yw== dependencies: - "@glimmer/interfaces" "^0.53.0" - "@glimmer/vm" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/vm" "^0.54.0" "@glimmer/env@0.1.7", "@glimmer/env@^0.1.7": version "0.1.7" resolved "https://registry.yarnpkg.com/@glimmer/env/-/env-0.1.7.tgz#fd2d2b55a9029c6b37a6c935e8c8871ae70dfa07" integrity sha1-/S0rVakCnGs3psk16MiHGucN+gc= -"@glimmer/interfaces@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.53.0.tgz#cb519256b0b446048b4c674c4db00754d796e0d7" - integrity sha512-Jiq4b5XLXc3OJDPlxj+uq3Owu4rl3e6UyApc6Of6EPal48Ync1jhGcsUUOiP0TdNIm6KeFuzwA2mY6rJ7B5IfQ== +"@glimmer/interfaces@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.54.0.tgz#99cb943f5652edf4a8fe1a11594050db0e0b9bb1" + integrity sha512-IXP6wkEqO+1P5aoDBZ7SvPBM6073eXMbKaWAWsYHlbMp7qXYN92dPnFVtrf6CVUB2NciLNvmEUzzDDteYxsH0A== dependencies: "@simple-dom/interface" "^1.4.0" -"@glimmer/low-level@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.53.0.tgz#acbbed3cae9038d497e81b741cacd9f0c9c5952f" - integrity sha512-l46nrSu4Wj1lsQa2wBIZOFPUa9E37HxGSNARs1nl6gRB+vW7n4nNUWZ8tSfTo8jGw2OETxgH+s3HT8HloIkMbw== +"@glimmer/low-level@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.54.0.tgz#f60b7566321b0ebfa5aa6068f387805d5e113aef" + integrity sha512-yPyNdDyA7ssZPi0at/7eRcGJOr6OQLGkkdXxNL8870ASw7JpNMIK2j1dJR5VHhIZc+fmBu6xC97DfzM4xMkVmA== -"@glimmer/node@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.53.0.tgz#5cd92f0fa23364a425219537c1481228083e2ce7" - integrity sha512-Ua15rR+FnXv8gSUsDzOtQAKf5Op4lOc9PvOagTalgiKX2O08JUtwd/MDwiJGIJ31DgOUkitu+6d8bz4V6unTDg== +"@glimmer/node@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.54.0.tgz#8d312c58eb94d9e019f6a6764ab2bb5bc24f6536" + integrity sha512-E19kMaYJ0k+vHwbPrruCnyIYtVSAATosj1azmsROHFVMLKnFouDv3QFhXehH+wQEIHZOxNoVQ0QwCrFn5Rkohw== dependencies: - "@glimmer/interfaces" "^0.53.0" - "@glimmer/runtime" "^0.53.0" - "@glimmer/util" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/runtime" "^0.54.0" + "@glimmer/util" "^0.54.0" "@simple-dom/document" "^1.4.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/opcode-compiler@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.53.0.tgz#96e7a999fefa6c10d8b95202772341d9e453d613" - integrity sha512-P6usfggdDdbKLPWc87Ca4KpvW7e3erLT1wnmLzzJaro8k3Tmy+XK+MW7w3t0//ixeRjpHa3qBH67WYaZtJP5/g== - dependencies: - "@glimmer/encoder" "^0.53.0" - "@glimmer/interfaces" "^0.53.0" - "@glimmer/program" "^0.53.0" - "@glimmer/reference" "^0.53.0" - "@glimmer/util" "^0.53.0" - "@glimmer/vm" "^0.53.0" - "@glimmer/wire-format" "^0.53.0" - -"@glimmer/program@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.53.0.tgz#ae0ecc6b6131d122cb4862bff4c98b98001c3829" - integrity sha512-bu1mu00BXEpOnmwBnvBNmiO/9Slybfun75T7AhIKRsV79yDGkkjCfIZoT/4I8UBX0D0vKdu5ZHMXWqp8PjEiYw== - dependencies: - "@glimmer/encoder" "^0.53.0" - "@glimmer/interfaces" "^0.53.0" - "@glimmer/util" "^0.53.0" - -"@glimmer/reference@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.53.0.tgz#3ef189259e28de65eb6e781add27c62d1475ac58" - integrity sha512-wLiUQJ2RrjrwfR3sbbXp6aAmAZpbSmx/q2xk/LDd8Sa9D3hD0FhWeLg/nc7qOxo5USAOYu+5npP2LMuT4nAB0g== +"@glimmer/opcode-compiler@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.54.0.tgz#8bd10814539028764a3961e4584bef3dcae86c85" + integrity sha512-1sIrRWt8ocO9MGHBtXt5VcrcI2TKjVfyd63EOLsNXFcCqUlQhoxljagwe/v+qTOzv6RfXZgfLCcnnKC1cGuuIg== + dependencies: + "@glimmer/encoder" "^0.54.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/program" "^0.54.0" + "@glimmer/reference" "^0.54.0" + "@glimmer/util" "^0.54.0" + "@glimmer/vm" "^0.54.0" + "@glimmer/wire-format" "^0.54.0" + +"@glimmer/program@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.54.0.tgz#8dd5be71e8f0f28038b05ed2ebd09c8d907849f9" + integrity sha512-RkbXrW+l/vQ3gwGM5ArTj5HO66+uVRpAqzjcUElZjjygWqDlBbU/vY+MOLbQReM48Vsa5l9wUDgUFue4876zbw== + dependencies: + "@glimmer/encoder" "^0.54.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/util" "^0.54.0" + +"@glimmer/reference@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.54.0.tgz#eab11698cf9b539bd6d5d5eed38be9dbeae6bbd0" + integrity sha512-8jiIOqDdMt88MesF/9Nv3+ge99GyRF29bAXfjzbUVJFDu6krmm2qiIpCLkKmcofsCyg82pJvn+OUEAmXcI2ZaA== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/interfaces" "^0.53.0" - "@glimmer/util" "^0.53.0" - "@glimmer/validator" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/util" "^0.54.0" + "@glimmer/validator" "^0.54.0" -"@glimmer/runtime@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.53.0.tgz#eb48638c8538a2a38f19eb1f0f85cffacd57fa63" - integrity sha512-ucHa0vFYI/hGSPydGhOoG8dplPNFc5jrG+nwxZJyfRnJEsNNTX8ygmqfYjst9Go7XLfGGTXy+kFRtyXPG4RTUg== +"@glimmer/runtime@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.54.0.tgz#5ef89928e245966ba1c3a3d69a1a593f05c3b528" + integrity sha512-5fA/RXuJS+2bE71m84KlXCPVCE2RsXIrs3k68YKaV50IzZR5hPftN0IPWZ/qsQIwbhaXvqrXGBQbMG0WZlp2IA== dependencies: "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "^0.53.0" - "@glimmer/low-level" "^0.53.0" - "@glimmer/program" "^0.53.0" - "@glimmer/reference" "^0.53.0" - "@glimmer/util" "^0.53.0" - "@glimmer/validator" "^0.53.0" - "@glimmer/vm" "^0.53.0" - "@glimmer/wire-format" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/low-level" "^0.54.0" + "@glimmer/program" "^0.54.0" + "@glimmer/reference" "^0.54.0" + "@glimmer/util" "^0.54.0" + "@glimmer/validator" "^0.54.0" + "@glimmer/vm" "^0.54.0" + "@glimmer/wire-format" "^0.54.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/syntax@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.53.0.tgz#61f2dd848aae7644c16f649d2ed0bb1d42c1c0fe" - integrity sha512-j1kXXXlb1+UrmQG6J1b6lByedFEX24zZskvqBxEcrbnwfuvRYf/LYspKlV8MCJIJLbhJCzesMsDBPdYF6IcgyA== +"@glimmer/syntax@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.54.0.tgz#d257a61141d9debcc00a39dd62e415f782cc202b" + integrity sha512-pL8BBkZ34bTJixSUKj3V84bMqh7J6PCQ7b+65HsNEMQcQAkGVoX5RMukYI2KfVKzGk2gSCi4Qmdly9if2ooF8g== dependencies: - "@glimmer/interfaces" "^0.53.0" - "@glimmer/util" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/util" "^0.54.0" handlebars "^4.7.4" simple-html-tokenizer "^0.5.9" -"@glimmer/util@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.53.0.tgz#19375e75c5d248d77b0f751a5f1808c7a23f77a8" - integrity sha512-J/46gQRLe09viNS9/bAvsEOeu70ZfFqKEU4sM9TxeMjNiiWJIN+mPoC3bFG9Ub4pPrmfbIqPOr7lTtBDibB2Sw== +"@glimmer/util@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.54.0.tgz#2657939303c2be1075c8accf701efc936306d653" + integrity sha512-hqbmkD3FBIGbRQzXMjgqW+z2hbbUgDvbWfr3b4ifJQNhwD/JlUyI1txMXFFFEzduWkTlhzoY52/LFDXdF4DY8Q== dependencies: "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/validator@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.53.0.tgz#ca9d7565a3ffd187f4c8ed4e315d7f2860ec58bb" - integrity sha512-T40WmR6MTznVq3SYUCOAxsG+G4XOAXAgjZYQQ2x3pRpKQGIDE6ky6BRJ7sChLkZxXjFYyPwOKZtYtIio7gWkLQ== +"@glimmer/validator@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.54.0.tgz#fe78eeaf52c54a88aec41d13bba20e240f9e687f" + integrity sha512-3O/hR6ykWbKryyKOnnj9daEmLD535dMmb0Dz7jGptUGvDRbIV9ubUf6xixfvjJHvyPDSuBVEgtMI1ANpX1oeOg== dependencies: "@glimmer/env" "^0.1.7" -"@glimmer/vm@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.53.0.tgz#09a9b41de17d81e45c13a23dd5a2d29202531753" - integrity sha512-1zP1s2N4dqXDRBWX/AGGH5NoLzC5U5y2dFn4w+v9NUHTeTFMpTgYn4bvNk1RzZBy9CFfnCvBk/4No/KRbq5ZEA== +"@glimmer/vm@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.54.0.tgz#4b6e284023b5a82a796468b0cc275d5b1f871991" + integrity sha512-EqFDCqD1zKkxL7H9crgIyXwu8arEl2VtubZj5uiWefsWgDa8b2exaaeLJG2WB0uA7OSnTpl+IAjruM+VmhNu6Q== dependencies: - "@glimmer/interfaces" "^0.53.0" - "@glimmer/util" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/util" "^0.54.0" -"@glimmer/wire-format@^0.53.0": - version "0.53.0" - resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.53.0.tgz#93dd32ffc6f4a03f1ede57801931d191a8af6293" - integrity sha512-BtFAjCQy1/eEPs0soRV87WqK4g65KpL0f0S1FwUEZdpRocnNdbHI971Xk5N24nCRkuRwfjfXwIVpWw2hz6dVwg== +"@glimmer/wire-format@^0.54.0": + version "0.54.0" + resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.54.0.tgz#128a75aea18cb2f3f904dbb317fdad6a299cb770" + integrity sha512-gcevzlWFmQU7dLtWLDfjTDCmiyAaKxuBMdapd7OvbQZC5pQUkngCy1EVbMQDAEtxmxncOsbDgi0EFemIspprgQ== dependencies: - "@glimmer/interfaces" "^0.53.0" - "@glimmer/util" "^0.53.0" + "@glimmer/interfaces" "^0.54.0" + "@glimmer/util" "^0.54.0" "@simple-dom/document@^1.4.0": version "1.4.0"