Skip to content

Releases: ProjectEvergreen/greenwood

v0.25.0

07 Apr 01:00
Compare
Choose a tag to compare

Overview

This minor introduced some breaking changes around how prerender configuration is handled by default. Going forward:

  1. it will be false by default, and for the rest of this release line, the plan is to make puppeteer opt-in by default, this expecting the user to install it themselves, but Greenwood will try and auto install if it can!).
  2. Puppeteer will not be installed by default, unless needed when running greenwood build, at which point Greenwood will try and auto-detect and install it

Puppeteer was also upgrade to v13.x.

The motivation with these changes is mainly to move puppeteer out of the critical dependency chain as Greenwood introduces more rendering options, and ensures that the out of the box development experience is as balanced as possible.

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.25.0

  1. make prerender config option false by default
  2. auto-detect and install puppeteer dependency for default prerendering
  3. node modules resolver should return a fallback path for package not located by require.resolve
  4. upgrade puppeteer version

Breaking Changes

Prerender (Configuration)

Going forward, if you would like to prerender your application, you will need to explicitely set it in your greenwood.config.js

export default {
  prerender: true
}

Prerender (Puppeteer)

Going forward, if you are using prerender: true as the default prerender, you will need to make sure puppeteer is installed, if Greenwood can't automatically detect and install it. This can be done bu just using npm / yarn / etc.

# npm
$ npm install puppeteer --dave-dev

# yarn
$ yarn add puppeteer --dev

Known Issues

N / A

Diff

% git diff v0.24.2 v0.25.0 --stat | grep -v "www"
 .gitignore                                         |   2 +
 README.md                                          |   4 +-
 greenwood.config.js                                |   1 +
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |  12 +-
 packages/cli/src/commands/build.js                 |  79 +++----
 packages/cli/src/commands/develop.js               |   4 +-
 packages/cli/src/commands/eject.js                 |   4 +-
 packages/cli/src/commands/serve.js                 |   4 +-
 packages/cli/src/index.js                          |  69 ++++--
 packages/cli/src/lib/node-modules-utils.js         |   4 +-
 packages/cli/src/lib/walker-package-ranger.js      | 235 +++++++++++++++++++++
 packages/cli/src/lifecycles/config.js              |   2 +-
 packages/cli/src/lifecycles/prerender.js           | 149 ++++++-------
 packages/cli/src/lifecycles/serve.js               |   9 -
 .../src/plugins/resource/plugin-node-modules.js    | 221 +------------------
 .../build.config-optimization-default.spec.js      |   7 -
 .../build.config-optimization-inline.spec.js       |  16 +-
 .../build.config-optimization-none.spec.js         |   5 +-
 .../build.config-optimization-overrides.spec.js    |  17 +-
 .../build.config-optimization-static.spec.js       |  10 +-
 .../greenwood.config.js                            |   3 +-
 .../build.config.prerender.spec.js                 |  26 ++-
 .../build.config.prerender/greenwood.config.js     |   2 +-
 .../build.default.import-node-modules.spec.js      |  16 +-
 .../greenwood.config.js                            |   3 +
 .../build.default.import-node-modules/package.json |   1 +
 .../build.default.quick-start-npx.spec.js          |  14 --
 .../build.default.workspace-404-markdown.spec.js   |   5 +-
 .../build.default.workspace-404.spec.js            |   5 +-
 ...d.default.workspace-frontmatter-imports.spec.js |  10 +-
 .../greenwood.config.js                            |   3 +
 ...build.default.workspace-getting-started.spec.js |  56 ++---
 .../build.default.workspace-javascript-css.spec.js |  12 +-
 .../greenwood.config.js                            |   3 +
 ...default.workspace-template-page-and-app.spec.js |  13 +-
 .../build.default.workspace-template-page.spec.js  |   2 +-
 ...ault.workspace-templates-relative-paths.spec.js |  19 +-
 ...efault.workspace-user-directory-mapping.spec.js |  10 +-
 .../build.plugins.context.spec.js                  |   6 +-
 .../build.config.plugins-resource.spec.js          |   8 +-
 .../build.plugins.resource/greenwood.config.js     |   1 +
 .../develop.plugins.context/greenwood.config.js    |   6 +-
 .../cli/test/cases/theme-pack/greenwood.config.js  |   6 +-
 .../test/cases/theme-pack/theme-pack.build.spec.js |   6 +-
 .../cases/theme-pack/theme-pack.develop.spec.js    |   2 +-
 packages/init/package.json                         |   2 +-
 .../test/cases/init.template/init.template.spec.js |   4 -
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/package.json               |   4 +-
 packages/plugin-graphql/src/index.js               |  52 +++--
 .../test/cases/query-children/greenwood.config.js  |   2 +
 .../cases/query-children/query-children.spec.js    |   9 +-
 .../test/cases/query-config/greenwood.config.js    |   2 +
 .../test/cases/query-config/query-config.spec.js   |   9 +-
 .../query-custom-frontmatter/greenwood.config.js   |   1 +
 .../query-custom-frontmatter.spec.js               |   9 +-
 .../cases/query-custom-schema/greenwood.config.js  |   1 +
 .../query-custom-schema.spec.js                    |  10 +-
 .../test/cases/query-graph/greenwood.config.js     |   1 +
 .../test/cases/query-graph/query-graph.spec.js     |   9 +-
 .../test/cases/query-menu/greenwood.config.js      |   1 +
 .../test/cases/query-menu/query-menu.spec.js       |  11 +-
 packages/plugin-import-commonjs/package.json       |   4 +-
 .../test/cases/default/default.spec.js             |   8 +-
 .../test/cases/default/greenwood.config.js         |   2 +
 packages/plugin-import-css/package.json            |   4 +-
 .../test/cases/default/default.spec.js             |   8 +-
 .../test/cases/default/greenwood.config.js         |   2 +
 packages/plugin-import-json/package.json           |   4 +-
 .../test/cases/default/default.spec.js             |   8 +-
 .../test/cases/default/greenwood.config.js         |   3 +-
 packages/plugin-include-html/package.json          |   4 +-
 .../greenwood.config.js                            |   1 -
 .../build.default.link-tag.spec.js                 |   2 +-
 .../build.default-link-tag/greenwood.config.js     |   1 -
 packages/plugin-polyfills/package.json             |   4 +-
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-renderer-lit/package.json          |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 test/utils.js                                      |  51 +++++
 .../greenwood-getting-started-repo-optimized.webp  | Bin 0 -> 36216 bytes
 yarn.lock                                          | 113 +++++-----
 89 files changed, 889 insertions(+), 668 deletions(-)

