linkedin / css-blocks

High performance, maintainable stylesheets.
http://css-blocks.com/
BSD 2-Clause "Simplified" License
6.33k stars 152 forks source link

[ember-cli] consuming apps attempt to resolve your test in-repo addons #214

Open mike-north opened 5 years ago

mike-north commented 5 years ago

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 to be properly resolved and used in tests

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. This will allow you to write similar tests to what already exist, but without running the risk of affecting consumers in any way.

chriseppstein commented 5 years ago

@mike-north thanks!