Skip to content

Releases: ProjectEvergreen/wcc

v0.13.0

13 Apr 18:48
Compare
Choose a tag to compare

Overview

This release introduces support for parsing Import Attributes syntax and and a basic no-op DOM shim for CSSStyleSheet (Constructable Stylesheets).

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.13.0

  1. Import Attributes syntax parsing
  2. Support Constructable Stylesheets (CSS Modules) in DOM Shim
  3. WCC dropping query params when loading module URLs

Breaking Changes

N / A

Known Issues

N / A

Diff

$ git diff 0.12.1 0.13.0 --stat
 .eslintrc.cjs                                                       |   10 +
 .nvmrc                                                              |    2 +-
 docs/pages/docs.md                                                  |    6 +-
 docs/pages/index.md                                                 |    1 +
 package-lock.json                                                   | 1398 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 package.json                                                        |   13 +-
 src/dom-shim.js                                                     |   12 +-
 src/jsx-loader.js                                                   |    6 +-
 src/wcc.js                                                          |   17 +-
 test/cases/constructable-stylesheet/constructabe-stylesheet.spec.js |   38 ++
 test/cases/constructable-stylesheet/src/components/header/header.js |   23 +
 test/cases/constructable-stylesheet/src/pages/index.js              |   10 +
 test/cases/import-attributes/import-attributes.spec.js              |   48 ++
 test/cases/import-attributes/src/components/header/data.json        |    3 +
 test/cases/import-attributes/src/components/header/header.js        |   17 +
 test/cases/import-attributes/src/pages/index.js                     |   10 +
 16 files changed, 1576 insertions(+), 38 deletions(-)

v0.12.1

10 Mar 22:45
Compare
Choose a tag to compare

Overview

This release fixes missing package reference coming out of the changes to adopt an ESM friendly version of acorn-jsx.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.12.1

  1. error for missing acorn-jsx package

Breaking Changes

N / A

Known Issues

N / A

Diff

$ git diff 0.12.0 0.12.1 --stat
 package.json      | 2 +-
 src/jsx-loader.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

v0.12.0

09 Mar 19:39
Compare
Choose a tag to compare

Overview

This release fixes and stabilizes the DOM shim loading to be more resilient in SSR environments, in addition to forking some of our dependencies to an ESM and more bundler friendly version.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.12.0

  1. duplicate loads of the DOM shim leads to an infinite rendering issue
  2. registration of a custom element is being assumed when initializing a custom element
  3. vendor a bundle friendly and ESM compatible version of acorn-jsx
  4. adopt a bundle friendly and ESM compatible fork of escodegen

Breaking Changes

You won't require a JSON plugin (e.g. for Rollup) now that our fork of escodegen does not have a require call in it to read package.json for getting the version

Known Issues

  1. error for missing acorn-jsx package

Diff

$ git diff 0.11.0 0.12.0 --stat
 .npmrc            |   1 +
 package-lock.json | 739 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
 package.json      |  13 +-
 rollup.config.js  |   6 +-
 src/dom-shim.js   |  20 ++-
 src/jsx-loader.js |   6 +-
 src/wcc.js        |   8 +-
 7 files changed, 560 insertions(+), 233 deletions(-)

v0.11.0

16 Jan 02:34
Compare
Choose a tag to compare

Overview

This release fixes a bug in the DOM shim and some enhancements / fixes around JSX compilation.