v0.25.0-alpha.3

02 Apr 15:18
Compare
Choose a tag to compare
v0.25.0-alpha.3 Pre-release
Pre-release

Overview

Final tweaks and enhancements before final release. Last release in this line before official v0.25.0 release.

This minor prerelease introduced some breaking changes around how prerender configuration is handled by default. Going forward, it will be false by default, and now with this release, puppeteer is now opt-in by default. This means as a user of Greenwood, puppeteer will need to be installed manually, But, that is only as a fallback, as Greenwood will auto-detect and install it if it is needed, but missing in node_modules.

The motivation with these changes is mainly to move puppeteer out of the critical dependency chain as Greenwood introduces more rendering options, and ensures that the out of the box development experience is as balanced as possible.

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.25.0+label%3Aalpha.3

  1. include puppeteer version expectation in output and only auto-detect on build or serve commands
  2. node modules resolver should return a fallback path for package not located by require.resolve

Breaking Changes

N / A

Known Issues

N / A

Diff

% git diff v0.25.0-alpha.2 v0.25.0-alpha.3 --stat | grep -v "www"
 lerna.json                                         |  2 +-
 packages/cli/package.json                          |  2 +-
 packages/cli/src/index.js                          | 68 ++++++++++++----------
 packages/cli/src/lib/node-modules-utils.js         |  4 +-
 .../build.default.import-node-modules.spec.js      |  2 +-
 .../develop.plugins.context/greenwood.config.js    |  6 +-
 .../cli/test/cases/theme-pack/greenwood.config.js  |  6 +-
 .../cases/theme-pack/theme-pack.develop.spec.js    |  2 +-
 packages/init/package.json                         |  2 +-
 packages/plugin-babel/package.json                 |  4 +-
 packages/plugin-google-analytics/package.json      |  4 +-
 packages/plugin-graphql/package.json               |  4 +-
 packages/plugin-import-commonjs/package.json       |  4 +-
 packages/plugin-import-css/package.json            |  4 +-
 packages/plugin-import-json/package.json           |  4 +-
 packages/plugin-include-html/package.json          |  4 +-
 packages/plugin-polyfills/package.json             |  4 +-
 packages/plugin-postcss/package.json               |  4 +-
 packages/plugin-renderer-lit/package.json          |  4 +-
 packages/plugin-typescript/package.json            |  4 +-
 21 files changed, 73 insertions(+), 67 deletions(-)

v0.25.0-alpha.2

02 Apr 13:14
Compare
Choose a tag to compare
v0.25.0-alpha.2 Pre-release
Pre-release

Overview

Fixes a bug with certain projects not being able to run due to missing puppeteer dependency checking after alpha.1.

This minor prerelease introduced some breaking changes around how prerender configuration is handled by default. Going forward, it will be false by default, and now with this release, puppeteer is now opt-in by default. This means as a user of Greenwood, puppeteer will need to be installed manually, But, that is only as a fallback, as Greenwood will auto-detect and install it if it is needed, but missing in node_modules.

