Skip to content

v0.17.0

Compare
Choose a tag to compare
@thescientist13 thescientist13 released this 13 Oct 17:07
· 463 commits to master since this release

Overview

This minor release includes (implicit) support for Lit@2 and compatibility with puppeteer pre-rendering as well as introduces a new Copy Plugin API. Rollup and some associated plugins also had their versions updated to support newer features in package.json like exports and sideEffects. For developing in the Greenwood monorepo itself, there is now full M1 support for macOS contributors. We were also able to resolve a number of bugs. (v0.1.7.0-alpha.0 release notes)

Also a big shout to @aholtzman for a number of enhancements and copy edits to the project website, including adding this sweet Edit on GitHub button to all our documentation pages for quick access if you spot any ways to help improve them! 👀 ✌️

Screen Shot 2021-10-13 at 12 21 09 PM

Screen Shot 2021-10-13 at 12 45 42 PM


Eventually any Lit specific code will be moved off into plugins before the 1.0 release as part of our upcoming SSR work.

Given that Node v12 is in maintenance (LTS) mode, we recommend users to start migrating to Node v14.

If using Yarn, you can can upgrade all your @greenwood packages at once

$ yarn upgrade --scope @greenwood --latest

Changelog

https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.17.0

  1. Create a general purpose copy mechanism

  2. Upgrade latest Rollup Deps (CLI only)

  3. (Implicit) Lit@2 support

  4. plugin-postcss extendConfig option is broken with PostCSS error

  5. assets (fonts) with query strings not loading correctly with production build (greenwood serve)

  6. nested client side routing fallback index.html not working in SPA mode

  7. handle no body tag and add specs for different HTML page possibilities

Breaking Changes

If you are using the Polyfills plugin, you will now need to spread the plugin function call in your greenwood.config.js.

// before
plugins: [
  pluginPolyfills()
]
  
// after
plugins: [
  ...pluginPolyfills()
]

Known Issues

  1. Not with Greenwood per se, but just a recommendation for Lit users to be aware of limitations and best practices for using CSS with expressions.

Diff

% git diff v0.16.1 v0.17.0 --stat | grep -v "www/"
 greenwood.config.js                                |   2 +-
 lerna.json                                         |   2 +-
 nyc.config.js                                      |   4 +-
 package.json                                       |   5 +-
 packages/cli/package.json                          |  16 +-
 packages/cli/src/lifecycles/config.js              |   8 +-
 packages/cli/src/lifecycles/copy.js                |  81 +++---
 packages/cli/src/lifecycles/serve.js               |   2 +-
 .../cli/src/plugins/copy/plugin-copy-assets.js     |  21 ++
 .../cli/src/plugins/copy/plugin-copy-graph-json.js |  14 +
 .../plugins/resource/plugin-optimization-mpa.js    |   2 +-
 .../src/plugins/resource/plugin-standard-html.js   |  33 ++-
 .../build.config.mode-mpa.spec.js                  |  31 ++-
 .../src/pages/regex-test.html                      | 305 +++++++++++++++++++++
 .../build.config.mode-spa.spec.js                  |  63 ++++-
 .../test/cases/build.config.mode-spa/package.json  |   4 +-
 .../build.config.mode-spa/src/components/footer.js |   2 +-
 .../test/cases/build.config.mode-spa/src/index.js  |   6 +-
 .../build.config.mode-spa/src/routes/about.js      |   4 +-
 .../cases/build.config.mode-spa/src/routes/home.js |   4 +-
 .../build.default.import-node-modules.spec.js      |  89 ++++--
 .../build.default.import-node-modules/package.json |   2 +-
 .../src/pages/index.html                           |   5 +-
 .../src/scripts/main.js                            |  14 +-
 ...build.default.workspace-templates-empty.spec.js | 183 +++++++++++++
 .../src/pages/index.html                           |  17 ++
 .../src/pages/no-body.html                         |  11 +
 .../src/pages/no-head.html                         |  10 +
 .../src/pages/shell.html                           |   3 +
 .../src/scripts/main.js                            |   1 +
 .../src/styles/main.css                            |   3 +
 .../build.plugins.error-type.spec.js               |   2 +-
 .../cases/develop.default/develop.default.spec.js  |  81 ++++--
 .../cases/develop.default/import-map.snapshot.json | 274 ++++++++++++++++++
 .../cli/test/cases/develop.default/package.json    |   6 +-
 .../cli/test/cases/develop.spa/develop.spa.spec.js | 196 +++++++++++++
 .../cli/test/cases/develop.spa/greenwood.config.js |   3 +
 packages/cli/test/cases/develop.spa/src/index.html |  12 +
 .../test/cases/serve.default/serve.default.spec.js | 174 ++++++++++++
 .../test/cases/serve.default/src/assets/data.json  |   4 +
 .../cases/serve.default/src/assets/favicon.ico     | Bin 0 -> 1150 bytes
 .../test/cases/serve.default/src/assets/logo.png   | Bin 0 -> 2171 bytes
 .../serve.default/src/assets/source-sans-pro.woff  | Bin 0 -> 20179 bytes
 .../serve.default/src/assets/webcomponents.svg     |   1 +
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/package.json               |   4 +-
 .../test/cases/query-children/package.json         |   2 +-
 .../cases/query-children/query-children.spec.js    |  66 ++++-
 .../query-children/src/components/posts-list.js    |   2 +-
 .../cases/query-custom-frontmatter/package.json    |   2 +-
 .../query-custom-frontmatter.spec.js               |  75 +++--
 .../src/components/posts-list.js                   |   2 +-
 .../test/cases/query-graph/package.json            |   2 +-
 .../test/cases/query-graph/query-graph.spec.js     |  66 ++++-
 .../query-graph/src/components/debug-output.js     |   2 +-
 .../test/cases/query-menu/package.json             |   2 +-
 .../test/cases/query-menu/query-menu.spec.js       |  66 ++++-
 .../test/cases/query-menu/src/components/header.js |   2 +-
 packages/plugin-import-commonjs/package.json       |   6 +-
 packages/plugin-import-css/README.md               |  17 +-
 packages/plugin-import-css/package.json            |   4 +-
 packages/plugin-import-json/package.json           |   4 +-
 packages/plugin-polyfills/README.md                |   4 +-
 packages/plugin-polyfills/package.json             |   6 +-
 packages/plugin-polyfills/src/index.js             |  65 +++--
 .../test/cases/default/greenwood.config.js         |   2 +-
 .../test/cases/lit/greenwood.config.js             |   7 +
 .../plugin-polyfills/test/cases/lit/lit.spec.js    | 182 ++++++++++++
 .../plugin-polyfills/test/cases/lit/package.json   |   6 +
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-postcss/src/index.js               |   2 +-
 packages/plugin-postcss/src/postcss.config.js      |   2 +-
 .../options.extend-config/greenwood.config.js      |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 .../getting-started-repo-unstyled-partial.png      | Bin 0 -> 14983 bytes
 yarn.lock                                          | 185 +++++++------
 115 files changed, 2466 insertions(+), 437 deletions(-)