For posterity there was also a good question issue raised around handling the browser warning - ["declarative Shadow DOM has not been enabled by includeShadowRoots"](declarative Shadow DOM has not been enabled by includeShadowRoots), for those curious.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.11.0

  1. HTMLTemplateElement should not have a set innerHTML method
  2. leverage getRootNode() for referencing Shadow DOM based parent node reference in JSX output
  3. JSX components not rendering into a declarative shadow root (e.g. <template> tag)

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.10.0 0.11.0 --stat
 .github/workflows/ci-exp-win.yml                                                          |   2 +-
 .github/workflows/ci-exp.yml                                                              |   2 +-
 .github/workflows/ci-win.yml                                                              |   2 +-
 .github/workflows/ci.yml                                                                  |   2 +-
 .github/workflows/master.yml                                                              |  28 ------
 .gitignore                                                                                |   3 +-
 .github/CONTRIBUTING.md => CONTRIBUTING.md                                                |  13 +--
 docs/pages/docs.md                                                                        |  32 +++++-
 netlify.toml                                                                              |   2 +-
 package-lock.json                                                                         | 228 +++++++++++++++++--------------------------
 package.json                                                                              |  15 +--
 sandbox.js                                                                                |  58 +++++++++++
 sandbox/components/card.js                                                                |  43 ++++++++
 sandbox/components/card.jsx                                                               |  54 ++++++++++
 sandbox/components/counter-dsd.jsx                                                        |  30 ++++++
 sandbox/components/counter.jsx                                                            |  27 +++++
 sandbox/components/header.js                                                              |  11 +++
 sandbox/components/header.jsx                                                             |  16 +++
 sandbox/index.html                                                                        | 142 +++++++++++++++++++++++++++
 src/dom-shim.js                                                                           |  24 ++---
 src/jsx-loader.js                                                                         |  37 ++++---
 .../fixtures/attribute-changed-callback.txt                                               |   0
 .../fixtures/get-observed-attributes.txt                                                  |   0
 .../jsx-inferred-obsevability.spec.js}                                                    |   2 +-
 test/cases/{jsx-coarse-grained => jsx-inferred-observability}/src/counter.jsx             |   0
 test/cases/jsx-shadow-dom/jsx-shadow-dom.spec.js                                          |  71 ++++++++++++++
 test/cases/jsx-shadow-dom/src/heading.jsx                                                 |  27 +++++
 test/cases/node-modules/src/components/events-list.js

v0.10.0

28 Dec 21:49
Compare
Choose a tag to compare

Overview

This release migrates WCC to use the spec compliant shadowrootmode attribute. (instead of shadowroot)

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.10.0

  1. support shadowrootmode attribute for declarative shadow DOM

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.9.1 0.10.0 --stat
 README.md                                                |  2 +-
 docs/pages/docs.md                                       |  2 +-
 docs/pages/index.md                                      |  2 +-
 package.json                                             |  3 ++-
 src/dom-shim.js                                          |  2 +-
 test/cases/attributes/attributes.spec.js                 |  4 ++--
 test/cases/attributes/src/components/counter.js          |  2 +-
 test/cases/children-and-slots/children-and-slots.spec.js |  6 +++---
 test/cases/custom-extension/custom-extension.spec.js     |  4 ++--
 test/cases/get-data/get-data.spec.js                     |  4 ++--
 test/cases/get-data/src/components/counter.js            |  2 +-
 test/cases/nested-elements/nested-elements.spec.js       | 10 +++++-----
 test/cases/nested-elements/src/components/header.js      |  2 +-
 test/cases/render-from-html/render-from-html.spec.js     |  4 ++--
 test/cases/single-element/single-element.spec.js         |  4 ++--
 15 files changed, 27 insertions(+), 26 deletions(-)

v0.9.1

21 Dec 13:29
Compare
Choose a tag to compare

Overview

This release improves some of the log messaging related to WCC heuristics for detecting custom element definitions.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.9.1

  1. gracefully and accurately handle "empty" entry points and dependency files that don't export a custom element

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.9.0 0.9.1 --stat
 package.json                           |  2 +-
 src/wcc.js                             | 34 +++++++++++++++++++---------------
 test/cases/no-export/no-export.spec.js | 10 ++++++++--
 3 files changed, 28 insertions(+), 18 deletions(-)

v0.9.0

28 Oct 00:52
Compare
Choose a tag to compare

Overview

This release introduces an option to pass "constructor props" renderToString as part of a data loading strategy for frameworks.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3A0.9.0

  1. provide component data through render method params (constructor props)

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.8.0 0.9.0 --stat
 .github/workflows/ci-exp-win.yml                       |  2 +-
 .github/workflows/ci-exp.yml                           |  2 +-
 .github/workflows/ci-win.yml                           |  2 +-
 .github/workflows/ci.yml                               |  2 +-
 docs/pages/docs.md                                     | 70 +++++++++++++++++++++++++++++++++++++++--
 package.json                                           |  2 +-
 src/wcc.js                                             | 12 ++++---
 test/cases/constructor-props/constructor-props.spec.js | 43 +++++++++++++++++++++++++
 test/cases/constructor-props/src/index.js              | 19 +++++++++++
 9 files changed, 143 insertions(+), 11 deletions(-)