The motivation with these changes is mainly to move puppeteer out of the critical dependency chain as Greenwood introduces more rendering options, and ensures that the out of the box development experience is as balanced as possible.

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.25.0+label%3Aalpha.2

  1. async import() puppeteer only if used when default prerendering

Breaking Changes

N / A

Known Issues

N / A

Diff

% git diff v0.25.0-alpha.1 v0.25.0-alpha.2 --stat | grep -v "www"
 lerna.json                                    | 2 +-
 packages/cli/package.json                     | 2 +-
 packages/cli/src/lifecycles/prerender.js      | 2 +-
 packages/init/package.json                    | 2 +-
 packages/plugin-babel/package.json            | 4 ++--
 packages/plugin-google-analytics/package.json | 4 ++--
 packages/plugin-graphql/package.json          | 4 ++--
 packages/plugin-import-commonjs/package.json  | 4 ++--
 packages/plugin-import-css/package.json       | 4 ++--
 packages/plugin-import-json/package.json      | 4 ++--
 packages/plugin-include-html/package.json     | 4 ++--
 packages/plugin-polyfills/package.json        | 4 ++--
 packages/plugin-postcss/package.json          | 4 ++--
 packages/plugin-renderer-lit/package.json     | 4 ++--
 packages/plugin-typescript/package.json       | 4 ++--
 16 files changed, 27 insertions(+), 27 deletions(-)

v0.25.0-alpha.1

02 Apr 01:44
Compare
Choose a tag to compare
v0.25.0-alpha.1 Pre-release
Pre-release

Overview

This minor prerelease introduced some breaking changes around how prerender configuration is handled by default. Going forward, it will be false by default, and now with this release, puppeteer is now opt-in by default. This means as a user of Greenwood, puppeteer will need to be installed manually, But, that is only as a fallback, as Greenwood will auto-detect and install it if it is needed, but missing in node_modules.

The motivation with these changes is mainly to move puppeteer out of the critical dependency chain as Greenwood introduces more rendering options, and ensures that the out of the box development experience is as balanced as possible.

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.25.0+label%3Aalpha.1

  1. auto-detect and install puppeteer dependency for default prerendering

Breaking Changes

Prerender

Going forward, if you are using prerender: true as the default prerender, you will need to make sure puppeteer is installed, if Greenwood can't automatically detect and install it. This can be done bu just using npm / yarn / etc.

# npm
$ npm install puppeteer --dave-dev

# yarn
$ yarn add puppeteer --dev

Known Issues

  1. static compilations breaking due to puppeteer not found

Diff

% git diff v0.25.0-alpha.0 v0.25.0-alpha.1 --stat | grep -v "www"
 .gitignore                                         |  2 +
 lerna.json                                         |  2 +-
 packages/cli/package.json                          | 12 ++++-
 packages/cli/src/commands/build.js                 |  4 +-
 packages/cli/src/commands/develop.js               |  4 +-
 packages/cli/src/commands/eject.js                 |  4 +-
 packages/cli/src/commands/serve.js                 |  4 +-
 packages/cli/src/index.js                          | 63 ++++++++++++++++------
 packages/cli/src/lifecycles/serve.js               |  9 ----
 .../build.config-optimization-static.spec.js       |  5 +-
 .../build.config.prerender.spec.js                 | 15 ++++--
 .../build.default.import-node-modules.spec.js      | 11 +++-
 .../build.default.import-node-modules/package.json |  1 +
 ...d.default.workspace-frontmatter-imports.spec.js |  5 +-
 .../build.default.workspace-javascript-css.spec.js |  5 +-
 .../build.config.plugins-resource.spec.js          |  5 +-
 packages/init/package.json                         |  2 +-
 packages/plugin-babel/package.json                 |  4 +-
 packages/plugin-google-analytics/package.json      |  4 +-
 packages/plugin-graphql/package.json               |  4 +-
 .../cases/query-children/query-children.spec.js    |  5 +-
 .../test/cases/query-config/query-config.spec.js   |  5 +-
 .../query-custom-frontmatter.spec.js               |  5 +-
 .../query-custom-schema.spec.js                    |  5 +-
 .../test/cases/query-graph/query-graph.spec.js     |  5 +-
 .../test/cases/query-menu/query-menu.spec.js       |  5 +-
 packages/plugin-import-commonjs/package.json       |  4 +-
 .../test/cases/default/default.spec.js             |  5 +-
 packages/plugin-import-css/package.json            |  4 +-
 .../test/cases/default/default.spec.js             |  5 +-
 packages/plugin-import-json/package.json           |  4 +-
 .../test/cases/default/default.spec.js             |  5 +-
 packages/plugin-include-html/package.json          |  4 +-
 packages/plugin-polyfills/package.json             |  4 +-
 packages/plugin-postcss/package.json               |  4 +-
 packages/plugin-renderer-lit/package.json          |  4 +-
 packages/plugin-typescript/package.json            |  4 +-
 test/utils.js                                      | 51 ++++++++++++++++++
 40 files changed, 223 insertions(+), 85 deletions(-)

