You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #3776 - rust-lang:renovate/ember-css-modules-1.x, r=Turbo87
Update dependency ember-css-modules to v1.5.0
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ember-css-modules](https://togithub.com/salsify/ember-css-modules) | [`1.4.0` -> `1.5.0`](https://renovatebot.com/diffs/npm/ember-css-modules/1.4.0/1.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
<details>
<summary>salsify/ember-css-modules</summary>
### [`v1.5.0`](https://togithub.com/salsify/ember-css-modules/blob/master/CHANGELOG.md#​150-July-6-2021)
[Compare Source](https://togithub.com/salsify/ember-css-modules/compare/v1.4.0...v1.5.0)
##### Deprecated
- ECM's support for binding local class names on the root element of a classic `Ember.Compnent` (the `localClassNames` and `localClassNameBindings` properties and the ``@localClassName`` and ``@localClassNames`` decorators) has been deprecated and will be removed in the next major release. These APIs rely on reopening `Ember.Component` (which is itself [now deprecated](https://togithub.com/emberjs/rfcs/pull/671)) and can be replaced by several alternative patterns. See the Upgrade Notes section below for migration suggestions.
##### Upgrade Notes
For classic ``@ember/component`` subclasses, `ember-css-modules` has had support for binding static and dynamic local class names to the component's root element using either `.extend()` or decorator syntax:
```js
export default Component.extend({
localClassNames: ['always-present'],
localClassNameBindings: ['flipACoin'],
flipACoin: computed(function() {
return Math.random() > 0.5 ? 'yes-class' : 'no-class';
}),
});
```
```js
`@​localClassNames('always-present')`
export default class MyComponent extends Component {
`@​localClassName` flipACoin = Math.random() > 0.5 ? 'yes-class' : 'no-class';
}
```
Both versions of these APIs are now deprecated, as:
1. they rely on monkey-patching `Ember.Component`, which is itself [now deprecated](https://togithub.com/emberjs/rfcs/pull/671)
2. they're parallels of the `classNames` and `classNameBindings` APIs that are no longer relevant in modern Ember applications
Depending on your appetite for refactoring and modernizing, you might take one of three approaches to migrating off of these APIs:
1. Convert your components to use the modern ``@glimmer/component`` base class instead of ``@ember/component`.` Since Glimmer component templates have "outer HTML" semantics, there's no implicit root element for these APIs to apply to. See the [Octane vs Classic cheat sheet](https://ember-learn.github.io/ember-octane-vs-classic-cheat-sheet/) for further details on the differences between classic and Glimmer components.
2. Use `tagName: ''` to remove the implicit root element from your classic component, then add a corresponding explicit root element to your template, where you can use `local-class` as you would for any other element.
3. Import the class name mapping from your styles module and use that with the classic `classNames` and `classNameBindings` APIs:
```js
import styles from './styles';
export default Component.extend({
classNames: [styles['always-present']],
classNameBindings: ['flipACoin'],
flipACoin: computed(function() {
return Math.random() > 0.5 ? styles['yes-class'] : styles['no-class'];
}),
});
```
</details>
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/rust-lang/crates.io).
0 commit comments