linkedin / linkedin/css-blocks
[ember-cli] consuming apps attempt to resolve your test in-repo addons
- Dominant language
- TypeScript
- Stars
- 6.3k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
Currently the ember-cli addon's package.json specifies some paths in the "ember-addon" object
https://github.com/linkedin/css-blocks/blob/f1259df3ce005dda256dde6ca4933acd3f2135a7/packages/%40css-blocks/ember-cli/package.json#L72-L76
This looks like an attempt to allow [in-repo addons within this library's dummy app](https://github.com/linkedin/css-blocks/tree/09f1a176861b094c86111d6e95f53e2c2634050b/packages/%40css-blocks/ember-cli/tests/dummy/lib) to be properly resolved and [used in tests](https://github.com/linkedin/css-blocks/blob/f1259df3ce005dda256dde6ca4933acd3f2135a7/packages/%40css-blocks/ember-cli/tests/integration/template-discovery-test.js#L64-L76)
Unfortunately any consumer is going to try and potentially resolve these paths. They'll see warning messages like these
```
WARNING: The 'package.json' file for the addon at .../node_modules/@css-blocks/ember-cli
WARNING: specifies invalid, malformed or missing addons at relative paths
WARNING: 'tests/dummy/lib/in-repo-addon'
WARNING: 'tests/dummy/lib/in-repo-engine'
WARNING: 'tests/dummy/lib/in-repo-lazy-engine'
```
Version information to reproduce
```
ember-cli: 3.3.0
node: 10.11.0
os: darwin x64
yarn: 1.10.1
```
```
@css-blocks/ember-cli 0.20.0-beta.4
```
as the app attempt to resolve these three things in the `tests/dummy` folder as transitive dependencies.
What you'll want to do instead is use something like https://github.com/tomdale/ember-cli-addon-tests, which sets up a brand new app/addon/in-repo-addon/in-repo-engine [based on some fixture files](https://github.com/tomdale/ember-cli-addon-tests#fixtures). This will allow you to write similar tests to what already exist, but without running the risk of affecting consumers in any way.
Contributor guide
Assessment
This issue has not been assessed yet.