v0.25.0-alpha.0

26 Mar 00:50
Compare
Choose a tag to compare
v0.25.0-alpha.0 Pre-release
Pre-release

Overview

This minor prerelease introduced some breaking changes around how prerender configuration is handled by default. Going forward, it will be false by default, and for the rest of this release line, the plan is to make puppeteer opt-in by default, this expecting the user to install it themselves, but Greenwood will try and auto install if it can!).

The motivation with these changes is mainly to move puppeteer out of the critical dependency chain as Greenwood introduces more rendering options, and ensures that the out of the box development experience is as balanced as possible.

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.25.0+label%3Aalpha.0

  1. make prerender config option false by default

Breaking Changes

Prerender

Going forward, if you would like to prerender your application, you will need to explicitely set it in your greenwood.config.js

export default {
  prerender: true
}

Known Issues

N / A

Diff

% git diff v0.24.2 v0.25.0-alpha.0 --stat | grep -v "www"
 README.md                                          |   4 +-
 greenwood.config.js                                |   1 +
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   2 +-
 packages/cli/src/commands/build.js                 |  75 ++++---
 packages/cli/src/lib/walker-package-ranger.js      | 235 +++++++++++++++++++++
 packages/cli/src/lifecycles/config.js              |   2 +-
 packages/cli/src/lifecycles/prerender.js           | 147 ++++++-------
 .../src/plugins/resource/plugin-node-modules.js    | 221 +------------------
 .../build.config-optimization-default.spec.js      |   7 -
 .../build.config-optimization-inline.spec.js       |  16 +-
 .../build.config-optimization-none.spec.js         |   5 +-
 .../build.config-optimization-overrides.spec.js    |  17 +-
 .../build.config-optimization-static.spec.js       |   5 +-
 .../greenwood.config.js                            |   3 +-
 .../build.config.prerender.spec.js                 |  11 +-
 .../build.config.prerender/greenwood.config.js     |   2 +-
 .../build.default.import-node-modules.spec.js      |   3 +-
 .../greenwood.config.js                            |   3 +
 .../build.default.quick-start-npx.spec.js          |  14 --
 .../build.default.workspace-404-markdown.spec.js   |   5 +-
 .../build.default.workspace-404.spec.js            |   5 +-
 ...d.default.workspace-frontmatter-imports.spec.js |   5 +-
 .../greenwood.config.js                            |   3 +
 ...build.default.workspace-getting-started.spec.js |  56 ++---
 .../build.default.workspace-javascript-css.spec.js |   7 +-
 .../greenwood.config.js                            |   3 +
 ...default.workspace-template-page-and-app.spec.js |  13 +-
 .../build.default.workspace-template-page.spec.js  |   2 +-
 ...ault.workspace-templates-relative-paths.spec.js |  19 +-
 ...efault.workspace-user-directory-mapping.spec.js |  10 +-
 .../build.plugins.context.spec.js                  |   6 +-
 .../build.config.plugins-resource.spec.js          |   3 +-
 .../build.plugins.resource/greenwood.config.js     |   1 +
 .../test/cases/theme-pack/theme-pack.build.spec.js |   6 +-
 packages/init/package.json                         |   2 +-
 .../test/cases/init.template/init.template.spec.js |   4 -
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/package.json               |   4 +-
 packages/plugin-graphql/src/index.js               |  52 +++--
 .../test/cases/query-children/greenwood.config.js  |   2 +
 .../cases/query-children/query-children.spec.js    |   4 +-
 .../test/cases/query-config/greenwood.config.js    |   2 +
 .../test/cases/query-config/query-config.spec.js   |   4 +-
 .../query-custom-frontmatter/greenwood.config.js   |   1 +
 .../query-custom-frontmatter.spec.js               |   4 +-
 .../cases/query-custom-schema/greenwood.config.js  |   1 +
 .../query-custom-schema.spec.js                    |   5 +-
 .../test/cases/query-graph/greenwood.config.js     |   1 +
 .../test/cases/query-graph/query-graph.spec.js     |   4 +-
 .../test/cases/query-menu/greenwood.config.js      |   1 +
 .../test/cases/query-menu/query-menu.spec.js       |   6 +-
 packages/plugin-import-commonjs/package.json       |   4 +-
 .../test/cases/default/default.spec.js             |   3 +-
 .../test/cases/default/greenwood.config.js         |   2 +
 packages/plugin-import-css/package.json            |   4 +-
 .../test/cases/default/default.spec.js             |   3 +-
 .../test/cases/default/greenwood.config.js         |   2 +
 packages/plugin-import-json/package.json           |   4 +-
 .../test/cases/default/default.spec.js             |   3 +-
 .../test/cases/default/greenwood.config.js         |   3 +-
 packages/plugin-include-html/package.json          |   4 +-
 .../greenwood.config.js                            |   1 -
 .../build.default.link-tag.spec.js                 |   2 +-
 .../build.default-link-tag/greenwood.config.js     |   1 -
 packages/plugin-polyfills/package.json             |   4 +-
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-renderer-lit/package.json          |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 .../greenwood-getting-started-repo-optimized.webp  | Bin 0 -> 36216 bytes
 76 files changed, 615 insertions(+), 547 deletions(-)

