ember-source 4.0.0-beta.8 → 4.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build-metadata.json +3 -3
  3. package/dist/dependencies/@glimmer/manager.js +19 -98
  4. package/dist/dependencies/@glimmer/opcode-compiler.js +9 -146
  5. package/dist/dependencies/@glimmer/runtime.js +1 -55
  6. package/dist/dependencies/@glimmer/validator.js +19 -51
  7. package/dist/ember-template-compiler.js +292 -276
  8. package/dist/ember-template-compiler.map +1 -1
  9. package/dist/ember-testing.js +1 -1
  10. package/dist/ember-testing.map +1 -1
  11. package/dist/ember.debug.js +3070 -5987
  12. package/dist/ember.debug.map +1 -1
  13. package/dist/header/license.js +1 -1
  14. package/dist/packages/@ember/-internals/environment/index.js +0 -15
  15. package/dist/packages/@ember/-internals/glimmer/index.js +4816 -6761
  16. package/dist/packages/@ember/-internals/metal/index.js +4 -14
  17. package/dist/packages/@ember/-internals/routing/lib/services/routing.js +1 -1
  18. package/dist/packages/@ember/-internals/routing/lib/system/route.js +1 -41
  19. package/dist/packages/@ember/-internals/routing/lib/system/router.js +13 -47
  20. package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -43
  21. package/dist/packages/@ember/-internals/views/index.js +0 -1
  22. package/dist/packages/@ember/canary-features/index.js +0 -2
  23. package/dist/packages/@ember/component/index.js +1 -1
  24. package/dist/packages/@ember/deprecated-features/index.js +0 -1
  25. package/dist/packages/@ember/routing/index.js +1 -1
  26. package/dist/packages/ember/index.js +2 -48
  27. package/dist/packages/ember/version.js +1 -1
  28. package/docs/data.json +276 -1046
  29. package/package.json +15 -15
  30. package/dist/packages/@ember/-internals/views/lib/mixins/text_support.js +0 -345
  31. package/dist/packages/@ember/component/checkbox.js +0 -17
  32. package/dist/packages/@ember/component/text-area.js +0 -17
  33. package/dist/packages/@ember/component/text-field.js +0 -17
  34. package/dist/packages/@ember/routing/link-component.js +0 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Ember Changelog
2
2
 
