jest-transform-css

👩‍🏭 Jest transformer to import CSS into Jest's jsdom

MIT License

Downloads
298.5K
Stars
45
Committers
9

Bot releases are visible (Hide)

jest-transform-css - v6.0.1 Latest Release

Published by dferber90 almost 2 years ago

Bug fix

jest-transform-css - v6.0.0

Published by dferber90 about 2 years ago

BREAKING CHANGE

Your .postcssrc file might need to be adapted as postcss-load-config dropped support for the sync API and for Node.js 12 & 10.

jest-transform-css - v5.0.0

Published by dferber90 about 2 years ago

BREAKING CHANGE

  • dropped support for jesttransformcss.config.js in favor of transformer config

You no longer need a jesttransformcss.config.js file. Instead, configure your transform directly.

See https://github.com/dferber90/jest-transform-css/pull/22 for more information.

massive thanks to @Yankovsky for coming up with & implementing this improvement

jest-transform-css - v4.0.1

Published by dferber90 over 2 years ago

  • make compatible with Jest v28, thanks @3c1u
jest-transform-css - v4.0.0

Published by dferber90 over 2 years ago

  • upgraded to postcss v8, thanks @WestCornfield
jest-transform-css - v3.0.0

Published by dferber90 almost 3 years ago

jest-transform-css - v2.1.0

Published by dferber90 about 4 years ago

  • Added a generateScopedName config option to jesttransformcss.config.js (#7, thanks @tomrule007)
jest-transform-css - v2.0.0

Published by dferber90 about 6 years ago

Fixed

  • d35fe66052125e236f63a86405bae42b41bc93c2 remove rootDir from cache key

Breaking

  • fea1e8d7798923f41f7a7613bb3a336efd0178d3 default to regular CSS (CSS Modules are now opt-in)

Upgrade Guide

So far CSS Modules were enabled by default. They are now opt-in. Add a configuration file called jesttransformcss.config.js at your project root to and add the following content to activate them:

// jesttransformcss.config.js

module.exports = {
  modules: true
};

Notice that you can also pass a function to modules to determine the mode depending on the file. See the README for more information.

jest-transform-css - v1.1.0

Published by dferber90 about 6 years ago

Added

  • 8a2f54f12b4c49e5d7100262eeb197b9b1035b20 Enable caching

Changed

  • 04a62c2d12dda2734e23f75f6fd30499d85bd8e0 reorganize dependencies

Upgrade guide

postcss-load-config and postcss-modules are no longer peerDependencies, so they can be removed from consuming projects not using them themselves.

jest-transform-css - v1.0.0

Published by dferber90 about 6 years ago

Changes:

  • made postcss, postcss-load-config and postcss-modules peer dependencies
jest-transform-css - Initial Release

Published by dferber90 about 6 years ago