v0.24.2

12 Mar 16:50
Compare
Choose a tag to compare

Overview

Fixes a regression introduced by the last release in support of local development unchanged file caching.

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.24.2

  1. fetching JSON content (e.g. graph.json) or 404 files are breaking local dev E-Tag caching mechanism

Breaking Changes

N / A

Known Issues

N / A

Diff

% git diff v0.24.1 v0.24.2 --stat | grep -v "www"
 lerna.json                                    | 2 +-
 packages/cli/package.json                     | 2 +-
 packages/cli/src/lifecycles/serve.js          | 6 ++++--
 packages/init/package.json                    | 2 +-
 packages/plugin-babel/package.json            | 4 ++--
 packages/plugin-google-analytics/package.json | 4 ++--
 packages/plugin-graphql/package.json          | 4 ++--
 packages/plugin-import-commonjs/package.json  | 4 ++--
 packages/plugin-import-css/package.json       | 4 ++--
 packages/plugin-import-json/package.json      | 4 ++--
 packages/plugin-include-html/package.json     | 4 ++--
 packages/plugin-polyfills/package.json        | 4 ++--
 packages/plugin-postcss/package.json          | 4 ++--
 packages/plugin-renderer-lit/package.json     | 4 ++--
 packages/plugin-typescript/package.json       | 4 ++--
 16 files changed, 30 insertions(+), 28 deletions(-)

v0.24.1

06 Mar 00:13
Compare
Choose a tag to compare

Overview

Fixes a regression introduced by the last release.

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.24.1

  1. fetching JSON content (e.g. graph.json) is breaking local dev E-Tag caching mechanism

Breaking Changes

N / A

Known Issues

  1. 404 / empty response bodies are breaking local dev E-Tag caching mechanism

Diff

% git diff v0.24.0 v0.24.1 --stat | grep -v "www"
 lerna.json                                    | 2 +-
 packages/cli/package.json                     | 2 +-
 packages/cli/src/lifecycles/serve.js          | 4 ++--
 packages/init/package.json                    | 2 +-
 packages/plugin-babel/package.json            | 4 ++--
 packages/plugin-google-analytics/package.json | 4 ++--
 packages/plugin-graphql/package.json          | 4 ++--
 packages/plugin-import-commonjs/package.json  | 4 ++--
 packages/plugin-import-css/package.json       | 4 ++--
 packages/plugin-import-json/package.json      | 4 ++--
 packages/plugin-include-html/package.json     | 4 ++--
 packages/plugin-polyfills/package.json        | 4 ++--
 packages/plugin-postcss/package.json          | 4 ++--
 packages/plugin-renderer-lit/package.json     | 4 ++--
 packages/plugin-typescript/package.json       | 4 ++--
 19 files changed, 30 insertions(+), 29 deletions(-)

v0.24.0

05 Mar 19:35
Compare
Choose a tag to compare

Overview

This minor release of Greenwood brings along a handful of enhancements and fixes, most notably moving content out of configuration (breaking) and improving local development workflow speeds. Check out the release blog post for a deep dive on both of those!

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.24.0

  1. Favor Content over Configuration
  2. long term cache workspace and node module files in development
  3. dependencies that reference more than one directory level of traversal (../) in their ESM specifiers do not resolve correctly
  4. support bundling of non ESM scripts that use this at the top level
  5. short circuit depth check if current URL is already sufficient for ResourceInterface.resolveRelativeUrl

Breaking Changes

Favor Content Over Configuration

In this release, both the title and meta configuration options were dropped from support in a greenwood.config.js. Instead you should now put these in your templates directly.

Before

