Skip to content

Commit 33b0475

Browse files
committed
Auto merge of #3776 - rust-lang:renovate/ember-css-modules-1.x, r=Turbo87
Update dependency ember-css-modules to v1.5.0 [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ember-css-modules](https://github.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) | [![age](https://badges.renovateapi.com/packages/npm/ember-css-modules/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ember-css-modules/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ember-css-modules/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ember-css-modules/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>salsify/ember-css-modules</summary> ### [`v1.5.0`](https://github.com/salsify/ember-css-modules/blob/master/CHANGELOG.md#&#8203;150-July-6-2021) [Compare Source](https://github.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://github.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 `@&#8203;localClassNames('always-present')` export default class MyComponent extends Component { `@&#8203;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://github.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).
2 parents 04a7a2c + 99bf7f8 commit 33b0475

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"ember-cli-terser": "4.0.2",
8383
"ember-click-outside": "2.0.0",
8484
"ember-concurrency": "2.1.0",
85-
"ember-css-modules": "1.4.0",
85+
"ember-css-modules": "1.5.0",
8686
"ember-data": "3.27.1",
8787
"ember-disable-prototype-extensions": "1.1.3",
8888
"ember-event-helpers": "0.1.1",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6931,10 +6931,10 @@ [email protected]:
69316931
ember-compatibility-helpers "^1.2.0"
69326932
ember-destroyable-polyfill "^2.0.2"
69336933

6934-
ember-css-modules@1.4.0:
6935-
version "1.4.0"
6936-
resolved "https://registry.yarnpkg.com/ember-css-modules/-/ember-css-modules-1.4.0.tgz#aec842ce6c7343994957253d4e5f4cf949c89e59"
6937-
integrity sha512-VNz2cZCw5FvrSh1r5Ye60+XQRZe5ZipzS/D4fAR92F/8/AUTNd+DzTtgLend6Iui4YLrEmUAEgTwLhMIZbxbdg==
6934+
ember-css-modules@1.5.0:
6935+
version "1.5.0"
6936+
resolved "https://registry.yarnpkg.com/ember-css-modules/-/ember-css-modules-1.5.0.tgz#3eba9378440f84edd9f87e76088d23867571c795"
6937+
integrity sha512-O2d3o1oZw3LZE8K123W9in764bg4VcBj4UxspIWpsz6dAIYbpAQOb8zo/wuMIwaocd8mgjfFkS4nHpxIEvcjVw==
69386938
dependencies:
69396939
broccoli-bridge "^1.0.0"
69406940
broccoli-concat "^3.2.2"

0 commit comments

Comments
 (0)