ember-cli 4.0.0-beta.2 → 4.1.0-beta.1
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/.github/workflows/ci.yml +5 -5
- package/CHANGELOG.md +48 -3
- package/blueprints/addon/additional-dev-dependencies.json +2 -2
- package/blueprints/addon/files/.github/workflows/ci.yml +5 -1
- package/blueprints/addon/files/.travis.yml +1 -1
- package/blueprints/addon/files/README.md +2 -2
- package/blueprints/addon/files/addon-config/ember-try.js +4 -4
- package/blueprints/app/files/.github/workflows/ci.yml +4 -0
- package/blueprints/app/files/package.json +17 -17
- package/docs/build/data.json +3 -3
- package/lib/commands/init.js +9 -1
- package/lib/models/host-info-cache.js +3 -5
- package/lib/models/per-bundle-addon-cache/index.js +2 -3
- package/lib/utilities/get-lang-arg.js +45 -45
- package/package.json +25 -25
- package/.github/ISSUE_TEMPLATE.md +0 -12
- package/.github/dependabot.yml +0 -15
- package/.github/workflows/coverage.yml +0 -31
- package/docs/analytics.md +0 -44
- package/docs/architecture.md +0 -316
- package/docs/assets/architecture/Ember-CLI architecture.png +0 -0
- package/docs/assets/architecture/Ember-CLI architecture.xml +0 -1
- package/docs/assets/architecture/README.md +0 -5
- package/docs/brocfile-transition.md +0 -46
- package/docs/build/api.js +0 -44
- package/docs/build/assets/css/external-small.png +0 -0
- package/docs/build/assets/css/logo.png +0 -0
- package/docs/build/assets/css/main.css +0 -555
- package/docs/build/assets/favicon.ico +0 -0
- package/docs/build/assets/img/spinner.gif +0 -0
- package/docs/build/assets/index.html +0 -10
- package/docs/build/assets/js/api-filter.js +0 -56
- package/docs/build/assets/js/api-list.js +0 -255
- package/docs/build/assets/js/api-search.js +0 -98
- package/docs/build/assets/js/apidocs.js +0 -376
- package/docs/build/assets/js/yui-prettify.js +0 -17
- package/docs/build/assets/vendor/prettify/CHANGES.html +0 -130
- package/docs/build/assets/vendor/prettify/COPYING +0 -202
- package/docs/build/assets/vendor/prettify/README.html +0 -203
- package/docs/build/assets/vendor/prettify/prettify-min.css +0 -1
- package/docs/build/assets/vendor/prettify/prettify-min.js +0 -1
- package/docs/build/classes/Addon.html +0 -4318
- package/docs/build/classes/AmdTransformAddon.html +0 -202
- package/docs/build/classes/Blueprint.html +0 -4796
- package/docs/build/classes/Builder.html +0 -611
- package/docs/build/classes/CLI.html +0 -810
- package/docs/build/classes/Command.html +0 -1655
- package/docs/build/classes/DefaultPackager.html +0 -202
- package/docs/build/classes/EmberAddon.html +0 -2207
- package/docs/build/classes/EmberApp.html +0 -2225
- package/docs/build/classes/HardwareInfo.html +0 -620
- package/docs/build/classes/HistorySupportAddon.html +0 -203
- package/docs/build/classes/Instrumentation.html +0 -695
- package/docs/build/classes/NodeModulesList.html +0 -460
- package/docs/build/classes/NpmTask.html +0 -333
- package/docs/build/classes/PackageInfo.html +0 -1390
- package/docs/build/classes/PackageInfoCache.html +0 -963
- package/docs/build/classes/PerBundleAddonCache {.html +0 -1010
- package/docs/build/classes/Project.html +0 -2083
- package/docs/build/classes/ServeFilesAddon.html +0 -260
- package/docs/build/classes/TestsServerAddon.html +0 -203
- package/docs/build/classes/WatcherAddon.html +0 -204
- package/docs/build/classes/WindowsSymlinkChecker.html +0 -1505
- package/docs/build/files/lib_broccoli_default-packager.js.html +0 -1426
- package/docs/build/files/lib_broccoli_ember-addon.js.html +0 -159
- package/docs/build/files/lib_broccoli_ember-app.js.html +0 -1913
- package/docs/build/files/lib_cli_cli.js.html +0 -417
- package/docs/build/files/lib_models_addon-info.js.html +0 -112
- package/docs/build/files/lib_models_addon.js.html +0 -1866
- package/docs/build/files/lib_models_blueprint.js.html +0 -1678
- package/docs/build/files/lib_models_builder.js.html +0 -417
- package/docs/build/files/lib_models_command.js.html +0 -804
- package/docs/build/files/lib_models_hardware-info.js.html +0 -479
- package/docs/build/files/lib_models_host-info-cache.js.html +0 -428
- package/docs/build/files/lib_models_installation-checker.js.html +0 -181
- package/docs/build/files/lib_models_instantiate-addons.js.html +0 -191
- package/docs/build/files/lib_models_instrumentation.js.html +0 -433
- package/docs/build/files/lib_models_package-info-cache_index.js.html +0 -793
- package/docs/build/files/lib_models_package-info-cache_node-modules-list.js.html +0 -208
- package/docs/build/files/lib_models_package-info-cache_package-info.js.html +0 -661
- package/docs/build/files/lib_models_per-bundle-addon-cache_addon-proxy.js.html +0 -252
- package/docs/build/files/lib_models_per-bundle-addon-cache_index.js.html +0 -485
- package/docs/build/files/lib_models_per-bundle-addon-cache_target-instance.js.html +0 -108
- package/docs/build/files/lib_models_project.js.html +0 -913
- package/docs/build/files/lib_models_task.js.html +0 -117
- package/docs/build/files/lib_tasks_build-watch.js.html +0 -157
- package/docs/build/files/lib_tasks_npm-task.js.html +0 -463
- package/docs/build/files/lib_tasks_serve.js.html +0 -207
- package/docs/build/files/lib_tasks_server_middleware_broccoli-serve-files_index.js.html +0 -127
- package/docs/build/files/lib_tasks_server_middleware_broccoli-watcher_index.js.html +0 -158
- package/docs/build/files/lib_tasks_server_middleware_history-support_index.js.html +0 -181
- package/docs/build/files/lib_tasks_server_middleware_tests-server_index.js.html +0 -171
- package/docs/build/files/lib_tasks_test-server.js.html +0 -167
- package/docs/build/files/lib_tasks_transforms_amd_index.js.html +0 -143
- package/docs/build/files/lib_utilities_ember-app-utils.js.html +0 -292
- package/docs/build/files/lib_utilities_insert-into-file.js.html +0 -219
- package/docs/build/files/lib_utilities_is-lazy-engine.js.html +0 -125
- package/docs/build/files/lib_utilities_is-yarn-project.js.html +0 -120
- package/docs/build/files/lib_utilities_valid-project-name.js.html +0 -142
- package/docs/build/files/lib_utilities_will-interrupt-process.js.html +0 -290
- package/docs/build/files/lib_utilities_windows-admin.js.html +0 -230
- package/docs/build/index.html +0 -125
- package/docs/build/modules/ember-cli.html +0 -152
- package/docs/build/modules/is-lazy-engine.html +0 -106
- package/docs/build-concurrency.md +0 -15
- package/docs/build-pipeline-debugging.md +0 -33
- package/docs/code-coverage.md +0 -14
- package/docs/error-propagation.md +0 -136
- package/docs/experiments.md +0 -53
- package/docs/node-support.md +0 -43
- package/docs/perf-guide.md +0 -250
- package/docs/project_version_preprocessor.js +0 -8
- package/docs/sourcemaps.md +0 -60
- package/docs/yuidoc.json +0 -13
package/.github/workflows/ci.yml
CHANGED
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
|
|
22
22
|
steps:
|
|
23
23
|
- uses: actions/checkout@v2
|
|
24
|
-
- uses: actions/setup-node@v2.
|
|
24
|
+
- uses: actions/setup-node@v2.5.0
|
|
25
25
|
with:
|
|
26
26
|
node-version: 12.x
|
|
27
27
|
cache: 'yarn'
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
|
|
40
40
|
steps:
|
|
41
41
|
- uses: actions/checkout@v2
|
|
42
|
-
- uses: actions/setup-node@v2.
|
|
42
|
+
- uses: actions/setup-node@v2.5.0
|
|
43
43
|
with:
|
|
44
44
|
node-version: 12.x
|
|
45
45
|
cache: 'yarn'
|
|
@@ -56,12 +56,12 @@ jobs:
|
|
|
56
56
|
strategy:
|
|
57
57
|
fail-fast: false
|
|
58
58
|
matrix:
|
|
59
|
-
node-version: [12.x, 14.x]
|
|
59
|
+
node-version: [12.x, 14.x, 16.x]
|
|
60
60
|
os: [ubuntu, windows]
|
|
61
61
|
|
|
62
62
|
steps:
|
|
63
63
|
- uses: actions/checkout@v2
|
|
64
|
-
- uses: actions/setup-node@v2.
|
|
64
|
+
- uses: actions/setup-node@v2.5.0
|
|
65
65
|
with:
|
|
66
66
|
node-version: ${{ matrix.node-version }}
|
|
67
67
|
cache: 'yarn'
|
|
@@ -86,7 +86,7 @@ jobs:
|
|
|
86
86
|
|
|
87
87
|
steps:
|
|
88
88
|
- uses: actions/checkout@v2
|
|
89
|
-
- uses: actions/setup-node@v2.
|
|
89
|
+
- uses: actions/setup-node@v2.5.0
|
|
90
90
|
with:
|
|
91
91
|
node-version: 12.x
|
|
92
92
|
cache: 'yarn'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,65 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
+
## v4.1.0-beta.1
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
#### Blueprint Changes
|
|
6
|
+
|
|
7
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.0.0...v4.1.0-beta.1)
|
|
8
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.0.0...v4.1.0-beta.1)
|
|
9
|
+
|
|
10
|
+
#### Changelog
|
|
11
|
+
|
|
12
|
+
- [#9431](https://github.com/ember-cli/ember-cli/pull/9431) replace fixtures with jest-like snapshots [@lifeart](https://github.com/lifeart)
|
|
13
|
+
- [#9607](https://github.com/ember-cli/ember-cli/pull/9607) Add online editor files to update-output-repos script [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
14
|
+
- [#9700](https://github.com/ember-cli/ember-cli/pull/9700) [Chore] Update .npmignore to ignore .github and docs folders [@SergeAstapov](https://github.com/SergeAstapov)
|
|
15
|
+
- [#9728](https://github.com/ember-cli/ember-cli/pull/9728) eslint-plugin-mocha@^9.0.0 [@kellyselden](https://github.com/kellyselden)
|
|
16
|
+
- [#9729](https://github.com/ember-cli/ember-cli/pull/9729) is-language-code@^3.1.0 [@kellyselden](https://github.com/kellyselden)
|
|
17
|
+
|
|
18
|
+
Thank you to all who took the time to contribute!
|
|
19
|
+
|
|
20
|
+
## v4.0.0
|
|
5
21
|
|
|
6
22
|
#### Blueprint Changes
|
|
7
23
|
|
|
8
|
-
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/
|
|
9
|
-
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/
|
|
24
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.4...v4.0.0)
|
|
25
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.4...v4.0.0)
|
|
10
26
|
|
|
11
27
|
#### Changelog
|
|
12
28
|
|
|
29
|
+
- [#9679](https://github.com/ember-cli/ember-cli/pull/9679) Bump ember-page-title from v6.2.2 to v7.0.0 [@raido](https://github.com/raido)
|
|
30
|
+
- [#9694](https://github.com/ember-cli/ember-cli/pull/9694) test in node 16 LTS [@kellyselden](https://github.com/kellyselden)
|
|
31
|
+
- [#9696](https://github.com/ember-cli/ember-cli/pull/9696) commands/init: Fix `--yarn` usage [@Turbo87](https://github.com/Turbo87)
|
|
13
32
|
- [#9659](https://github.com/ember-cli/ember-cli/pull/9659) Ensure `ember-classic` ember-try scenario uses Ember 3.x [@rwjblue](https://github.com/rwjblue)
|
|
14
33
|
- [#9661](https://github.com/ember-cli/ember-cli/pull/9661) Set default CI config blueprints to run all builds [@elwayman02](https://github.com/elwayman02)
|
|
15
34
|
- [#9666](https://github.com/ember-cli/ember-cli/pull/9666) Remove IE11 comments from `config/target.js` in app blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
16
35
|
- [#9667](https://github.com/ember-cli/ember-cli/pull/9667) Update eslint-plugin-qunit to v7 in blueprint [@bmish](https://github.com/bmish)
|
|
17
36
|
- [#9670](https://github.com/ember-cli/ember-cli/pull/9670) Don't emit an error when the `lint:fix` script fails post blueprint generation [@bertdeblock](https://github.com/bertdeblock)
|
|
37
|
+
- [#9574](https://github.com/ember-cli/ember-cli/pull/9574) Update link to Discord in README.md [@MelSumner](https://github.com/MelSumner)
|
|
38
|
+
- [#9613](https://github.com/ember-cli/ember-cli/pull/9613) Fix test that started failing with v2.17.0 of qunit [@kategengler](https://github.com/kategengler)
|
|
39
|
+
- [#9579](https://github.com/ember-cli/ember-cli/pull/9579) Add `--ci-provider` option to `ember new` and `ember addon` [@snewcomer](https://github.com/snewcomer)
|
|
40
|
+
- [#9618](https://github.com/ember-cli/ember-cli/pull/9618) Reload `_packageInfo` as part of `reloadPkg` [@brendenpalmer](https://github.com/brendenpalmer)
|
|
41
|
+
- [#9563](https://github.com/ember-cli/ember-cli/pull/9563) Add `pnpm` support to `ember install` command [@Turbo87](https://github.com/Turbo87)
|
|
42
|
+
- [#9580](https://github.com/ember-cli/ember-cli/pull/9580) Add `.lint-todo` to prettier ignore [@elwayman02](https://github.com/elwayman02)
|
|
43
|
+
- [#9589](https://github.com/ember-cli/ember-cli/pull/9589) Add link to visualizer to perf guide [@mehulkar](https://github.com/mehulkar)
|
|
44
|
+
- [#9595](https://github.com/ember-cli/ember-cli/pull/9595) Add support for `addons.exclude` and `addons.include` options [@bertdeblock](https://github.com/bertdeblock)
|
|
45
|
+
- [#9623](https://github.com/ember-cli/ember-cli/pull/9623) Update app/addon blueprints to use ember-auto-import@2 [@rwjblue](https://github.com/rwjblue)
|
|
46
|
+
- [#9619](https://github.com/ember-cli/ember-cli/pull/9619) Update watch-detector to 1.0.1 [@colenso](https://github.com/colenso)
|
|
47
|
+
- [#9605](https://github.com/ember-cli/ember-cli/pull/9605) Properly set `loglevel` flag for npm [@jrvidal](https://github.com/jrvidal)
|
|
48
|
+
- [#9609](https://github.com/ember-cli/ember-cli/pull/9609) Ignore additional `ember-try` files for apps and addons [@bertdeblock](https://github.com/bertdeblock)
|
|
49
|
+
- [#9644](https://github.com/ember-cli/ember-cli/pull/9644) Default `ember new` and `ember addon` to use GitHub Actions [@rwjblue](https://github.com/rwjblue)
|
|
50
|
+
|
|
51
|
+
Thank you to all who took the time to contribute!
|
|
52
|
+
|
|
53
|
+
## v3.28.4
|
|
54
|
+
|
|
55
|
+
#### Blueprint Changes
|
|
56
|
+
|
|
57
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v3.28.3...v3.28.4)
|
|
58
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v3.28.3...v3.28.4)
|
|
59
|
+
|
|
60
|
+
#### Changelog
|
|
61
|
+
|
|
62
|
+
- [#9694](https://github.com/ember-cli/ember-cli/pull/9694) test in node 16 LTS [@kellyselden](https://github.com/kellyselden)
|
|
18
63
|
|
|
19
64
|
Thank you to all who took the time to contribute!
|
|
20
65
|
|
|
@@ -7,6 +7,10 @@ on:
|
|
|
7
7
|
- master
|
|
8
8
|
pull_request: {}
|
|
9
9
|
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.head_ref || github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
10
14
|
jobs:
|
|
11
15
|
test:
|
|
12
16
|
name: "Tests"
|
|
@@ -50,8 +54,8 @@ jobs:
|
|
|
50
54
|
fail-fast: false
|
|
51
55
|
matrix:
|
|
52
56
|
try-scenario:
|
|
53
|
-
- ember-lts-3.20
|
|
54
57
|
- ember-lts-3.24
|
|
58
|
+
- ember-lts-3.28
|
|
55
59
|
- ember-release
|
|
56
60
|
- ember-beta
|
|
57
61
|
- ember-canary
|
|
@@ -51,8 +51,8 @@ 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.20
|
|
55
54
|
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
|
|
55
|
+
- env: EMBER_TRY_SCENARIO=ember-lts-3.28
|
|
56
56
|
- env: EMBER_TRY_SCENARIO=ember-release
|
|
57
57
|
- env: EMBER_TRY_SCENARIO=ember-beta
|
|
58
58
|
- env: EMBER_TRY_SCENARIO=ember-canary
|
|
@@ -8,18 +8,18 @@ module.exports = async function () {
|
|
|
8
8
|
<% if (yarn) { %>useYarn: true,
|
|
9
9
|
<% } %>scenarios: [
|
|
10
10
|
{
|
|
11
|
-
name: 'ember-lts-3.
|
|
11
|
+
name: 'ember-lts-3.24',
|
|
12
12
|
npm: {
|
|
13
13
|
devDependencies: {
|
|
14
|
-
'ember-source': '~3.
|
|
14
|
+
'ember-source': '~3.24.3',
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
name: 'ember-lts-3.
|
|
19
|
+
name: 'ember-lts-3.28',
|
|
20
20
|
npm: {
|
|
21
21
|
devDependencies: {
|
|
22
|
-
'ember-source': '~3.
|
|
22
|
+
'ember-source': '~3.28.0',
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
@@ -24,45 +24,45 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@ember/optional-features": "^2.0.0",
|
|
27
|
-
"@ember/test-helpers": "^2.
|
|
28
|
-
"@embroider/compat": "^0.
|
|
29
|
-
"@embroider/core": "^0.
|
|
30
|
-
"@embroider/webpack": "^0.
|
|
27
|
+
"@ember/test-helpers": "^2.6.0<% if (embroider) { %>",
|
|
28
|
+
"@embroider/compat": "^0.48.1",
|
|
29
|
+
"@embroider/core": "^0.48.1",
|
|
30
|
+
"@embroider/webpack": "^0.48.1<% } %>",
|
|
31
31
|
"@glimmer/component": "^1.0.4",
|
|
32
32
|
"@glimmer/tracking": "^1.0.4",
|
|
33
33
|
"babel-eslint": "^10.1.0",
|
|
34
34
|
"broccoli-asset-rev": "^3.0.0",
|
|
35
|
-
"ember-auto-import": "^2.2.
|
|
35
|
+
"ember-auto-import": "^2.2.4",
|
|
36
36
|
"ember-cli": "~<%= emberCLIVersion %>",
|
|
37
37
|
"ember-cli-app-version": "^5.0.0",
|
|
38
|
-
"ember-cli-babel": "^7.26.
|
|
38
|
+
"ember-cli-babel": "^7.26.8",
|
|
39
39
|
"ember-cli-dependency-checker": "^3.2.0",
|
|
40
|
-
"ember-cli-htmlbars": "^
|
|
40
|
+
"ember-cli-htmlbars": "^6.0.1",
|
|
41
41
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
42
42
|
"ember-cli-sri": "^2.1.1",
|
|
43
43
|
"ember-cli-terser": "^4.0.2",
|
|
44
|
-
"ember-data": "~4.
|
|
44
|
+
"ember-data": "~4.1.0-beta.0",
|
|
45
45
|
"ember-export-application-global": "^2.0.1",
|
|
46
46
|
"ember-fetch": "^8.1.1",
|
|
47
47
|
"ember-load-initializers": "^2.1.2",
|
|
48
|
-
"ember-page-title": "^
|
|
49
|
-
"ember-qunit": "^5.1.
|
|
48
|
+
"ember-page-title": "^7.0.0",
|
|
49
|
+
"ember-qunit": "^5.1.5",
|
|
50
50
|
"ember-resolver": "^8.0.3",
|
|
51
|
-
"ember-source": "~4.
|
|
52
|
-
"ember-template-lint": "^3.
|
|
53
|
-
"ember-welcome-page": "^
|
|
51
|
+
"ember-source": "~4.1.0-beta.1",
|
|
52
|
+
"ember-template-lint": "^3.15.0<% if (welcome) { %>",
|
|
53
|
+
"ember-welcome-page": "^6.0.0<% } %>",
|
|
54
54
|
"eslint": "^7.32.0",
|
|
55
55
|
"eslint-config-prettier": "^8.3.0",
|
|
56
|
-
"eslint-plugin-ember": "^10.5.
|
|
56
|
+
"eslint-plugin-ember": "^10.5.8",
|
|
57
57
|
"eslint-plugin-node": "^11.1.0",
|
|
58
58
|
"eslint-plugin-prettier": "^4.0.0",
|
|
59
|
-
"eslint-plugin-qunit": "^7.
|
|
59
|
+
"eslint-plugin-qunit": "^7.2.0",
|
|
60
60
|
"loader.js": "^4.7.0",
|
|
61
61
|
"npm-run-all": "^4.1.5",
|
|
62
|
-
"prettier": "^2.
|
|
62
|
+
"prettier": "^2.5.1",
|
|
63
63
|
"qunit": "^2.17.2",
|
|
64
64
|
"qunit-dom": "^2.0.0",
|
|
65
|
-
"webpack": "^5.
|
|
65
|
+
"webpack": "^5.65.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": "12.* || 14.* || >= 16"
|
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.1.0-beta.1-beta-d79fe1e1b3"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"lib/broccoli/default-packager.js": {
|
|
@@ -2378,7 +2378,7 @@
|
|
|
2378
2378
|
},
|
|
2379
2379
|
{
|
|
2380
2380
|
"file": "lib/models/per-bundle-addon-cache/index.js",
|
|
2381
|
-
"line":
|
|
2381
|
+
"line": 247,
|
|
2382
2382
|
"description": "Called from PackageInfo.getAddonInstance(), return an instance of the requested\naddon or a Proxy, based on the type of addon and its bundle host.",
|
|
2383
2383
|
"itemtype": "method",
|
|
2384
2384
|
"name": "getAddonInstance",
|
|
@@ -5651,7 +5651,7 @@
|
|
|
5651
5651
|
},
|
|
5652
5652
|
{
|
|
5653
5653
|
"file": "lib/models/host-info-cache.js",
|
|
5654
|
-
"line":
|
|
5654
|
+
"line": 270,
|
|
5655
5655
|
"description": "This returns the LCA host for a given engine; we use the associated package info\nto compute this (see `getHostAddonInfo` above); this finds the lowest common ancestor\nthat is considered a host amongst _all_ engines by the same name in the project. This\nfunction is intended to replace the original behavior in `ember-engines`.\n\nFor more info, see the original implementation here:\n\nhttps://github.com/ember-engines/ember-engines/blob/master/packages/ember-engines/lib/utils/find-lca-host.js",
|
|
5656
5656
|
"itemtype": "method",
|
|
5657
5657
|
"name": "findLCAHost",
|
package/lib/commands/init.js
CHANGED
|
@@ -101,9 +101,17 @@ module.exports = Command.extend({
|
|
|
101
101
|
await this.runTask('InstallBlueprint', blueprintOpts);
|
|
102
102
|
|
|
103
103
|
if (!commandOptions.skipNpm) {
|
|
104
|
+
let packageManager =
|
|
105
|
+
commandOptions.yarn === true
|
|
106
|
+
? 'yarn'
|
|
107
|
+
: // supported for legacy reasons
|
|
108
|
+
commandOptions.yarn === false
|
|
109
|
+
? 'npm'
|
|
110
|
+
: undefined;
|
|
111
|
+
|
|
104
112
|
await this.runTask('NpmInstall', {
|
|
105
113
|
verbose: commandOptions.verbose,
|
|
106
|
-
|
|
114
|
+
packageManager,
|
|
107
115
|
});
|
|
108
116
|
}
|
|
109
117
|
|
|
@@ -242,11 +242,9 @@ class HostInfoCache {
|
|
|
242
242
|
path.push(currentPackageInfo);
|
|
243
243
|
|
|
244
244
|
queue.push(
|
|
245
|
-
...[
|
|
246
|
-
...
|
|
247
|
-
|
|
248
|
-
...Object.values(devDependencyPackages),
|
|
249
|
-
].map((pkgInfo) => ({ pkgInfo, path: [...path] }))
|
|
245
|
+
...[...inRepoAddons, ...Object.values(dependencyPackages), ...Object.values(devDependencyPackages)].map(
|
|
246
|
+
(pkgInfo) => ({ pkgInfo, path: [...path] })
|
|
247
|
+
)
|
|
250
248
|
);
|
|
251
249
|
}
|
|
252
250
|
}
|
|
@@ -234,9 +234,8 @@ class PerBundleAddonCache {
|
|
|
234
234
|
return bundleHost;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
let { hostPackageInfo, hostAndAncestorBundledPackageInfos } =
|
|
238
|
-
bundleHost
|
|
239
|
-
);
|
|
237
|
+
let { hostPackageInfo, hostAndAncestorBundledPackageInfos } =
|
|
238
|
+
this.project.hostInfoCache.getHostAddonInfo(bundleHost);
|
|
240
239
|
|
|
241
240
|
if (!hostAndAncestorBundledPackageInfos.has(addonPkgInfo)) {
|
|
242
241
|
return bundleHost;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/*
|
|
2
2
|
|
|
3
|
-
This utility processes the argument passed with the `lang` option
|
|
3
|
+
This utility processes the argument passed with the `lang` option
|
|
4
4
|
in ember-cli, i.e. `ember (new||init||addon) app-name --lang=langArg`
|
|
5
5
|
|
|
6
6
|
Execution Context (usage, input, output, error handling, etc.):
|
|
@@ -35,11 +35,11 @@ Warning Messages (if necessary):
|
|
|
35
35
|
|
|
36
36
|
'use strict';
|
|
37
37
|
|
|
38
|
-
const
|
|
38
|
+
const { isLangCode } = require('is-language-code');
|
|
39
39
|
|
|
40
40
|
// Primary language code validation function (boolean)
|
|
41
41
|
function isValidLangCode(langArg) {
|
|
42
|
-
return
|
|
42
|
+
return isLangCode(langArg).res;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// Generates the result to pass back to `init`
|
|
@@ -48,29 +48,29 @@ function getResult(langArg) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/*
|
|
51
|
-
Misuse case: attempt to set application programming language via `lang`
|
|
51
|
+
Misuse case: attempt to set application programming language via `lang`
|
|
52
52
|
AND
|
|
53
53
|
Edge case: valid language code AND a common programming language abbreviation
|
|
54
54
|
-------------------------------------------------------------------------------
|
|
55
|
-
It is possible that a user might mis-interpret the type of `language` that is
|
|
56
|
-
specified by the `--lang` flag. One notable potential `misuse case` is one in
|
|
57
|
-
which the user thinks `--lang` specifies the application's programming
|
|
58
|
-
language. For example, the user might call `ember new my-app --lang=typescript`
|
|
59
|
-
expecting to achieve an effect similar to the one provided by the
|
|
55
|
+
It is possible that a user might mis-interpret the type of `language` that is
|
|
56
|
+
specified by the `--lang` flag. One notable potential `misuse case` is one in
|
|
57
|
+
which the user thinks `--lang` specifies the application's programming
|
|
58
|
+
language. For example, the user might call `ember new my-app --lang=typescript`
|
|
59
|
+
expecting to achieve an effect similar to the one provided by the
|
|
60
60
|
`ember-cli-typescript` addon.
|
|
61
61
|
|
|
62
|
-
This misuse case is handled by checking the input `langArg` against an Array
|
|
63
|
-
containing notable programming language-related values: language names
|
|
64
|
-
(e.g. `JavaScript`), abbreviations (e.g. `js`), file extensions (e.g. `.js`),
|
|
65
|
-
or versions (e.g. `ES6`), etc. Specifically, if `langArg` is found within this
|
|
66
|
-
reference list, a WARNING message that describes correct `--lang` usage will
|
|
67
|
-
be emitted. The `lang` attribute will not be assigned in `index.html`, and the
|
|
62
|
+
This misuse case is handled by checking the input `langArg` against an Array
|
|
63
|
+
containing notable programming language-related values: language names
|
|
64
|
+
(e.g. `JavaScript`), abbreviations (e.g. `js`), file extensions (e.g. `.js`),
|
|
65
|
+
or versions (e.g. `ES6`), etc. Specifically, if `langArg` is found within this
|
|
66
|
+
reference list, a WARNING message that describes correct `--lang` usage will
|
|
67
|
+
be emitted. The `lang` attribute will not be assigned in `index.html`, and the
|
|
68
68
|
user will be notified with a corresponding STATUS message.
|
|
69
69
|
|
|
70
70
|
There are several edge cases (marked) where `langArg` is both a commonly-used
|
|
71
|
-
abbreviation for a programming language AND a valid language code. The behavior
|
|
72
|
-
for these cases is to assume the user has used `--lang` correctly and set the
|
|
73
|
-
`lang` attribute to the valid code in `index.html`. To cover for potential
|
|
71
|
+
abbreviation for a programming language AND a valid language code. The behavior
|
|
72
|
+
for these cases is to assume the user has used `--lang` correctly and set the
|
|
73
|
+
`lang` attribute to the valid code in `index.html`. To cover for potential
|
|
74
74
|
misuage, several helpful messages will also be emitted:
|
|
75
75
|
- `ts` is a valid language code AND a common programming language abbreviation
|
|
76
76
|
- the `lang` attribute will be set to `ts` in the application
|
|
@@ -141,44 +141,44 @@ function isValidCodeAndProg(langArg) {
|
|
|
141
141
|
return isValidLangCode(langArg) && isProgLang(langArg);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
/*
|
|
144
|
+
/*
|
|
145
145
|
Misuse case: `--lang` called without `langArg` (NB: parser bug workaround)
|
|
146
146
|
-------------------------------------------------------------------------------
|
|
147
|
-
This is a workaround for handling an existing bug in the ember-cli parser
|
|
148
|
-
where the `--lang` option is specified in the command without a corresponding
|
|
149
|
-
value for `langArg`.
|
|
147
|
+
This is a workaround for handling an existing bug in the ember-cli parser
|
|
148
|
+
where the `--lang` option is specified in the command without a corresponding
|
|
149
|
+
value for `langArg`.
|
|
150
150
|
|
|
151
|
-
As examples, the parser behavior would likely affect the following usages:
|
|
151
|
+
As examples, the parser behavior would likely affect the following usages:
|
|
152
152
|
1. `ember new app-name --lang --skip-npm
|
|
153
153
|
2. `ember new app-name --lang`
|
|
154
154
|
|
|
155
|
-
In this context, the unintended parser behavior is that `langArg` will be
|
|
156
|
-
assingned to the String that immediately follows `--lang` in the command. If
|
|
157
|
-
`--lang` is the last explicitly defined part of the command (as in the second
|
|
158
|
-
example above), the first of any any `hidden` options pushed onto the command
|
|
159
|
-
after the initial parse (e.g. `--disable-analytics`, `--no-watcher`) will be
|
|
160
|
-
used when assigning `langArg`.
|
|
155
|
+
In this context, the unintended parser behavior is that `langArg` will be
|
|
156
|
+
assingned to the String that immediately follows `--lang` in the command. If
|
|
157
|
+
`--lang` is the last explicitly defined part of the command (as in the second
|
|
158
|
+
example above), the first of any any `hidden` options pushed onto the command
|
|
159
|
+
after the initial parse (e.g. `--disable-analytics`, `--no-watcher`) will be
|
|
160
|
+
used when assigning `langArg`.
|
|
161
161
|
|
|
162
162
|
In the above examples, `langArg` would likely be assigned as follows:
|
|
163
163
|
1. `ember new app-name --lang --skip-npm => `langArg='--skip-npm'`
|
|
164
164
|
2. `ember new app-name --lang` => `langArg='--disable-analytics'`
|
|
165
165
|
|
|
166
|
-
The workaround impelemented herein is to check whether or not the value of
|
|
167
|
-
`langArg` starts with a hyphen. The rationale for this approach is based on
|
|
166
|
+
The workaround impelemented herein is to check whether or not the value of
|
|
167
|
+
`langArg` starts with a hyphen. The rationale for this approach is based on
|
|
168
168
|
the following underlying assumptions:
|
|
169
169
|
- ALL CLI options start with (at least one) hyphen
|
|
170
170
|
- NO valid language codes start with a hyphen
|
|
171
171
|
|
|
172
|
-
If the leading hyphen is detected, the current behavior is to assume `--lang`
|
|
173
|
-
was declared without a corresponding specification. A WARNING message that
|
|
174
|
-
describes correct `--lang` usage will be emitted. The `lang` attribute will not
|
|
175
|
-
be assigned in `index.html`, and the user will be notified with a corresponding
|
|
172
|
+
If the leading hyphen is detected, the current behavior is to assume `--lang`
|
|
173
|
+
was declared without a corresponding specification. A WARNING message that
|
|
174
|
+
describes correct `--lang` usage will be emitted. The `lang` attribute will not
|
|
175
|
+
be assigned in `index.html`, and the user will be notified with a corresponding
|
|
176
176
|
STATUS message. Execution will not be halted.
|
|
177
177
|
|
|
178
|
-
Other complications related to this parser behavior are considered out-of-scope
|
|
179
|
-
and not handled here. In the first example above, this workaround would ensure
|
|
180
|
-
that `lang` is not assigned to `--skip-npm`, but it would not guarantee that
|
|
181
|
-
`--skip-npm` is correctly processed as a command option. That is, `npm` may or
|
|
178
|
+
Other complications related to this parser behavior are considered out-of-scope
|
|
179
|
+
and not handled here. In the first example above, this workaround would ensure
|
|
180
|
+
that `lang` is not assigned to `--skip-npm`, but it would not guarantee that
|
|
181
|
+
`--skip-npm` is correctly processed as a command option. That is, `npm` may or
|
|
182
182
|
may not get skipped during execution.
|
|
183
183
|
*/
|
|
184
184
|
|
|
@@ -194,12 +194,12 @@ const MSG_HEAD = `An issue with the \`--lang\` flag returned the following messa
|
|
|
194
194
|
|
|
195
195
|
// Message context from language code validation (valid: null, invalid: reason)
|
|
196
196
|
function getLangCodeMsg(langArg) {
|
|
197
|
-
return
|
|
197
|
+
return isLangCode(langArg).message;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
// Edge case: valid language code AND a common programming language abbreviation
|
|
201
201
|
function getValidAndProgMsg(langArg) {
|
|
202
|
-
return `The \`--lang\` flag has been used with argument \`${langArg}\`,
|
|
202
|
+
return `The \`--lang\` flag has been used with argument \`${langArg}\`,
|
|
203
203
|
which is BOTH a valid language code AND an abbreviation for a programming language.
|
|
204
204
|
${getProgLangMsg(langArg)}`;
|
|
205
205
|
}
|
|
@@ -218,15 +218,15 @@ function getCliMsg() {
|
|
|
218
218
|
|
|
219
219
|
// 3. `STATUS` message: report if `lang` will be set in `index.html`
|
|
220
220
|
function getStatusMsg(langArg, willSet) {
|
|
221
|
-
return `The human language of the application will ${willSet ? `be set to ${langArg}` : `NOT be set`} in
|
|
221
|
+
return `The human language of the application will ${willSet ? `be set to ${langArg}` : `NOT be set`} in
|
|
222
222
|
the \`<html>\` element's \`lang\` attribute in \`index.html\`.`;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
// 4. `HELP` message: template for all `--lang`-related warnings emitted
|
|
226
|
-
const MSG_HELP = `If this was not your intention, you may edit the \`<html>\` element's
|
|
226
|
+
const MSG_HELP = `If this was not your intention, you may edit the \`<html>\` element's
|
|
227
227
|
\`lang\` attribute in \`index.html\` manually after the process is complete.
|
|
228
228
|
Information about using the \`--lang\` flag:
|
|
229
|
-
The \`--lang\` flag sets the base human language of an app or test app:
|
|
229
|
+
The \`--lang\` flag sets the base human language of an app or test app:
|
|
230
230
|
- \`app/index.html\` (app)
|
|
231
231
|
- \`tests/dummy/app/index.html\` (addon test app)
|
|
232
232
|
If used, the lang option must specfify a valid language code.
|