ember-source 6.1.0-alpha.2 → 6.1.0-alpha.4

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.
@@ -1,13 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const chalk = require('chalk');
4
- const path = require('path');
5
4
  const SilentError = require('silent-error');
6
5
  const stringUtil = require('ember-cli-string-utils');
7
- const pathUtil = require('ember-cli-path-utils');
8
6
  const getPathOption = require('ember-cli-get-component-path-option');
9
7
  const normalizeEntityName = require('ember-cli-normalize-entity-name');
10
- const { EOL } = require('os');
11
8
  const { has } = require('@ember/edition-utils');
12
9
  const { generateComponentSignature } = require('../-utils');
13
10
 
@@ -48,9 +45,9 @@ module.exports = {
48
45
  },
49
46
  {
50
47
  name: 'component-structure',
51
- type: OCTANE ? ['flat', 'nested', 'classic'] : ['classic'],
52
- default: OCTANE ? 'flat' : 'classic',
53
- aliases: OCTANE ? [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }] : [{ cs: 'classic' }],
48
+ type: ['flat', 'nested'],
49
+ default: 'flat',
50
+ aliases: [{ fs: 'flat' }, { ns: 'nested' }],
54
51
  },
55
52
  ],
56
53
 
@@ -75,15 +72,9 @@ module.exports = {
75
72
  option.default = '@ember/component';
76
73
  }
77
74
  } else if (option.name === 'component-structure') {
78
- if (isOctane) {
79
- option.type = ['flat', 'nested', 'classic'];
80
- option.default = 'flat';
81
- option.aliases = [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }];
82
- } else {
83
- option.type = ['classic'];
84
- option.default = 'classic';
85
- option.aliases = [{ cs: 'classic' }];
86
- }
75
+ option.type = ['flat', 'nested'];
76
+ option.default = 'flat';
77
+ option.aliases = [{ fs: 'flat' }, { ns: 'nested' }];
87
78
  }
88
79
  });
89
80
 
@@ -107,12 +98,6 @@ module.exports = {
107
98
  'Usage of --component-class argument to `ember generate component` is only available on canary'
108
99
  );
109
100
  }
110
-
111
- if (options.componentStructure !== 'classic') {
112
- throw new SilentError(
113
- 'Usage of --component-structure argument to `ember generate component` is only available on canary'
114
- );
115
- }
116
101
  }
117
102
 
118
103
  return this._super.install.apply(this, arguments);
