ember-cli 4.0.0-beta.4 → 4.1.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.
Files changed (118) hide show
  1. package/.github/workflows/ci.yml +4 -4
  2. package/CHANGELOG.md +28 -17
  3. package/bin/ember +0 -0
  4. package/blueprints/addon/additional-dev-dependencies.json +1 -1
  5. package/blueprints/addon/files/.github/workflows/ci.yml +5 -1
  6. package/blueprints/addon/files/.travis.yml +1 -1
  7. package/blueprints/addon/files/README.md +2 -2
  8. package/blueprints/addon/files/addon-config/ember-try.js +4 -4
  9. package/blueprints/app/files/.github/workflows/ci.yml +4 -0
  10. package/blueprints/app/files/package.json +8 -8
  11. package/blueprints/in-repo-addon/files/__root__/__name__/index.js +0 -0
  12. package/blueprints/in-repo-addon/index.js +0 -0
  13. package/blueprints/lib/index.js +0 -0
  14. package/docs/build/data.json +413 -413
  15. package/lib/models/host-info-cache.js +3 -5
  16. package/lib/models/per-bundle-addon-cache/index.js +2 -3
  17. package/lib/tasks/npm-task.js +1 -1
  18. package/lib/utilities/get-lang-arg.js +45 -45
  19. package/package.json +25 -25
  20. package/.github/ISSUE_TEMPLATE.md +0 -12
  21. package/.github/dependabot.yml +0 -15
  22. package/.github/workflows/coverage.yml +0 -31
  23. package/docs/analytics.md +0 -44
  24. package/docs/architecture.md +0 -316
  25. package/docs/assets/architecture/Ember-CLI architecture.png +0 -0
  26. package/docs/assets/architecture/Ember-CLI architecture.xml +0 -1
  27. package/docs/assets/architecture/README.md +0 -5
  28. package/docs/brocfile-transition.md +0 -46
  29. package/docs/build/api.js +0 -44
  30. package/docs/build/assets/css/external-small.png +0 -0
  31. package/docs/build/assets/css/logo.png +0 -0
  32. package/docs/build/assets/css/main.css +0 -555
  33. package/docs/build/assets/favicon.ico +0 -0
  34. package/docs/build/assets/img/spinner.gif +0 -0
  35. package/docs/build/assets/index.html +0 -10
  36. package/docs/build/assets/js/api-filter.js +0 -56
  37. package/docs/build/assets/js/api-list.js +0 -255
  38. package/docs/build/assets/js/api-search.js +0 -98
  39. package/docs/build/assets/js/apidocs.js +0 -376
  40. package/docs/build/assets/js/yui-prettify.js +0 -17
  41. package/docs/build/assets/vendor/prettify/CHANGES.html +0 -130
  42. package/docs/build/assets/vendor/prettify/COPYING +0 -202
  43. package/docs/build/assets/vendor/prettify/README.html +0 -203
  44. package/docs/build/assets/vendor/prettify/prettify-min.css +0 -1
  45. package/docs/build/assets/vendor/prettify/prettify-min.js +0 -1
  46. package/docs/build/classes/Addon.html +0 -4318
  47. package/docs/build/classes/AmdTransformAddon.html +0 -202
  48. package/docs/build/classes/Blueprint.html +0 -4796
  49. package/docs/build/classes/Builder.html +0 -611
  50. package/docs/build/classes/CLI.html +0 -810
  51. package/docs/build/classes/Command.html +0 -1655
  52. package/docs/build/classes/DefaultPackager.html +0 -202
  53. package/docs/build/classes/EmberAddon.html +0 -2207
  54. package/docs/build/classes/EmberApp.html +0 -2225
  55. package/docs/build/classes/HardwareInfo.html +0 -620
  56. package/docs/build/classes/HistorySupportAddon.html +0 -203
  57. package/docs/build/classes/Instrumentation.html +0 -695
  58. package/docs/build/classes/NodeModulesList.html +0 -460
  59. package/docs/build/classes/NpmTask.html +0 -333
  60. package/docs/build/classes/PackageInfo.html +0 -1390
  61. package/docs/build/classes/PackageInfoCache.html +0 -963
  62. package/docs/build/classes/PerBundleAddonCache {.html +0 -1010
  63. package/docs/build/classes/Project.html +0 -2083
  64. package/docs/build/classes/ServeFilesAddon.html +0 -260
  65. package/docs/build/classes/TestsServerAddon.html +0 -203
  66. package/docs/build/classes/WatcherAddon.html +0 -204
  67. package/docs/build/classes/WindowsSymlinkChecker.html +0 -1505
  68. package/docs/build/files/lib_broccoli_default-packager.js.html +0 -1426
  69. package/docs/build/files/lib_broccoli_ember-addon.js.html +0 -159
  70. package/docs/build/files/lib_broccoli_ember-app.js.html +0 -1913
  71. package/docs/build/files/lib_cli_cli.js.html +0 -417
  72. package/docs/build/files/lib_models_addon-info.js.html +0 -112
  73. package/docs/build/files/lib_models_addon.js.html +0 -1866
  74. package/docs/build/files/lib_models_blueprint.js.html +0 -1678
  75. package/docs/build/files/lib_models_builder.js.html +0 -417
  76. package/docs/build/files/lib_models_command.js.html +0 -804
  77. package/docs/build/files/lib_models_hardware-info.js.html +0 -479
  78. package/docs/build/files/lib_models_host-info-cache.js.html +0 -428
  79. package/docs/build/files/lib_models_installation-checker.js.html +0 -181
  80. package/docs/build/files/lib_models_instantiate-addons.js.html +0 -191
  81. package/docs/build/files/lib_models_instrumentation.js.html +0 -433
  82. package/docs/build/files/lib_models_package-info-cache_index.js.html +0 -793
  83. package/docs/build/files/lib_models_package-info-cache_node-modules-list.js.html +0 -208
  84. package/docs/build/files/lib_models_package-info-cache_package-info.js.html +0 -661
  85. package/docs/build/files/lib_models_per-bundle-addon-cache_addon-proxy.js.html +0 -252
  86. package/docs/build/files/lib_models_per-bundle-addon-cache_index.js.html +0 -485
  87. package/docs/build/files/lib_models_per-bundle-addon-cache_target-instance.js.html +0 -108
  88. package/docs/build/files/lib_models_project.js.html +0 -913
  89. package/docs/build/files/lib_models_task.js.html +0 -117
  90. package/docs/build/files/lib_tasks_build-watch.js.html +0 -157
  91. package/docs/build/files/lib_tasks_npm-task.js.html +0 -463
  92. package/docs/build/files/lib_tasks_serve.js.html +0 -207
  93. package/docs/build/files/lib_tasks_server_middleware_broccoli-serve-files_index.js.html +0 -127
  94. package/docs/build/files/lib_tasks_server_middleware_broccoli-watcher_index.js.html +0 -158
  95. package/docs/build/files/lib_tasks_server_middleware_history-support_index.js.html +0 -181
  96. package/docs/build/files/lib_tasks_server_middleware_tests-server_index.js.html +0 -171
  97. package/docs/build/files/lib_tasks_test-server.js.html +0 -167
  98. package/docs/build/files/lib_tasks_transforms_amd_index.js.html +0 -143
  99. package/docs/build/files/lib_utilities_ember-app-utils.js.html +0 -292
  100. package/docs/build/files/lib_utilities_insert-into-file.js.html +0 -219
  101. package/docs/build/files/lib_utilities_is-lazy-engine.js.html +0 -125
  102. package/docs/build/files/lib_utilities_is-yarn-project.js.html +0 -120
  103. package/docs/build/files/lib_utilities_valid-project-name.js.html +0 -142
  104. package/docs/build/files/lib_utilities_will-interrupt-process.js.html +0 -290
  105. package/docs/build/files/lib_utilities_windows-admin.js.html +0 -230
  106. package/docs/build/index.html +0 -125
  107. package/docs/build/modules/ember-cli.html +0 -152
  108. package/docs/build/modules/is-lazy-engine.html +0 -106
  109. package/docs/build-concurrency.md +0 -15
  110. package/docs/build-pipeline-debugging.md +0 -33
  111. package/docs/code-coverage.md +0 -14
  112. package/docs/error-propagation.md +0 -136
  113. package/docs/experiments.md +0 -53
  114. package/docs/node-support.md +0 -43
  115. package/docs/perf-guide.md +0 -250
  116. package/docs/project_version_preprocessor.js +0 -8
  117. package/docs/sourcemaps.md +0 -60
  118. package/docs/yuidoc.json +0 -13
@@ -1,250 +0,0 @@
1
- # Build performance
2
-
3
- When we talk about build performance, it is important to understand that there
4
- are several build phases:
5
-
6
- + cold build (booting your app up for the first time)
7
- + warm build (booting your app up when cache was populated)
8
- + rebuild (subsequent rebuilds that happen on file change)
9
-
10
- *Cold build* is the slowest because the cache is not yet populated and the
11
- application is booting for the first time. Build time varies and depends on
12
- the number of dependencies that application has but ballpark should be around 5
13
- seconds for small to middle size applications and around 15 seconds for large
14
- size applications.
15
-
16
- *Warm build* is faster then cold one because the cache was populated already
17
- and it takes less time re-compute dependencies. Build time varies but ballpark
18
- should be around 2 seconds for small to middle size applications and around 10
19
- seconds for large size applications.
20
-
21
- *Rebuild* aims to be the fastest because it happens the most often. App/
22
- JavaScript Rebuild time varies but ballpark should be around 200-300ms for
23
- small to middle size applications and up to 1 second for large size
24
- applications (200kloc js + 3000 modules).
25
-
26
- * rebuild of JS in app/ <--- Largely our focus, as this is likely the most common.
27
- * rebuild of CSS/Sass/Less in app/: largely depends on 3 factors
28
- * the size of bower_components (we have plans to largely mitigate this one)
29
- * which preprocessor is being used (libsass vs ruby-sass vs less vs ...)
30
- * the amount of css
31
- * rebuild of vendor/, bower_components/ <--- somewhat costly still, due to
32
- how slow available sourceMap Libraries are. We have WIP with a more v8/JIT
33
- friendly sourceMap lib, already showing some very nice improvements.
34
-
35
- *note* these times are based on a posix box with and SSD, win32 unfortunately
36
- tends to be slower. As we continue to improve performance, both posix and win32
37
- improve, hopefully future work will bring these platforms build times closer
38
- together.
39
-
40
- If you see that application timings escape, there might be a problem.
41
-
42
- Addons known to cause a slow down (but have not yet been addressed):
43
-
44
- * any old non-patch based broccoli plugin
45
- * ember-cli-component-css
46
- * ember-browserify
47
- * ... ?
48
-
49
- Make sure to mention which type of the build seems to be the problem so we can
50
- help identify and fix issues faster.
51
-
52
- ## FAQ/Common Issues & Solutions:
53
-
54
- ##### Q
55
-
56
- My rebuilds are slow. (And I have anti-virus installed)
57
-
58
- ##### A
59
-
60
- Our build-system assumes a relative fast/performant file system (although, we
61
- continue to reduce IO related work). It is quite common for a Anti-virus to
62
- slow down IO.
63
-
64
- Common issues:
65
-
66
- * anti-virus scanning of <project-root>/tmp/, oftentimes this can be avoided
67
- altogether.
68
- * anti-virus on-file-access re-scanning files, oftentimes this can be disabled
69
- for the app directory. or ember can be whitelisted.
70
-
71
- ##### Q
72
-
73
- My rebuilds are slow. (And I am using an encrypted thumb-drive to host my project)
74
-
75
- ##### A
76
-
77
- These sorts of drives are notoriously slow. Although we continue to reduce our
78
- IO overhead, you will be running at a disadvantage. Oftentimes, a much
79
- better alternative is hardware supported full-disk encryption, like on most OSX
80
- corporate laptops (mine included) use. This setup is both reasonably secure,
81
- and has negligible impact on performance.
82
-
83
- ##### Q
84
-
85
- My JavaScript rebuilds are still slow.
86
-
87
- ##### A
88
-
89
- please run
90
-
91
- ```
92
- npm ls broccoli-funnel broccoli-merge-trees broccoli-filter broccoli-persistent-filter broccoli-concat broccoli-caching-writer
93
- ```
94
-
95
- and ideally the following should be true (otherwise some upgrades may be required)
96
-
97
- * `broccoli-funnel` should be at `^1.0.1`
98
- * `broccoli-merge-trees` should be at `^1.1.0`
99
- * `broccoli-persistent-filter` should be at `^1.1.6`
100
- * `broccoli-filter` often needs to be replaced with
101
- `broccoli-persistent-filter` (we hope to re-merge the two eventually)
102
- * `broccoli-sourcemap-concat` should be at `^2.0.2` but will soon be replace by
103
- `broccoli-concat` (we have just re-merged the two)
104
- * `broccoli-caching-writer` should be at `^2.2.1`
105
- * `broccoli-concat` should be at `^2.0.3`
106
- * `broccoli-stew` should be at `^1.2.0`
107
- * likely more...
108
-
109
- Up next we should check for old and deprecate plugins
110
-
111
- * `npm ls broccoli-static-compiler` this should no longer be used, rather
112
- `broccoli-funnel` at `v1.0.1` should be used
113
- * ..
114
-
115
- ##### Q
116
-
117
- npm v3 made my build slow
118
-
119
- ##### A
120
-
121
- Well what happened is npm v3 changed the module topology, this coupled with a
122
- misbehaving plugin may result in extra files (maybe all of node_modules) being
123
- pulled into the build. This is going to be slow.., the solution is to find the
124
- offending plugin, and upgrade (or report the issue if it is not yet fixed).
125
-
126
- One such plugin is `ember-cli-ic-ajax`, which has been fixed. So please be sure
127
- to upgrade.
128
-
129
- Finding such plugins, we can use a series of DEBUG flags, to gain more insight
130
-
131
- `DEBUG=broccoli-funnel:Funnel*Addon* ember s` should reveal if extra files are
132
- being pulled into the build
133
-
134
- ##### Q
135
-
136
- My builds are slow, and the above Q/A hasn't helped
137
-
138
- ##### A
139
-
140
- Please be sure to read this full document (including the tips and tricks bellow).
141
- If the issue persists, please report an issue.
142
-
143
- Be sure to include:
144
-
145
- * `npm version`
146
- * `npm ls` (as a gist)
147
- * ideally a reproduction
148
- * we are aware some are unable to share apps (even privately), this may prove
149
- more difficult to debug. Although in some cases, consulting and proper IP
150
- related paperwork to allow sharing could enable improved debugging
151
-
152
-
153
- ##### Q
154
-
155
- My builds are slow for a reason not mentioned here
156
-
157
- ##### A
158
-
159
- We would love a PR improving this guide.
160
-
161
- # Various tips and tricks
162
-
163
- # How to explore/debug and hopefully address performance issues
164
-
165
- ### DEBUG logging
166
-
167
- We use [heimdalljs-logger](https://github.com/heimdalljs/heimdalljs-logger) for
168
- logging, which supports the same usage as the de facto standard
169
- [debug](https://github.com/visionmedia/debug). Quite often this can be used to
170
- quickly discover obviously wrong things.
171
-
172
- Usage:
173
-
174
- * `DEBUG=<pattern> ember s`
175
- * `DEBUG=* ember s` for all logging (this will be very verbose)
176
- * `DEBUG=ember-cli* ember s` for all ember-cli logging
177
- * `DEBUG=broccoli* ember s` for all broccoli logging
178
- * `DEBUG=broccoli*,ember-cli* ember s` for both broccoli and ember-cli logging
179
-
180
- The above patterns will be very verbose. But to make them even more verbose you
181
- can set the log level via `DEBUG_LEVEL`
182
-
183
- * `DEBUG=* DEBUG_LEVEL=debug ember s`
184
-
185
- To make them a bit less verbose, a curated set of performance related logging
186
- flags are:
187
-
188
- + `DEBUG=broccoli-caching-writer:* ember s`
189
- + `DEBUG=broccoli-funnel:* ember s`
190
- + `DEBUG=broccoli-funnel:Funnel*Addon* ember s`
191
- + `DEBUG=broccoli-merge-trees ember s`
192
- + `DEBUG=broccoli-merge-trees:TreeMerger* ember s`
193
- + `DEBUG=broccoli-merge-trees:Addon* ember s`
194
- + `DEBUG=broccoli-merge-trees:styles ember s`
195
- + `DEBUG=broccoli-merge-trees:compileTemplates* ember s`
196
- + `DEBUG=broccoli-merge-trees:compileTemplates* ember s`
197
-
198
- Because many plugins are used repeatedly it may be difficult to see the context
199
- for log entries. By default, 3 nodes of context are shown.
200
-
201
- ```
202
- DEBUG_LEVEL=debug DEBUG=broccoli-merge-trees: ember build
203
- broccoli-merge-trees: [TreeMerger (testFiles)#777 -> ConcatWithMaps#782 -> BroccoliMergeTrees#783] deriving patches
204
- ```
205
-
206
- To show more (or fewer) lines of context, specify the environment variable
207
- `DEBUG_DEPTH`.
208
-
209
- ```
210
- DEBUG_DEPTH=5 DEBUG_LEVEL=debug DEBUG=broccoli-merge-trees: ember build
211
- # => broccoli-merge-trees: [TreeMerger (allTrees)#1 -> BroccoliMergeTrees#668 -> TreeMerger (testFiles)#777 -> ConcatWithMaps#782 -> BroccoliMergeTrees#783]
212
- ```
213
-
214
- `[... ConcatWithMaps#782 -> BroccoliMergeTrees#783]` means that the log entry
215
- occurred in broccoli merge-trees node with id 783, whose parent was a concat
216
- with maps node with id 782. These ids are shown in the visualization graph.
217
- See [Visualization](#visualization) for details.
218
-
219
- ... more on what to look for ...
220
-
221
- ### `broccoli-viz`
222
-
223
- #### Visualization
224
-
225
- To visualize build tree, we use [graphviz](http://www.graphviz.org/). To
226
- install it run `brew install graphviz` or download it directly from
227
- [here](http://www.graphviz.org/Download.php).
228
-
229
- You will also need to install
230
- [broccoli-viz](https://github.com/stefanpenner/broccoli-viz) version `4.0.0` or
231
- higher. `npm install -g broccoli-viz@^4.0.0`.
232
-
233
- To generate visualization:
234
-
235
- + `BROCCOLI_VIZ=1 ember build`
236
- + `broccoli-viz instrumentation.build.0.json > instrumentation.build.0.dot`
237
- + `dot -Tpng instrumentation.build.0.dot > instrumentation.build.0.png`
238
-
239
-
240
- Each build will generate an additional graph, `instrumentation.build.<build-number>.json`
241
-
242
- Alternatively, you can upload the JSON file to https://heimdalljs.github.io/heimdalljs-visualizer/
243
-
244
- #### in-depth look
245
-
246
- in-depth tooling, aimed to provide much deeper insight into the given build
247
-
248
- + `dot`: is the input to graphviz, allowing tree visualization
249
- + `json`: more detailed counts and timings related to the corresponding build
250
-
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- let versionUtils = require('../lib/utilities/version-utils');
4
- let emberCLIVersion = versionUtils.emberCLIVersion;
5
-
6
- module.exports = function (data, options) {
7
- options.project.version = emberCLIVersion();
8
- };
@@ -1,60 +0,0 @@
1
- # Sourcemaps
2
-
3
- Today, we expect sourcemaps to work in ember-cli. A default ember-cli
4
- application should have functioning sourcemaps, with the exception of in-module
5
- ES6 -> ES5 mappings. This is for two reasons:
6
-
7
- 1. dramatically increases build costs
8
- 2. babel (at least at the time) does not correctly mangle names, which results in
9
- a very poor debugging experience when some of your variables are debuggable
10
- and others are not. We hope this is eventually rectified.
11
-
12
- ember-cli, via ef4/fast-sourcemap-concat, attempts to detect invalid sourcemaps,
13
- and discards them while still producing a valid, correct but incomplete
14
- sourcemap. This means inputs with invalid sourcemaps can still be viewed
15
- separately in the chrome debugger (as separate "files"), but will have no
16
- mappings (eg for function names).
17
-
18
- If your experience differs from the above, please read the rest of
19
- this document before logging an issue.
20
-
21
- ## Debugging Sourcemaps
22
-
23
- Sourcemaps can be a bit tricky to read. This is due to them being VLQ encoded,
24
- and humans not being very good at decoding VLQ on the fly.
25
-
26
- There are broadly two ways a source file will have sourcemaps attached.
27
-
28
- 1. Via an external map file
29
- 2. Inline, in Base64.
30
-
31
- External sourcemap files can be read with the [helper tools at
32
- fast-source-map](https://github.com/krisselden/fast-source-map/tree/master/bin).
33
-
34
- Inline sourcemaps will look something like
35
-
36
- ```
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlubmVyL2ZpcnN0LmpzIiwiaW5uZXIvc2Vjb25kLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIG1lYW5pbmdPZkxpZmUoKSB7XG4gIHRocm93IG5ldyBFcnJvcig0Mik7XG59XG5cbmZ1bmN0aW9uIGJvb20oKSB7XG4gIHRocm93IG5ldyBFcnJvcignYm9vbScpO1xufVxuIiwiZnVuY3Rpb24gc29tZXRoaW5nRWxzZSgpIHtcbiAgdGhyb3cgbmV3IEVycm9yKFwic29tZXRoaWduIGVsc2VcIik7XG59XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDTkE7QUFDQTtBQUNBOyIsImZpbGUiOiJhbGwtaW5uZXIuanMifQ==
38
- ```
39
-
40
-
41
- The easiest way to read them is to first convert them to an external map file.
42
- To do so:
43
-
44
- 1. take the part after `base64,` and in node `new Buffer(string,
45
- 'base64').toString();`
46
- 2. write this to a file, and one can now use the above described fast sourcemap
47
- helpers
48
-
49
- ### Handling Invalid Sourcemaps
50
-
51
- Add `DEBUG='fast-sourcemap-concat:*'` to see error output when invalid
52
- sourcemaps are detected.
53
-
54
- ## Useful tools
55
-
56
- - source map visualizer - https://sokra.github.io/source-map-visualization/ **
57
- Very useful, but appears to have issues with both large sourcemaps, and
58
- incorrect sourcemaps (such as ones with unexpected negative offsets).
59
- - encode/decode - https://github.com/krisselden/fast-source-map/tree/master/bin
60
- - srcmap r3 - `https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit`
package/docs/yuidoc.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "logo": "https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png",
3
- "options": {
4
- "paths": [
5
- "lib"
6
- ],
7
- "themedir": "node_modules/yuidoc-ember-cli-theme",
8
- "helpers": ["node_modules/yuidoc-ember-cli-theme/helpers.js"],
9
- "outdir": "docs/build",
10
- "preprocessor": "docs/project_version_preprocessor.js",
11
- "linkNatives": true
12
- }
13
- }