Skip to content

WebC v0.12.0-beta.1

Pre-release
Pre-release

Choose a tag to compare

@zachleat zachleat released this 22 Aug 15:11
· 13 commits to main since this release
  • Breaking: Node minimum 18+
  • Breaking: export default is now required when using webc:type="js" and webc:type="render" and drops support for CommonJS module.exports. See more examples at #229 (notably, this change also aliases webc:type="render" to webc:type="js" and they have the same code path now)
  • Breaking: ESM export keyword is now required in webc:setup for anything you want to use inside the component (no more implicit globals). Implicit globals from the data cascade are not available here (use $data.* instead)
    • Fix for leaking page context across multiple instances of components using webc:setup nodes #174 This means stale access to page is no longer available in webc:setup
  • Adds ESM support (including import, though require is also still available) to webc:setup, webc:type="js", and webc:type="render". Swapped to use import-module-string instead of node-retrieve-globals in #229 #226 #225
  • Fix to @attributes and webc.renderAttributes to preserve original attribute names (fixes dashes being stripped) #163 #202, #178, #216
  • Fix to webc:for to preserve variable context on nested loops #175
  • Fix to webc:for to work with Set and Map (or anything that is Array.from-friendly) #179
  • Fix double-escaping bug with HTML entities inside <style> content assigned via @raw and @html #208
  • Tests added for webc:if short-circuit to skip dynamic attribute evaluation #191
  • Fix bug with webc:if on multiple subsquent void sibling elements #217
  • Adds links in npm config by @nichoth in #223
  • Use node: protocol in imports by @Zearin in #168
  • Fix npm audit in nanoid dependency #218
  • Fix slots.text still referencing the wrong component #165

Major version dependency upgrades:

Name Version Changelog Notable
css-tree ^2.3.1 → ^3.1.0 Changelog CSS support changes
dependency-graph ^0.11.0 → ^1.0.0 Changelog Internals only
entities ^4.5.0 → ^6.0.1 Changelog and Changelog Deep import file locations moved
nanoid ^4.0.2 → ^5.1.5 Changelog Node 18+
parse5 ^7.3.0 → ^8.0.0 Changelog ESM-only

Milestone: https://github.com/11ty/webc/milestone/23?closed=1
Full Changelog: v0.11.4...v0.12.0-beta.1