// greenwood.config.js
export default {
  title: 'My Website',

  meta: [
    { name: 'description', content: 'Description of My Website' },
    { property: 'og:title', content: 'My Website' },
    { rel: 'icon', href: '/favicon.ico }
   ...
  ]
}

After

<!-- app.html -->
<html>

  <head>
    <title>My Website</title>
    <meta name="description" content="Description of My Website.">
    <meta property="og:title" content="My Website">
    <link rel="icon" href="/favicon.ico">
    
    ...
  </head>
  
  ...
</html>

You should also delete <meta-outlet></meta-outlet> from any of your templates too.

Known Issues

Diff

% git diff v0.23.1 v0.24.0 --stat | grep -v "www/"
 README.md                                          |  11 +-
 greenwood.config.js                                |  16 +-
 lerna.json                                         |   2 +-
 package.json                                       |   2 +-
 packages/cli/package.json                          |   5 +-
 packages/cli/src/config/rollup.config.js           |   1 +
 packages/cli/src/lib/hashing-utils.js              |  14 ++
 packages/cli/src/lib/resource-interface.js         |   4 +
 packages/cli/src/lifecycles/config.js              |  17 +-
 packages/cli/src/lifecycles/graph.js               |   6 +-
 packages/cli/src/lifecycles/serve.js               |  33 ++-
 .../src/plugins/resource/plugin-node-modules.js    |  84 ++++----
 .../src/plugins/resource/plugin-standard-html.js   |  81 +++----
 packages/cli/src/templates/app.html                |   3 +-
 .../build.config.error-title.spec.js               |  49 -----
 .../build.config.error-title/greenwood.config.js   |   3 -
 .../cases/build.config.meta/greenwood.config.js    |  10 -
 .../build.config.prerender/src/pages/index.html    |   1 -
 .../cases/build.config.title/greenwood.config.js   |   3 -
 .../build.default.markdown.spec.js                 |  11 +-
 .../build.default.markdown/greenwood.config.js     |   3 -
 .../build.default.meta.spec.js}                    |  80 +++----
 .../src/pages/about/index.md                       |   0
 .../src/pages/hello.md                             |   0
 .../src/pages/index.md                             |   0
 .../build.default.meta/src/templates/page.html     |  14 ++
 .../build.default.spa/build.default.spa.spec.js    |   5 +-
 .../test/cases/build.default.spa/src/index.html    |   1 -
 .../build.default.ssr/build.default.ssr.spec.js    |   4 +-
 .../cases/build.default.ssr/src/pages/artists.js   |  57 ++---
 .../cases/build.default.ssr/src/templates/app.html |   3 +-
 .../build.default.title.spec.js}                   |  19 +-
 .../src/pages/about.md                             |   0
 .../src/pages/index.md                             |   0
 .../build.default.title/src/templates/page.html    |   5 +
 .../src/pages/index.html                           |   3 -
 .../src/templates/app.html                         |   1 +
 .../src/templates/app.html                         |   2 +-
 .../fixtures/layouts/app.html                      |   1 +
 .../cases/develop.default/develop.default.spec.js  |  17 +-
 .../cases/develop.default/import-map.snapshot.json |  10 +-
 .../cli/test/cases/develop.default/package.json    |   1 +
 .../fixtures/layouts/app.html                      |   1 +
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js |   4 +-
 .../test/cases/develop.ssr/src/pages/artists.js    |  55 ++---
 .../test/cases/develop.ssr/src/templates/app.html  |   1 -
 packages/init/package.json                         |   2 +-
 packages/init/src/template/greenwood.config.js     |   3 -
 .../cases/develop.default/develop.default.spec.js  |   2 +-
 .../test/cases/init.default/init.default.spec.js   |  18 +-
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/package.json               |   4 +-
 packages/plugin-graphql/src/core/common.js         |  11 +-
 packages/plugin-graphql/src/index.js               |   1 +
 packages/plugin-graphql/src/queries/config.gql     |   9 -
 packages/plugin-graphql/src/schema/config.js       |  11 -
 .../test/cases/query-config/greenwood.config.js    |   1 -
 .../test/cases/query-config/query-config.spec.js   |   5 +-
 .../cases/query-config/src/components/footer.js    |   2 +-
 packages/plugin-graphql/test/unit/mocks/config.js  |   5 -
 .../plugin-graphql/test/unit/schema/config.spec.js |  32 ---
 packages/plugin-import-commonjs/package.json       |   4 +-
 packages/plugin-import-css/package.json            |   4 +-
 packages/plugin-import-json/package.json           |   4 +-
 packages/plugin-include-html/package.json          |   4 +-
 packages/plugin-polyfills/package.json             |   4 +-
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-renderer-lit/package.json          |   4 +-
 .../test/cases/build.default/build.default.spec.js |   2 +-
 .../test/cases/build.default/src/pages/artists.js  |   6 +-
 .../cases/build.default/src/templates/app.html     |   2 +-
 packages/plugin-typescript/package.json            |   4 +-
 test/smoke-test.js                                 |   2 +-
 yarn.lock                                          |  27 ++-
 98 files changed, 679 insertions(+), 608 deletions(-)

v0.23.1

24 Feb 02:47
Compare
Choose a tag to compare

Overview

This patch release fixes a small regression SPA prerendering from the last release and fixes a couple other small bugs related to the merging of app and page templates.

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.23.1

  1. SPA prerenders by default when no greenwood.config.js is present
  2. inline <script> tags in app templates are breaking page layouts with <script> tags
  3. inline optimization config is superseding static optimization attribute

