All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Improved nodes range detection
- Added support for passing a function to
styled
instead using it as a tagged template. For example,styled.div(props => `color: red;`)
, orstyled(Component)(props => `color: red;`)
- Fixed parsing for CSS with escaped characters
- Fixed interpolation range if comment after interpolation has a backslash
- Fixed a JS parsing issue if a comment between a tag function and template literal is present
- Fixed interpolation ranges if there is a comment inside an interpolation
- Catch more JavaScript parsing errors
- Use TypeScript instead of @typescript-eslint/typescript-estree for parsing. This fixes “unsupported TypeScript version” messages and reduces install size.
- Fixed parsing for two interpolations before rule selector. Fixes #24
- Dropped support for Node.js 14 and 16
- Moved
typescript
frompeerDependencies
todependencies
. This should also remove “unsupported TypeScript version” messages. Your project doesn't need to be a TypeScript project.typescript
package is used as a parser for JavaScript and TypeScript files.
- Added
raws.isRuleLike
to all Roots. Enable PostCSS and Stylelint to adjust to CSS-in-JS quirks. E. g. if something processes only rules, it could also processroot
if this flag is present
- Fixed: Catch JavaScript parsing errors
- Fixed stringifier mutating AST
- Fixed regression for comments inside a selector
- Interpolation on a separate line before
Rule
now added torule.raws.before
instead of being part of a selector - Fixed at-rule with interpolation before it parsed as a rule
- Fixed parsing error for interpolations before a comment
- Fixed parsing error for multiple interpolations before declaration, while they have no spacing between them
- Add Node.js 14 support.
- Initial release.