3
+ ### v4.0.0-beta.9 (November 20, 2021)
4
+
5
+ - [#19749](https://github.com/emberjs/ember.js/pull/19749) [CLEANUP] Remove `deprecate-router-events` support code
6
+ - [#19762](https://github.com/emberjs/ember.js/pull/19762) [CLEANUP] Update GlimmerVM to 0.81
7
+ - removes deprecation of mutations during helper compute
8
+ - removes deprecation of mutations during unknownProperty
9
+ - `@glimmer/integration-tests`, `@glimmer/manager`, `@glimmer/validator`
10
+ * [#1330](https://github.com/glimmerjs/glimmer-vm/pull/1330) Remove deprecated support for mutation after consumption during certain manager hooks ([@snewcomer](https://github.com/snewcomer))
11
+ - `@glimmer/manager`
12
+ * [#1328](https://github.com/glimmerjs/glimmer-vm/pull/1328) Remove deprecated Component Manager version 3.4 ([@nlfurniss](https://github.com/nlfurniss))
13
+ - `@glimmer/integration-tests`, `@glimmer/manager`
14
+ * [#1329](https://github.com/glimmerjs/glimmer-vm/pull/1329) Remove deprecated Modifier Manager version 3.13 ([@nlfurniss](https://github.com/nlfurniss))
15
+ - [#19806](https://github.com/emberjs/ember.js/pull/19806) [CLEANUP] Drop export of built-ins, remove legacy components
16
+
3
17
  ### v4.0.0-beta.8 (November 5, 2021)
4
18
 
5
19
  - [#19823](https://github.com/emberjs/ember.js/pull/19823) / [#19828](https://github.com/emberjs/ember.js/pull/19828) [BUGFIX] Fix deprecation `until` and link for Component.reopenClass and Component.reopen
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.0.0-beta.8",
2
+ "version": "4.0.0-beta.9",
3
3
  "buildType": "tag",
4
- "SHA": "78f8fbf3bebc724e39dd0d6806f28c8021764866",
5
- "assetPath": "/tag/shas/78f8fbf3bebc724e39dd0d6806f28c8021764866.tgz"
4
+ "SHA": "c4be3a86a7c03860bde7f4928ff6fc54a3216e24",
5
+ "assetPath": "/tag/shas/c4be3a86a7c03860bde7f4928ff6fc54a3216e24.tgz"
6
6
  }
@@ -1,9 +1,8 @@
1
1
  import { DEBUG } from '@glimmer/env';
2
- import { debugToString, _WeakSet, HAS_NATIVE_PROXY, assign, dict } from '@glimmer/util';
2
+ import { debugToString, _WeakSet, HAS_NATIVE_PROXY } from '@glimmer/util';
3
3
  import { valueForRef, createConstRef, createComputeRef, UNDEFINED_REFERENCE } from '@glimmer/reference';
4
- import { track, deprecateMutationsInTrackingTransaction, createUpdatableTag, untrack } from '@glimmer/validator';
4
+ import { track, createUpdatableTag, untrack } from '@glimmer/validator';
5
5
  import { registerDestructor, associateDestroyableChild } from '@glimmer/destroyable';
6
- import { setOwner } from '@glimmer/owner';
7
6
 
8
7
  const COMPONENT_MANAGERS = new WeakMap();
9
8
  const MODIFIER_MANAGERS = new WeakMap();
@@ -382,16 +381,11 @@ const CAPABILITIES = {
382
381
  hasSubOwner: false
383
382
  };
384
383
  function componentCapabilities(managerAPI, options = {}) {
385
- if (DEBUG && managerAPI !== '3.4' && managerAPI !== '3.13') {
384
+ if (DEBUG && managerAPI !== '3.13') {
386
385
  throw new Error('Invalid component manager compatibility specified');
387
386
  }
388
387
 
389
- let updateHook = true;
390
-
391
- if (managerAPI === '3.13') {
392
- updateHook = Boolean(options.updateHook);
393
- }
394
-
388
+ let updateHook = Boolean(options.updateHook);
395
389
  return buildCapabilities({
396
390
  asyncLifeCycleCallbacks: Boolean(options.asyncLifecycleCallbacks),
397
391
  destructor: Boolean(options.destructor),
@@ -456,7 +450,7 @@ class CustomComponentManager {
456
450
 
457
451
  if (DEBUG && !FROM_CAPABILITIES.has(delegate.capabilities)) {
458
452
  // TODO: This error message should make sense in both Ember and Glimmer https://github.com/glimmerjs/glimmer-vm/issues/1200
459
- throw new Error(`Custom component managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.4' | '3.13')\` (imported via \`import { capabilities } from '@ember/component';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
453
+ throw new Error(`Custom component managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.13')\` (imported via \`import { capabilities } from '@ember/component';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
460
454
  }
461
455
 
462
456
  componentManagerDelegates.set(owner, delegate);
@@ -468,16 +462,7 @@ class CustomComponentManager {
468
462
  create(owner, definition, vmArgs) {
469
463
  let delegate = this.getDelegateFor(owner);
470
464
  let args = argsProxyFor(vmArgs.capture(), 'component');
471
- let component;
472
-
473
- if (DEBUG && deprecateMutationsInTrackingTransaction !== undefined) {
474
- deprecateMutationsInTrackingTransaction(() => {
475
- component = delegate.createComponent(definition, args);
476
- });
477
- } else {
478
- component = delegate.createComponent(definition, args);
479
- }
480
-
465
+ let component = delegate.createComponent(definition, args);
481
466
  return new CustomComponentState(component, delegate, args);
482
467
  }
483
468
 
@@ -563,16 +548,12 @@ class CustomComponentState {
563
548
  }
564
549
 
565
550
  function modifierCapabilities(managerAPI, optionalFeatures = {}) {
566
- if (DEBUG && managerAPI !== '3.13' && managerAPI !== '3.22') {
551
+ if (DEBUG && managerAPI !== '3.22') {
567
552
  throw new Error('Invalid modifier manager compatibility specified');
568
553
  }
569
554
 
570
555
  return buildCapabilities({
571
- disableAutoTracking: Boolean(optionalFeatures.disableAutoTracking),
572
- useArgsProxy: managerAPI === '3.13' ? false : true,
573
- // This capability is used in Ember, exclusively in resolution mode. See the
574
- // Ember glimmer resolver for details.
575
- passFactoryToCreate: managerAPI === '3.13'
556
+ disableAutoTracking: Boolean(optionalFeatures.disableAutoTracking)
576
557
  });
577
558
  }
578
559
  /**
@@ -620,7 +601,7 @@ class CustomModifierManager {
620
601
 
621
602
  if (DEBUG && !FROM_CAPABILITIES.has(delegate.capabilities)) {
622
603
  // TODO: This error message should make sense in both Ember and Glimmer https://github.com/glimmerjs/glimmer-vm/issues/1200
623
- throw new Error(`Custom modifier managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.13' | '3.22')\` (imported via \`import { capabilities } from '@ember/modifier';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
604
+ throw new Error(`Custom modifier managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.22')\` (imported via \`import { capabilities } from '@ember/modifier';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
624
605
  }
625
606
 
626
607
  componentManagerDelegates.set(owner, delegate);
@@ -631,67 +612,23 @@ class CustomModifierManager {
631
612
 
632
613
  create(owner, element, definition, capturedArgs) {
633
614
  let delegate = this.getDelegateFor(owner);
634
- let {
635
- useArgsProxy,
636
- passFactoryToCreate
637
- } = delegate.capabilities;
638
- let argsProxy = argsProxyFor(capturedArgs, 'modifier');
639
- let args = useArgsProxy ? argsProxy : reifyArgs(capturedArgs);
640
- let instance;
641
- let factoryOrDefinition = definition;
642
-
643
- if (passFactoryToCreate) {
644
- // Make a fake factory. While not perfect, this should generally prevent
645
- // breakage in users of older modifier capabilities.
646
- factoryOrDefinition = {
647
- create(args) {
648
- let params = assign({}, args);
649
- setOwner(params, owner);
650
- return definition.create(args);
651
- },
652
-
653
- class: definition
654
- };
655
- }
656
-
657
- if (DEBUG && deprecateMutationsInTrackingTransaction !== undefined) {
658
- deprecateMutationsInTrackingTransaction(() => {
659
- instance = delegate.createModifier(factoryOrDefinition, args);
660
- });
661
- } else {
662
- instance = delegate.createModifier(factoryOrDefinition, args);
663
- }
664
-
615
+ let args = argsProxyFor(capturedArgs, 'modifier');
616
+ let instance = delegate.createModifier(definition, args);
665
617
  let tag = createUpdatableTag();
666
618
  let state;
667
-
668
- if (useArgsProxy) {
669
- state = {
670
- tag,
671
- element,
672
- delegate,
673
- args,
674
- modifier: instance
675
- };
676
- } else {
677
- state = {
678
- tag,
679
- element,
680
- modifier: instance,
681
- delegate,
682
-
683
- get args() {
684
- return reifyArgs(capturedArgs);
685
- }
686
-
687
- };
688
- }
619
+ state = {
620
+ tag,
621
+ element,
622
+ delegate,
623
+ args,
624
+ modifier: instance
625
+ };
689
626
 
690
627
  if (DEBUG) {
691
628
  state.debugName = typeof definition === 'function' ? definition.name : definition.toString();
692
629
  }
693
630
 
694
- registerDestructor(state, () => delegate.destroyModifier(instance, argsProxy));
631
+ registerDestructor(state, () => delegate.destroyModifier(instance, args));
695
632
  return state;
696
633
  }
697
634
 
@@ -745,22 +682,6 @@ class CustomModifierManager {
745
682
  }
746
683
 
747
684
  }
748
- function reifyArgs({
749
- named,
750
- positional
751
- }) {
752
- let reifiedNamed = dict();
753
-
754
- for (let key in named) {
755
- reifiedNamed[key] = valueForRef(named[key]);
756
- }
757
-
758
- let reifiedPositional = positional.map(valueForRef);
759
- return {
760
- named: reifiedNamed,
761
- positional: reifiedPositional
762
- };
763
- }
764
685
 
765
686
  function helperCapabilities(managerAPI, options = {}) {
766
687
  if (DEBUG && managerAPI !== '3.23') {
@@ -1,4 +1,4 @@
1
- import { dict, assign, isSmallInt, debugToString, EMPTY_ARRAY, EMPTY_STRING_ARRAY, encodeImmediate, Stack, encodeHandle, unwrapTemplate } from '@glimmer/util';
1
+ import { dict, assign, isSmallInt, debugToString, EMPTY_ARRAY, EMPTY_STRING_ARRAY, encodeImmediate, Stack, encodeHandle } from '@glimmer/util';
2
2
  import { DEBUG } from '@glimmer/env';
3
3
  import { $v0, $fp, $s0, $s1, $sp, isMachineOp } from '@glimmer/vm';
4
4
  import { assert, deprecate } from '@glimmer/global-context';
@@ -353,8 +353,7 @@ function resolveComponentOrHelper(resolver, constants, meta, [, expr, {
353
353
  */
354
354
 
355
355
  function resolveOptionalHelper(resolver, constants, meta, [, expr, {
356
- ifHelper,
357
- ifFallback
356
+ ifHelper
358
357
  }]) {
359
358
  let {
360
359
  upvars,
@@ -363,9 +362,7 @@ function resolveOptionalHelper(resolver, constants, meta, [, expr, {
363
362
  let name = upvars[expr[1]];
364
363
  let helper = resolver.lookupHelper(name, owner);
365
364
 
366
- if (helper === null) {
367
- ifFallback(name, meta.moduleName);
368
- } else {
365
+ if (helper) {
369
366
  ifHelper(constants.helper(helper, name), name, meta.moduleName);
370
367
  }
371
368
  }
@@ -376,8 +373,7 @@ function resolveOptionalHelper(resolver, constants, meta, [, expr, {
376
373
  function resolveOptionalComponentOrHelper(resolver, constants, meta, [, expr, {
377
374
  ifComponent,
378
375
  ifHelper,
379
- ifValue,
380
- ifFallback
376
+ ifValue
381
377
  }]) {
382
378
  let type = expr[0];
383
379
 
@@ -432,10 +428,7 @@ function resolveOptionalComponentOrHelper(resolver, constants, meta, [, expr, {
432
428
 
433
429
  if (helper !== null) {
434
430
  ifHelper(constants.helper(helper, name));
435
- return;
436
431
  }
437
-
438
- ifFallback(name);
439
432
  }
440
433
  }
441
434
 
@@ -533,28 +526,6 @@ EXPRESSIONS.add(31
533
526
  , sym, _handle => {// TODO: Implement in strict mode
534
527
  });
535
528
  });
536
- EXPRESSIONS.add(33
537
- /* GetFreeAsFallback */
538
- , (op, [, freeVar, path]) => {
539
- op(1010
540
- /* ResolveLocal */
541
- , freeVar, (name, moduleName) => {
542
- if (DEBUG) {
543
- let propertyPath = path ? [name, ...path].join('.') : name;
544
- deprecate(`The \`${propertyPath}\` property path was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${propertyPath}}}`, false, {
545
- id: 'this-property-fallback'
546
- });
547
- }
548
-
549
- op(21
550
- /* GetVariable */
551
- , 0);
552
- op(22
553
- /* GetProperty */
554
- , name);
555
- });
556
- withPath(op, path);
557
- });
558
529
  EXPRESSIONS.add(34
559
530
  /* GetFreeAsComponentOrHelperHeadOrThisFallback */
560
531
  , () => {
@@ -576,17 +547,6 @@ EXPRESSIONS.add(36
576
547
  , expr$$1, {
577
548
  ifHelper: handle => {
578
549
  Call(op, handle, null, null);
579
- },
580
- ifFallback: (name, moduleName) => {
581
- deprecate(`The \`${name}\` property was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${name}}}`, false, {
582
- id: 'this-property-fallback'
583
- });
584
- op(21
585
- /* GetVariable */
586
- , 0);
587
- op(22
588
- /* GetProperty */
589
- , name);
590
550
  }
591
551
  });
592
552
  });
@@ -608,17 +568,6 @@ EXPRESSIONS.add(99
608
568
  id: 'argument-less-helper-paren-less-invocation'
609
569
  });
610
570
  Call(op, handle, null, null);
611
- },
612
- ifFallback: (name, moduleName) => {
613
- deprecate(`The \`${name}\` property was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${name}}}`, false, {
614
- id: 'this-property-fallback'
615
- });
616
- op(21
617
- /* GetVariable */
618
- , 0);
619
- op(22
620
- /* GetProperty */
621
- , name);
622
571
  }
623
572
  });
624
573
  });
@@ -801,7 +750,6 @@ function meta(layout) {
801
750
 
802
751
  let [, symbols,, upvars] = layout.block;
803
752
  return {
804
- asPartial: layout.asPartial || false,
805
753
  evalSymbols: evalSymbols(layout),
806
754
  upvars: upvars,
807
755
  scopeValues: (_b = (_a = layout.scope) === null || _a === void 0 ? void 0 : _a.call(layout)) !== null && _b !== void 0 ? _b : null,
@@ -2038,27 +1986,6 @@ STATEMENTS.add(8
2038
1986
  InvokeDynamicComponent(op, expr$$1, elementBlock, null, named, blocks, true, true);
2039
1987
  }
2040
1988
  });
2041
- STATEMENTS.add(19
2042
- /* Partial */
2043
- , (op, [, name, evalInfo]) => {
2044
- ReplayableIf(op, () => {
2045
- expr(op, name);
2046
- op(33
2047
- /* Dup */
2048
- , $sp, 0);
2049
- return 2;
2050
- }, () => {
2051
- op(101
2052
- /* InvokePartial */
2053
- , evalSymbolsOperand(), evalInfo);
2054
- op(40
2055
- /* PopScope */
2056
- );
2057
- op(1
2058
- /* PopFrame */
2059
- );
2060
- });
2061
- });
2062
1989
  STATEMENTS.add(18
2063
1990
  /* Yield */
2064
1991
  , (op, [, to, params]) => YieldBlock(op, to, params));
@@ -2112,31 +2039,6 @@ STATEMENTS.add(1
2112
2039
  op(1
2113
2040
  /* PopFrame */
2114
2041
  );
2115
- },
2116
-
2117
- ifFallback(_name) {
2118
- op(0
2119
- /* PushFrame */
2120
- );
2121
- op(1010
2122
- /* ResolveLocal */
2123
- , value[1], (name, moduleName) => {
2124
- deprecate(`The \`${name}\` property was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${name}}}`, false, {
2125
- id: 'this-property-fallback'
2126
- });
2127
- op(21
2128
- /* GetVariable */
2129
- , 0);
2130
- op(22
2131
- /* GetProperty */
2132
- , name);
2133
- });
2134
- op(3
2135
- /* InvokeStatic */
2136
- , stdlibOperand('cautious-append'));
2137
- op(1
2138
- /* PopFrame */
2139
- );
2140
2042
  }
2141
2043
 
2142
2044
  });
@@ -2567,16 +2469,8 @@ function encodeOp(encoder, constants, resolver, meta, op) {
2567
2469
  :
2568
2470
  let freeVar = op[1];
2569
2471
  let name = meta.upvars[freeVar];
2570
-
2571
- if (meta.asPartial === true) {
2572
- encoder.push(constants, 102
2573
- /* ResolveMaybeLocal */
2574
- , name);
2575
- } else {
2576
- let then = op[2];
2577
- then(name, meta.moduleName);
2578
- }
2579
-
2472
+ let andThen = op[2];
2473
+ andThen(name, meta.moduleName);
2580
2474
  break;
2581
2475
 
2582
2476
  case 1011
@@ -2860,7 +2754,6 @@ function compileStd(context) {
2860
2754
  return new StdLib(mainHandle, trustingGuardedDynamicAppend, cautiousGuardedDynamicAppend, trustingGuardedNonDynamicAppend, cautiousGuardedNonDynamicAppend);
2861
2755
  }
2862
2756
  const STDLIB_META = {
2863
- asPartial: false,
2864
2757
  evalSymbols: null,
2865
2758
  upvars: null,
2866
2759
  moduleName: 'stdlib',
@@ -2938,24 +2831,6 @@ const MINIMAL_CAPABILITIES = {
2938
2831
  hasSubOwner: false
2939
2832
  };
2940
2833
 
2941
- class PartialDefinitionImpl {
2942
- constructor(name, // for debugging
2943
- template) {
2944
- this.name = name;
2945
- this.template = template;
2946
- }
2947
-
2948
- getPartial(context) {
2949
- let partial = unwrapTemplate(this.template).asPartial();
2950
- let handle = partial.compile(context);
2951
- return {
2952
- symbolTable: partial.symbolTable,
2953
- handle
2954
- };
2955
- }
2956
-
2957
- }
2958
-
2959
2834
  class WrappedBuilder {
2960
2835
  constructor(layout, moduleName) {
2961
2836
  this.layout = layout;
@@ -3094,7 +2969,6 @@ class TemplateImpl {
3094
2969
  this.parsedLayout = parsedLayout;
3095
2970
  this.result = 'ok';
3096
2971
  this.layout = null;
3097
- this.partial = null;
3098
2972
  this.wrappedLayout = null;
3099
2973
  }
3100
2974
 
@@ -3117,25 +2991,14 @@ class TemplateImpl {
3117
2991
 
3118
2992
  asLayout() {
3119
2993
  if (this.layout) return this.layout;
3120
- return this.layout = compilable(assign({}, this.parsedLayout, {
3121
- asPartial: false
3122
- }), this.moduleName);
3123
- }
3124
-
3125
- asPartial() {
3126
- if (this.partial) return this.partial;
3127
- return this.partial = compilable(assign({}, this.parsedLayout, {
3128
- asPartial: true
3129
- }), this.moduleName);
2994
+ return this.layout = compilable(assign({}, this.parsedLayout), this.moduleName);
3130
2995
  }
3131
2996
 
3132
2997
  asWrappedLayout() {
3133
2998
  if (this.wrappedLayout) return this.wrappedLayout;
3134
- return this.wrappedLayout = new WrappedBuilder(assign({}, this.parsedLayout, {
3135
- asPartial: false
3136
- }), this.moduleName);
2999
+ return this.wrappedLayout = new WrappedBuilder(assign({}, this.parsedLayout), this.moduleName);
3137
3000
  }
3138
3001
 
3139
3002
  }
3140
3003
 
3141
- export { debugCompiler, compileStatements, compilable, InvokeStaticBlockWithStack as invokeStaticBlockWithStack, InvokeStaticBlock as invokeStaticBlock, compileStd, meta, StdLib, PartialDefinitionImpl, templateFactory, templateCacheCounters, WrappedBuilder, EMPTY_BLOCKS, CompileTimeCompilationContextImpl, programCompilationContext, templateCompilationContext, DEFAULT_CAPABILITIES, MINIMAL_CAPABILITIES };
3004
+ export { debugCompiler, compileStatements, compilable, InvokeStaticBlockWithStack as invokeStaticBlockWithStack, InvokeStaticBlock as invokeStaticBlock, compileStd, meta, StdLib, templateFactory, templateCacheCounters, WrappedBuilder, EMPTY_BLOCKS, CompileTimeCompilationContextImpl, programCompilationContext, templateCompilationContext, DEFAULT_CAPABILITIES, MINIMAL_CAPABILITIES };
@@ -1,4 +1,4 @@
1
- import { assign, symbol, Stack, fillNulls, _WeakSet, isObject, dict, emptyArray, EMPTY_STRING_ARRAY, debugToString, decodeHandle, decodeImmediate, isHandle, unwrapTemplate, unwrapHandle, clearElement, buildUntouchableThis, HAS_NATIVE_PROXY, isDict } from '@glimmer/util';
1
+ import { assign, symbol, Stack, fillNulls, _WeakSet, isObject, dict, emptyArray, EMPTY_STRING_ARRAY, debugToString, decodeHandle, decodeImmediate, isHandle, unwrapTemplate, clearElement, unwrapHandle, buildUntouchableThis, HAS_NATIVE_PROXY, isDict } from '@glimmer/util';
2
2
  import { UNDEFINED_REFERENCE, valueForRef, createComputeRef, createDebugAliasRef, childRefFor, TRUE_REFERENCE, FALSE_REFERENCE, isConstRef, createPrimitiveRef, NULL_REFERENCE, createConstRef, createIteratorRef, updateRef, createIteratorItemRef, isInvokableRef } from '@glimmer/reference';
3
3
  import { warnIfStyleNotTrusted, toBool, assertGlobalContextWasSet, deprecate, getPath, setPath } from '@glimmer/global-context';
4
4
  import { DEBUG } from '@glimmer/env';
@@ -3903,60 +3903,6 @@ APPEND_OPCODES.add(103
3903
3903
  callback(valueForRef(vm.getSelf()), path => valueForRef(inspector.get(path)));
3904
3904
  });
3905
3905
 
3906
- APPEND_OPCODES.add(101
3907
- /* InvokePartial */
3908
- , (vm, {
3909
- op1: _symbols,
3910
- op2: _evalInfo
3911
- }) => {
3912
- let {
3913
- [CONSTANTS]: constants,
3914
- stack
3915
- } = vm;
3916
- let name = valueForRef(stack.pop());
3917
- let outerScope = vm.scope();
3918
- let owner = outerScope.owner;
3919
- let outerSymbols = constants.getArray(_symbols);
3920
- let evalInfo = constants.getArray(decodeHandle(_evalInfo));
3921
- let definition = vm.runtime.resolver.lookupPartial(name, owner);
3922
- let {
3923
- symbolTable,
3924
- handle: vmHandle
3925
- } = definition.getPartial(vm.context);
3926
- {
3927
- let partialSymbols = symbolTable.symbols;
3928
- let partialScope = vm.pushRootScope(partialSymbols.length, owner);
3929
- let evalScope = outerScope.getEvalScope();
3930
- partialScope.bindEvalScope(evalScope);
3931
- partialScope.bindSelf(outerScope.getSelf());
3932
- let locals = Object.create(outerScope.getPartialMap());
3933
-
3934
- for (let i = 0; i < evalInfo.length; i++) {
3935
- let slot = evalInfo[i];
3936
-
3937
- if (slot !== -1) {
3938
- let name = outerSymbols[slot - 1];
3939
- let ref = outerScope.getSymbol(slot);
3940
- locals[name] = ref;
3941
- }
3942
- }
3943
-
3944
- if (evalScope) {
3945
- for (let i = 0; i < partialSymbols.length; i++) {
3946
- let name = partialSymbols[i];
3947
- let symbol$$1 = i + 1;
3948
- let value = evalScope[name];
3949
- if (value !== undefined) partialScope.bind(symbol$$1, value);
3950
- }
3951
- }
3952
-
3953
- partialScope.bindPartialMap(locals);
3954
- vm.pushFrame(); // sp += 2
3955
-
3956
- vm.call(unwrapHandle(vmHandle));
3957
- }
3958
- });
3959
-
3960
3906
  APPEND_OPCODES.add(72
3961
3907
  /* EnterList */
3962
3908
  , (vm, {
@@ -1,5 +1,5 @@
1
1
  import { DEBUG } from '@glimmer/env';
2
- import { deprecate, assert, scheduleRevalidate } from '@glimmer/global-context';
2
+ import { assert, scheduleRevalidate } from '@glimmer/global-context';
3
3
 
4
4
  // eslint-disable-next-line @typescript-eslint/ban-types
5
5
  function indexable(input) {
@@ -28,7 +28,6 @@ function unwrap(val) {
28
28
  let beginTrackingTransaction;
29
29
  let endTrackingTransaction;
30
30
  let runInTrackingTransaction;
31
- let deprecateMutationsInTrackingTransaction;
32
31
  let resetTrackingTransaction;
33
32
  let setTrackingTransactionEnv;
34
33
  let assertTagNotConsumed;
@@ -62,14 +61,13 @@ if (DEBUG) {
62
61
 
63
62
  setTrackingTransactionEnv = env => Object.assign(TRANSACTION_ENV, env);
64
63
 
65
- beginTrackingTransaction = (_debugLabel, deprecate$$1 = false) => {
64
+ beginTrackingTransaction = _debugLabel => {
66
65
  CONSUMED_TAGS = CONSUMED_TAGS || new WeakMap();
67
66
  let debugLabel = _debugLabel || undefined;
68
67
  let parent = TRANSACTION_STACK[TRANSACTION_STACK.length - 1] || null;
69
68
  TRANSACTION_STACK.push({
70
69
  parent,
71
- debugLabel,
72
- deprecate: deprecate$$1
70
+ debugLabel
73
71
  });
74
72
  };
75
73
 
@@ -122,28 +120,6 @@ if (DEBUG) {
122
120
  }
123
121
  }
124
122
  };
125
- /**
126
- * Switches to deprecating within an autotracking transaction, if one exists.
127
- * If `runInAutotrackingTransaction` is called within the callback of this
128
- * method, it switches back to throwing an error, allowing zebra-striping of
129
- * the types of errors that are thrown.
130
- *
131
- * Does not start an autotracking transaction.
132
- *
133
- * NOTE: For Ember usage only, in general you should assert that these
134
- * invariants are true.
135
- */
136
-
137
-
138
- deprecateMutationsInTrackingTransaction = (fn, debugLabel) => {
139
- beginTrackingTransaction(debugLabel, true);
140
-
141
- try {
142
- fn();
143
- } finally {
144
- endTrackingTransaction();
145
- }
146
- };
147
123
 
148
124
  let nthIndex = (str, pattern, n, startingPos = -1) => {
149
125
  let i = startingPos;
@@ -201,32 +177,24 @@ if (DEBUG) {
201
177
  assertTagNotConsumed = (tag, obj, keyName) => {
202
178
  if (CONSUMED_TAGS === null) return;
203
179
  let transaction = CONSUMED_TAGS.get(tag);
204
- if (!transaction) return;
205
- let currentTransaction = TRANSACTION_STACK[TRANSACTION_STACK.length - 1];
180
+ if (!transaction) return; // This hack makes the assertion message nicer, we can cut off the first
181
+ // few lines of the stack trace and let users know where the actual error
182
+ // occurred.
206
183
 
207
- if (currentTransaction.deprecate) {
208
- deprecate(makeTrackingErrorMessage(transaction, obj, keyName), false, {
209
- id: 'autotracking.mutation-after-consumption'
210
- });
211
- } else {
212
- // This hack makes the assertion message nicer, we can cut off the first
213
- // few lines of the stack trace and let users know where the actual error
214
- // occurred.
215
- try {
216
- assert(false, makeTrackingErrorMessage(transaction, obj, keyName));
217
- } catch (e) {
218
- if (e.stack) {
219
- let updateStackBegin = e.stack.indexOf('Stack trace for the update:');
220
-
221
- if (updateStackBegin !== -1) {
222
- let start = nthIndex(e.stack, '\n', 1, updateStackBegin);
223
- let end = nthIndex(e.stack, '\n', 4, updateStackBegin);
224
- e.stack = e.stack.substr(0, start) + e.stack.substr(end);
225
- }
184
+ try {
185
+ assert(false, makeTrackingErrorMessage(transaction, obj, keyName));
186
+ } catch (e) {
187
+ if (e.stack) {
188
+ let updateStackBegin = e.stack.indexOf('Stack trace for the update:');
189
+
190
+ if (updateStackBegin !== -1) {
191
+ let start = nthIndex(e.stack, '\n', 1, updateStackBegin);
192
+ let end = nthIndex(e.stack, '\n', 4, updateStackBegin);
193
+ e.stack = e.stack.substr(0, start) + e.stack.substr(end);
226
194
  }
227
-
228
- throw e;
229
195
  }
196
+
197
+ throw e;
230
198
  }
231
199
  };
232
200
  }
@@ -765,4 +733,4 @@ if (globalObj[GLIMMER_VALIDATOR_REGISTRATION] === true) {
765
733
 
766
734
  globalObj[GLIMMER_VALIDATOR_REGISTRATION] = true;
767
735
 
768
- export { ALLOW_CYCLES, bump, combine, COMPUTE, CONSTANT_TAG, CONSTANT, createTag, createUpdatableTag, CurrentTag, CURRENT_TAG, DIRTY_TAG as dirtyTag, INITIAL, isConstTag, UPDATE_TAG as updateTag, validateTag, valueForTag, VolatileTag, VOLATILE_TAG, VOLATILE, dirtyTagFor, tagFor, tagMetaFor, beginTrackFrame, endTrackFrame, beginUntrackFrame, endUntrackFrame, resetTracking, consumeTag, isTracking, track, untrack, createCache, isConst, getValue, trackedData, logTrackingStack, setTrackingTransactionEnv, runInTrackingTransaction, beginTrackingTransaction, endTrackingTransaction, deprecateMutationsInTrackingTransaction };
736
+ export { ALLOW_CYCLES, bump, combine, COMPUTE, CONSTANT_TAG, CONSTANT, createTag, createUpdatableTag, CurrentTag, CURRENT_TAG, DIRTY_TAG as dirtyTag, INITIAL, isConstTag, UPDATE_TAG as updateTag, validateTag, valueForTag, VolatileTag, VOLATILE_TAG, VOLATILE, dirtyTagFor, tagFor, tagMetaFor, beginTrackFrame, endTrackFrame, beginUntrackFrame, endUntrackFrame, resetTracking, consumeTag, isTracking, track, untrack, createCache, isConst, getValue, trackedData, logTrackingStack, setTrackingTransactionEnv, runInTrackingTransaction, beginTrackingTransaction, endTrackingTransaction };