Breaking Changes

N / A

Known Issues

N / A

Diff

% git diff v0.23.0 v0.23.1 --stat | grep -v "www/"
 .github/workflows/ci-win.yml                       |  2 +-
 lerna.json                                         |  2 +-
 packages/cli/package.json                          |  2 +-
 packages/cli/src/config/rollup.config.js           | 15 ++++---
 packages/cli/src/lifecycles/config.js              |  5 +++
 .../src/plugins/resource/plugin-standard-html.js   |  2 +-
 .../src/pages/index.html                           |  4 ++
 .../cases/build.default.spa/greenwood.config.js    |  3 --
 ...default.workspace-template-page-and-app.spec.js |  4 +-
 .../src/templates/app.html                         |  4 ++
 packages/init/package.json                         |  4 +-
 packages/plugin-babel/package.json                 |  4 +-
 packages/plugin-google-analytics/package.json      |  4 +-
 packages/plugin-graphql/package.json               |  4 +-
 packages/plugin-import-commonjs/package.json       |  4 +-
 packages/plugin-import-css/package.json            |  4 +-
 packages/plugin-import-json/package.json           |  4 +-
 packages/plugin-include-html/package.json          |  4 +-
 packages/plugin-polyfills/package.json             |  4 +-
 packages/plugin-postcss/package.json               |  4 +-
 packages/plugin-renderer-lit/package.json          |  6 +--
 packages/plugin-typescript/package.json            |  4 +-
 yarn.lock                                          | 49 ++++------------------
 30 files changed, 76 insertions(+), 84 deletions(-)

v0.23.0

12 Feb 01:52
Compare
Choose a tag to compare

Overview

This release of Greenwood introduces support for Server Side Rendering and the ability to customize the renderer through a plugin including Lit! 🎉

We consider this to be a "soft launch" of this feature as we continue to improve and enhance this feature but you can read more in our release blog post as well as our new interpolateFrontmatter feature. Please try it out and let us know your feedback!


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.23.0

  1. Introduce an SSR mode for Greenwood
  2. Add support for additional (SSR) rendering options through a render plugin type
  3. Create a Lit based render plugin that provides Lit based SSR
  4. have Greenwood auto detect project workspaces ("hybrid" workspaces)
  5. build time interpolation of front matter in markdown / HTML
  6. add configuration for prod server port

Breaking Changes

Mode

The mode setting has been removed and is no longer supported in greenwood.config.js. Greenwood will automatically detect the type of workspace for you from SSG <> SPA <> SSR.

MPA

For the mpa configuration, it has instead been renamed to staticRouter.

// before
export default {
  mode: 'mpa'
}

// after
export default {
  staticRender: true
}

Known Issues

Diff

