ember-source 5.7.0-alpha.6 → 5.7.0-beta.2
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.
- package/README.md +2 -2
- package/blueprints/-utils.js +24 -0
- package/blueprints/component/index.js +3 -24
- package/blueprints/component-class/files/__root__/__path__/__name__.ts +1 -0
- package/blueprints/component-class/index.js +24 -3
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +15 -2
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +19 -3
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/environment/index.js +13 -0
- package/dist/packages/@ember/routing/route.js +4 -0
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +76 -63
- package/package.json +3 -3
- package/types/stable/@ember/-internals/environment/lib/env.d.ts +15 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<a href="https://codeclimate.com/github/emberjs/ember.js"><img src="https://codeclimate.com/github/emberjs/ember.js.svg" alt="Code Climate"></a>
|
|
9
9
|
<a href="https://discord.gg/zT3asNS"><img src="https://img.shields.io/discord/480462759797063690.svg?logo=discord" alt="Discord Community Server"></a>
|
|
10
10
|
<a href="https://help-wanted.emberjs.com/"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
|
|
11
|
-
<a href="https://github.com/emberjs/ember.js/blob/
|
|
11
|
+
<a href="https://github.com/emberjs/ember.js/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license"></a>
|
|
12
12
|
|
|
13
13
|
</p>
|
|
14
14
|
|
|
@@ -42,7 +42,7 @@ Find out more:
|
|
|
42
42
|
|
|
43
43
|
## Contributions
|
|
44
44
|
|
|
45
|
-
See [CONTRIBUTING.md](https://github.com/emberjs/ember.js/blob/
|
|
45
|
+
See [CONTRIBUTING.md](https://github.com/emberjs/ember.js/blob/main/CONTRIBUTING.md)
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
package/blueprints/-utils.js
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
const { dasherize } = require('ember-cli-string-utils');
|
|
2
|
+
const { EOL } = require('os');
|
|
3
|
+
|
|
4
|
+
function generateComponentSignature(componentName) {
|
|
5
|
+
let args = ` // The arguments accepted by the component${EOL} Args: {};`;
|
|
6
|
+
|
|
7
|
+
let blocks =
|
|
8
|
+
` // Any blocks yielded by the component${EOL}` +
|
|
9
|
+
` Blocks: {${EOL}` +
|
|
10
|
+
` default: []${EOL}` +
|
|
11
|
+
` };`;
|
|
12
|
+
|
|
13
|
+
let element =
|
|
14
|
+
` // The element to which \`...attributes\` is applied in the component template${EOL}` +
|
|
15
|
+
` Element: null;`;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
`export interface ${componentName}Signature {${EOL}` +
|
|
19
|
+
`${args}${EOL}` +
|
|
20
|
+
`${blocks}${EOL}` +
|
|
21
|
+
`${element}${EOL}` +
|
|
22
|
+
`}${EOL}`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
2
25
|
|
|
3
26
|
function modulePrefixForProject(project) {
|
|
4
27
|
return dasherize(project.config().modulePrefix);
|
|
5
28
|
}
|
|
6
29
|
|
|
7
30
|
module.exports = {
|
|
31
|
+
generateComponentSignature,
|
|
8
32
|
modulePrefixForProject,
|
|
9
33
|
};
|
|
@@ -9,6 +9,7 @@ const getPathOption = require('ember-cli-get-component-path-option');
|
|
|
9
9
|
const normalizeEntityName = require('ember-cli-normalize-entity-name');
|
|
10
10
|
const { EOL } = require('os');
|
|
11
11
|
const { has } = require('@ember/edition-utils');
|
|
12
|
+
const { generateComponentSignature } = require('../-utils');
|
|
12
13
|
|
|
13
14
|
const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints');
|
|
14
15
|
|
|
@@ -273,7 +274,7 @@ module.exports = {
|
|
|
273
274
|
case '@glimmer/component':
|
|
274
275
|
importComponent = `import Component from '@glimmer/component';`;
|
|
275
276
|
if (this._isUsingTS) {
|
|
276
|
-
componentSignature =
|
|
277
|
+
componentSignature = generateComponentSignature(classifiedModuleName);
|
|
277
278
|
defaultExport = `class ${classifiedModuleName}Component extends Component<${classifiedModuleName}Signature> {}`;
|
|
278
279
|
} else {
|
|
279
280
|
defaultExport = `class ${classifiedModuleName}Component extends Component {}`;
|
|
@@ -282,7 +283,7 @@ module.exports = {
|
|
|
282
283
|
case '@ember/component/template-only':
|
|
283
284
|
importComponent = `import templateOnly from '@ember/component/template-only';`;
|
|
284
285
|
if (this._isUsingTS) {
|
|
285
|
-
componentSignature =
|
|
286
|
+
componentSignature = generateComponentSignature(classifiedModuleName);
|
|
286
287
|
defaultExport = `templateOnly<${classifiedModuleName}Signature>();`;
|
|
287
288
|
} else {
|
|
288
289
|
defaultExport = `templateOnly();`;
|
|
@@ -300,25 +301,3 @@ module.exports = {
|
|
|
300
301
|
};
|
|
301
302
|
},
|
|
302
303
|
};
|
|
303
|
-
|
|
304
|
-
function signatureFor(classifiedModuleName) {
|
|
305
|
-
let args = ` // The arguments accepted by the component${EOL} Args: {};`;
|
|
306
|
-
|
|
307
|
-
let blocks =
|
|
308
|
-
` // Any blocks yielded by the component${EOL}` +
|
|
309
|
-
` Blocks: {${EOL}` +
|
|
310
|
-
` default: []${EOL}` +
|
|
311
|
-
` };`;
|
|
312
|
-
|
|
313
|
-
let element =
|
|
314
|
-
` // The element to which \`...attributes\` is applied in the component template${EOL}` +
|
|
315
|
-
` Element: null;`;
|
|
316
|
-
|
|
317
|
-
return (
|
|
318
|
-
`interface ${classifiedModuleName}Signature {${EOL}` +
|
|
319
|
-
`${args}${EOL}` +
|
|
320
|
-
`${blocks}${EOL}` +
|
|
321
|
-
`${element}${EOL}` +
|
|
322
|
-
`}${EOL}`
|
|
323
|
-
);
|
|
324
|
-
}
|
|
@@ -8,6 +8,7 @@ const getPathOption = require('ember-cli-get-component-path-option');
|
|
|
8
8
|
const normalizeEntityName = require('ember-cli-normalize-entity-name');
|
|
9
9
|
const { EOL } = require('os');
|
|
10
10
|
const { has } = require('@ember/edition-utils');
|
|
11
|
+
const { generateComponentSignature } = require('../-utils');
|
|
11
12
|
|
|
12
13
|
const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints');
|
|
13
14
|
|
|
@@ -49,9 +50,17 @@ module.exports = {
|
|
|
49
50
|
},
|
|
50
51
|
],
|
|
51
52
|
|
|
53
|
+
/**
|
|
54
|
+
Flag to let us correctly handle the case where we are running against a
|
|
55
|
+
version of Ember CLI which does not support TS-based emit, and where we
|
|
56
|
+
therefore *must* not emit a `defaultExport` local which includes a type
|
|
57
|
+
parameter in the exported function call or class definition.
|
|
58
|
+
*/
|
|
59
|
+
_isUsingTS: false,
|
|
60
|
+
|
|
52
61
|
init() {
|
|
53
62
|
this._super && this._super.init.apply(this, arguments);
|
|
54
|
-
maybePolyfillTypeScriptBlueprints(this);
|
|
63
|
+
this._isUsingTS = maybePolyfillTypeScriptBlueprints(this);
|
|
55
64
|
let isOctane = has('octane');
|
|
56
65
|
|
|
57
66
|
this.availableOptions.forEach((option) => {
|
|
@@ -134,6 +143,7 @@ module.exports = {
|
|
|
134
143
|
let importComponent = '';
|
|
135
144
|
let importTemplate = '';
|
|
136
145
|
let defaultExport = '';
|
|
146
|
+
let componentSignature = '';
|
|
137
147
|
|
|
138
148
|
// if we're in an addon, build import statement
|
|
139
149
|
if (options.project.isEmberCLIAddon() || (options.inRepoAddon && !options.inDummy)) {
|
|
@@ -161,17 +171,28 @@ module.exports = {
|
|
|
161
171
|
break;
|
|
162
172
|
case '@glimmer/component':
|
|
163
173
|
importComponent = `import Component from '@glimmer/component';`;
|
|
164
|
-
|
|
174
|
+
if (this._isUsingTS) {
|
|
175
|
+
componentSignature = generateComponentSignature(classifiedModuleName);
|
|
176
|
+
defaultExport = `class ${classifiedModuleName}Component extends Component<${classifiedModuleName}Signature> {}`;
|
|
177
|
+
} else {
|
|
178
|
+
defaultExport = `class ${classifiedModuleName}Component extends Component {}`;
|
|
179
|
+
}
|
|
165
180
|
break;
|
|
166
181
|
case '@ember/component/template-only':
|
|
167
182
|
importComponent = `import templateOnly from '@ember/component/template-only';`;
|
|
168
|
-
|
|
183
|
+
if (this._isUsingTS) {
|
|
184
|
+
componentSignature = generateComponentSignature(classifiedModuleName);
|
|
185
|
+
defaultExport = `templateOnly<${classifiedModuleName}Signature>();`;
|
|
186
|
+
} else {
|
|
187
|
+
defaultExport = `templateOnly();`;
|
|
188
|
+
}
|
|
169
189
|
break;
|
|
170
190
|
}
|
|
171
191
|
|
|
172
192
|
return {
|
|
173
193
|
importTemplate,
|
|
174
194
|
importComponent,
|
|
195
|
+
componentSignature,
|
|
175
196
|
defaultExport,
|
|
176
197
|
path: getPathOption(options),
|
|
177
198
|
componentClass,
|
package/build-metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.7.0-
|
|
2
|
+
"version": "5.7.0-beta.2",
|
|
3
3
|
"buildType": "tag",
|
|
4
|
-
"SHA": "
|
|
5
|
-
"assetPath": "/tag/shas/
|
|
4
|
+
"SHA": "64553efeac94f4a4eb7dd360dd3f6c10b8249f20",
|
|
5
|
+
"assetPath": "/tag/shas/64553efeac94f4a4eb7dd360dd3f6c10b8249f20.tgz"
|
|
6
6
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 5.7.0-
|
|
9
|
+
* @version 5.7.0-beta.2
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* eslint-disable no-var */
|
|
@@ -281,6 +281,19 @@ define("@ember/-internals/environment/index", ["exports"], function (_exports) {
|
|
|
281
281
|
@private
|
|
282
282
|
*/
|
|
283
283
|
_DEFAULT_ASYNC_OBSERVERS: false,
|
|
284
|
+
/**
|
|
285
|
+
Whether the app still has default record-loading behavior in the model
|
|
286
|
+
hook from RFC https://rfcs.emberjs.com/id/0774-implicit-record-route-loading
|
|
287
|
+
This will also remove the default store property from the route.
|
|
288
|
+
This is not intended to be set directly, as the implementation may change in
|
|
289
|
+
the future. Use `@ember/optional-features` instead.
|
|
290
|
+
@property _NO_IMPLICIT_ROUTE_MODEL
|
|
291
|
+
@for EmberENV
|
|
292
|
+
@type Boolean
|
|
293
|
+
@default false
|
|
294
|
+
@private
|
|
295
|
+
*/
|
|
296
|
+
_NO_IMPLICIT_ROUTE_MODEL: false,
|
|
284
297
|
/**
|
|
285
298
|
Controls the maximum number of scheduled rerenders without "settling". In general,
|
|
286
299
|
applications should not need to modify this environment variable, but please
|
|
@@ -16564,7 +16577,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
16564
16577
|
value: true
|
|
16565
16578
|
});
|
|
16566
16579
|
_exports.default = void 0;
|
|
16567
|
-
var _default = _exports.default = "5.7.0-
|
|
16580
|
+
var _default = _exports.default = "5.7.0-beta.2";
|
|
16568
16581
|
});
|
|
16569
16582
|
define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
16570
16583
|
"use strict";
|