Releases: salsify/ember-css-modules
Releases · salsify/ember-css-modules
The Big Dig
Migrating from 0.7.x
The 1.0 release should largely be a drop-in replacement coming from 0.7.x, but there are a few changes to be aware of:
- Referencing a
local-class
in a template that doesn't have a correspondingstyles
module is now a hard error (before it would silently fail and add no class to the target element). - Using
localClassNames
orlocalClassNameBindings
on a component with no template is no longer possible. You can either create an empty template for that component or import the styles module and setclassNames
orclassNameBindings
using the imported mapping, e.g.classNames: styles['my-local-class']
.
Fixed
- The type declaration for
localClassNames
now uses the right identifier - The error message when referencing a
local-class
in a template with no styles module is now more informative
If you're migrating from 0.7.x, see the release notes for the 1.0 betas for additional changes and fixes.
Decorations
Added
- The long awaited
@localClassNames
and@localClassName
decorators, which work as parallels toember-decorators
'@classNames
and@className
, are now available. Thanks @buschtoens!
Fixed
- Turns out there was one breaking change from the 0.7 series: components must now have a template in order for their
localClassNames
andlocalClassNameBindings
(as well as the decorator versions) to resolve. The error message for this scenario has been improved to provide more actionable details.
Ch-ch-changes
This release is the first beta for Ember CSS Modules 1.0. There are no known breaking changes since 0.7.10, but as described below, there were a few internal refactorings, so we'll run a beta series before christening the official 1.0 🎉
Added
addPostcssPlugin
now accepts multiple arguments (#103)
Fixed
- The
template-only-glimmer-components
feature should no longer conflict with ember-css-modules (#98)
Changed
- The majority of the runtime monkeypatching that was present in this addon has been removed in favor of build-time processing. The only remaining runtime code is the
{{local-class}}
helper and an extension to theComponent
class to supportlocalClassNames
andlocalClassNameBindings
. (#99)
Super Scope
- Support importing styles via
@value
andcomposes:
from addons with@scope
ed names.
Party Like It's 1992
Fixed
- Ember 3.1 ships with a version of Glimmer that expects AST transforms to use a singular
visitor
key rather than pluralvisitors
. So we do that. Big thanks to @luqman for tracking this down. - The internal computed property we set up to support
localClassNameBindings
now uses Ember'sdefineProperty
for compatibility with the ES5 getters overhaul.
Let's Pretend This Never Happened
This was a no-op republish of 0.7.7.
Prerelease Blues
Fixed
- Prerelease versions of Ember CLI are correctly detected now.
Lint Roller
Added
- The plugin system now supports a notion of lint plugins, which will activate for developing addons even when they're in
devDependencies
.
Everything is Awesome
Fixed
- The
local-class
template transform should now play nicely with ember-font-awesome's own transforms (thanks @buschtoens!) - The plugin registry no longer explodes when addons with no package keywords are present (thanks @devotox!)
String Theory
Added
- The ability to use
{{local-class}}
to inject classes from other modules is now public and documented (thanks @kellyselden!)
Fixed
localClassNameBindings
now works with string values instead of just booleans (thanks @luxferresum!)headerFiles
andfooterFiles
will now accept file paths with and without extensions- Setup for
localClassNames
andlocalClassNameBindings
now short circuits to avoid extra work for tagless components (thanks @garno!)