@@ -149,37 +134,7 @@ module.exports = {
149
134
  fileMapTokens(options) {
150
135
  let commandOptions = this.options;
151
136
 
152
- if (commandOptions.pod) {
153
- return {
154
- __path__() {
155
- return path.join(options.podPath, options.locals.path, options.dasherizedModuleName);
156
- },
157
- __templatepath__() {
158
- return path.join(options.podPath, options.locals.path, options.dasherizedModuleName);
159
- },
160
- __templatename__() {
161
- return 'template';
162
- },
163
- };
164
- } else if (
165
- !this.EMBER_GLIMMER_SET_COMPONENT_TEMPLATE ||
166
- commandOptions.componentStructure === 'classic'
167
- ) {
168
- return {
169
- __path__() {
170
- return 'components';
171
- },
172
- __templatepath__() {
173
- return 'templates/components';
174
- },
175
- __templatename__() {
176
- return options.dasherizedModuleName;
177
- },
178
- };
179
- } else if (
180
- this.EMBER_GLIMMER_SET_COMPONENT_TEMPLATE &&
181
- commandOptions.componentStructure === 'flat'
182
- ) {
137
+ if (this.EMBER_GLIMMER_SET_COMPONENT_TEMPLATE && commandOptions.componentStructure === 'flat') {
183
138
  return {
184
139
  __path__() {
185
140
  return 'components';
@@ -236,19 +191,6 @@ module.exports = {
236
191
  },
237
192
 
238
193
  locals(options) {
239
- // if we're in an addon, build import statement
240
- let templatePath = '';
241
- if (options.project.isEmberCLIAddon() || (options.inRepoAddon && !options.inDummy)) {
242
- if (options.pod) {
243
- templatePath = './template';
244
- } else {
245
- templatePath =
246
- pathUtil.getRelativeParentPath(options.entity.name) +
247
- 'templates/components/' +
248
- stringUtil.dasherize(options.entity.name);
249
- }
250
- }
251
-
252
194
  let componentClass = this.EMBER_GLIMMER_SET_COMPONENT_TEMPLATE
253
195
  ? options.componentClass
254
196
  : '@ember/component';
@@ -264,12 +206,7 @@ module.exports = {
264
206
  switch (componentClass) {
265
207
  case '@ember/component':
266
208
  importComponent = `import Component from '@ember/component';`;
267
- if (templatePath) {
268
- importTemplate = `import layout from '${templatePath}';${EOL}`;
269
- defaultExport = `Component.extend({${EOL} layout${EOL}});`;
270
- } else {
271
- defaultExport = `Component.extend({});`;
272
- }
209
+ defaultExport = `Component.extend({});`;
273
210
  break;
274
211
  case '@glimmer/component':
275
212
  importComponent = `import Component from '@glimmer/component';`;
@@ -1,12 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const path = require('path');
4
3
  const SilentError = require('silent-error');
5
4
  const stringUtil = require('ember-cli-string-utils');
6
- const pathUtil = require('ember-cli-path-utils');
7
5
  const getPathOption = require('ember-cli-get-component-path-option');
8
6
  const normalizeEntityName = require('ember-cli-normalize-entity-name');
9
- const { EOL } = require('os');
10
7
  const { has } = require('@ember/edition-utils');
11
8
  const { generateComponentSignature } = require('../-utils');
12
9
 
@@ -44,9 +41,9 @@ module.exports = {
44
41
  },
45
42
  {
46
43
  name: 'component-structure',
47
- type: OCTANE ? ['flat', 'nested', 'classic'] : ['classic'],
48
- default: OCTANE ? 'flat' : 'classic',
49
- aliases: OCTANE ? [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }] : [{ cs: 'classic' }],
44
+ type: ['flat', 'nested'],
45
+ default: 'flat',
46
+ aliases: [{ fs: 'flat' }, { ns: 'nested' }],
50
47
  },
51
48
  ],
52
49
 
@@ -71,15 +68,9 @@ module.exports = {
71
68
  option.default = '@ember/component';
72
69
  }
73
70
  } else if (option.name === 'component-structure') {
74
- if (isOctane) {
75
- option.type = ['flat', 'nested', 'classic'];
76
- option.default = 'flat';
77
- option.aliases = [{ fs: 'flat' }, { ns: 'nested' }, { cs: 'classic' }];
78
- } else {
79
- option.type = ['classic'];
80
- option.default = 'classic';
81
- option.aliases = [{ cs: 'classic' }];
82
- }
71
+ option.type = ['flat', 'nested'];
72
+ option.default = 'flat';
73
+ option.aliases = [{ fs: 'flat' }, { ns: 'nested' }];
83
74
  }
84
75
  });
85
76
 
@@ -99,19 +90,7 @@ module.exports = {
99
90
  fileMapTokens(options) {
100
91
  let commandOptions = this.options;
101
92
 
102
- if (commandOptions.pod) {
103
- return {
104
- __path__() {
105
- return path.join(options.podPath, options.locals.path, options.dasherizedModuleName);
106
- },
107
- __name__() {
108
- return 'component';
109
- },
110
- };
111
- } else if (
112
- commandOptions.componentStructure === 'classic' ||
113
- commandOptions.componentStructure === 'flat'
114
- ) {
93
+ if (commandOptions.componentStructure === 'flat') {
115
94
  return {
116
95
  __path__() {
117
96
  return 'components';
@@ -139,35 +118,17 @@ module.exports = {
139
118
  let sanitizedModuleName = options.entity.name.replace(/\//g, '-');
140
119
  let classifiedModuleName = stringUtil.classify(sanitizedModuleName);
141
120
 
142
- let templatePath = '';
143
121
  let importComponent = '';
144
122
  let importTemplate = '';
145
123
  let defaultExport = '';
146
124
  let componentSignature = '';
147
125
 
148
- // if we're in an addon, build import statement
149
- if (options.project.isEmberCLIAddon() || (options.inRepoAddon && !options.inDummy)) {
150
- if (options.pod) {
151
- templatePath = './template';
152
- } else {
153
- templatePath =
154
- pathUtil.getRelativeParentPath(options.entity.name) +
155
- 'templates/components/' +
156
- stringUtil.dasherize(options.entity.name);
157
- }
158
- }
159
-
160
126
  let componentClass = options.componentClass;
161
127
 
162
128
  switch (componentClass) {
163
129
  case '@ember/component':
164
130
  importComponent = `import Component from '@ember/component';`;
165
- if (templatePath) {
166
- importTemplate = `import layout from '${templatePath}';${EOL}`;
167
- defaultExport = `Component.extend({${EOL} layout${EOL}});`;
168
- } else {
169
- defaultExport = `Component.extend({});`;
170
- }
131
+ defaultExport = `Component.extend({});`;
171
132
  break;
172
133
  case '@glimmer/component':
173
134
  importComponent = `import Component from '@glimmer/component';`;
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "6.1.0-alpha.2",
2
+ "version": "6.1.0-alpha.4",
3
3
  "buildType": "tag",
4
- "SHA": "fa266994407f1c3e0e09b85bbaf4d1d031546a93",
5
- "assetPath": "/tag/shas/fa266994407f1c3e0e09b85bbaf4d1d031546a93.tgz"
4
+ "SHA": "13d4340cd7596f95e42241ad5ec833dd8870f433",
5
+ "assetPath": "/tag/shas/13d4340cd7596f95e42241ad5ec833dd8870f433.tgz"
6
6
  }
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 6.1.0-alpha.2
8
+ * @version 6.1.0-alpha.4
9
9
  */
10
10
  /* eslint-disable no-var */
11
11
  /* globals global globalThis self */
@@ -15651,7 +15651,7 @@ var define, require;
15651
15651
  }, Symbol.toStringTag, { value: 'Module' });
15652
15652
 
15653
15653
  // this file gets replaced with the real value during the build
15654
- const version = '6.1.0-alpha.2';
15654
+ const version = '6.1.0-alpha.4';
15655
15655
 
15656
15656
  const emberVersion = /*#__PURE__*/Object.defineProperty({
15657
15657
  __proto__: null,
@@ -15690,6 +15690,69 @@ var define, require;
15690
15690
  default: calculateLocationDisplay
15691
15691
  }, Symbol.toStringTag, { value: 'Module' });
15692
15692
 
15693
+ function isPath(node) {
15694
+ return node.type === 'PathExpression';
15695
+ }
15696
+ function isSubExpression(node) {
15697
+ return node.type === 'SubExpression';
15698
+ }
15699
+ function isStringLiteral(node) {
15700
+ return node.type === 'StringLiteral';
15701
+ }
15702
+ function getLocalName(node) {
15703
+ if (typeof node === 'string') {
15704
+ return node;
15705
+ } else {
15706
+ return node.original;
15707
+ }
15708
+ }
15709
+ function inScope(env, name) {
15710
+ return Boolean(env.lexicalScope?.(name));
15711
+ }
15712
+ function trackLocals(env) {
15713
+ let locals = new Map();
15714
+ let node = {
15715
+ enter(node) {
15716
+ let params = 'params' in node ? node.params : node.blockParams;
15717
+ for (let param of params) {
15718
+ let name = getLocalName(param);
15719
+ let value = locals.get(param) || 0;
15720
+ locals.set(name, value + 1);
15721
+ }
15722
+ },
15723
+ exit(node) {
15724
+ let params = 'params' in node ? node.params : node.blockParams;
15725
+ for (let param of params) {
15726
+ let name = getLocalName(param);
15727
+ let value = locals.get(name) - 1;
15728
+ if (value === 0) {
15729
+ locals.delete(name);
15730
+ } else {
15731
+ locals.set(name, value);
15732
+ }
15733
+ }
15734
+ }
15735
+ };
15736
+ return {
15737
+ hasLocal: key => locals.has(key) || inScope(env, key),
15738
+ node,
15739
+ visitor: {
15740
+ Template: node,
15741
+ ElementNode: node,
15742
+ Block: node
15743
+ }
15744
+ };
15745
+ }
15746
+
15747
+ const emberTemplateCompilerLibPluginsUtils = /*#__PURE__*/Object.defineProperty({
15748
+ __proto__: null,
15749
+ inScope,
15750
+ isPath,
15751
+ isStringLiteral,
15752
+ isSubExpression,
15753
+ trackLocals
15754
+ }, Symbol.toStringTag, { value: 'Module' });
15755
+
15693
15756
  /**
15694
15757
  @module ember
15695
15758
  */
@@ -15712,41 +15775,16 @@ var define, require;
15712
15775
  builders: b
15713
15776
  } = env.syntax;
15714
15777
  let moduleName = env.meta?.moduleName;
15715
- let stack = [[]];
15716
- function updateBlockParamsStack(blockParams) {
15717
- let parent = stack[stack.length - 1];
15718
- (!(parent) && assert('has parent', parent));
15719
- stack.push(parent.concat(blockParams));
15720
- }
15778
+ let {
15779
+ hasLocal,
15780
+ visitor
15781
+ } = trackLocals(env);
15721
15782
  return {
15722
15783
  name: 'assert-against-attrs',
15723
15784
  visitor: {
15724
- Template: {
15725
- enter(node) {
15726
- updateBlockParamsStack(node.blockParams);
15727
- },
15728
- exit() {
15729
- stack.pop();
15730
- }
15731
- },
15732
- Block: {
15733
- enter(node) {
15734
- updateBlockParamsStack(node.blockParams);
15735
- },
15736
- exit() {
15737
- stack.pop();
15738
- }
15739
- },
15740
- ElementNode: {
15741
- enter(node) {
15742
- updateBlockParamsStack(node.blockParams);
15743
- },
15744
- exit() {
15745
- stack.pop();
15746
- }
15747
- },
15785
+ ...visitor,
15748
15786
  PathExpression(node) {
15749
- if (isAttrs(node, stack[stack.length - 1])) {
15787
+ if (isAttrs(node, hasLocal)) {
15750
15788
  (assert(`Using {{attrs}} to reference named arguments is not supported. {{${node.original}}} should be updated to {{@${node.original.slice(6)}}}. ${calculateLocationDisplay(moduleName, node.loc)}`));
15751
15789
  } else if (isThisDotAttrs(node)) {
15752
15790
  // When removing this, ensure `{{this.attrs.foo}}` is left as-is, without triggering
@@ -15770,8 +15808,8 @@ var define, require;
15770
15808
  }
15771
15809
  };
15772
15810
  }
15773
- function isAttrs(node, symbols) {
15774
- return node.head.type === 'VarHead' && node.head.name === 'attrs' && symbols.indexOf(node.head.name) === -1;
15811
+ function isAttrs(node, hasLocal) {
15812
+ return node.head.type === 'VarHead' && node.head.name === 'attrs' && !hasLocal(node.head.name);
15775
15813
  }
15776
15814
  function isThisDotAttrs(node) {
15777
15815
  return node.head.type === 'ThisHead' && node.tail[0] === 'attrs';
@@ -15794,11 +15832,16 @@ var define, require;
15794
15832
  */
15795
15833
  function assertAgainstNamedOutlets(env) {
15796
15834
  let moduleName = env.meta?.moduleName;
15835
+ let {
15836
+ hasLocal,
15837
+ visitor
15838
+ } = trackLocals(env);
15797
15839
  return {
15798
15840
  name: 'assert-against-named-outlets',
15799
15841
  visitor: {
15842
+ ...visitor,
15800
15843
  MustacheStatement(node) {
15801
- if (node.path.type === 'PathExpression' && node.path.original === 'outlet' && node.params[0]) {
15844
+ if (node.path.type === 'PathExpression' && node.path.original === 'outlet' && node.params[0] && !hasLocal('outlet')) {
15802
15845
  let sourceInformation = calculateLocationDisplay(moduleName, node.loc);
15803
15846
  (assert(`Named outlets were removed in Ember 4.0. See https://deprecations.emberjs.com/v3.x#toc_route-render-template for guidance on alternative APIs for named outlet use cases. ${sourceInformation}`));
15804
15847
  }
@@ -15812,66 +15855,18 @@ var define, require;
15812
15855
  default: assertAgainstNamedOutlets
15813
15856
  }, Symbol.toStringTag, { value: 'Module' });
15814
15857
 
15815
- function isPath(node) {
15816
- return node.type === 'PathExpression';
15817
- }
15818
- function isSubExpression(node) {
15819
- return node.type === 'SubExpression';
15820
- }
15821
- function isStringLiteral(node) {
15822
- return node.type === 'StringLiteral';
15823
- }
15824
- function getLocalName(node) {
15825
- if (typeof node === 'string') {
15826
- return node;
15827
- } else {
15828
- return node.original;
15829
- }
15830
- }
15831
- function trackLocals() {
15832
- let locals = new Map();
15833
- let node = {
15834
- enter(node) {
15835
- let params = 'params' in node ? node.params : node.blockParams;
15836
- for (let param of params) {
15837
- let name = getLocalName(param);
15838
- let value = locals.get(param) || 0;
15839
- locals.set(name, value + 1);
15840
- }
15841
- },
15842
- exit(node) {
15843
- let params = 'params' in node ? node.params : node.blockParams;
15844
- for (let param of params) {
15845
- let name = getLocalName(param);
15846
- let value = locals.get(name) - 1;
15847
- if (value === 0) {
15848
- locals.delete(name);
15849
- } else {
15850
- locals.set(name, value);
15851
- }
15852
- }
15853
- }
15854
- };
15855
- return {
15856
- hasLocal: key => locals.has(key),
15857
- node
15858
- };
15859
- }
15860
-
15861
- const emberTemplateCompilerLibPluginsUtils = /*#__PURE__*/Object.defineProperty({
15862
- __proto__: null,
15863
- isPath,
15864
- isStringLiteral,
15865
- isSubExpression,
15866
- trackLocals
15867
- }, Symbol.toStringTag, { value: 'Module' });
15868
-
15869
15858
  function errorOnInputWithContent(env) {
15870
15859
  let moduleName = env.meta?.moduleName;
15860
+ let {
15861
+ hasLocal,
15862
+ visitor
15863
+ } = trackLocals(env);
15871
15864
  return {
15872
15865
  name: 'assert-input-helper-without-block',
15873
15866
  visitor: {
15867
+ ...visitor,
15874
15868
  BlockStatement(node) {
15869
+ if (hasLocal('input')) return;
15875
15870
  if (isPath(node.path) && node.path.original === 'input') {
15876
15871
  (assert(assertMessage$1(moduleName, node)));
15877
15872
  }
@@ -15964,35 +15959,38 @@ var define, require;
15964
15959
  @class TransformActionSyntax
15965
15960
  */
15966
15961
 
15967
- function transformActionSyntax({
15968
- syntax
15969
- }) {
15962
+ function transformActionSyntax(env) {
15970
15963
  let {
15971
15964
  builders: b
15972
- } = syntax;
15965
+ } = env.syntax;
15966
+ let {
15967
+ hasLocal,
15968
+ visitor
15969
+ } = trackLocals(env);
15973
15970
  return {
15974
15971
  name: 'transform-action-syntax',
15975
15972
  visitor: {
15973
+ ...visitor,
15976
15974
  ElementModifierStatement(node) {
15977
- if (isAction(node)) {
15975
+ if (isAction(node, hasLocal)) {
15978
15976
  insertThisAsFirstParam(node, b);
15979
15977
  }
15980
15978
  },
15981
15979
  MustacheStatement(node) {
15982
- if (isAction(node)) {
15980
+ if (isAction(node, hasLocal)) {
15983
15981
  insertThisAsFirstParam(node, b);
15984
15982
  }
15985
15983
  },
15986
15984
  SubExpression(node) {
15987
- if (isAction(node)) {
15985
+ if (isAction(node, hasLocal)) {
15988
15986
  insertThisAsFirstParam(node, b);
15989
15987
  }
15990
15988
  }
15991
15989
  }
15992
15990
  };
15993
15991
  }
15994
- function isAction(node) {
15995
- return isPath(node.path) && node.path.original === 'action';
15992
+ function isAction(node, hasLocal) {
15993
+ return isPath(node.path) && node.path.original === 'action' && !hasLocal('action');
15996
15994
  }
15997
15995
  function insertThisAsFirstParam(node, builders) {
15998
15996
  node.params.unshift(builders.path('this'));
@@ -16080,11 +16078,16 @@ var define, require;
16080
16078
  let {
16081
16079
  builders: b
16082
16080
  } = env.syntax;
16081
+ let {
16082
+ hasLocal,
16083
+ visitor
16084
+ } = trackLocals(env);
16083
16085
  return {
16084
16086
  name: 'transform-each-track-array',
16085
16087
  visitor: {
16088
+ ...visitor,
16086
16089
  BlockStatement(node) {
16087
- if (isPath(node.path) && node.path.original === 'each') {
16090
+ if (isPath(node.path) && node.path.original === 'each' && !hasLocal('each')) {
16088
16091
  let firstParam = node.params[0];
16089
16092
  (!(firstParam) && assert('has firstParam', firstParam));
16090
16093
  if (firstParam.type === 'SubExpression' && firstParam.path.type === 'PathExpression' && firstParam.path.original === '-each-in') {
@@ -16259,7 +16262,7 @@ var define, require;
16259
16262
  let {
16260
16263
  hasLocal,
16261
16264
  node: tracker
16262
- } = trackLocals();
16265
+ } = trackLocals(env);
16263
16266
  let seen;
16264
16267
  return {
16265
16268
  name: 'transform-resolutions',
@@ -16363,14 +16366,12 @@ var define, require;
16363
16366
  } = env.syntax;
16364
16367
  let {
16365
16368
  hasLocal,
16366
- node
16367
- } = trackLocals();
16369
+ visitor
16370
+ } = trackLocals(env);
16368
16371
  return {
16369
16372
  name: 'transform-wrap-mount-and-outlet',
16370
16373
  visitor: {
16371
- Template: node,
16372
- ElementNode: node,
16373
- Block: node,
16374
+ ...visitor,
16374
16375
  MustacheStatement(node) {
16375
16376
  if (isPath(node.path) && (node.path.original === 'mount' || node.path.original === 'outlet') && !hasLocal(node.path.original)) {
16376
16377
  let subexpression = b.sexpr(b.path(`-${node.path.original}`), node.params, node.hash, node.loc);
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 6.1.0-alpha.2
8
+ * @version 6.1.0-alpha.4
9
9
  */
10
10
  /* eslint-disable no-var */
11
11
  /* globals global globalThis self */
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 6.1.0-alpha.2
8
+ * @version 6.1.0-alpha.4
9
9
  */
10
10
  /* eslint-disable no-var */
11
11
  /* globals global globalThis self */
@@ -3379,7 +3379,7 @@ var define, require;
3379
3379
  }, Symbol.toStringTag, { value: 'Module' });
3380
3380
 
3381
3381
  // this file gets replaced with the real value during the build
3382
- const Version = '6.1.0-alpha.2';
3382
+ const Version = '6.1.0-alpha.4';
3383
3383
 
3384
3384
  const emberVersion = /*#__PURE__*/Object.defineProperty({
3385
3385
  __proto__: null,
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 6.1.0-alpha.2
8
+ * @version 6.1.0-alpha.4
9
9
  */
10
10
  /* eslint-disable no-var */
11
11
  /* globals global globalThis self */
@@ -2620,7 +2620,7 @@ var define, require;
2620
2620
  }, Symbol.toStringTag, { value: 'Module' });
2621
2621
 
2622
2622
  // this file gets replaced with the real value during the build
2623
- const Version = '6.1.0-alpha.2';
2623
+ const Version = '6.1.0-alpha.4';
2624
2624
 
2625
2625
  const emberVersion = /*#__PURE__*/Object.defineProperty({
2626
2626
  __proto__: null,
@@ -1,4 +1,4 @@
1
1
  // this file gets replaced with the real value during the build
2
- const Version = '6.1.0-alpha.2';
2
+ const Version = '6.1.0-alpha.4';
3
3
 
4
4
  export { Version as default };
package/docs/data.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "The Ember API",
4
4
  "description": "The Ember API: a framework for building ambitious web applications",
5
5
  "url": "https://emberjs.com/",
6
- "version": "6.1.0-alpha.2"
6
+ "version": "6.1.0-alpha.4"
7
7
  },
8
8
  "files": {
9
9
  "node_modules/rsvp/lib/rsvp/promise/all.js": {
package/lib/browsers.js CHANGED
@@ -3,7 +3,7 @@ module.exports = [
3
3
  'Edge >= 110',
4
4
  'Firefox >= 102',
5
5
  'iOS >= 12',
6
- 'Safari >= 12',
6
+ 'Safari >= 15.6',
7
7
  'ChromeAndroid >= 112',
8
8
  'FirefoxAndroid >= 110',
9
9
  ];
@@ -60,16 +60,4 @@ module.exports = [
60
60
  safari 16.1
61
61
  safari 16.0
62
62
  safari 15.6
63
- safari 15.5
64
- safari 15.4
65
- safari 15.2-15.3
66
- safari 15.1
67
- safari 15
68
- safari 14.1
69
- safari 14
70
- safari 13.1
71
- safari 13
72
- safari 12.1
73
- safari 12
74
-
75
63
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "6.1.0-alpha.2",
3
+ "version": "6.1.0-alpha.4",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -372,7 +372,7 @@
372
372
  "node": "16.20.0",
373
373
  "pnpm": "8.10.0"
374
374
  },
375
- "_originalVersion": "6.1.0-alpha.2",
375
+ "_originalVersion": "6.1.0-alpha.4",
376
376
  "_versionPreviouslyCalculated": true,
377
377
  "publishConfig": {
378
378
  "tag": "alpha"
@@ -24,5 +24,5 @@ declare module 'ember-template-compiler/lib/plugins/transform-action-syntax' {
24
24
  @private
25
25
  @class TransformActionSyntax
26
26
  */
27
- export default function transformActionSyntax({ syntax }: EmberASTPluginEnvironment): ASTPlugin;
27
+ export default function transformActionSyntax(env: EmberASTPluginEnvironment): ASTPlugin;
28
28
  }
@@ -1,13 +1,29 @@
1
1
  declare module 'ember-template-compiler/lib/plugins/utils' {
2
2
  import type { AST } from '@glimmer/syntax';
3
+ import type { EmberASTPluginEnvironment } from 'ember-template-compiler/lib/types';
3
4
  export function isPath(node: AST.Node): node is AST.PathExpression;
4
5
  export function isSubExpression(node: AST.Node): node is AST.SubExpression;
5
6
  export function isStringLiteral(node: AST.Expression): node is AST.StringLiteral;
6
- export function trackLocals(): {
7
+ export function inScope(env: EmberASTPluginEnvironment, name: string): boolean;
8
+ export function trackLocals(env: EmberASTPluginEnvironment): {
7
9
  hasLocal: (key: string) => boolean;
8
10
  node: {
9
11
  enter(node: AST.Template | AST.Block | AST.ElementNode): void;
10
12
  exit(node: AST.Template | AST.Block | AST.ElementNode): void;
11
13
  };
14
+ visitor: {
15
+ Template: {
16
+ enter(node: AST.Template | AST.Block | AST.ElementNode): void;
17
+ exit(node: AST.Template | AST.Block | AST.ElementNode): void;
18
+ };
19
+ ElementNode: {
20
+ enter(node: AST.Template | AST.Block | AST.ElementNode): void;
21
+ exit(node: AST.Template | AST.Block | AST.ElementNode): void;
22
+ };
23
+ Block: {
24
+ enter(node: AST.Template | AST.Block | AST.ElementNode): void;
25
+ exit(node: AST.Template | AST.Block | AST.ElementNode): void;
26
+ };
27
+ };
12
28
  };
13
29
  }
@@ -14,6 +14,7 @@ declare module 'ember-template-compiler/lib/types' {
14
14
  isProduction?: boolean;
15
15
  moduleName?: string;
16
16
  plugins?: Plugins;
17
+ lexicalScope?: (name: string) => boolean;
17
18
  }
18
19
  export type EmberASTPluginEnvironment = ASTPluginEnvironment & EmberPrecompileOptions;
19
20
  export {};