Skip to content

Releases

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 03:30
Immutable release. Only release title and notes can be modified.
v0.7.0
65d1b03

What's Changed

  • ⚠️ Projects tested with Vitest now need Vitest 5 or later, which ecij declares as an optional vitest peer dependency (^5.0.0) (#122)
    • Installing ecij in a project on Vitest 4 now fails with a peer dependency conflict
    • Upgrade to Vitest 5, or stay on ecij 0.6 until then
    • Projects that don't use Vitest are not affected
  • Fixed Vitest 5 test runs failing from the second run on with Cannot find module '….css' (#122)
    • Vitest's fsModuleCache, on by default, reused transformed modules without running ecij, so their stylesheets were missing
    • Vitest no longer caches the modules that reference ecij on disk, so fsModuleCache: false workarounds can be removed
  • Fixed css templates left untransformed in modules whose language differs from their file extension, like JSX in a .js file with Rolldown's moduleTypes: { '.js': 'jsx' } (#125)
    • Modules are now parsed as the language the bundler assigned them
  • Improved performance when a module interpolates several values from the same module, like design tokens, which is now resolved, loaded, and parsed once per transform instead of once per value (#124)
  • The package now includes source maps for dist/index.js and dist/index.d.ts, and the src/index.ts they point to, so debuggers and Go to Definition can show the source (#121)
  • Corrected the documentation shown in editors for css, which now says that only const bindings resolve (#119)

Full Changelog: v0.6.0...v0.7.0

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 23:09
Immutable release. Only release title and notes can be modified.

What's Changed

  • ⚠️ Interpolations no longer resolve let and var bindings, only const bindings (#79)
    • This applies to values and class names, whether declared in the same module or imported
    • A template that interpolates a let or var binding is skipped with an UNRESOLVED_INTERPOLATION warning, and its css call throws at runtime
    • css templates assigned to a let or var are still extracted, though their binding cannot be interpolated
    • Declare these bindings with const instead
    • See the new Static resolution section of the README
  • Added support for aliased css imports, like import { css as styled } from 'ecij' (#79)
  • Added support for more const bindings in interpolations, in the same module or imported (#79)
    • Signed numbers, like const offset = -5
    • Other bindings that resolve, like const accent = brand
  • Fixed missing styles in the build output when optimization.inlineConst is true or { mode: 'all' } in a package with "sideEffects": false (#87, #98)
    • Class names are now emitted as (() => "css-1a2b3c4d")(), which minifiers fold back into plain strings
  • Fixed builds hanging when modules interpolate each other's class names (#102)
  • Fixed stale CSS in the Vite dev server after editing a module whose values or class names other modules interpolate (#104)
  • Fixed a memory leak that grew with every parsed file, noticeable in long-running dev servers and watch mode (#109)
  • Fixed interpolations resolving to the wrong binding in some scopes (#79)
    • Parameter defaults no longer see the declarations of the function body
    • Templates assigned to a var now see the bindings of the block they are in
  • Fixed bindings exported under several names, which only resolved under the last one (#79)
  • Templates whose css tag is shadowed by a local binding are no longer extracted (#79)
    • This changes the class names of the templates that follow them in the same module
  • Improved performance with hook filters, so Rolldown and Vite only call the plugin for the modules it handles (#99)
  • Improved the documentation shown in editors for css, ecij(), and its options (#84)
  • Added Vite Plugin Registry metadata, which marks Rollup as incompatible (#82)
  • Documented the tsdown setup, which needs @tsdown/css to bundle the extracted CSS (#99)

Full Changelog: v0.5.0...v0.6.0

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 31 Aug 12:35
Immutable release. Only release title and notes can be modified.

What's Changed

  • ⚠️ Added rolldown and vite peer dependency version ranges (#22, #76, #80)
    • rolldown :^1.2.0, required
    • vite: ^8.2.0, optional
  • Added support for JS sourcemaps (#78)
  • Added variable scoping and shadowing support (#14)
  • Added support for inline string/number literals in CSS interpolations (#59)
  • Configuration options (include, exclude, and classPrefix) now accept an explicit undefined to better support exactOptionalPropertyTypes in TypeScript, and null (#21)
  • Skipped CSS extraction failures are now logged as warnings (#58)

Full Changelog: v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 28 Feb 19:48
Immutable release. Only release title and notes can be modified.

What's Changed

  • Fixed missing styles in build output in some cases (#9)

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Feb 17:37
Immutable release. Only release title and notes can be modified.

What's Changed

  • Removed @rolldown/pluginutils and oxc-parser dependencies
    • ecij now imports utils from rolldown directly
    • ecij now has no dependencies
    • ⚠️ An updated version of rolldown is expected, ecij has been tested against [email protected]

Full Changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Dec 14:46
Immutable release. Only release title and notes can be modified.
  • Various fixes, optimizations, and correctness improvements
  • ⚠️ In some cases the CSS may be output in a different order compared to the previous version's output

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 16:14
Immutable release. Only release title and notes can be modified.
  • Added support for number literals in template string interpolations
  • Added support for include/exclude configuration settings, with defaults
  • Marked the package as having no side-effects

Full Changelog: v0.1.1...v0.2.0

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 15 Nov 00:55

Renamed package to ecij

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 16:20