ember-cli 4.11.0 → 4.12.0-beta.0
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/CHANGELOG.md +31 -0
- package/blueprints/addon/additional-package.json +1 -1
- package/blueprints/addon/files/.github/workflows/ci.yml +1 -2
- package/blueprints/addon/files/.travis.yml +1 -2
- package/blueprints/addon/files/README.md +2 -2
- package/blueprints/addon/files/addon-config/ember-try.js +4 -22
- package/blueprints/addon/files/npmignore +2 -0
- package/blueprints/addon/index.js +0 -7
- package/blueprints/app/files/.eslintrc.js +8 -4
- package/blueprints/app/files/.stylelintignore +8 -0
- package/blueprints/app/files/.stylelintrc.js +5 -0
- package/blueprints/app/files/app/styles/app.css +1 -0
- package/blueprints/app/files/ember-cli-build.js +0 -13
- package/blueprints/app/files/package.json +16 -9
- package/docs/build/data.json +37 -37
- package/lib/broccoli/default-packager.js +0 -3
- package/lib/commands/addon.js +13 -0
- package/lib/commands/new.js +2 -14
- package/lib/commands/test.js +3 -2
- package/lib/models/blueprint.js +10 -18
- package/lib/tasks/interactive-new.js +6 -4
- package/lib/tasks/npm-task.js +0 -20
- package/lib/tasks/transforms/amd/index.js +2 -2
- package/package.json +20 -18
- package/tests/helpers/assert-version-lock.js +1 -1
- package/lib/commands/uninstall-npm.js +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
+
## v4.12.0-beta.0
|
|
4
|
+
|
|
5
|
+
#### Blueprint Changes
|
|
6
|
+
|
|
7
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.11.0...v4.12.0-beta.0)
|
|
8
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.11.0...v4.12.0-beta.0)
|
|
9
|
+
|
|
10
|
+
#### Changelog
|
|
11
|
+
|
|
12
|
+
- [#10039](https://github.com/ember-cli/ember-cli/pull/10039) [CLEANUP] Remove unused test fixtures [@bertdeblock](https://github.com/bertdeblock)
|
|
13
|
+
- [#10040](https://github.com/ember-cli/ember-cli/pull/10040) [CLEANUP] Remove MU-related debug code [@bertdeblock](https://github.com/bertdeblock)
|
|
14
|
+
- [#10091](https://github.com/ember-cli/ember-cli/pull/10091) [BUGFIX] Fix looking up the default blueprint for scoped addons [@GendelfLugansk](https://github.com/GendelfLugansk)
|
|
15
|
+
- [#10107](https://github.com/ember-cli/ember-cli/pull/10107) [INTERNAL] Remove old `uninstall:npm` command [@bertdeblock](https://github.com/bertdeblock)
|
|
16
|
+
- [#10122](https://github.com/ember-cli/ember-cli/pull/10122) [ENHANCEMENT] Add Stylelint setup to `app` and `addon` blueprints [RFC 814] [@bmish](https://github.com/bmish)
|
|
17
|
+
- [#10142](https://github.com/ember-cli/ember-cli/pull/10142) [ENHANCEMENT] Update ESLint to v8 in `app` and `addon` blueprints [@bertdeblock](https://github.com/bertdeblock)
|
|
18
|
+
- [#10157](https://github.com/ember-cli/ember-cli/pull/10157) [ENHANCEMENT] Exclude `ember-cli-terser` when generating apps using the `--embroider` option [@bertdeblock](https://github.com/bertdeblock)
|
|
19
|
+
- [#10159](https://github.com/ember-cli/ember-cli/pull/10159) [ENHANCEMENT] Exclude `ember-cli-sri` when generating apps using the `--embroider` option [@bertdeblock](https://github.com/bertdeblock)
|
|
20
|
+
- [#10161](https://github.com/ember-cli/ember-cli/pull/10161) [ENHANCEMENT] Remove NPM version checking [@bertdeblock](https://github.com/bertdeblock)
|
|
21
|
+
- [#10166](https://github.com/ember-cli/ember-cli/pull/10166) [INTERNAL] Remove unused dependencies [@bertdeblock](https://github.com/bertdeblock)
|
|
22
|
+
- [#10169](https://github.com/ember-cli/ember-cli/pull/10169) [ENHANCEMENT] Remove `app.import` comment in `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
23
|
+
- [#10172](https://github.com/ember-cli/ember-cli/pull/10172) [PERFORMANCE] Lazy require heavier packages [@bertdeblock](https://github.com/bertdeblock)
|
|
24
|
+
- [#10173](https://github.com/ember-cli/ember-cli/pull/10173) [ENHANCEMENT] Don't delete the newly-generated app directory when an error occurs [@ef4](https://github.com/ef4)
|
|
25
|
+
- [#10174](https://github.com/ember-cli/ember-cli/pull/10174) [INTERNAL] Clean up removal of `bower.json` and `package.json` files in `addon` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
26
|
+
- [#10180](https://github.com/ember-cli/ember-cli/pull/10180) [ENHANCEMENT] Update `ember-welcome-page` to v7 in `app` blueprint [@ijlee2](https://github.com/ijlee2)
|
|
27
|
+
- [#10188](https://github.com/ember-cli/ember-cli/pull/10188) [ENHANCEMENT] Update ESLint parser `ecmaVersion` to `latest` in `app` blueprint [@elwayman02](https://github.com/elwayman02)
|
|
28
|
+
- [#10189](https://github.com/ember-cli/ember-cli/pull/10189) [ENHANCEMENT] Add v4.8 LTS to `addon` blueprint - Remove v3.28 LTS and `ember-classic` scenario [@bertdeblock](https://github.com/bertdeblock)
|
|
29
|
+
- [#10192](https://github.com/ember-cli/ember-cli/pull/10192) [BUGFIX] The `addon` command should throw when no addon name is provided [@bertdeblock](https://github.com/bertdeblock)
|
|
30
|
+
- [#10198](https://github.com/ember-cli/ember-cli/pull/10198) [INTERNAL] Output TypeScript apps and addons for StackBlitz [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
31
|
+
|
|
32
|
+
Thank you to all who took the time to contribute!
|
|
33
|
+
|
|
3
34
|
## v4.11.0
|
|
4
35
|
|
|
5
36
|
#### Blueprint Changes
|
|
@@ -51,12 +51,11 @@ jobs:
|
|
|
51
51
|
|
|
52
52
|
# we recommend new addons test the current and previous LTS
|
|
53
53
|
# as well as latest stable release (bonus points to beta/canary)
|
|
54
|
-
- env: EMBER_TRY_SCENARIO=ember-lts-3.28
|
|
55
54
|
- env: EMBER_TRY_SCENARIO=ember-lts-4.4
|
|
55
|
+
- env: EMBER_TRY_SCENARIO=ember-lts-4.8
|
|
56
56
|
- env: EMBER_TRY_SCENARIO=ember-release
|
|
57
57
|
- env: EMBER_TRY_SCENARIO=ember-beta
|
|
58
58
|
- env: EMBER_TRY_SCENARIO=ember-canary
|
|
59
|
-
- env: EMBER_TRY_SCENARIO=ember-classic
|
|
60
59
|
- env: EMBER_TRY_SCENARIO=embroider-safe
|
|
61
60
|
- env: EMBER_TRY_SCENARIO=embroider-optimized
|
|
62
61
|
<% if (yarn) { %>
|
|
@@ -8,18 +8,18 @@ module.exports = async function () {
|
|
|
8
8
|
<% if (yarn) { %>useYarn: true,
|
|
9
9
|
<% } %>scenarios: [
|
|
10
10
|
{
|
|
11
|
-
name: 'ember-lts-
|
|
11
|
+
name: 'ember-lts-4.4',
|
|
12
12
|
npm: {
|
|
13
13
|
devDependencies: {
|
|
14
|
-
'ember-source': '~
|
|
14
|
+
'ember-source': '~4.4.0',
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
name: 'ember-lts-4.
|
|
19
|
+
name: 'ember-lts-4.8',
|
|
20
20
|
npm: {
|
|
21
21
|
devDependencies: {
|
|
22
|
-
'ember-source': '~4.
|
|
22
|
+
'ember-source': '~4.8.0',
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
@@ -47,24 +47,6 @@ module.exports = async function () {
|
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
name: 'ember-classic',
|
|
52
|
-
env: {
|
|
53
|
-
EMBER_OPTIONAL_FEATURES: JSON.stringify({
|
|
54
|
-
'application-template-wrapper': true,
|
|
55
|
-
'default-async-observers': false,
|
|
56
|
-
'template-only-glimmer-components': false,
|
|
57
|
-
}),
|
|
58
|
-
},
|
|
59
|
-
npm: {
|
|
60
|
-
devDependencies: {
|
|
61
|
-
'ember-source': '~3.28.0',
|
|
62
|
-
},
|
|
63
|
-
ember: {
|
|
64
|
-
edition: 'classic',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
50
|
embroiderSafe(),
|
|
69
51
|
embroiderOptimized(),
|
|
70
52
|
],
|
|
@@ -111,13 +111,6 @@ module.exports = {
|
|
|
111
111
|
},
|
|
112
112
|
|
|
113
113
|
async afterInstall(options) {
|
|
114
|
-
let packagePath = path.join(this.path, 'files', 'package.json');
|
|
115
|
-
let bowerPath = path.join(this.path, 'files', 'bower.json');
|
|
116
|
-
|
|
117
|
-
[packagePath, bowerPath].forEach((filePath) => {
|
|
118
|
-
fs.removeSync(filePath);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
114
|
if (options.typescript) {
|
|
122
115
|
await this.addAddonToProject({
|
|
123
116
|
name: 'ember-cli-typescript',
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
root: true,
|
|
5
|
-
parser: '<%= typescript ? '@typescript-eslint/parser' : 'babel-
|
|
5
|
+
parser: '<%= typescript ? '@typescript-eslint/parser' : '@babel/eslint-parser' %>',
|
|
6
6
|
parserOptions: {
|
|
7
|
-
ecmaVersion:
|
|
7
|
+
ecmaVersion: 'latest',<% if (!typescript) { %>
|
|
8
8
|
sourceType: 'module',
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
requireConfigFile: false,
|
|
10
|
+
babelOptions: {
|
|
11
|
+
plugins: [
|
|
12
|
+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
|
|
13
|
+
],
|
|
11
14
|
},<% } %>
|
|
12
15
|
},
|
|
13
16
|
plugins: ['ember'<% if (typescript) { %>, '@typescript-eslint'<% } %>],
|
|
@@ -35,6 +38,7 @@ module.exports = {
|
|
|
35
38
|
files: [
|
|
36
39
|
'./.eslintrc.js',
|
|
37
40
|
'./.prettierrc.js',
|
|
41
|
+
'./.stylelintrc.js',
|
|
38
42
|
'./.template-lintrc.js',
|
|
39
43
|
'./ember-cli-build.js',<% if (blueprint !== 'app') { %>
|
|
40
44
|
'./index.js',<% } %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
|
|
@@ -7,19 +7,6 @@ module.exports = function (defaults) {
|
|
|
7
7
|
// Add options here
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
// Use `app.import` to add additional libraries to the generated
|
|
11
|
-
// output files.
|
|
12
|
-
//
|
|
13
|
-
// If you need to use different assets in different
|
|
14
|
-
// environments, specify an object as the first parameter. That
|
|
15
|
-
// object's keys should be the environment name and the values
|
|
16
|
-
// should be the asset to use in that environment.
|
|
17
|
-
//
|
|
18
|
-
// If the library that you are including contains AMD or ES6
|
|
19
|
-
// modules that you would like to import into your application
|
|
20
|
-
// please specify an object with the list of modules as keys
|
|
21
|
-
// along with the exports of each module as its value.
|
|
22
|
-
|
|
23
10
|
<% if (embroider) { %>const { Webpack } = require('@embroider/webpack');
|
|
24
11
|
return require('@embroider/compat').compatBuild(app, Webpack, {
|
|
25
12
|
skipBabel: [
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "ember build --environment=production",
|
|
15
15
|
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
16
|
+
"lint:css": "stylelint \"**/*.css\"",
|
|
17
|
+
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
|
|
16
18
|
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
17
19
|
"lint:hbs": "ember-template-lint .",
|
|
18
20
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
@@ -24,7 +26,9 @@
|
|
|
24
26
|
"test:ember": "ember test"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"
|
|
29
|
+
"<% if (!typescript) { %>@babel/eslint-parser": "^7.19.1",
|
|
30
|
+
"@babel/plugin-proposal-decorators": "^7.21.0",
|
|
31
|
+
"<% } %>@ember/optional-features": "^2.0.0",
|
|
28
32
|
"@ember/string": "^3.0.1",
|
|
29
33
|
"@ember/test-helpers": "^2.9.3<% if (embroider) { %>",
|
|
30
34
|
"@embroider/compat": "^2.1.1",
|
|
@@ -32,9 +36,8 @@
|
|
|
32
36
|
"@embroider/webpack": "^2.1.1<% } %>",
|
|
33
37
|
"@glimmer/component": "^1.1.2",
|
|
34
38
|
"@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "^5.54.
|
|
36
|
-
"@typescript-eslint/parser": "^5.54.
|
|
37
|
-
"babel-eslint": "^10.1.0<% } %>",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
|
40
|
+
"@typescript-eslint/parser": "^5.54.1<% } %>",
|
|
38
41
|
"broccoli-asset-rev": "^3.0.0",
|
|
39
42
|
"concurrently": "^7.6.0",
|
|
40
43
|
"ember-auto-import": "^2.6.1",
|
|
@@ -43,9 +46,9 @@
|
|
|
43
46
|
"ember-cli-babel": "^7.26.11",
|
|
44
47
|
"ember-cli-dependency-checker": "^3.3.1",
|
|
45
48
|
"ember-cli-htmlbars": "^6.2.0",
|
|
46
|
-
"ember-cli-inject-live-reload": "^2.1.0",
|
|
49
|
+
"ember-cli-inject-live-reload": "^2.1.0<% if (!embroider) { %>",
|
|
47
50
|
"ember-cli-sri": "^2.1.1",
|
|
48
|
-
"ember-cli-terser": "^4.0.2",
|
|
51
|
+
"ember-cli-terser": "^4.0.2<% } %>",
|
|
49
52
|
"ember-data": "~4.11.3",
|
|
50
53
|
"ember-fetch": "^8.1.2",
|
|
51
54
|
"ember-load-initializers": "^2.1.2",
|
|
@@ -53,11 +56,11 @@
|
|
|
53
56
|
"ember-page-title": "^7.0.0",
|
|
54
57
|
"ember-qunit": "^6.2.0",
|
|
55
58
|
"ember-resolver": "^10.0.0",
|
|
56
|
-
"ember-source": "~4.
|
|
59
|
+
"ember-source": "~4.12.0-beta.2",
|
|
57
60
|
"ember-template-lint": "^5.6.0<% if (welcome) { %>",
|
|
58
61
|
"ember-welcome-page": "^7.0.1<% } %>",
|
|
59
|
-
"eslint": "^
|
|
60
|
-
"eslint-config-prettier": "^8.
|
|
62
|
+
"eslint": "^8.35.0",
|
|
63
|
+
"eslint-config-prettier": "^8.7.0",
|
|
61
64
|
"eslint-plugin-ember": "^11.4.7",
|
|
62
65
|
"eslint-plugin-n": "^15.6.1",
|
|
63
66
|
"eslint-plugin-prettier": "^4.2.1",
|
|
@@ -66,6 +69,10 @@
|
|
|
66
69
|
"prettier": "^2.8.4",
|
|
67
70
|
"qunit": "^2.19.4",
|
|
68
71
|
"qunit-dom": "^2.0.0",
|
|
72
|
+
"stylelint": "^15.2.0",
|
|
73
|
+
"stylelint-config-prettier": "^9.0.5",
|
|
74
|
+
"stylelint-config-standard": "^30.0.1",
|
|
75
|
+
"stylelint-prettier": "^3.0.0",
|
|
69
76
|
"tracked-built-ins": "^3.1.1",
|
|
70
77
|
"webpack": "^5.75.0"
|
|
71
78
|
},
|
package/docs/build/data.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"logo": "https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png",
|
|
4
4
|
"name": "ember-cli",
|
|
5
5
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.12.0-beta.0-beta-3c14502fb3"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"lib\\broccoli\\default-packager.js": {
|
|
@@ -613,7 +613,7 @@
|
|
|
613
613
|
"module": "ember-cli",
|
|
614
614
|
"namespace": "Blueprint",
|
|
615
615
|
"file": "lib\\models\\blueprint.js",
|
|
616
|
-
"line":
|
|
616
|
+
"line": 31,
|
|
617
617
|
"description": "A blueprint is a bundle of template files with optional install\nlogic.\n\nBlueprints follow a simple structure. Let's take the built-in\n`controller` blueprint as an example:\n\n```\nblueprints/controller\n├── files\n│ ├── app\n│ │ └── __path__\n│ │ └── __name__.js\n└── index.js\n\nblueprints/controller-test\n├── files\n│ └── tests\n│ └── unit\n│ └── controllers\n│ └── __test__.js\n└── index.js\n```\n\n## Files\n\n`files` contains templates for the all the files to be\ninstalled into the target directory.\n\nThe `__name__` token is subtituted with the dasherized\nentity name at install time. For example, when the user\ninvokes `ember generate controller foo` then `__name__` becomes\n`foo`. When the `--pod` flag is used, for example `ember\ngenerate controller foo --pod` then `__name__` becomes\n`controller`.\n\nThe `__path__` token is substituted with the blueprint\nname at install time. For example, when the user invokes\n`ember generate controller foo` then `__path__` becomes\n`controller`. When the `--pod` flag is used, for example\n`ember generate controller foo --pod` then `__path__`\nbecomes `foo` (or `<podModulePrefix>/foo` if the\npodModulePrefix is defined). This token is primarily for\npod support, and is only necessary if the blueprint can be\nused in pod structure. If the blueprint does not require pod\nsupport, simply use the blueprint name instead of the\n`__path__` token.\n\nThe `__test__` token is substituted with the dasherized\nentity name and appended with `-test` at install time.\nThis token is primarily for pod support and only necessary\nif the blueprint requires support for a pod structure. If\nthe blueprint does not require pod support, simply use the\n`__name__` token instead.\n\n## Template Variables (AKA Locals)\n\nVariables can be inserted into templates with\n`<%= someVariableName %>`.\n\nFor example, the built-in `util` blueprint\n`files/app/utils/__name__.js` looks like this:\n\n```js\nexport default function <%= camelizedModuleName %>() {\n return true;\n}\n```\n\n`<%= camelizedModuleName %>` is replaced with the real\nvalue at install time.\n\nThe following template variables are provided by default:\n\n- `dasherizedPackageName`\n- `classifiedPackageName`\n- `dasherizedModuleName`\n- `classifiedModuleName`\n- `camelizedModuleName`\n\n`packageName` is the project name as found in the project's\n`package.json`.\n\n`moduleName` is the name of the entity being generated.\n\nThe mechanism for providing custom template variables is\ndescribed below.\n\n## Index.js\n\nCustom installation and uninstallation behavior can be added\nby overriding the hooks documented below. `index.js` should\nexport a plain object, which will extend the prototype of the\n`Blueprint` class. If needed, the original `Blueprint` prototype\ncan be accessed through the `_super` property.\n\n```js\nmodule.exports = {\n locals(options) {\n // Return custom template variables here.\n return {};\n },\n\n normalizeEntityName(entityName) {\n // Normalize and validate entity name here.\n return entityName;\n },\n\n fileMapTokens(options) {\n // Return custom tokens to be replaced in your files\n return {\n __token__(options){\n // logic to determine value goes here\n return 'value';\n }\n }\n },\n\n filesPath(options) {\n return path.join(this.path, 'files');\n },\n\n beforeInstall(options) {},\n afterInstall(options) {},\n beforeUninstall(options) {},\n afterUninstall(options) {}\n\n};\n```\n\n## Blueprint Hooks\n\n### beforeInstall & beforeUninstall\n\nCalled before any of the template files are processed and receives\nthe `options` and `locals` hashes as parameters. Typically used for\nvalidating any additional command line options or for any asynchronous\nsetup that is needed. As an example, the `controller` blueprint validates\nits `--type` option in this hook. If you need to run any asynchronous code,\nwrap it in a promise and return that promise from these hooks. This will\nensure that your code is executed correctly.\n\n### afterInstall & afterUninstall\n\nThe `afterInstall` and `afterUninstall` hooks receives the same\narguments as `locals`. Use it to perform any custom work after the\nfiles are processed. For example, the built-in `route` blueprint\nuses these hooks to add and remove relevant route declarations in\n`app/router.js`.\n\n### Overriding Install\n\nIf you don't want your blueprint to install the contents of\n`files` you can override the `install` method. It receives the\nsame `options` object described above and must return a promise.\nSee the built-in `resource` blueprint for an example of this.",
|
|
618
618
|
"is_constructor": 1,
|
|
619
619
|
"extends": "CoreObject",
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
"module": "ember-cli",
|
|
798
798
|
"namespace": "",
|
|
799
799
|
"file": "lib\\tasks\\transforms\\amd\\index.js",
|
|
800
|
-
"line":
|
|
800
|
+
"line": 4,
|
|
801
801
|
"description": "This addon is used to register a custom AMD transform for app and addons to use.",
|
|
802
802
|
"is_constructor": 1
|
|
803
803
|
},
|
|
@@ -3661,7 +3661,7 @@
|
|
|
3661
3661
|
},
|
|
3662
3662
|
{
|
|
3663
3663
|
"file": "lib\\models\\blueprint.js",
|
|
3664
|
-
"line":
|
|
3664
|
+
"line": 200,
|
|
3665
3665
|
"description": "Indicates whether or not a blueprint is a candidate for automatic transpilation from TS to JS.\nThis property could be false in the case that the blueprint is written in JS and is not intended\nto work with TS at all, OR in the case that the blueprint is written in TS and the author does\nnot intend to support transpilation to JS.",
|
|
3666
3666
|
"access": "public",
|
|
3667
3667
|
"tagname": "",
|
|
@@ -3673,7 +3673,7 @@
|
|
|
3673
3673
|
},
|
|
3674
3674
|
{
|
|
3675
3675
|
"file": "lib\\models\\blueprint.js",
|
|
3676
|
-
"line":
|
|
3676
|
+
"line": 221,
|
|
3677
3677
|
"description": "Process the options object coming from either\nthe `init`, `install` or `uninstall` hook.",
|
|
3678
3678
|
"access": "private",
|
|
3679
3679
|
"tagname": "",
|
|
@@ -3691,7 +3691,7 @@
|
|
|
3691
3691
|
},
|
|
3692
3692
|
{
|
|
3693
3693
|
"file": "lib\\models\\blueprint.js",
|
|
3694
|
-
"line":
|
|
3694
|
+
"line": 237,
|
|
3695
3695
|
"description": "Hook to specify the path to the blueprint's files. By default this is\n`path.join(this.path, 'files)`.\n\nThis can be used to customize which set of files to install based on options\nor environmental variables. It defaults to the `files` directory within the\nblueprint's folder.",
|
|
3696
3696
|
"access": "public",
|
|
3697
3697
|
"tagname": "",
|
|
@@ -3713,7 +3713,7 @@
|
|
|
3713
3713
|
},
|
|
3714
3714
|
{
|
|
3715
3715
|
"file": "lib\\models\\blueprint.js",
|
|
3716
|
-
"line":
|
|
3716
|
+
"line": 254,
|
|
3717
3717
|
"description": "Used to retrieve files for blueprint.",
|
|
3718
3718
|
"access": "public",
|
|
3719
3719
|
"tagname": "",
|
|
@@ -3735,7 +3735,7 @@
|
|
|
3735
3735
|
},
|
|
3736
3736
|
{
|
|
3737
3737
|
"file": "lib\\models\\blueprint.js",
|
|
3738
|
-
"line":
|
|
3738
|
+
"line": 277,
|
|
3739
3739
|
"itemtype": "method",
|
|
3740
3740
|
"name": "srcPath",
|
|
3741
3741
|
"params": [
|
|
@@ -3754,7 +3754,7 @@
|
|
|
3754
3754
|
},
|
|
3755
3755
|
{
|
|
3756
3756
|
"file": "lib\\models\\blueprint.js",
|
|
3757
|
-
"line":
|
|
3757
|
+
"line": 286,
|
|
3758
3758
|
"description": "Hook for normalizing entity name\n\nUse the `normalizeEntityName` hook to add custom normalization and\nvalidation of the provided entity name. The default hook does not\nmake any changes to the entity name, but makes sure an entity name\nis present and that it doesn't have a trailing slash.\n\nThis hook receives the entity name as its first argument. The string\nreturned by this hook will be used as the new entity name.",
|
|
3759
3759
|
"access": "public",
|
|
3760
3760
|
"tagname": "",
|
|
@@ -3776,7 +3776,7 @@
|
|
|
3776
3776
|
},
|
|
3777
3777
|
{
|
|
3778
3778
|
"file": "lib\\models\\blueprint.js",
|
|
3779
|
-
"line":
|
|
3779
|
+
"line": 306,
|
|
3780
3780
|
"description": "Write a status and message to the UI",
|
|
3781
3781
|
"access": "private",
|
|
3782
3782
|
"tagname": "",
|
|
@@ -3804,7 +3804,7 @@
|
|
|
3804
3804
|
},
|
|
3805
3805
|
{
|
|
3806
3806
|
"file": "lib\\models\\blueprint.js",
|
|
3807
|
-
"line":
|
|
3807
|
+
"line": 320,
|
|
3808
3808
|
"access": "private",
|
|
3809
3809
|
"tagname": "",
|
|
3810
3810
|
"itemtype": "method",
|
|
@@ -3825,7 +3825,7 @@
|
|
|
3825
3825
|
},
|
|
3826
3826
|
{
|
|
3827
3827
|
"file": "lib\\models\\blueprint.js",
|
|
3828
|
-
"line":
|
|
3828
|
+
"line": 332,
|
|
3829
3829
|
"description": "Actions lookup",
|
|
3830
3830
|
"access": "private",
|
|
3831
3831
|
"tagname": "",
|
|
@@ -3837,7 +3837,7 @@
|
|
|
3837
3837
|
},
|
|
3838
3838
|
{
|
|
3839
3839
|
"file": "lib\\models\\blueprint.js",
|
|
3840
|
-
"line":
|
|
3840
|
+
"line": 370,
|
|
3841
3841
|
"description": "Calls an action.",
|
|
3842
3842
|
"access": "private",
|
|
3843
3843
|
"tagname": "",
|
|
@@ -3863,7 +3863,7 @@
|
|
|
3863
3863
|
},
|
|
3864
3864
|
{
|
|
3865
3865
|
"file": "lib\\models\\blueprint.js",
|
|
3866
|
-
"line":
|
|
3866
|
+
"line": 388,
|
|
3867
3867
|
"description": "Prints warning for pod unsupported.",
|
|
3868
3868
|
"access": "private",
|
|
3869
3869
|
"tagname": "",
|
|
@@ -3874,7 +3874,7 @@
|
|
|
3874
3874
|
},
|
|
3875
3875
|
{
|
|
3876
3876
|
"file": "lib\\models\\blueprint.js",
|
|
3877
|
-
"line":
|
|
3877
|
+
"line": 405,
|
|
3878
3878
|
"access": "private",
|
|
3879
3879
|
"tagname": "",
|
|
3880
3880
|
"itemtype": "method",
|
|
@@ -3891,7 +3891,7 @@
|
|
|
3891
3891
|
},
|
|
3892
3892
|
{
|
|
3893
3893
|
"file": "lib\\models\\blueprint.js",
|
|
3894
|
-
"line":
|
|
3894
|
+
"line": 416,
|
|
3895
3895
|
"access": "private",
|
|
3896
3896
|
"tagname": "",
|
|
3897
3897
|
"itemtype": "method",
|
|
@@ -3908,7 +3908,7 @@
|
|
|
3908
3908
|
},
|
|
3909
3909
|
{
|
|
3910
3910
|
"file": "lib\\models\\blueprint.js",
|
|
3911
|
-
"line":
|
|
3911
|
+
"line": 445,
|
|
3912
3912
|
"access": "private",
|
|
3913
3913
|
"tagname": "",
|
|
3914
3914
|
"itemtype": "method",
|
|
@@ -3940,7 +3940,7 @@
|
|
|
3940
3940
|
},
|
|
3941
3941
|
{
|
|
3942
3942
|
"file": "lib\\models\\blueprint.js",
|
|
3943
|
-
"line":
|
|
3943
|
+
"line": 471,
|
|
3944
3944
|
"access": "private",
|
|
3945
3945
|
"tagname": "",
|
|
3946
3946
|
"itemtype": "method",
|
|
@@ -3966,7 +3966,7 @@
|
|
|
3966
3966
|
},
|
|
3967
3967
|
{
|
|
3968
3968
|
"file": "lib\\models\\blueprint.js",
|
|
3969
|
-
"line":
|
|
3969
|
+
"line": 525,
|
|
3970
3970
|
"access": "private",
|
|
3971
3971
|
"tagname": "",
|
|
3972
3972
|
"itemtype": "method",
|
|
@@ -4716,7 +4716,7 @@
|
|
|
4716
4716
|
},
|
|
4717
4717
|
{
|
|
4718
4718
|
"file": "lib\\models\\blueprint.js",
|
|
4719
|
-
"line":
|
|
4719
|
+
"line": 1536,
|
|
4720
4720
|
"description": "Loads a blueprint from given path.",
|
|
4721
4721
|
"static": 1,
|
|
4722
4722
|
"itemtype": "method",
|
|
@@ -4744,7 +4744,7 @@
|
|
|
4744
4744
|
},
|
|
4745
4745
|
{
|
|
4746
4746
|
"file": "lib\\models\\blueprint.js",
|
|
4747
|
-
"line":
|
|
4747
|
+
"line": 1564,
|
|
4748
4748
|
"static": 1,
|
|
4749
4749
|
"itemtype": "method",
|
|
4750
4750
|
"name": "list",
|
|
@@ -4774,7 +4774,7 @@
|
|
|
4774
4774
|
},
|
|
4775
4775
|
{
|
|
4776
4776
|
"file": "lib\\models\\blueprint.js",
|
|
4777
|
-
"line":
|
|
4777
|
+
"line": 1613,
|
|
4778
4778
|
"description": "Files that are renamed when installed into the target directory.\nThis allows including files in the blueprint that would have an effect\non another process, such as a file named `.gitignore`.\n\nThe keys are the filenames used in the files folder.\nThe values are the filenames used in the target directory.",
|
|
4779
4779
|
"static": 1,
|
|
4780
4780
|
"itemtype": "property",
|
|
@@ -4785,7 +4785,7 @@
|
|
|
4785
4785
|
},
|
|
4786
4786
|
{
|
|
4787
4787
|
"file": "lib\\models\\blueprint.js",
|
|
4788
|
-
"line":
|
|
4788
|
+
"line": 1628,
|
|
4789
4789
|
"static": 1,
|
|
4790
4790
|
"itemtype": "property",
|
|
4791
4791
|
"name": "ignoredFiles",
|
|
@@ -4795,7 +4795,7 @@
|
|
|
4795
4795
|
},
|
|
4796
4796
|
{
|
|
4797
4797
|
"file": "lib\\models\\blueprint.js",
|
|
4798
|
-
"line":
|
|
4798
|
+
"line": 1634,
|
|
4799
4799
|
"static": 1,
|
|
4800
4800
|
"itemtype": "property",
|
|
4801
4801
|
"name": "ignoredUpdateFiles",
|
|
@@ -4805,7 +4805,7 @@
|
|
|
4805
4805
|
},
|
|
4806
4806
|
{
|
|
4807
4807
|
"file": "lib\\models\\blueprint.js",
|
|
4808
|
-
"line":
|
|
4808
|
+
"line": 1640,
|
|
4809
4809
|
"static": 1,
|
|
4810
4810
|
"itemtype": "property",
|
|
4811
4811
|
"name": "defaultLookupPaths",
|
|
@@ -4815,7 +4815,7 @@
|
|
|
4815
4815
|
},
|
|
4816
4816
|
{
|
|
4817
4817
|
"file": "lib\\models\\blueprint.js",
|
|
4818
|
-
"line":
|
|
4818
|
+
"line": 1648,
|
|
4819
4819
|
"access": "private",
|
|
4820
4820
|
"tagname": "",
|
|
4821
4821
|
"itemtype": "method",
|
|
@@ -4837,7 +4837,7 @@
|
|
|
4837
4837
|
},
|
|
4838
4838
|
{
|
|
4839
4839
|
"file": "lib\\models\\blueprint.js",
|
|
4840
|
-
"line":
|
|
4840
|
+
"line": 1661,
|
|
4841
4841
|
"access": "private",
|
|
4842
4842
|
"tagname": "",
|
|
4843
4843
|
"itemtype": "method",
|
|
@@ -4855,7 +4855,7 @@
|
|
|
4855
4855
|
},
|
|
4856
4856
|
{
|
|
4857
4857
|
"file": "lib\\models\\blueprint.js",
|
|
4858
|
-
"line":
|
|
4858
|
+
"line": 1672,
|
|
4859
4859
|
"access": "private",
|
|
4860
4860
|
"tagname": "",
|
|
4861
4861
|
"itemtype": "method",
|
|
@@ -4873,7 +4873,7 @@
|
|
|
4873
4873
|
},
|
|
4874
4874
|
{
|
|
4875
4875
|
"file": "lib\\models\\blueprint.js",
|
|
4876
|
-
"line":
|
|
4876
|
+
"line": 1681,
|
|
4877
4877
|
"access": "private",
|
|
4878
4878
|
"tagname": "",
|
|
4879
4879
|
"itemtype": "method",
|
|
@@ -4900,7 +4900,7 @@
|
|
|
4900
4900
|
},
|
|
4901
4901
|
{
|
|
4902
4902
|
"file": "lib\\models\\blueprint.js",
|
|
4903
|
-
"line":
|
|
4903
|
+
"line": 1695,
|
|
4904
4904
|
"access": "private",
|
|
4905
4905
|
"tagname": "",
|
|
4906
4906
|
"itemtype": "method",
|
|
@@ -4922,7 +4922,7 @@
|
|
|
4922
4922
|
},
|
|
4923
4923
|
{
|
|
4924
4924
|
"file": "lib\\models\\blueprint.js",
|
|
4925
|
-
"line":
|
|
4925
|
+
"line": 1707,
|
|
4926
4926
|
"description": "Combines provided lookup paths with defaults and removes\nduplicates.",
|
|
4927
4927
|
"access": "private",
|
|
4928
4928
|
"tagname": "",
|
|
@@ -4945,7 +4945,7 @@
|
|
|
4945
4945
|
},
|
|
4946
4946
|
{
|
|
4947
4947
|
"file": "lib\\models\\blueprint.js",
|
|
4948
|
-
"line":
|
|
4948
|
+
"line": 1722,
|
|
4949
4949
|
"description": "Looks for a __path__ token in the files folder. Must be present for\nthe blueprint to support pod tokens.",
|
|
4950
4950
|
"access": "private",
|
|
4951
4951
|
"tagname": "",
|
|
@@ -4968,7 +4968,7 @@
|
|
|
4968
4968
|
},
|
|
4969
4969
|
{
|
|
4970
4970
|
"file": "lib\\models\\blueprint.js",
|
|
4971
|
-
"line":
|
|
4971
|
+
"line": 1761,
|
|
4972
4972
|
"access": "private",
|
|
4973
4973
|
"tagname": "",
|
|
4974
4974
|
"itemtype": "method",
|
|
@@ -4990,7 +4990,7 @@
|
|
|
4990
4990
|
},
|
|
4991
4991
|
{
|
|
4992
4992
|
"file": "lib\\models\\blueprint.js",
|
|
4993
|
-
"line":
|
|
4993
|
+
"line": 1775,
|
|
4994
4994
|
"access": "private",
|
|
4995
4995
|
"tagname": "",
|
|
4996
4996
|
"itemtype": "method",
|
|
@@ -5012,7 +5012,7 @@
|
|
|
5012
5012
|
},
|
|
5013
5013
|
{
|
|
5014
5014
|
"file": "lib\\models\\blueprint.js",
|
|
5015
|
-
"line":
|
|
5015
|
+
"line": 1785,
|
|
5016
5016
|
"access": "private",
|
|
5017
5017
|
"tagname": "",
|
|
5018
5018
|
"itemtype": "method",
|
|
@@ -5027,7 +5027,7 @@
|
|
|
5027
5027
|
},
|
|
5028
5028
|
{
|
|
5029
5029
|
"file": "lib\\models\\blueprint.js",
|
|
5030
|
-
"line":
|
|
5030
|
+
"line": 1798,
|
|
5031
5031
|
"access": "private",
|
|
5032
5032
|
"tagname": "",
|
|
5033
5033
|
"itemtype": "method",
|
|
@@ -6422,7 +6422,7 @@
|
|
|
6422
6422
|
},
|
|
6423
6423
|
{
|
|
6424
6424
|
"file": "lib\\tasks\\npm-task.js",
|
|
6425
|
-
"line":
|
|
6425
|
+
"line": 131,
|
|
6426
6426
|
"description": "This method will determine what package manager (npm or yarn) should be\nused to install the npm dependencies.\n\nSetting `this.useYarn` to `true` or `false` will force the use of yarn\nor npm respectively.\n\nIf `this.useYarn` is not set we check if `yarn.lock` exists and if\n`yarn` is available and in that case set `useYarn` to `true`.",
|
|
6427
6427
|
"access": "private",
|
|
6428
6428
|
"tagname": "",
|
|
@@ -557,10 +557,7 @@ module.exports = class DefaultPackager {
|
|
|
557
557
|
};
|
|
558
558
|
|
|
559
559
|
let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree);
|
|
560
|
-
stylesAndVendor = this._debugTree(stylesAndVendor, 'mu-layout:addonsPreprocessTree:css');
|
|
561
|
-
|
|
562
560
|
let preprocessedStyles = preprocessCss(stylesAndVendor, '/app/styles', '/assets', options);
|
|
563
|
-
preprocessedStyles = this._debugTree(preprocessedStyles, 'mu-layout:preprocess:css');
|
|
564
561
|
|
|
565
562
|
let vendorStyles = [];
|
|
566
563
|
for (let outputFile in this.styleOutputFiles) {
|
package/lib/commands/addon.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const SilentError = require('silent-error');
|
|
3
4
|
const NewCommand = require('./new');
|
|
4
5
|
|
|
5
6
|
module.exports = NewCommand.extend({
|
|
@@ -30,4 +31,16 @@ module.exports = NewCommand.extend({
|
|
|
30
31
|
],
|
|
31
32
|
|
|
32
33
|
anonymousOptions: ['<addon-name>'],
|
|
34
|
+
|
|
35
|
+
run(commandOptions, commandArguments) {
|
|
36
|
+
let addonName = commandArguments[0];
|
|
37
|
+
|
|
38
|
+
if (addonName) {
|
|
39
|
+
return this._super(commandOptions, commandArguments);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return Promise.reject(
|
|
43
|
+
new SilentError('The `ember addon` command requires a name to be specified. For more details, run `ember help`.')
|
|
44
|
+
);
|
|
45
|
+
},
|
|
33
46
|
});
|
package/lib/commands/new.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const fs = require('fs-extra');
|
|
4
3
|
const chalk = require('chalk');
|
|
5
4
|
const Command = require('../models/command');
|
|
6
5
|
const Project = require('../models/project');
|
|
@@ -115,7 +114,7 @@ module.exports = Command.extend({
|
|
|
115
114
|
project: Project.nullProject(this.ui, this.cli),
|
|
116
115
|
});
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
await this.runTask('CreateAndStepIntoDirectory', {
|
|
119
118
|
projectName,
|
|
120
119
|
directoryName: commandOptions.directory,
|
|
121
120
|
dryRun: commandOptions.dryRun,
|
|
@@ -123,17 +122,6 @@ module.exports = Command.extend({
|
|
|
123
122
|
|
|
124
123
|
initCommand.project.root = process.cwd();
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
let response = await initCommand.run(commandOptions, rawArgs);
|
|
128
|
-
return response;
|
|
129
|
-
} catch (err) {
|
|
130
|
-
let { initialDirectory, projectDirectory } = opts;
|
|
131
|
-
|
|
132
|
-
process.chdir(initialDirectory);
|
|
133
|
-
await fs.remove(projectDirectory);
|
|
134
|
-
|
|
135
|
-
console.log(chalk.red(`Error creating new application. Removing generated directory \`./${projectDirectory}\``));
|
|
136
|
-
throw err;
|
|
137
|
-
}
|
|
125
|
+
return await initCommand.run(commandOptions, rawArgs);
|
|
138
126
|
},
|
|
139
127
|
});
|
package/lib/commands/test.js
CHANGED
|
@@ -10,8 +10,6 @@ const fs = require('fs');
|
|
|
10
10
|
const temp = require('temp');
|
|
11
11
|
temp.track();
|
|
12
12
|
|
|
13
|
-
require('express').static.mime.define({ 'application/wasm': ['wasm'] });
|
|
14
|
-
|
|
15
13
|
let defaultPort = 7357;
|
|
16
14
|
|
|
17
15
|
module.exports = Command.extend({
|
|
@@ -81,6 +79,9 @@ module.exports = Command.extend({
|
|
|
81
79
|
init() {
|
|
82
80
|
this._super.apply(this, arguments);
|
|
83
81
|
|
|
82
|
+
// Make sure Testem supports the Wasm MIME type:
|
|
83
|
+
require('express').static.mime.define({ 'application/wasm': ['wasm'] });
|
|
84
|
+
|
|
84
85
|
this.Builder = this.Builder || Builder;
|
|
85
86
|
this.Watcher = this.Watcher || Watcher;
|
|
86
87
|
|
package/lib/models/blueprint.js
CHANGED
|
@@ -23,7 +23,6 @@ const EOL = require('os').EOL;
|
|
|
23
23
|
const bowEpParser = require('bower-endpoint-parser');
|
|
24
24
|
const logger = require('heimdalljs-logger')('ember-cli:blueprint');
|
|
25
25
|
const normalizeEntityName = require('ember-cli-normalize-entity-name');
|
|
26
|
-
const { removeTypes } = require('remove-types');
|
|
27
26
|
const isAddon = require('../utilities/is-addon');
|
|
28
27
|
const { deprecate } = require('../debug');
|
|
29
28
|
|
|
@@ -532,6 +531,7 @@ let Blueprint = CoreObject.extend({
|
|
|
532
531
|
async convertToJS(fileInfo) {
|
|
533
532
|
let rendered = await fileInfo.render();
|
|
534
533
|
|
|
534
|
+
const { removeTypes } = require('remove-types');
|
|
535
535
|
const transformed = await removeTypes(rendered);
|
|
536
536
|
|
|
537
537
|
fileInfo.rendered = transformed;
|
|
@@ -1508,23 +1508,6 @@ let Blueprint = CoreObject.extend({
|
|
|
1508
1508
|
Blueprint.lookup = function (name, options) {
|
|
1509
1509
|
options = options || {};
|
|
1510
1510
|
|
|
1511
|
-
if (name.includes(path.sep)) {
|
|
1512
|
-
let blueprintPath = path.resolve(name);
|
|
1513
|
-
let isNameAPath = Boolean(blueprintPath);
|
|
1514
|
-
|
|
1515
|
-
if (isNameAPath) {
|
|
1516
|
-
if (Blueprint._existsSync(blueprintPath)) {
|
|
1517
|
-
return Blueprint.load(blueprintPath, options.blueprintOptions);
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
if (!options.ignoreMissing) {
|
|
1521
|
-
throw new SilentError(`Unknown blueprint: ${name}`);
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
return;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
1511
|
let lookupPaths = generateLookupPaths(options.paths);
|
|
1529
1512
|
|
|
1530
1513
|
let lookupPath;
|
|
@@ -1536,6 +1519,15 @@ Blueprint.lookup = function (name, options) {
|
|
|
1536
1519
|
}
|
|
1537
1520
|
}
|
|
1538
1521
|
|
|
1522
|
+
// Check if `name` itself is a path to a blueprint:
|
|
1523
|
+
if (name.includes(path.sep)) {
|
|
1524
|
+
let blueprintPath = path.resolve(name);
|
|
1525
|
+
|
|
1526
|
+
if (Blueprint._existsSync(blueprintPath)) {
|
|
1527
|
+
return Blueprint.load(blueprintPath, options.blueprintOptions);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1539
1531
|
if (!options.ignoreMissing) {
|
|
1540
1532
|
throw new SilentError(`Unknown blueprint: ${name}`);
|
|
1541
1533
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const inquirer = require('inquirer');
|
|
4
|
-
const { isLangCode } = require('is-language-code');
|
|
5
|
-
const osLocale = require('os-locale');
|
|
6
|
-
|
|
7
3
|
const Task = require('../models/task');
|
|
8
4
|
const isValidProjectName = require('../utilities/valid-project-name');
|
|
9
5
|
|
|
@@ -11,6 +7,8 @@ const DEFAULT_LOCALE = 'en-US';
|
|
|
11
7
|
|
|
12
8
|
class InteractiveNewTask extends Task {
|
|
13
9
|
async run(newCommandOptions, _testAnswers) {
|
|
10
|
+
const inquirer = require('inquirer');
|
|
11
|
+
|
|
14
12
|
let prompt = inquirer.createPromptModule();
|
|
15
13
|
let questions = await this.getQuestions(newCommandOptions);
|
|
16
14
|
let answers = await prompt(questions, _testAnswers);
|
|
@@ -24,6 +22,8 @@ class InteractiveNewTask extends Task {
|
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
async getQuestions(newCommandOptions = {}) {
|
|
25
|
+
const { isLangCode } = require('is-language-code');
|
|
26
|
+
|
|
27
27
|
return [
|
|
28
28
|
{
|
|
29
29
|
name: 'blueprint',
|
|
@@ -145,6 +145,8 @@ class InteractiveNewTask extends Task {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
getUserLocale() {
|
|
148
|
+
const osLocale = require('os-locale');
|
|
149
|
+
|
|
148
150
|
return osLocale();
|
|
149
151
|
}
|
|
150
152
|
}
|
package/lib/tasks/npm-task.js
CHANGED
|
@@ -25,8 +25,6 @@ class NpmTask extends Task {
|
|
|
25
25
|
|
|
26
26
|
// The command to run: can be 'install' or 'uninstall'
|
|
27
27
|
this.command = '';
|
|
28
|
-
|
|
29
|
-
this.versionConstraints = '3 || 4 || 5 || 6 || 7 || 8';
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
get packageManagerOutputName() {
|
|
@@ -115,24 +113,6 @@ class NpmTask extends Task {
|
|
|
115
113
|
let version = result.stdout;
|
|
116
114
|
logger.info('npm --version: %s', version);
|
|
117
115
|
|
|
118
|
-
let ok = semver.satisfies(version, this.versionConstraints);
|
|
119
|
-
if (!ok) {
|
|
120
|
-
logger.warn('npm --version is outside of version constraint: %s', this.versionConstraints);
|
|
121
|
-
|
|
122
|
-
let below = semver.ltr(version, this.versionConstraints);
|
|
123
|
-
if (below) {
|
|
124
|
-
throw new SilentError(
|
|
125
|
-
'Ember CLI is now using the global npm, but your npm version is outdated.\n' +
|
|
126
|
-
'Please update your global npm version by running: npm install -g npm'
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
this.ui.writeWarnLine(
|
|
131
|
-
'Ember CLI is using the global npm, but your npm version has not yet been ' +
|
|
132
|
-
'verified to work with the current Ember CLI release.'
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
116
|
return { name: 'npm', version };
|
|
137
117
|
} catch (error) {
|
|
138
118
|
logger.error('npm --version failed: %s', error);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const shimAmd = require('./amd-shim');
|
|
4
|
-
|
|
5
3
|
class AmdTransformAddon {
|
|
6
4
|
/**
|
|
7
5
|
* This addon is used to register a custom AMD transform for app and addons to use.
|
|
@@ -15,6 +13,8 @@ class AmdTransformAddon {
|
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
importTransforms() {
|
|
16
|
+
const shimAmd = require('./amd-shim');
|
|
17
|
+
|
|
18
18
|
return {
|
|
19
19
|
amd: {
|
|
20
20
|
transform: (tree, options) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0-beta.0",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"test:slow": "node --unhandled-rejections=strict tests/runner slow"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/core": "^7.
|
|
41
|
-
"@babel/plugin-transform-modules-amd": "^7.
|
|
40
|
+
"@babel/core": "^7.21.0",
|
|
41
|
+
"@babel/plugin-transform-modules-amd": "^7.20.11",
|
|
42
42
|
"amd-name-resolver": "^1.3.1",
|
|
43
43
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
44
44
|
"bower-config": "^1.4.3",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"ember-cli-normalize-entity-name": "^1.0.0",
|
|
75
75
|
"ember-cli-preprocess-registry": "^3.3.0",
|
|
76
76
|
"ember-cli-string-utils": "^1.1.0",
|
|
77
|
-
"ember-source-channel-url": "^3.0.0",
|
|
78
77
|
"ensure-posix-path": "^1.1.1",
|
|
79
78
|
"execa": "^5.1.1",
|
|
80
79
|
"exit": "^0.1.2",
|
|
@@ -83,11 +82,11 @@
|
|
|
83
82
|
"find-up": "^5.0.0",
|
|
84
83
|
"find-yarn-workspace-root": "^2.0.0",
|
|
85
84
|
"fixturify-project": "^2.1.1",
|
|
86
|
-
"fs-extra": "^
|
|
85
|
+
"fs-extra": "^11.1.0",
|
|
87
86
|
"fs-tree-diff": "^2.0.1",
|
|
88
87
|
"get-caller-file": "^2.0.5",
|
|
89
88
|
"git-repo-info": "^2.1.1",
|
|
90
|
-
"glob": "^8.0
|
|
89
|
+
"glob": "^8.1.0",
|
|
91
90
|
"heimdalljs": "^0.2.6",
|
|
92
91
|
"heimdalljs-fs-monitor": "^1.1.1",
|
|
93
92
|
"heimdalljs-graph": "^1.0.0",
|
|
@@ -103,7 +102,7 @@
|
|
|
103
102
|
"lodash.template": "^4.5.0",
|
|
104
103
|
"markdown-it": "^13.0.1",
|
|
105
104
|
"markdown-it-terminal": "^0.4.0",
|
|
106
|
-
"minimatch": "^
|
|
105
|
+
"minimatch": "^7.4.1",
|
|
107
106
|
"morgan": "^1.10.0",
|
|
108
107
|
"nopt": "^3.0.6",
|
|
109
108
|
"npm-package-arg": "^10.1.0",
|
|
@@ -116,7 +115,7 @@
|
|
|
116
115
|
"remove-types": "^1.0.0",
|
|
117
116
|
"resolve": "^1.22.1",
|
|
118
117
|
"resolve-package-path": "^4.0.3",
|
|
119
|
-
"safe-stable-stringify": "^2.
|
|
118
|
+
"safe-stable-stringify": "^2.4.2",
|
|
120
119
|
"sane": "^5.0.1",
|
|
121
120
|
"semver": "^7.3.5",
|
|
122
121
|
"silent-error": "^1.1.1",
|
|
@@ -126,15 +125,14 @@
|
|
|
126
125
|
"testem": "^3.10.1",
|
|
127
126
|
"tiny-lr": "^2.0.0",
|
|
128
127
|
"tree-sync": "^2.1.0",
|
|
129
|
-
"uuid": "^
|
|
128
|
+
"uuid": "^9.0.0",
|
|
130
129
|
"walk-sync": "^3.0.0",
|
|
131
130
|
"watch-detector": "^1.0.2",
|
|
132
|
-
"workerpool": "^6.
|
|
131
|
+
"workerpool": "^6.4.0",
|
|
133
132
|
"yam": "^1.0.0"
|
|
134
133
|
},
|
|
135
134
|
"devDependencies": {
|
|
136
|
-
"@
|
|
137
|
-
"@octokit/rest": "^19.0.5",
|
|
135
|
+
"@octokit/rest": "^19.0.7",
|
|
138
136
|
"broccoli-plugin": "^4.0.3",
|
|
139
137
|
"broccoli-test-helper": "^2.0.0",
|
|
140
138
|
"chai": "^4.3.7",
|
|
@@ -143,14 +141,14 @@
|
|
|
143
141
|
"chai-jest-snapshot": "^2.0.0",
|
|
144
142
|
"ember-cli-blueprint-test-helpers": "^0.19.2",
|
|
145
143
|
"ember-cli-internal-test-helpers": "^0.9.1",
|
|
146
|
-
"eslint": "^8.
|
|
147
|
-
"eslint-config-prettier": "^8.
|
|
144
|
+
"eslint": "^8.35.0",
|
|
145
|
+
"eslint-config-prettier": "^8.6.0",
|
|
148
146
|
"eslint-plugin-chai-expect": "^3.0.0",
|
|
149
147
|
"eslint-plugin-mocha": "^10.1.0",
|
|
150
148
|
"eslint-plugin-n": "^15.3.0",
|
|
151
149
|
"eslint-plugin-prettier": "^4.2.1",
|
|
152
|
-
"fixturify": "^
|
|
153
|
-
"jsdom": "^
|
|
150
|
+
"fixturify": "^3.0.0",
|
|
151
|
+
"jsdom": "^21.1.0",
|
|
154
152
|
"latest-version": "^5.1.0",
|
|
155
153
|
"mocha": "^10.0.0",
|
|
156
154
|
"nock": "^13.2.9",
|
|
@@ -163,7 +161,7 @@
|
|
|
163
161
|
"testdouble": "^3.16.6",
|
|
164
162
|
"tmp": "^0.2.1",
|
|
165
163
|
"websocket": "^1.0.32",
|
|
166
|
-
"which": "
|
|
164
|
+
"which": "3.0.0",
|
|
167
165
|
"yuidoc-ember-cli-theme": "^1.0.4",
|
|
168
166
|
"yuidocjs": "0.10.2"
|
|
169
167
|
},
|
|
@@ -186,5 +184,9 @@
|
|
|
186
184
|
"tokenRef": "GITHUB_AUTH"
|
|
187
185
|
}
|
|
188
186
|
},
|
|
189
|
-
"trackingCode": "UA-49225444-1"
|
|
187
|
+
"trackingCode": "UA-49225444-1",
|
|
188
|
+
"volta": {
|
|
189
|
+
"node": "14.21.3",
|
|
190
|
+
"yarn": "1.22.19"
|
|
191
|
+
}
|
|
190
192
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const Command = require('../models/command');
|
|
4
|
-
const SilentError = require('silent-error');
|
|
5
|
-
|
|
6
|
-
module.exports = Command.extend({
|
|
7
|
-
name: 'uninstall:npm',
|
|
8
|
-
description: 'Npm package uninstall are now managed by the user.',
|
|
9
|
-
works: 'insideProject',
|
|
10
|
-
skipHelp: true,
|
|
11
|
-
|
|
12
|
-
anonymousOptions: ['<package-names...>'],
|
|
13
|
-
|
|
14
|
-
run() {
|
|
15
|
-
let err = 'This command has been removed. Please use `npm uninstall ';
|
|
16
|
-
err += '<packageName> --save-dev` instead.';
|
|
17
|
-
return Promise.reject(new SilentError(err));
|
|
18
|
-
},
|
|
19
|
-
});
|