v0.8.0

01 Apr 19:01
Compare
Choose a tag to compare

Overview

This release introduces a feature for renderToString to control how returned HTML is (or isn't wrapped).

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3Av0.9.0

  1. opt out of top level wrapping entry tag name when using renderToString

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.7.0 0.8.0 --stat
 .eslintrc.cjs                                                  |   6 +-
 .ls-lint.yml                                                   |  20 +++++
 docs/pages/docs.md                                             |  15 +++-
 docs/pages/examples.md                                         |   8 +-
 docs/pages/index.md                                            |   2 +-
 package-lock.json                                              | 170 ++++++++++++++++++++++++++++++++++-
 package.json                                                   |   7 +-
 src/jsx-loader.js                                              |   8 +-
 src/wcc.js                                                     |   6 +-
 test-exp-loader.js                                             |  12 ++-
 test/cases/no-wrapping-entry-tag/no-wrapping-entry-tag.spec.js |  37 ++++++++
 test/cases/no-wrapping-entry-tag/src/no-wrap.js                |  27 ++++++
 12 files changed, 296 insertions(+), 22 deletions(-)

v0.7.0

04 Jan 20:58
Compare
Choose a tag to compare

Overview

This release introduced some new features to JSX support for "inferred" attribute observability and removed usage of path and url Node specific dependencies from source files. (still need to find a work around for fs)

Also extended Node CI support matrix to v18, and dropped v14.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3Av0.7.0

  1. Coarse Grained (Inferred) Observability for JSX
  2. remove path and url node dependencies from main entry points

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.6.2 0.7.0 --stat
 .github/workflows/ci-exp-win.yml                                      |   2 +-
 .github/workflows/ci-exp.yml                                          |   4 +-
 .github/workflows/ci-win.yml                                          |   2 +-
 .github/workflows/ci.yml                                              |   4 +-
 .github/workflows/master.yml                                          |   4 +-
 .nvmrc                                                                |   2 +-
 docs/pages/docs.md                                                    |  58 +++++++++++--
 docs/pages/examples.md                                                |   7 +-
 netlify.toml                                                          |   2 +-
 package.json                                                          |   9 +-
 src/jsx-loader.js                                                     | 168 ++++++++++++++++++++++++++++++++------
 src/wcc.js                                                            |   4 +-
 test-exp-loader.js                                                    |  11 +--
 test/cases/jsx-coarse-grained/fixtures/attribute-changed-callback.txt |  13 +++
 test/cases/jsx-coarse-grained/fixtures/get-observed-attributes.txt    |   3 +
 test/cases/jsx-coarse-grained/jsx-coarse-grained.spec.js              |  52 ++++++++++++
 test/cases/jsx-coarse-grained/src/counter.jsx                         |  40 +++++++++
 test/cases/jsx/jsx.spec.js                                            |  40 +++++----
 18 files changed, 354 insertions(+), 71 deletions(-)

v0.6.2

28 Dec 16:38
Compare
Choose a tag to compare

Overview

This release improves compatibility and error handling by not failing on missing default export while also documenting and accounting for recommended usage of globalThis instead of window for isomorphic code.

Changelog

https://github.com/ProjectEvergreen/wcc/issues?q=label%3Av0.6.2

  1. fail safely on no default export
  2. window / globalThis handling and documentation

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff 0.6.1 0.6.2 --stat
 .github/ISSUE_TEMPLATE.md                     |  8 +-------
 docs/pages/index.md                           |  2 ++
 package.json                                  |  6 +++++-
 src/wcc.js                                    | 28 +++++++++++++++++-----------
 test/cases/event-listener/src/my-component.js |  1 +
 test/cases/no-export/no-export.spec.js        | 34 ++++++++++++++++++++++++++++++++++
 test/cases/no-export/src/no-export.js         |  2 ++
 7 files changed, 62 insertions(+), 19 deletions(-)