fastbootDependencies are not respected (causing failure with in-repo addons)
See original GitHub issueWhen building with ember-cli-fastboot@2
and @embroider/*@1.5
, I’m seeing that dist/package.json
includes dependencies that are not in the fastbootDependencies
list in ./package.json
.
While this could be problematic on its own, it also causes a build failure, because it includes in-repo addons in this list also. Because these in-repo addons are not in the npm registry (or could be totally different packages), this can:
- break the fastboot server build
- be a security risk(?) since an in-repo addon that is named the same as something else published to npm can get installed.
Here’s a repro where I show that an in-repo addon named with a @scope
causes the fastboot server build to fail: https://github.com/mehulkar/embroider-in-repo-addons
(Reproduces with ember-cli-fastboot@3.2
as well)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Recursive fastbootDependencies not discovered · Issue #188 ...
My understanding is that fastbootDependencies exists not to protect against addon authors, but to minimize the amount of code accessible inside the fastboot...
Read more >Addon Author Guide - Ember FastBoot
Common Causes. The most common cause of failure on boot is initialization code that relies on the following global objects that aren't available...
Read more >Imports not working in in-repo addons - General - Ember.JS
I have created an in-repo addon and then ran the below command to create a component within that in-repo addon. The component was...
Read more >how to use in-repo-addons in the ember-engines?
I found the answer but not sure whether it is correct way or not. In the users-engine/package.json add relative path to addons
Read more >Testing Ember Addons in a Real App Using ember-cli-addon ...
I was not aware there was even an option to run a real app, consume the addon and... ... Testing with an App;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That makes sense. Would it make sense not to generate a
dist/package.json
under embroider then? It’s already doing something different, so maybe we could be more explicit about the known good pattern? (and maybe document it somewhere in embroider if it’s a transition path other users may run into)It would make sense to eventually drop the package.json. Right now there are still things fastboot reads from it.