% git diff v0.22.1 v0.23.0 --stat | grep -v "www/"
 .c8rc.json                                         |   4 +-
 README.md                                          |   8 +-
 greenwood.config.js                                |   4 +-
 lerna.json                                         |   2 +-
 package.json                                       |   5 +-
 packages/cli/package.json                          |   2 +-
 packages/cli/src/commands/build.js                 |   4 +-
 packages/cli/src/commands/develop.js               |   4 +-
 packages/cli/src/commands/serve.js                 |  12 +-
 packages/cli/src/lib/browser.js                    |   2 -
 packages/cli/src/lib/resource-interface.js         |   4 +-
 packages/cli/src/lib/ssr-route-worker.js           |  29 +++
 packages/cli/src/lifecycles/bundle.js              |   3 +-
 packages/cli/src/lifecycles/config.js              |  70 ++++--
 packages/cli/src/lifecycles/graph.js               | 234 +++++++++++-------
 packages/cli/src/lifecycles/prerender.js           |  96 +++++++-
 packages/cli/src/lifecycles/serve.js               | 127 ++++++++--
 .../src/plugins/renderer/plugin-renderer-string.js |  11 +
 .../plugins/resource/plugin-optimization-mpa.js    |   7 +-
 .../src/plugins/resource/plugin-standard-html.js   | 124 +++++++---
 .../build.config.error-mode.spec.js                |  49 ----
 .../build.config.error-mode/greenwood.config.js    |   3 -
 .../build.config.error-optimization.spec.js        |   2 +-
 .../build.config.interpolate-frontmatter.spec.js   |  84 +++++++
 .../greenwood.config.js                            |   3 +
 .../src/pages/blog/first-post.md                   |  13 +
 .../src/templates/blog.html                        |  12 +
 .../build.config.mode-mpa/greenwood.config.js      |   3 -
 .../build.config.mode-spa/greenwood.config.js      |   4 -
 .../build.config.static-router.spec.js}            |  10 +-
 .../build.config.static-router/greenwood.config.js |   3 +
 .../src/pages/about.md                             |   0
 .../src/pages/index.md                             |   0
 .../src/pages/regex-test.html                      |   0
 .../build.default.import-node-modules.spec.js      |   4 +-
 .../build.default.spa.spec.js}                     |  13 +-
 .../cases/build.default.spa/greenwood.config.js    |   3 +
 .../package.json                                   |   0
 .../src/components/footer.js                       |   0
 .../src/index.html                                 |   0
 .../src/index.js                                   |   0
 .../src/routes/about.js                            |   0
 .../src/routes/home.js                             |   0
 .../build.default.ssr/build.default.ssr.spec.js    | 265 +++++++++++++++++++++
 .../cli/test/cases/build.default.ssr/package.json  |   6 +
 .../build.default.ssr/src/components/counter.js    |  42 ++++
 .../build.default.ssr/src/components/footer.js     |  49 ++++
 .../cases/build.default.ssr/src/pages/artists.js   | 111 +++++++++
 .../cases/build.default.ssr/src/pages/index.md     |   3 +
 .../cases/build.default.ssr/src/templates/app.html |  14 ++
 .../build.plugins.error-type.spec.js               |   4 +-
 .../cli/test/cases/develop.spa/develop.spa.spec.js |  10 +-
 .../cli/test/cases/develop.spa/greenwood.config.js |   3 -
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js | 246 +++++++++++++++++++
 packages/cli/test/cases/develop.ssr/package.json   |   6 +
 .../cases/develop.ssr/src/components/counter.js    |  42 ++++
 .../cases/develop.ssr/src/components/footer.js     |  49 ++++
 .../test/cases/develop.ssr/src/pages/artists.js    | 110 +++++++++
 .../test/cases/develop.ssr/src/templates/app.html  |  14 ++
 .../test/cases/serve.default/greenwood.config.js   |   3 +-
 .../test/cases/serve.default/serve.default.spec.js |  11 +-
 packages/init/package.json                         |   2 +-
 packages/plugin-babel/README.md                    |   4 +-
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/README.md         |  12 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/README.md                  |   6 +-
 packages/plugin-graphql/package.json               |   4 +-
 packages/plugin-graphql/src/index.js               |   4 +-
 packages/plugin-graphql/src/queries/config.gql     |   2 +-
 packages/plugin-graphql/src/schema/config.js       |   2 +-
 packages/plugin-import-commonjs/README.md          |   2 +-
 packages/plugin-import-commonjs/package.json       |   4 +-
 packages/plugin-import-css/README.md               |   4 +-
 packages/plugin-import-css/package.json            |   4 +-
 packages/plugin-import-json/package.json           |   4 +-
 packages/plugin-include-html/README.md             |  18 +-
 packages/plugin-include-html/package.json          |   4 +-
 .../build.default.custom-element.spec.js           |   2 +-
 .../build.default.link-tag.spec.js                 |   2 +-
 packages/plugin-polyfills/README.md                |   2 +-
 packages/plugin-polyfills/package.json             |   4 +-
 packages/plugin-polyfills/src/index.js             |   4 +-
 packages/plugin-postcss/README.md                  |   6 +-
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-renderer-lit/README.md             | 116 +++++++++
 packages/plugin-renderer-lit/package.json          |  33 +++
 packages/plugin-renderer-lit/src/index.js          |  16 ++
 .../src/ssr-route-worker-lit.js                    |  66 +++++
 .../test/cases/build.default/artists.json          | 134 +++++++++++
 .../test/cases/build.default/build.default.spec.js | 253 ++++++++++++++++++++
 .../test/cases/build.default/greenwood.config.js   |   7 +
 .../test/cases/build.default/package.json          |   7 +
 .../cases/build.default/src/components/footer.js   |  49 ++++
 .../cases/build.default/src/components/greeting.js |  24 ++
 .../test/cases/build.default/src/pages/artists.js  |  84 +++++++
 .../cases/build.default/src/templates/app.html     |  12 +
 .../build.prerender.getting-started.spec.js        | 205 ++++++++++++++++
 .../greenwood.config.js                            |   9 +
 .../build.prerender.getting-started/package.json   |   7 +
 .../src/assets/greenwood-logo.png                  | Bin 0 -> 15037 bytes
 .../src/components/footer.js                       |  16 ++
 .../src/components/header.js                       |  15 ++
 .../src/pages/blog/first-post.md                   |   8 +
 .../src/pages/blog/second-post.md                  |   8 +
 .../src/pages/index.md                             |   7 +
 .../src/styles/theme.css                           |   7 +
 .../src/templates/blog.html                        |  24 ++
 .../src/templates/page.html                        |  31 +++
 packages/plugin-typescript/README.md               |   6 +-
 packages/plugin-typescript/package.json            |   4 +-
 test/smoke-test.js                                 |   2 +-
 yarn.lock                                          | 114 +++++++--
 162 files changed, 3565 insertions(+), 521 deletions(-)