diff --git a/package.json b/package.json index da057585c89..12af37b4494 100644 --- a/package.json +++ b/package.json @@ -74,19 +74,19 @@ }, "devDependencies": { "@babel/preset-env": "^7.9.5", - "@glimmer/compiler": "0.72.0", + "@glimmer/compiler": "0.73.0", "@glimmer/env": "^0.1.7", - "@glimmer/global-context": "0.72.0", - "@glimmer/interfaces": "0.72.0", - "@glimmer/manager": "0.72.0", - "@glimmer/destroyable": "0.72.0", - "@glimmer/owner": "0.72.0", - "@glimmer/node": "0.72.0", - "@glimmer/opcode-compiler": "0.72.0", - "@glimmer/program": "0.72.0", - "@glimmer/reference": "0.72.0", - "@glimmer/runtime": "0.72.0", - "@glimmer/validator": "0.72.0", + "@glimmer/global-context": "0.73.0", + "@glimmer/interfaces": "0.73.0", + "@glimmer/manager": "0.73.0", + "@glimmer/destroyable": "0.73.0", + "@glimmer/owner": "0.73.0", + "@glimmer/node": "0.73.0", + "@glimmer/opcode-compiler": "0.73.0", + "@glimmer/program": "0.73.0", + "@glimmer/reference": "0.73.0", + "@glimmer/runtime": "0.73.0", + "@glimmer/validator": "0.73.0", "@simple-dom/document": "^1.4.0", "@types/qunit": "^2.9.1", "@types/rsvp": "^4.0.3", diff --git a/packages/@ember/-internals/glimmer/index.ts b/packages/@ember/-internals/glimmer/index.ts index e0dc4e836ae..6361a67283d 100644 --- a/packages/@ember/-internals/glimmer/index.ts +++ b/packages/@ember/-internals/glimmer/index.ts @@ -382,13 +382,6 @@ export { export { setupEngineRegistry, setupApplicationRegistry } from './lib/setup-registry'; export { DOMChanges, NodeDOMTreeConstruction, DOMTreeConstruction } from './lib/dom'; -export { default as array } from './lib/helpers/array'; -export { default as hash } from './lib/helpers/hash'; -export { default as concat } from './lib/helpers/concat'; -export { default as get } from './lib/helpers/get'; -export { default as fn } from './lib/helpers/fn'; -export { default as on } from './lib/modifiers/on'; - // needed for test // TODO just test these through public API // a lot of these are testing how a problem was solved diff --git a/packages/@ember/-internals/glimmer/lib/environment.ts b/packages/@ember/-internals/glimmer/lib/environment.ts index 506ccca2eec..bd47e5f7929 100644 --- a/packages/@ember/-internals/glimmer/lib/environment.ts +++ b/packages/@ember/-internals/glimmer/lib/environment.ts @@ -1,5 +1,5 @@ import { ENV } from '@ember/-internals/environment'; -import { _getProp, get, set } from '@ember/-internals/metal'; +import { _getProp, _setProp, get, set } from '@ember/-internals/metal'; import { Owner } from '@ember/-internals/owner'; import { getDebugName } from '@ember/-internals/utils'; import { constructStyleDeprecationMessage } from '@ember/-internals/views'; @@ -26,8 +26,9 @@ setGlobalContext({ toIterator, getProp: _getProp, - setProp: set, + setProp: _setProp, getPath: get, + setPath: set, scheduleDestroy(destroyable, destructor) { schedule('actions', null, destructor, destroyable); diff --git a/packages/@ember/-internals/glimmer/lib/helpers/array.ts b/packages/@ember/-internals/glimmer/lib/helpers/array.ts index 1805777fb7d..6d8816ddc15 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/array.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/array.ts @@ -1,8 +1,3 @@ -import { VMArguments } from '@glimmer/interfaces'; -import { createComputeRef, Reference } from '@glimmer/reference'; -import { reifyPositional } from '@glimmer/runtime'; -import { internalHelper } from './internal-helper'; - /** @module ember */ @@ -42,11 +37,3 @@ import { internalHelper } from './internal-helper'; @since 3.8.0 @public */ - -export default internalHelper( - (args: VMArguments): Reference => { - let captured = args.positional.capture(); - - return createComputeRef(() => reifyPositional(captured), null, 'array'); - } -); diff --git a/packages/@ember/-internals/glimmer/lib/helpers/concat.ts b/packages/@ember/-internals/glimmer/lib/helpers/concat.ts index 7af9ef8b5c3..bcf81909712 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/concat.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/concat.ts @@ -1,19 +1,3 @@ -import { VMArguments } from '@glimmer/interfaces'; -import { createComputeRef } from '@glimmer/reference'; -import { reifyPositional } from '@glimmer/runtime'; -import { internalHelper } from './internal-helper'; - -const isEmpty = (value: unknown): boolean => { - return value === null || value === undefined || typeof (value as object).toString !== 'function'; -}; - -const normalizeTextValue = (value: unknown): string => { - if (isEmpty(value)) { - return ''; - } - return String(value); -}; - /** @module ember */ @@ -40,12 +24,3 @@ const normalizeTextValue = (value: unknown): string => { @for Ember.Templates.helpers @since 1.13.0 */ -export default internalHelper((args: VMArguments) => { - let captured = args.positional.capture(); - - return createComputeRef( - () => reifyPositional(captured).map(normalizeTextValue).join(''), - null, - 'concat' - ); -}); diff --git a/packages/@ember/-internals/glimmer/lib/helpers/fn.ts b/packages/@ember/-internals/glimmer/lib/helpers/fn.ts index 46a67a70f94..8723cfa91c3 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/fn.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/fn.ts @@ -1,19 +1,3 @@ -import { assert } from '@ember/debug'; -import { DEBUG } from '@glimmer/env'; -import { VMArguments } from '@glimmer/interfaces'; -import { - createComputeRef, - isInvokableRef, - Reference, - updateRef, - valueForRef, -} from '@glimmer/reference'; -import { reifyPositional } from '@glimmer/runtime'; -import buildUntouchableThis from '../utils/untouchable-this'; -import { internalHelper } from './internal-helper'; - -const context = buildUntouchableThis('`fn` helper'); - /** @module ember */ @@ -85,37 +69,3 @@ const context = buildUntouchableThis('`fn` helper'); @public @since 3.11.0 */ -export default internalHelper((args: VMArguments) => { - let positional = args.positional.capture(); - let callbackRef = positional[0]; - - if (DEBUG) assertCallbackIsFn(callbackRef); - - return createComputeRef( - () => { - return (...invocationArgs: unknown[]) => { - let [fn, ...args] = reifyPositional(positional); - - if (DEBUG) assertCallbackIsFn(callbackRef); - - if (isInvokableRef(callbackRef)) { - let value = args.length > 0 ? args[0] : invocationArgs[0]; - return updateRef(callbackRef, value); - } else { - return (fn as Function).call(context, ...args, ...invocationArgs); - } - }; - }, - null, - 'fn' - ); -}); - -function assertCallbackIsFn(callbackRef: Reference) { - assert( - `You must pass a function as the \`fn\` helpers first argument, you passed ${ - callbackRef ? valueForRef(callbackRef) : callbackRef - }. While rendering:\n\n${callbackRef?.debugLabel}`, - callbackRef && (isInvokableRef(callbackRef) || typeof valueForRef(callbackRef) === 'function') - ); -} diff --git a/packages/@ember/-internals/glimmer/lib/helpers/get.ts b/packages/@ember/-internals/glimmer/lib/helpers/get.ts index 26131c7cfd3..b91fa69dd26 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/get.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/get.ts @@ -1,16 +1,3 @@ -import { get, set } from '@ember/-internals/metal'; -import { isObject } from '@ember/-internals/utils'; -import { VMArguments } from '@glimmer/interfaces'; -import { - childRefFor, - childRefFromParts, - createComputeRef, - isConstRef, - NULL_REFERENCE, - valueForRef, -} from '@glimmer/reference'; -import { internalHelper } from './internal-helper'; - /** @module ember */ @@ -95,40 +82,3 @@ import { internalHelper } from './internal-helper'; @for Ember.Templates.helpers @since 2.1.0 */ -export default internalHelper((args: VMArguments) => { - let sourceRef = args.positional.at(0); - let pathRef = args.positional.at(1); - - if (isConstRef(pathRef)) { - // Since the path is constant, we can create a normal chain of property - // references. The source reference will update like normal, and all of the - // child references will update accordingly. - let path = valueForRef(pathRef); - - if (path === undefined || path === null || path === '') { - return NULL_REFERENCE; - } else if (typeof path === 'string' && path.indexOf('.') > -1) { - return childRefFromParts(sourceRef, path.split('.')); - } else { - return childRefFor(sourceRef, String(path)); - } - } else { - return createComputeRef( - () => { - let source = valueForRef(sourceRef); - - if (isObject(source)) { - return get(source, String(valueForRef(pathRef))); - } - }, - (value) => { - let source = valueForRef(sourceRef); - - if (isObject(source)) { - return set(source, String(valueForRef(pathRef)), value); - } - }, - 'get' - ); - } -}); diff --git a/packages/@ember/-internals/glimmer/lib/helpers/hash.ts b/packages/@ember/-internals/glimmer/lib/helpers/hash.ts index 2de7eecc059..b4872d84f49 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/hash.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/hash.ts @@ -1,8 +1,3 @@ -import { Dict, VMArguments } from '@glimmer/interfaces'; -import { createComputeRef, Reference } from '@glimmer/reference'; -import { reifyNamed } from '@glimmer/runtime'; -import { internalHelper } from './internal-helper'; - /** @module ember */ @@ -45,10 +40,3 @@ import { internalHelper } from './internal-helper'; @since 2.3.0 @public */ -export default internalHelper( - (args: VMArguments): Reference> => { - let positional = args.named.capture(); - - return createComputeRef(() => reifyNamed(positional), null, 'hash'); - } -); diff --git a/packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts b/packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts index 47ac572ffc9..59e3532903f 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts @@ -2,12 +2,6 @@ @module ember */ -import { assert } from '@ember/debug'; -import { toBool } from '@glimmer/global-context'; -import { VMArguments } from '@glimmer/interfaces'; -import { createComputeRef, valueForRef } from '@glimmer/reference'; -import { internalHelper } from './internal-helper'; - /** The `if` helper allows you to conditionally render one of two branches, depending on the "truthiness" of a property. @@ -99,28 +93,6 @@ import { internalHelper } from './internal-helper'; @for Ember.Templates.helpers @public */ -export const inlineIf = internalHelper((args: VMArguments) => { - let positional = args.positional.capture(); - - return createComputeRef( - () => { - assert( - 'The inline form of the `if` helper expects two or three arguments, e.g. `{{if trialExpired "Expired" expiryDate}}`.', - positional.length === 3 || positional.length === 2 - ); - - let [condition, truthyValue, falsyValue] = positional; - - if (toBool(valueForRef(condition)) === true) { - return valueForRef(truthyValue); - } else { - return falsyValue !== undefined ? valueForRef(falsyValue) : undefined; - } - }, - null, - 'if' - ); -}); /** The `unless` helper is the inverse of the `if` helper. It displays if a value @@ -207,25 +179,3 @@ export const inlineIf = internalHelper((args: VMArguments) => { @for Ember.Templates.helpers @public */ -export const inlineUnless = internalHelper((args: VMArguments) => { - let positional = args.positional.capture(); - - return createComputeRef( - () => { - assert( - 'The inline form of the `unless` helper expects two or three arguments, e.g. `{{unless isFirstLogin "Welcome back!"}}`.', - positional.length === 3 || positional.length === 2 - ); - - let [condition, falsyValue, truthyValue] = positional; - - if (toBool(valueForRef(condition)) === true) { - return truthyValue !== undefined ? valueForRef(truthyValue) : undefined; - } else { - return valueForRef(falsyValue); - } - }, - null, - 'unless' - ); -}); diff --git a/packages/@ember/-internals/glimmer/lib/helpers/log.ts b/packages/@ember/-internals/glimmer/lib/helpers/log.ts index 758b298be2c..14e3f783f79 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/log.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/log.ts @@ -1,8 +1,3 @@ -import { VMArguments } from '@glimmer/interfaces'; -import { createComputeRef } from '@glimmer/reference'; -import { reifyPositional } from '@glimmer/runtime'; -import { internalHelper } from './internal-helper'; - /** @module ember */ @@ -20,12 +15,3 @@ import { internalHelper } from './internal-helper'; @param {Array} params @public */ -export default internalHelper((args: VMArguments) => { - let positional = args.positional.capture(); - - return createComputeRef(() => { - /* eslint-disable no-console */ - console.log(...reifyPositional(positional)); - /* eslint-enable no-console */ - }); -}); diff --git a/packages/@ember/-internals/glimmer/lib/modifiers/on.ts b/packages/@ember/-internals/glimmer/lib/modifiers/on.ts index c6e696a0b72..06f3beb0fa2 100644 --- a/packages/@ember/-internals/glimmer/lib/modifiers/on.ts +++ b/packages/@ember/-internals/glimmer/lib/modifiers/on.ts @@ -1,17 +1,3 @@ -import { Owner } from '@ember/-internals/owner'; -import { assert } from '@ember/debug'; -import { registerDestructor } from '@glimmer/destroyable'; -import { DEBUG } from '@glimmer/env'; -import { CapturedArguments, InternalModifierManager, VMArguments } from '@glimmer/interfaces'; -import { setInternalModifierManager } from '@glimmer/manager'; -import { valueForRef } from '@glimmer/reference'; -import { reifyNamed } from '@glimmer/runtime'; -import { createUpdatableTag, UpdatableTag } from '@glimmer/validator'; -import { SimpleElement } from '@simple-dom/interface'; -import buildUntouchableThis from '../utils/untouchable-this'; - -const untouchableContext = buildUntouchableThis('`on` modifier'); - /** @module ember */ @@ -28,199 +14,6 @@ const untouchableContext = buildUntouchableThis('`on` modifier'); This flag determines, whether `{ once: true }` and thus also event options in general are supported. */ -const SUPPORTS_EVENT_OPTIONS = (() => { - try { - const div = document.createElement('div'); - let counter = 0; - div.addEventListener('click', () => counter++, { once: true }); - - let event; - if (typeof Event === 'function') { - event = new Event('click'); - } else { - event = document.createEvent('Event'); - event.initEvent('click', true, true); - } - - div.dispatchEvent(event); - div.dispatchEvent(event); - - return counter === 1; - } catch (error) { - return false; - } -})(); - -export class OnModifierState { - public tag = createUpdatableTag(); - public element: Element; - public args: CapturedArguments; - public eventName!: string; - public callback!: EventListener; - private userProvidedCallback!: EventListener; - public once?: boolean; - public passive?: boolean; - public capture?: boolean; - public options?: AddEventListenerOptions; - public shouldUpdate = true; - - constructor(element: Element, args: CapturedArguments) { - this.element = element; - this.args = args; - } - - updateFromArgs(): void { - let { args } = this; - - let { once, passive, capture }: AddEventListenerOptions = reifyNamed(args.named); - if (once !== this.once) { - this.once = once; - this.shouldUpdate = true; - } - - if (passive !== this.passive) { - this.passive = passive; - this.shouldUpdate = true; - } - - if (capture !== this.capture) { - this.capture = capture; - this.shouldUpdate = true; - } - - let options: AddEventListenerOptions; - if (once || passive || capture) { - options = this.options = { once, passive, capture }; - } else { - this.options = undefined; - } - - assert( - 'You must pass a valid DOM event name as the first argument to the `on` modifier', - args.positional[0] !== undefined && typeof valueForRef(args.positional[0]) === 'string' - ); - let eventName = valueForRef(args.positional[0]) as string; - if (eventName !== this.eventName) { - this.eventName = eventName; - this.shouldUpdate = true; - } - - let userProvidedCallbackReference = args.positional[1]; - - if (DEBUG) { - assert( - `You must pass a function as the second argument to the \`on\` modifier.`, - args.positional[1] !== undefined - ); - - let value = valueForRef(userProvidedCallbackReference); - assert( - `You must pass a function as the second argument to the \`on\` modifier, you passed ${ - value === null ? 'null' : typeof value - }. While rendering:\n\n${userProvidedCallbackReference.debugLabel}`, - typeof value === 'function' - ); - } - - let userProvidedCallback = valueForRef(userProvidedCallbackReference) as EventListener; - if (userProvidedCallback !== this.userProvidedCallback) { - this.userProvidedCallback = userProvidedCallback; - this.shouldUpdate = true; - } - - assert( - `You can only pass two positional arguments (event name and callback) to the \`on\` modifier, but you provided ${args.positional.length}. Consider using the \`fn\` helper to provide additional arguments to the \`on\` callback.`, - args.positional.length === 2 - ); - - let needsCustomCallback = - (SUPPORTS_EVENT_OPTIONS === false && once) /* needs manual once implementation */ || - (DEBUG && passive); /* needs passive enforcement */ - - if (this.shouldUpdate) { - if (needsCustomCallback) { - let callback = (this.callback = function (this: Element, event) { - if (DEBUG && passive) { - event.preventDefault = () => { - assert( - `You marked this listener as 'passive', meaning that you must not call 'event.preventDefault()': \n\n${userProvidedCallback}` - ); - }; - } - - if (!SUPPORTS_EVENT_OPTIONS && once) { - removeEventListener(this, eventName, callback, options); - } - return userProvidedCallback.call(untouchableContext, event); - }); - } else if (DEBUG) { - // prevent the callback from being bound to the element - this.callback = userProvidedCallback.bind(untouchableContext); - } else { - this.callback = userProvidedCallback; - } - } - } -} - -let adds = 0; -let removes = 0; - -function removeEventListener( - element: Element, - eventName: string, - callback: EventListener, - options?: AddEventListenerOptions -): void { - removes++; - - if (SUPPORTS_EVENT_OPTIONS) { - // when options are supported, use them across the board - element.removeEventListener(eventName, callback, options); - } else if (options !== undefined && options.capture) { - // used only in the following case: - // - // `{ once: true | false, passive: true | false, capture: true } - // - // `once` is handled via a custom callback that removes after first - // invocation so we only care about capture here as a boolean - element.removeEventListener(eventName, callback, true); - } else { - // used only in the following cases: - // - // * where there is no options - // * `{ once: true | false, passive: true | false, capture: false } - element.removeEventListener(eventName, callback); - } -} - -function addEventListener( - element: Element, - eventName: string, - callback: EventListener, - options?: AddEventListenerOptions -): void { - adds++; - - if (SUPPORTS_EVENT_OPTIONS) { - // when options are supported, use them across the board - element.addEventListener(eventName, callback, options); - } else if (options !== undefined && options.capture) { - // used only in the following case: - // - // `{ once: true | false, passive: true | false, capture: true } - // - // `once` is handled via a custom callback that removes after first - // invocation so we only care about capture here as a boolean - element.addEventListener(eventName, callback, true); - } else { - // used only in the following cases: - // - // * where there is no options - // * `{ once: true | false, passive: true | false, capture: false } - element.addEventListener(eventName, callback); - } -} /** The `{{on}}` modifier lets you easily add event listeners (it uses @@ -311,84 +104,3 @@ function addEventListener( @public @since 3.11.0 */ -class OnModifierManager implements InternalModifierManager { - public SUPPORTS_EVENT_OPTIONS: boolean = SUPPORTS_EVENT_OPTIONS; - - getDebugName(): string { - return 'on'; - } - - get counters(): { adds: number; removes: number } { - return { adds, removes }; - } - - create( - _owner: Owner, - element: SimpleElement | Element, - _state: object, - args: VMArguments - ): OnModifierState | null { - const capturedArgs = args.capture(); - - return new OnModifierState(element, capturedArgs); - } - - getTag(state: OnModifierState | null): UpdatableTag | null { - if (state === null) { - return null; - } - - return state.tag; - } - - install(state: OnModifierState | null): void { - if (state === null) { - return; - } - - state.updateFromArgs(); - - let { element, eventName, callback, options } = state; - - addEventListener(element, eventName, callback, options); - - registerDestructor(state, () => removeEventListener(element, eventName, callback, options)); - - state.shouldUpdate = false; - } - - update(state: OnModifierState | null): void { - if (state === null) { - return; - } - - // stash prior state for el.removeEventListener - let { element, eventName, callback, options } = state; - - state.updateFromArgs(); - - if (!state.shouldUpdate) { - return; - } - - // use prior state values for removal - removeEventListener(element, eventName, callback, options); - - // read updated values from the state object - addEventListener(state.element, state.eventName, state.callback, state.options); - - state.shouldUpdate = false; - } - - getDestroyable(state: OnModifierState | null): OnModifierState | null { - return state; - } -} - -const ON_MODIFIER_MANAGER = new OnModifierManager(); - -const on = {}; - -setInternalModifierManager(ON_MODIFIER_MANAGER, on); - -export default on; diff --git a/packages/@ember/-internals/glimmer/lib/resolver.ts b/packages/@ember/-internals/glimmer/lib/resolver.ts index cda2a83ff0b..8c87ec67c64 100644 --- a/packages/@ember/-internals/glimmer/lib/resolver.ts +++ b/packages/@ember/-internals/glimmer/lib/resolver.ts @@ -24,7 +24,12 @@ import { } from '@glimmer/manager'; import { PartialDefinitionImpl } from '@glimmer/opcode-compiler'; import { - getDynamicVar, + array, + concat, + fn, + get, + hash, + on, TEMPLATE_ONLY_COMPONENT_MANAGER, templateOnlyComponent, } from '@glimmer/runtime'; @@ -41,21 +46,12 @@ import { default as inElementNullCheckHelper } from './helpers/-in-element-null- import { default as normalizeClassHelper } from './helpers/-normalize-class'; import { default as trackArray } from './helpers/-track-array'; import { default as action } from './helpers/action'; -import { default as array } from './helpers/array'; -import { default as concat } from './helpers/concat'; import { default as eachIn } from './helpers/each-in'; -import { default as fn } from './helpers/fn'; -import { default as get } from './helpers/get'; -import { default as hash } from './helpers/hash'; -import { inlineIf, inlineUnless } from './helpers/if-unless'; -import { internalHelper } from './helpers/internal-helper'; -import { default as log } from './helpers/log'; import { default as mut } from './helpers/mut'; import { default as queryParams } from './helpers/query-param'; import { default as readonly } from './helpers/readonly'; import { default as unbound } from './helpers/unbound'; import actionModifier from './modifiers/action'; -import onModifier from './modifiers/on'; import { mountHelper } from './syntax/mount'; import { outletHelper } from './syntax/outlet'; @@ -178,18 +174,14 @@ if (PARTIALS) { const BUILTIN_KEYWORD_HELPERS = { action, - if: inlineIf, - log, mut, readonly, unbound, - unless: inlineUnless, 'query-params': queryParams, '-hash': hash, '-each-in': eachIn, '-normalize-class': normalizeClassHelper, '-track-array': trackArray, - '-get-dynamic-var': internalHelper(getDynamicVar), '-mount': mountHelper, '-outlet': outletHelper, '-in-el-null': inElementNullCheckHelper, @@ -210,7 +202,7 @@ const BUILTIN_KEYWORD_MODIFIERS = { const BUILTIN_MODIFIERS = { ...BUILTIN_KEYWORD_MODIFIERS, - on: onModifier, + on, }; const CLASSIC_HELPER_MANAGER_ASSOCIATED = new _WeakSet(); diff --git a/packages/@ember/-internals/glimmer/lib/utils/untouchable-this.ts b/packages/@ember/-internals/glimmer/lib/utils/untouchable-this.ts deleted file mode 100644 index c58d61b5cc5..00000000000 --- a/packages/@ember/-internals/glimmer/lib/utils/untouchable-this.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { HAS_NATIVE_PROXY } from '@ember/-internals/utils'; -import { assert } from '@ember/debug'; -import { DEBUG } from '@glimmer/env'; - -export default function buildUntouchableThis(source: string): null | object { - let context: null | object = null; - if (DEBUG && HAS_NATIVE_PROXY) { - let assertOnProperty = (property: string | number | symbol) => { - assert( - `You accessed \`this.${String( - property - )}\` from a function passed to the ${source}, but the function itself was not bound to a valid \`this\` context. Consider updating to usage of \`@action\`.` - ); - }; - - context = new Proxy( - {}, - { - get(_target: {}, property: string | symbol) { - assertOnProperty(property); - }, - - set(_target: {}, property: string | symbol) { - assertOnProperty(property); - - return false; - }, - - has(_target: {}, property: string | symbol) { - assertOnProperty(property); - - return false; - }, - } - ); - } - - return context; -} diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js index f88b6eab1c7..888c33cd088 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js @@ -8,17 +8,8 @@ import { } from 'internal-test-helpers'; import { EMBER_STRICT_MODE } from '@ember/canary-features'; -import { - Input, - LinkComponent as LinkTo, - TextArea, - hash, - array, - concat, - get, - on, - fn, -} from '@ember/-internals/glimmer'; +import { Input, LinkComponent as LinkTo, TextArea } from '@ember/-internals/glimmer'; +import { hash, array, concat, get, on, fn } from '@glimmer/runtime'; import GlimmerishComponent from '../../utils/glimmerish-component'; if (EMBER_STRICT_MODE) { diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/custom-helper-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/custom-helper-test.js index b8c884c0a72..c7b5a3c1b4c 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/custom-helper-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/custom-helper-test.js @@ -15,10 +15,10 @@ moduleFor( 'Helpers test: custom helpers', class extends RenderingTestCase { ['@test it cannot override built-in syntax']() { - this.registerHelper('if', () => 'Nope'); + this.registerHelper('array', () => 'Nope'); expectAssertion(() => { - this.render(`{{if foo 'LOL'}}`, { foo: true }); - }, /You attempted to overwrite the built-in helper "if" which is not allowed. Please rename the helper./); + this.render(`{{array foo 'LOL'}}`, { foo: true }); + }, /You attempted to overwrite the built-in helper "array" which is not allowed. Please rename the helper./); } ['@test it can resolve custom simple helpers with or without dashes']() { diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/fn-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/fn-test.js index 6b9986d3547..7136480865a 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/fn-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/fn-test.js @@ -120,58 +120,6 @@ moduleFor( assert.equal(this.stashedFn(), 'arg1: foo, arg2: bar'); } - '@test asserts if no argument given'() { - expectAssertion(() => { - this.render(`{{fn}}`, { - myFunc: null, - arg1: 'foo', - arg2: 'bar', - }); - }, /You must pass a function as the `fn` helpers first argument./); - } - - '@test asserts if the first argument is undefined'() { - expectAssertion(() => { - this.render(`{{fn this.myFunc this.arg1 this.arg2}}`, { - myFunc: undefined, - arg1: 'foo', - arg2: 'bar', - }); - }, /You must pass a function as the `fn` helpers first argument, you passed undefined. While rendering:\n\nthis.myFunc/); - } - - '@test asserts if the first argument is null'() { - expectAssertion(() => { - this.render(`{{fn this.myFunc this.arg1 this.arg2}}`, { - myFunc: null, - arg1: 'foo', - arg2: 'bar', - }); - }, /You must pass a function as the `fn` helpers first argument, you passed null. While rendering:\n\nthis.myFunc/); - } - - '@test asserts if the provided function accesses `this` without being bound prior to passing to fn'( - assert - ) { - if (!HAS_NATIVE_PROXY) { - assert.expect(0); - return; - } - - this.render(`{{stash stashedFn=(fn this.myFunc this.arg1)}}`, { - myFunc(arg1) { - return `arg1: ${arg1}, arg2: ${this.arg2}`; - }, - - arg1: 'foo', - arg2: 'bar', - }); - - expectAssertion(() => { - this.stashedFn(); - }, /You accessed `this.arg2` from a function passed to the `fn` helper, but the function itself was not bound to a valid `this` context. Consider updating to usage of `@action`./); - } - '@test there is no `this` context within the callback'(assert) { if (DEBUG && HAS_NATIVE_PROXY) { assert.expect(0); diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/if-unless-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/if-unless-test.js index c68084309b5..499c06730e5 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/if-unless-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/if-unless-test.js @@ -2,27 +2,6 @@ import { moduleFor } from 'internal-test-helpers'; import { IfUnlessHelperTest } from '../../utils/shared-conditional-tests'; -moduleFor( - 'Helpers test: inline {{if}}', - class extends IfUnlessHelperTest { - templateFor({ cond, truthy, falsy }) { - return `{{if ${cond} ${truthy} ${falsy}}}`; - } - - ['@test it raises when there are more than three arguments']() { - expectAssertion(() => { - this.render(`{{if condition 'a' 'b' 'c'}}`, { condition: true }); - }, `The inline form of the 'if' helper expects two or three arguments. ('-top-level' @ L1:C0) `); - } - - ['@test it raises when there are less than two arguments']() { - expectAssertion(() => { - this.render(`{{if condition}}`, { condition: true }); - }, `The inline form of the 'if' helper expects two or three arguments. ('-top-level' @ L1:C0) `); - } - } -); - moduleFor( 'Helpers test: nested {{if}} helpers (returning truthy values)', class extends IfUnlessHelperTest { @@ -80,27 +59,6 @@ moduleFor( } ); -moduleFor( - 'Helpers test: inline {{unless}}', - class extends IfUnlessHelperTest { - templateFor({ cond, truthy, falsy }) { - return `{{unless ${cond} ${falsy} ${truthy}}}`; - } - - ['@test it raises when there are more than three arguments']() { - expectAssertion(() => { - this.render(`{{unless condition 'a' 'b' 'c'}}`, { condition: true }); - }, /The inline form of the `unless` helper expects two or three arguments/); - } - - ['@test it raises when there are less than two arguments']() { - expectAssertion(() => { - this.render(`{{unless condition}}`, { condition: true }); - }, /The inline form of the `unless` helper expects two or three arguments/); - } - } -); - moduleFor( 'Helpers test: nested {{unless}} helpers (returning truthy values)', class extends IfUnlessHelperTest { diff --git a/packages/@ember/-internals/glimmer/tests/integration/modifiers/on-test.js b/packages/@ember/-internals/glimmer/tests/integration/modifiers/on-test.js index f10186b6a61..fa40faf7a87 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/modifiers/on-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/modifiers/on-test.js @@ -1,8 +1,7 @@ import { moduleFor, RenderingTestCase, runTask } from 'internal-test-helpers'; import { isChrome, isFirefox } from '@ember/-internals/browser-environment'; -import { HAS_NATIVE_PROXY } from '@ember/-internals/utils'; import { getInternalModifierManager } from '@glimmer/manager'; -import { on } from '@ember/-internals/glimmer'; +import { on } from '@glimmer/runtime'; import { Component } from '../../utils/helpers'; @@ -177,19 +176,6 @@ moduleFor( } } - '@test setting passive named argument prevents calling preventDefault'() { - let matcher = /You marked this listener as 'passive', meaning that you must not call 'event.preventDefault\(\)'/; - this.render('', { - callback(event) { - expectAssertion(() => { - event.preventDefault(); - }, matcher); - }, - }); - - runTask(() => this.$('button').click()); - } - '@test by default bubbling is used (capture: false)'(assert) { this.render( ` @@ -259,97 +245,6 @@ moduleFor( assert.verifySteps(['inner clicked'], 'once works'); } - '@test unrelated updates to `this` context does not result in removing + re-adding'(assert) { - let called = false; - - this.render('', { - callback() { - called = true; - }, - otherThing: 0, - }); - - this.assertCounts({ adds: 1, removes: 0 }); - - runTask(() => this.$('button').click()); - assert.equal(called, 1, 'callback is being invoked'); - - runTask(() => this.context.set('otherThing', 1)); - this.assertCounts({ adds: 1, removes: 0 }); - } - - '@test asserts when eventName is missing'() { - expectAssertion(() => { - this.render(``, { - callback() {}, - }); - }, /You must pass a valid DOM event name as the first argument to the `on` modifier/); - } - - '@test asserts when eventName is a bound undefined value'() { - expectAssertion(() => { - this.render(``, { - callback() {}, - }); - }, /You must pass a valid DOM event name as the first argument to the `on` modifier/); - } - - '@test asserts when eventName is a function'() { - expectAssertion(() => { - this.render(``, { - callback() {}, - }); - }, /You must pass a valid DOM event name as the first argument to the `on` modifier/); - } - - '@test asserts when callback is missing'() { - expectAssertion(() => { - this.render(``); - }, /You must pass a function as the second argument to the `on` modifier/); - } - - '@test asserts when callback is undefined'() { - expectAssertion(() => { - this.render(``); - }, /You must pass a function as the second argument to the `on` modifier, you passed undefined. While rendering:\n\nthis.foo/); - } - - '@test asserts when callback is null'() { - expectAssertion(() => { - this.render(``, { foo: null }); - }, /You must pass a function as the second argument to the `on` modifier, you passed null. While rendering:\n\nthis.foo/); - } - - '@test asserts if the provided callback accesses `this` without being bound prior to passing to on'( - assert - ) { - this.render(``, { - myFunc() { - if (HAS_NATIVE_PROXY) { - expectAssertion(() => { - this.arg1; - }, /You accessed `this.arg1` from a function passed to the `on` modifier, but the function itself was not bound to a valid `this` context. Consider updating to usage of `@action`./); - } else { - // IE11 - assert.strictEqual(this, null, 'this is null on browsers without native proxy support'); - } - }, - - arg1: 'foo', - }); - - runTask(() => this.$('button').click()); - } - - '@test asserts if more than 2 positional parameters are provided'() { - expectAssertion(() => { - this.render(``, { - callback() {}, - someArg: 'foo', - }); - }, /You can only pass two positional arguments \(event name and callback\) to the `on` modifier, but you provided 3. Consider using the `fn` helper to provide additional arguments to the `on` callback./); - } - '@test it removes the modifier when the element is removed'(assert) { let count = 0; diff --git a/packages/@ember/-internals/metal/index.ts b/packages/@ember/-internals/metal/index.ts index c82a97c8d45..64018eba48b 100644 --- a/packages/@ember/-internals/metal/index.ts +++ b/packages/@ember/-internals/metal/index.ts @@ -9,7 +9,7 @@ export { getCachedValueFor } from './lib/computed_cache'; export { default as alias } from './lib/alias'; export { deprecateProperty } from './lib/deprecate_property'; export { PROXY_CONTENT, _getPath, get, getWithDefault, _getProp } from './lib/property_get'; -export { set, trySet } from './lib/property_set'; +export { set, _setProp, trySet } from './lib/property_set'; export { objectAt, replace, diff --git a/packages/@ember/-internals/metal/lib/property_set.ts b/packages/@ember/-internals/metal/lib/property_set.ts index e78e2b22037..908f59cc8c5 100644 --- a/packages/@ember/-internals/metal/lib/property_set.ts +++ b/packages/@ember/-internals/metal/lib/property_set.ts @@ -68,10 +68,10 @@ export function set(obj: object, keyName: string, value: T, toleran return value; } - if (isPath(keyName)) { - return setPath(obj, keyName, value, tolerant); - } + return isPath(keyName) ? _setPath(obj, keyName, value, tolerant) : _setProp(obj, keyName, value); +} +export function _setProp(obj: object, keyName: string, value: any) { let descriptor = lookupDescriptor(obj, keyName); if (descriptor !== null && COMPUTED_SETTERS.has(descriptor.set!)) { @@ -109,7 +109,7 @@ export function set(obj: object, keyName: string, value: T, toleran return value; } -function setPath(root: object, path: string, value: any, tolerant?: boolean): any { +function _setPath(root: object, path: string, value: any, tolerant?: boolean): any { let parts = path.split('.'); let keyName = parts.pop()!; diff --git a/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.ts b/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.ts deleted file mode 100644 index 15f3e642f34..00000000000 --- a/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { assert } from '@ember/debug'; -import { AST, ASTPlugin } from '@glimmer/syntax'; -import calculateLocationDisplay from '../system/calculate-location-display'; -import { EmberASTPluginEnvironment } from '../types'; -import { isPath } from './utils'; - -export default function assertIfHelperWithoutArguments(env: EmberASTPluginEnvironment): ASTPlugin { - let { moduleName } = env.meta; - - return { - name: 'assert-if-helper-without-arguments', - - visitor: { - BlockStatement(node: AST.BlockStatement) { - if (isPath(node.path) && isInvalidBlockIf(node.path, node.params)) { - assert( - `${blockAssertMessage(node.path.original)} ${calculateLocationDisplay( - moduleName, - node.loc - )}` - ); - } - }, - - MustacheStatement(node: AST.MustacheStatement) { - if (isPath(node.path) && isInvalidInlineIf(node.path, node.params)) { - assert( - `${inlineAssertMessage(node.path.original as string)} ${calculateLocationDisplay( - moduleName, - node.loc - )}` - ); - } - }, - - SubExpression(node: AST.SubExpression) { - if (isPath(node.path) && isInvalidInlineIf(node.path, node.params)) { - assert( - `${inlineAssertMessage(node.path.original)} ${calculateLocationDisplay( - moduleName, - node.loc - )}` - ); - } - }, - }, - }; -} - -function blockAssertMessage(original: string) { - return `#${original} requires a single argument.`; -} - -function inlineAssertMessage(original: string) { - return `The inline form of the '${original}' helper expects two or three arguments.`; -} - -function isInvalidInlineIf(path: AST.PathExpression, params: AST.Expression[]) { - return ( - isPath(path) && path.original === 'if' && (!params || params.length < 2 || params.length > 3) - ); -} - -function isInvalidBlockIf(path: AST.PathExpression, params: AST.Expression[]) { - return isPath(path) && path.original === 'if' && (!params || params.length !== 1); -} diff --git a/packages/ember-template-compiler/lib/plugins/index.ts b/packages/ember-template-compiler/lib/plugins/index.ts index ead78cda876..756d528d0f1 100644 --- a/packages/ember-template-compiler/lib/plugins/index.ts +++ b/packages/ember-template-compiler/lib/plugins/index.ts @@ -1,6 +1,5 @@ import AssertAgainstDynamicHelpersModifiers from './assert-against-dynamic-helpers-modifiers'; import AssertAgainstNamedBlocks from './assert-against-named-blocks'; -import AssertIfHelperWithoutArguments from './assert-if-helper-without-arguments'; import AssertInputHelperWithoutBlock from './assert-input-helper-without-block'; import AssertReservedNamedArguments from './assert-reserved-named-arguments'; import AssertSplattributeExpressions from './assert-splattribute-expression'; @@ -32,7 +31,6 @@ export const RESOLUTION_MODE_TRANSFORMS = Object.freeze( TransformLinkTo, AssertInputHelperWithoutBlock, TransformInElement, - AssertIfHelperWithoutArguments, AssertSplattributeExpressions, TransformEachTrackArray, TransformWrapMountAndOutlet, diff --git a/packages/ember-template-compiler/tests/plugins/assert-if-helper-without-arguments-test.js b/packages/ember-template-compiler/tests/plugins/assert-if-helper-without-arguments-test.js deleted file mode 100644 index 5f726a7b32d..00000000000 --- a/packages/ember-template-compiler/tests/plugins/assert-if-helper-without-arguments-test.js +++ /dev/null @@ -1,51 +0,0 @@ -import { compile } from '../../index'; -import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; - -moduleFor( - 'ember-template-compiler: assert-if-helper-without-argument', - class extends AbstractTestCase { - [`@test block if helper expects one argument`]() { - expectAssertion(() => { - compile(`{{#if}}aVal{{/if}}`, { - moduleName: 'baz/foo-bar', - }); - }, `#if requires a single argument. ('baz/foo-bar' @ L1:C0) `); - - expectAssertion(() => { - compile(`{{#if val1 val2}}aVal{{/if}}`, { - moduleName: 'baz/foo-bar', - }); - }, `#if requires a single argument. ('baz/foo-bar' @ L1:C0) `); - - expectAssertion(() => { - compile(`{{#if}}aVal{{/if}}`, { - moduleName: 'baz/foo-bar', - }); - }, `#if requires a single argument. ('baz/foo-bar' @ L1:C0) `); - } - - [`@test inline if helper expects between one and three arguments`]() { - expectAssertion(() => { - compile(`{{if}}`, { - moduleName: 'baz/foo-bar', - }); - }, `The inline form of the 'if' helper expects two or three arguments. ('baz/foo-bar' @ L1:C0) `); - - compile(`{{if foo bar baz}}`, { - moduleName: 'baz/foo-bar', - }); - } - - ['@test subexpression if helper expects between one and three arguments']() { - expectAssertion(() => { - compile(`{{input foo=(if)}}`, { - moduleName: 'baz/foo-bar', - }); - }, `The inline form of the 'if' helper expects two or three arguments. ('baz/foo-bar' @ L1:C12) `); - - compile(`{{some-thing foo=(if foo bar baz)}}`, { - moduleName: 'baz/foo-bar', - }); - } - } -); diff --git a/packages/ember/index.js b/packages/ember/index.js index fd2d5640a92..474e88a7b3a 100644 --- a/packages/ember/index.js +++ b/packages/ember/index.js @@ -115,12 +115,6 @@ import { TextField, TextArea, Input, - hash, - array, - concat, - get, - on, - fn, isSerializationFirstNode, } from '@ember/-internals/glimmer'; // eslint-disable-next-line import/no-unresolved @@ -139,7 +133,17 @@ import Engine from '@ember/engine'; 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, invokeHelper } from '@glimmer/runtime'; + +import { + templateOnlyComponent, + invokeHelper, + hash, + array, + concat, + get, + on, + fn, +} from '@glimmer/runtime'; import { componentCapabilities, diff --git a/yarn.lock b/yarn.lock index ec4a3f52f97..a6671cbd632 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1657,187 +1657,187 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@glimmer/compiler@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.72.0.tgz#71a7d0983ca7193bfee487519d76e2c70e02841d" - integrity sha512-nm9yNFIzilzfKrrtgJpCJeLxBFL3Iyt+FvBgFfyhOKl1O43YXTLBOK/19QhLZriq0jQGARzIIhvhuUstZpXs5A== - dependencies: - "@glimmer/interfaces" "0.72.0" - "@glimmer/syntax" "0.72.0" - "@glimmer/util" "0.72.0" - "@glimmer/wire-format" "0.72.0" +"@glimmer/compiler@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.73.0.tgz#206d3b3bf5de07bfa95591bc6aa9c43493e52bce" + integrity sha512-vBq4CNPdA1wdKysOshbkjUgy2YHc8IfPIdish4qIx7S3g2ibfH9+EfcFHwb+CrXnijG7dUrVMu/AUmuurbvTNQ== + dependencies: + "@glimmer/interfaces" "0.73.0" + "@glimmer/syntax" "0.73.0" + "@glimmer/util" "0.73.0" + "@glimmer/wire-format" "0.73.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/destroyable@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/destroyable/-/destroyable-0.72.0.tgz#68713e78294fd83f49ecaa39a7eb98e512c4e89e" - integrity sha512-Ku+plbghbGLT4cXqLAyG9GJiGRQ5QT+imGdnafqDY5GhWYu8d1lv/oTcSsZiYpMi0G+TG1bZmH3HgZqW4juBTA== +"@glimmer/destroyable@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/destroyable/-/destroyable-0.73.0.tgz#04a0ce1d31c6325c13f85831e63d392ad103646e" + integrity sha512-yx2Ci2s7Q0zY6A934a/eJBVofBg/YsuLv9et6FXVYgQFjb45V3Pm+lklitKCZ401kXKJqozTC08jHgka40U3rA== dependencies: "@glimmer/env" "0.1.7" - "@glimmer/global-context" "0.72.0" - "@glimmer/interfaces" "0.72.0" - "@glimmer/util" "0.72.0" + "@glimmer/global-context" "0.73.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/util" "0.73.0" -"@glimmer/encoder@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.72.0.tgz#76b3c243bffefdd0f2ec0938cc28cfdff466dde2" - integrity sha512-Pi7unh9ZGGig7WZbOpARYgAxN7h1i8EB5DNLeDE46fAK+zxZ6Fh5JOqgiv6dMIP3VF1plJ0Xft1FTZJSVjfQ9w== +"@glimmer/encoder@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.73.0.tgz#5ad9ebcdca8fc7952367ab4b0d77c8452cda96e7" + integrity sha512-v2jcMem2TFLP/VJF4HI+GPX9PEwkmcussyLjNG65ZMCcsqOKHcmGcXULtMxeQR4Y7PpjaZRwWCMpuGgL9QLo5Q== dependencies: "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.72.0" - "@glimmer/vm" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/vm" "0.73.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/global-context@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.72.0.tgz#258d10b3e8185e148ee7235fc00005a781b12317" - integrity sha512-OGKHFNLPYnWFr+B+seYpPGJDnXUlq7wBnFe/+ThGbe0gB411uKxAbrhdBFMx/lwjVY8U2xJzglomtGfGXHWj6A== +"@glimmer/global-context@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.73.0.tgz#273f757779a17595cb4cb76685c17087dc619bb8" + integrity sha512-DnatUdDcF6STNhN4aOFjSW5cn1lmgMpjaauwIKZSy9O45Eo8uqNCMpYRCKf4fkVmYVDRwg6N6ua0Sv0q6OlWSw== dependencies: "@glimmer/env" "^0.1.7" -"@glimmer/interfaces@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.72.0.tgz#34817afba6736f68974cfbd14825a88032d60a63" - integrity sha512-o5zLnfca4FogcO4wfmerLGHpmJHz5mfUUB7uxabnLHBI53ABu+Gfmeaaye24lgQI9NyaHY/eSJlz+GtRtvMnSg== +"@glimmer/interfaces@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.73.0.tgz#ea926b2542cf666a9a479e8aa67224cc11f7710d" + integrity sha512-DagAc0Ul+lrid54QKrUVctlKfloIZMRhaz/oaEJ3nVf4Nqz/6YtT3tOrJ+fOxLYjsDy3Dq0uJMDOHzdd6IqS2g== dependencies: "@simple-dom/interface" "^1.4.0" -"@glimmer/low-level@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.72.0.tgz#77da0900f1e06b55a8a6ec230928c5fc3f561a89" - integrity sha512-453Cm/yZmh4HCWQJzTuNQDYdggnJcyJfH/T1OT21MqqjoL0qyGLYBuOoKav+B+Z6fd4EgRJLOL8ceLd0pcEnGQ== +"@glimmer/low-level@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.73.0.tgz#70e42e35954ed07c544413bd5064cdd4aa2f6ce9" + integrity sha512-n52STqtO54R/1GUv+oe7TXjwIdLBaZ1/+DqWPsh5XlzIH/MY6RipNeCpaIKJDYdSshJYZEp6i/7x0NBfzmocdQ== -"@glimmer/manager@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/manager/-/manager-0.72.0.tgz#6629e59664c9c535f050327cb54d1bcf2c4376ec" - integrity sha512-X6AMzRHHWCRTrlbeuZk7+T81ItGrcp6rG9dPv9kp0/gt80m52Mf/pS+uQekS5ItMSzUpQ+LZnlXHHQHNuokKYQ== +"@glimmer/manager@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/manager/-/manager-0.73.0.tgz#7af1c290e5ad5ce0d38517367996452346b776d6" + integrity sha512-Sjn2eTBbDxS7fdr3tY2nfHQ34DTGmobNDUIwNGBv7RgNWJ6yCcgM3HYxfynK6AoCrzQyNcHkthefNtFRZOQJSQ== dependencies: - "@glimmer/destroyable" "0.72.0" + "@glimmer/destroyable" "0.73.0" "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.72.0" - "@glimmer/reference" "0.72.0" - "@glimmer/util" "0.72.0" - "@glimmer/validator" "0.72.0" - -"@glimmer/node@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.72.0.tgz#1ae8f3b9cf7405cef111c9b49b2795fa1a899488" - integrity sha512-dl2ax+CWFelwQrqnRWzCbM/+9RBj0KcS+JtV52Pt3Gq3/kdbAont50e/YlGu0AE2vJvPvg2s9kVqlDQ5MTKQ8Q== - dependencies: - "@glimmer/interfaces" "0.72.0" - "@glimmer/runtime" "0.72.0" - "@glimmer/util" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/reference" "0.73.0" + "@glimmer/util" "0.73.0" + "@glimmer/validator" "0.73.0" + +"@glimmer/node@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.73.0.tgz#ad1fb21423044b78781c2a0a522ca74b7655312d" + integrity sha512-IVQuV+jezP5L81KwswnyW8vT+M+ef+KhgMtW3gI8+6D5Msdx06QUrLzPjbcFyLwHUZ6AHO3IOydEAsk8JclgCg== + dependencies: + "@glimmer/interfaces" "0.73.0" + "@glimmer/runtime" "0.73.0" + "@glimmer/util" "0.73.0" "@simple-dom/document" "^1.4.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/opcode-compiler@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.72.0.tgz#bce10a2bfc65da6aab4d50f7b14b3cce970bf09d" - integrity sha512-hUjNG1KzspeHigFRyagKQr512o8k8JHBED1sdpRAn5WPNzl8g73sJpFYofRJrobUaDnKq0u0onxlXAuSwSf96g== +"@glimmer/opcode-compiler@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.73.0.tgz#302b3f2d3ca0c8fa6b4dded1230aa63e53007208" + integrity sha512-5RTVLx1CpdTeTNeNw9Nrbc8FKeTACrptacfL5pBD/3hWkj2XqaXIpsuMv6rXm1oGrr79KhFqpSimPM1qcdPGAg== dependencies: - "@glimmer/encoder" "0.72.0" + "@glimmer/encoder" "0.73.0" "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.72.0" - "@glimmer/reference" "0.72.0" - "@glimmer/util" "0.72.0" - "@glimmer/vm" "0.72.0" - "@glimmer/wire-format" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/reference" "0.73.0" + "@glimmer/util" "0.73.0" + "@glimmer/vm" "0.73.0" + "@glimmer/wire-format" "0.73.0" -"@glimmer/owner@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/owner/-/owner-0.72.0.tgz#87adc14fb576a3d0dbc6ead1d47d8cda30dff4bc" - integrity sha512-P2bB/0oE44PfgfVv/isPsKikVWbyzdfTtRxJKMqmtIDW0F1oZ5FaLJqT3P7TehfThSl45f3RyWcpQFTxiHOcbQ== +"@glimmer/owner@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/owner/-/owner-0.73.0.tgz#a76378812f5def9cc47bcecb09caf0838111fcc7" + integrity sha512-fJ/ZzGNbGZiHwTlohqvPOXLdStmlm57iNuKg3PmqXYOpOfe4Ga/l7qbwDeat/+vBskVT7ZWitawM6lsyRtuVlg== dependencies: - "@glimmer/util" "0.72.0" + "@glimmer/util" "0.73.0" -"@glimmer/program@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.72.0.tgz#2b29943b7fc176a1ee2b39522b797ed8579dacd4" - integrity sha512-IGg0FXPNAGnGYWKpFjpYrRfRfHvK6DvxW/BZuNaPR4ZUqvlYnJ5YXlKKBJQ5v4AGwXOgqDwZ/SL+fNAcAKkTOw== +"@glimmer/program@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.73.0.tgz#a6a368e0c9d7e5a47375577a93f5773fbace8d8c" + integrity sha512-P631EYGtkOJ+05oNy4taxh1G+D9Hd12uc5STUB9jRutxN/6U4WJy2+V935Vyac2disuKTj7RVQuWI0EE6BAXgQ== dependencies: - "@glimmer/encoder" "0.72.0" + "@glimmer/encoder" "0.73.0" "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.72.0" - "@glimmer/manager" "0.72.0" - "@glimmer/opcode-compiler" "0.72.0" - "@glimmer/util" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/manager" "0.73.0" + "@glimmer/opcode-compiler" "0.73.0" + "@glimmer/util" "0.73.0" -"@glimmer/reference@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.72.0.tgz#2b0e3fcd7385c663dcda3525e85b2eefd9b6f8a4" - integrity sha512-rae42xIBYM6F8ht0KDmiQ+ycOX32umQBRNaGgCrbe1i84w/hkuqzBFyp/pO47IxE0Ob5TXjU8BBxAWQZKVdiJQ== +"@glimmer/reference@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.73.0.tgz#77d421254c0d58dd0bdcb341bdcb76744d0b28ba" + integrity sha512-m2vWCAD0bYLI03EvvJo4ow8a2cmfpLi7mHT+s9tMER7c7/TNenLmh6/5A7NKzbwCb6onqXQGOT4Sb/vAZqFgQw== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.72.0" - "@glimmer/interfaces" "0.72.0" - "@glimmer/util" "0.72.0" - "@glimmer/validator" "0.72.0" + "@glimmer/global-context" "0.73.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/util" "0.73.0" + "@glimmer/validator" "0.73.0" -"@glimmer/runtime@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.72.0.tgz#4df28a0472f45ab8ccf59560306a621cdd03dbdb" - integrity sha512-jsGuhKALuNQLUCBEdmBcLeDJPvSgNuQpukIYttt5cnvPNsLa5oInzUIoP4A9XZ9bYG0HqMiWBPOCyqjH2mFfPQ== +"@glimmer/runtime@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.73.0.tgz#621a354ed7040afd29fedd8acd78ba3eb7cd8b52" + integrity sha512-O7YJSDbw5zRSdAcGBSi1YIWtoFmDqYR1HK7eSyLpobHOyhNLOYajdK0QLFreB9RZSELHACMWUbHpEQa3NPo5RA== dependencies: - "@glimmer/destroyable" "0.72.0" + "@glimmer/destroyable" "0.73.0" "@glimmer/env" "0.1.7" - "@glimmer/global-context" "0.72.0" - "@glimmer/interfaces" "0.72.0" - "@glimmer/low-level" "0.72.0" - "@glimmer/owner" "0.72.0" - "@glimmer/program" "0.72.0" - "@glimmer/reference" "0.72.0" - "@glimmer/util" "0.72.0" - "@glimmer/validator" "0.72.0" - "@glimmer/vm" "0.72.0" - "@glimmer/wire-format" "0.72.0" + "@glimmer/global-context" "0.73.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/low-level" "0.73.0" + "@glimmer/owner" "0.73.0" + "@glimmer/program" "0.73.0" + "@glimmer/reference" "0.73.0" + "@glimmer/util" "0.73.0" + "@glimmer/validator" "0.73.0" + "@glimmer/vm" "0.73.0" + "@glimmer/wire-format" "0.73.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/syntax@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.72.0.tgz#a7c22b8d1d7fb2c307d0df3ad68f826905a81794" - integrity sha512-HOA+dsI+tsqEvTZDZZWdnsV9wjAfCoKzmkYnzWOM+5RXOU9muRfRVp0wdu1cYF7J50QKp7gCmHLxzdLG7XcpDg== +"@glimmer/syntax@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.73.0.tgz#f45f820d19fba8e7d87054f4bb87b7ce9edd1aac" + integrity sha512-dgxEUocjkbtlfkDPLFDkJO+RhZigffnOeDkdDAR4lbsEFgm0Pd3zNvnFhYyXSg/UUzioLdknyuixlwihG9OGow== dependencies: - "@glimmer/interfaces" "0.72.0" - "@glimmer/util" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/util" "0.73.0" "@handlebars/parser" "^2.0.0" simple-html-tokenizer "^0.5.10" -"@glimmer/util@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.72.0.tgz#77fdce5c14649651117d5e795b2870c48158b2c9" - integrity sha512-OlVmdMaV1o7UxWqhmuGXOlgpXgtynwp3zD5ypdWuf6IzNDeFf2OAsHaZY+GYqE+uDjx1u6xb+Q9xTXk7U7Bhow== +"@glimmer/util@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.73.0.tgz#21c93fd7f822ba641485953c3ad4d7e929ec17c1" + integrity sha512-S8DfVvNAIOUxSawKjSSxa8U6yu2VVcZjaMVy4yoJR0QKpo++V6x1HDBjDOQU0xKgr98lCJqoAnPKZT6t1/eahg== dependencies: "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.72.0" + "@glimmer/interfaces" "0.73.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/validator@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.72.0.tgz#1c2f4b0702c82584f9ea1f5675b4aa00bb0464c7" - integrity sha512-Je1zk5iJjStjV3acgQ3Fl2lVnLyhvh+0eyJ/8+FIHp3M3IyR32D/yShYCHMIQhTppXuSV9WZwxif3KsrGxlPqA== +"@glimmer/validator@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.73.0.tgz#d523904f4faff0a3af570d215d679bc7c2148e29" + integrity sha512-fAs3XREHTw/ePYkAM8lKkNeo0//d/TJYWn2iM5SuPPglRJGATg/8p1Nk2iw31BofPvsT3WAnFbr0aWGGZF9paQ== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.72.0" + "@glimmer/global-context" "0.73.0" -"@glimmer/vm@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.72.0.tgz#132d94fc5bd663e066419a0895412561847fdfd8" - integrity sha512-gaMcw0uQUwEzIl9vPKLkbtu+icuT1zQcsavCmjHiV1yWqM8Hv8JZqqEvErwrsxQUFEBvJ76CUG/lDDUgd3+B8w== +"@glimmer/vm@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.73.0.tgz#286b7fd3049bd922e6e61293ff040e3a4a392210" + integrity sha512-DokPu8ls8akbQcGwPpm1Z4I9m81de4PqkC8hhkMFQ9qj8BAA/4LRoJ5nxaJFJTq4Ub+kKIZ5owzGosSnucGZEg== dependencies: - "@glimmer/interfaces" "0.72.0" - "@glimmer/util" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/util" "0.73.0" -"@glimmer/wire-format@0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.72.0.tgz#cde189a6a7813dd378033b3e967b1cb73b0edee5" - integrity sha512-15WjtP9sxMh6R4eujxf1JtZGrHpgIym1aD7XrgEt+048K2en5vOdjsHV5R3zxhhbu9tXxCVwZuVJMGfits8n3Q== +"@glimmer/wire-format@0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.73.0.tgz#2069aa68763dc409a3ea28b3819298376b4de5be" + integrity sha512-I3iLdUXClTDUuusq+/FiYA3g6Crr8KW4VmX6qgOxE4aG8kWqnlmDZNX73RvWJVDS0t7t/Cjrv+YwOf51DA75pg== dependencies: - "@glimmer/interfaces" "0.72.0" - "@glimmer/util" "0.72.0" + "@glimmer/interfaces" "0.73.0" + "@glimmer/util" "0.73.0" "@handlebars/parser@^2.0.0": version "2.0.0"