adopted-ember-addons / ember-light-table

Lightweight, contextual component based table for Ember
http://adopted-ember-addons.github.io/ember-light-table/
MIT License
312 stars 131 forks source link

ELT 3.0.0-beta.0 incompatible with Ember 3.27+ #768

Closed IgnaceMaes closed 2 years ago

IgnaceMaes commented 2 years ago

Using ELT 3.0.0-beta.0 in an Ember app on version 3.27 and above results in a build warning and a runtime error. The following build warning is logged when starting a new Ember 3.28 app, installing ELT, and running it locally.

WARNING: [DEPRECATION] [DEPRECATION] Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.

See https://deprecations.emberjs.com/v3.x/#toc_ember-global for details.

Usages of the Ember Global may be caused by an outdated ember-cli-babel dependency. The following steps may help:

* Upgrade the following addons to the latest version:
  * ember-light-table

### Important ###

In order to avoid repeatedly showing the same deprecation messages, no further deprecation messages will be shown for usages of the Ember Global until ember-cli-babel is upgraded to v7.26.6 or above.

To see all instances of this deprecation message, set the `EMBER_GLOBAL_DEPRECATIONS` environment variable to "all", e.g. `EMBER_GLOBAL_DEPRECATIONS=all ember test`.

### Details ###

Prior to v7.26.6, ember-cli-babel sometimes transpiled imports into the equivalent Ember Global API, potentially triggering this deprecation message indirectly, even when you did not observe these deprecated usages in your code.

The following outdated versions are found in your project:

* ember-cli-babel@6.18.0, currently used by:
  * ember-component-inbound-actions@1.3.1
    * Depends on ember-cli-babel@^6.16.0
    * Added by ember-light-table@3.0.0-beta.0 > ember-scrollable@1.0.2
  * ember-element-resize-detector@0.4.0
    * Depends on ember-cli-babel@^6.6.0
    * Added by ember-light-table@3.0.0-beta.0 > ember-scrollable@1.0.2
  * ember-get-config@0.2.4
    * Depends on ember-cli-babel@^6.3.0
    * Added by ember-light-table@3.0.0-beta.0
  * ember-maybe-import-regenerator@0.1.6 (Dormant)
    * Depends on ember-cli-babel@^6.0.0-beta.4
  * ember-raf-scheduler@0.1.0
    * Depends on ember-cli-babel@^6.6.0
    * Added by ember-light-table@3.0.0-beta.0 > @html-next/vertical-collection@1.0.0
  * ember-scrollable@1.0.2
    * Depends on ember-cli-babel@^6.8.0
    * Added by ember-light-table@3.0.0-beta.0
  * ember-truth-helpers@2.1.0
    * Depends on ember-cli-babel@^6.6.0
    * Added by ember-light-table@3.0.0-beta.0
  * ember-wormhole@0.5.5
    * Depends on ember-cli-babel@^6.10.0
    * Added by ember-light-table@3.0.0-beta.0

Note: Addons marked as "Dormant" does not appear to have any JavaScript files. Therefore, even if they are using an old version ember-cli-babel, they are unlikely to be the culprit of this deprecation and can likely be ignored.

When using ELT this results in the following runtime error.

Uncaught TypeError: (0 , _string.htmlSafe) is not a function
    at cssStyleify (css-styleify.js:19)
    at Class.<anonymous> (light-table.js:266)
    at index.js:1993
    at untrack (validator.js:851)
    at ComputedProperty.get (index.js:1992)
    at Class.getter [as style] (index.js:1074)
    at getPossibleMandatoryProxyValue (index.js:1383)
    at _getProp (index.js:1448)
    at reference.js:222
    at reference.js:170

To solve this it seems like dependencies will need to get updated to versions compatible with ember-cli-babel@7.26.6 and up?

IgnaceMaes commented 2 years ago

For anyone also running into this issue, I ended up forcing the resolution of ember-cli-babel v7 in package.json:

{
  "resolutions": {
    "ember-cli-babel": "~7.26.10"
  },
}
RobbieTheWagner commented 2 years ago

All of this should be fixed in the master branch. We'll work on getting some new releases out soon!