Skip to content

Releases: ProjectEvergreen/greenwood

v0.29.1

21 Dec 13:51
Compare
Choose a tag to compare

Overview

This patch release fixes an issue with import map generation in development when using Node >= 18.19.0 and cleans up some debug logging from WCC.

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

  1. develop command fails on creating import map with Failed to parse URL error (Node >= 18.19.0)
  2. "no custom element class found for this file" warning when prerendering with WCC

Breaking Changes

None

Known Issues

N / A

Diff

$ git diff v0.29.0 v0.29.1 --stat | grep -v "www"
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   4 +-
 packages/cli/src/lib/node-modules-utils.js         |  54 ++--
 .../src/pages/artists.js                           |   4 +-
 .../develop.config.base-path/src/pages/users.js    |   2 +-
 .../test/cases/develop.ssr/src/pages/artists.js    |   4 +-
 .../serve.config.base-path/src/pages/users.js      |   2 +-
 .../src/pages/artists.js                           |   4 +-
 .../cases/serve.default.ssr/src/pages/artists.js   |   4 +-
 .../cases/serve.default.ssr/src/pages/users.js     |   2 +-
 packages/init/package.json                         |   2 +-
 packages/plugin-adapter-netlify/package.json       |   4 +-
 packages/plugin-adapter-vercel/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-import-jsx/package.json            |   6 +-
 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-renderer-puppeteer/package.json    |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 yarn.lock                                          | 310 +++++++++------------
 28 files changed, 202 insertions(+), 256 deletions(-)

v0.29.0

09 Nov 02:51
Compare
Choose a tag to compare

Overview

The v0.29.0 release is here! Please check out our blog post to learn about some of the great new features now available.

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

  1. Adapter Plugin API
  2. Vercel Adapter Plugin
  3. Netlify Adapter Plugin
  4. Data Loading Strategies
  5. refactor Workers out of SSR builds
  6. adapter SSR pages are rendering with incorrect content type header
  7. handle merging additional Request / Response instance properties
  8. custom loader hook not handling bare specifiers when resolving URLs (invalid URL)
  9. devServer proxy not returning content (when proxied response includes a content-encoding header)
  10. templates with (inline) template strings breaks bundling of SSR pages
  11. custom imports bundling breaks when used in API routes and SSR pages
  12. upgrade plugin-typescript to TypeScript 5.x
  13. add support for optimizing the CSS :has / :is pseudo-selectors
  14. add support for configuring a base path
  15. support resource plugin based transformations for non "standard" module formats (ex: TypeScript, GraphQL) for SSR
  16. Support "active links" in terminal output for server URLs - thanks @DevLab2425 !

Breaking Changes

Renderer Plugin

As part of the refactor for how Greenwood handles Worker threads, the API for creating a renderer plugin has changed a bit.

  1. The options have changed and workerUrl has been renamed to executeModuleUrl.
  2. For the params into executeRouteModule now has route, label and id replaced with just the page graph data (which includes all of those and more)
  3. The URL for executeModuleUrl is now simply a function that produces the output the same way it did before, no need to bother with the Workers abstraction. Just export now.

Before

import { parentPort } from 'worker_threads';
// ...

async function executeRouteModule({ moduleUrl, compilation, route, label, id, prerender, htmlContents, scripts }) {
  // ...
  parentPort.postMessage(data);
}

parentPort.on('message', async (task) => {
  await executeRouteModule(task);
});

After

// ...

async function executeRouteModule({ moduleUrl, compilation, page = {}, prerender = false, htmlContents = null, scripts = [] }) {
  // ...
  return data
}

export { executeRouteModule };

GraphQL Plugin

Package Imports

All import statements for queries will have to have their import reference slightly updated to reference the full path in the package and will require an extension, e.x

// before
import client from '@greenwood/plugin-graphql/core/client';
import MenuQuery from '@greenwood/plugin-graphql/queries/menu';
// after
import client from '@greenwood/plugin-graphql/src/core/client.js';
import MenuQuery from '@greenwood/plugin-graphql/src/queries/menu.gql';

Children Query

ChildrenQuery calls will now expect a leading / slash for the parent variable

// before
const response = await client.query({
  query: ChildrenQuery,
  variables: {
    parent: 'blog'
  }
});
// after
const response = await client.query({
  query: ChildrenQuery,
  variables: {
    parent: '/blog'
  }
});

Known Issues

N / A

Diff

Diff looks big because repo was formatted post v0.28.4 release - #1119

$ git diff v0.28.5 v0.29.0 --stat | grep -v "www"
 .eslintignore                                      |    3 +-
 .gitignore                                         |    6 +-
 .ls-lint.yml                                       |    3 +-
 lerna.json                                         |    2 +-
 package.json                                       |    8 +-
 packages/cli/package.json                          |    6 +-
 packages/cli/src/commands/build.js                 |    9 +-
 packages/cli/src/commands/develop.js               |    6 +-
 packages/cli/src/commands/serve.js                 |    7 +-
 packages/cli/src/config/rollup.config.js           |  237 +-
 packages/cli/src/lib/api-route-worker.js           |   23 +-
 packages/cli/src/lib/execute-route-module.js       |   44 +
 packages/cli/src/lib/resource-utils.js             |  100 +-
 packages/cli/src/lib/ssr-route-worker.js           |   42 +-
 packages/cli/src/lib/templating-utils.js           |   13 +-
 packages/cli/src/lifecycles/bundle.js              |  141 +-
 packages/cli/src/lifecycles/compile.js             |    4 -
 packages/cli/src/lifecycles/config.js              |   14 +-
 packages/cli/src/lifecycles/graph.js               |   54 +-
 packages/cli/src/lifecycles/prerender.js           |   26 +-
 packages/cli/src/lifecycles/serve.js               |  118 +-
 packages/cli/src/loader.js                         |   24 +-
 .../plugins/renderer/plugin-renderer-default.js    |    2 +-
 .../cli/src/plugins/resource/plugin-api-routes.js  |   48 +-
 .../cli/src/plugins/resource/plugin-dev-proxy.js   |   20 +-
 .../src/plugins/resource/plugin-standard-css.js    |    4 +
 .../src/plugins/resource/plugin-standard-font.js   |    2 +-
 .../src/plugins/resource/plugin-standard-html.js   |   27 +-
 .../src/plugins/resource/plugin-standard-json.js   |    6 +-
 .../src/plugins/resource/plugin-static-router.js   |   24 +-
 .../build.config-optimization-default.spec.js      |    2 +-
 .../fixtures/expected.css                          |    6 +-
 .../src/styles/main.css                            |    8 +
 .../build.config-optimization-inline.spec.js       |    8 +-
 .../build.config-optimization-none.spec.js         |    2 +-
 .../build.config-optimization-overrides.spec.js    |    2 +-
 .../build.config.static-router.spec.js             |    9 +-
 .../build.default.import-node-modules.spec.js      |    4 +-
 .../build.default.ssr-static-export.spec.js        |    3 +-
 .../src/pages/artists.js                           |    7 +-
 .../build.default.workspace-404-markdown.spec.js   |    2 +-
 .../build.default.workspace-404.spec.js            |    2 +-
 ...build.default.workspace-getting-started.spec.js |    6 +-
 .../build.default.workspace-javascript-css.spec.js |    8 +-
 ...default.workspace-template-page-and-app.spec.js |    2 +-
 .../build.default.workspace-template-page.spec.js  |    2 +-
 ...build.default.workspace-templates-empty.spec.js |    8 +-
 ...efault.workspace-user-directory-mapping.spec.js |    4 +-
 .../test/cases/build.default/build.default.spec.js |   11 +
 .../build.config.plugins-adapter.spec.js           |  125 +
 .../cases/build.plugins.adapter/generic-adapter.js |   58 +
 .../build.plugins.adapter/greenwood.config.js      |    7 +
 .../build.plugins.adapter/src/api/greeting.js      |   12 +
 .../build.plugins.adapter/src/components/card.js   |   22 +
 .../cases/build.plugins.adapter/src/pages/index.js |   24 +
 .../build.plugins.context.spec.js                  |    5 +-
 .../build.plugins.error-type.spec.js               |    2 +-
 .../develop.config.base-path.spec.js               |  324 +
 .../develop.config.base-path/greenwood.config.js   |    8 +
 .../cases/develop.config.base-path/package.json    |    4 +
 .../develop.config.base-path/src/api/greeting.js   |   11 +
 .../develop.config.base-path/src/assets/logo.png   |  Bin 0 -> 2171 bytes
 .../src/components/card.js                         |   22 +
 .../develop.config.base-path/src/pages/index.html  |   16 +
 .../develop.config.base-path/src/pages/users.js    |   18 +
 .../develop.config.base-path/src/styles/main.css   |    3 +
 .../develop.default.hud-disabled.spec.js           |   36 +-
 .../develop.default.hud.spec.js                    |   36 +-
 .../cases/develop.default/develop.default.spec.js  |  672 +--
 .../test/cases/develop.default/src/api/fragment.js |   18 +
 .../test/cases/develop.default/src/api/missing.js  |    3 +
 .../test/cases/develop.default/src/api/nothing.js  |    6 +-
 .../develop.default/src/api/submit-form-data.js    |   11 +
 .../cases/develop.default/src/api/submit-json.js   |   12 +
 .../cases/develop.default/src/components/card.js   |   11 +
 .../develop.plugins.context.spec.js                |   69 +-
 .../cli/test/cases/develop.spa/develop.spa.spec.js |  125 +-
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js |  100 +-
 .../test/cases/develop.ssr/src/pages/artists.js    |    4 +-
 .../cli/test/cases/develop.ssr/src/pages/post.js   |   20 +
 .../serve.config.base-path/greenwood.config.js     |    9 +
 .../serve.config.base-path.spec.js                 |  471 ++
 .../serve.config.base-path/src/api/greeting.js     |   11 +
 .../serve.config.base-path/src/assets/logo.png     |  Bin 0 -> 2171 bytes
 .../serve.config.base...
Read more

v0.29.0-alpha.6

04 Nov 15:06
Compare
Choose a tag to compare
v0.29.0-alpha.6 Pre-release
Pre-release

Overview

This last alpha release of the v0.29.0 release line extends support for request handing in SSR pages, adds support for configuring a base path, and stablizing support for importing non standard import formats on the server side.

In development docs here, full release blog will come out with the final release.

Changelog

https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.29.0+label%3Aalpha.6

  1. Data Loading Strategies
  2. add support for optimizing the CSS :has / :is pseudo-selectors
  3. add support for configuring a base path
  4. support resource plugin based transformations for non "standard" module formats (ex: TypeScript, GraphQL) for SSR
  5. Support "active links" in terminal output for server URLs - thanks @DevLab2425 !

Breaking Changes

GraphQL Plugin

Package Imports

All import statements for queries will have to have their import reference slightly updated to reference the full path in the package and will require an extension, e.x

// before
import client from '@greenwood/plugin-graphql/core/client';
import MenuQuery from '@greenwood/plugin-graphql/queries/menu';
// after
import client from '@greenwood/plugin-graphql/src/core/client.js';
import MenuQuery from '@greenwood/plugin-graphql/src/queries/menu.gql';

Children Query

ChildrenQuery calls will now expect a leading / slash for the parent variable

// before
const response = await client.query({
  query: ChildrenQuery,
  variables: {
    parent: 'blog'
  }
});
// after
const response = await client.query({
  query: ChildrenQuery,
  variables: {
    parent: '/blog'
  }
});

Known Issues

  1. ensure resolving graph.json respects base path configuration

Diff

$ git diff v0.29.0-alpha.5 v0.29.0-alpha.6 --stat | grep -v "www"
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   4 +-
 packages/cli/src/commands/develop.js               |   6 +-
 packages/cli/src/commands/serve.js                 |   7 +-
 packages/cli/src/lib/execute-route-module.js       |  10 +-
 packages/cli/src/lib/resource-utils.js             |  52 +++
 packages/cli/src/lib/ssr-route-worker.js           |   4 +-
 packages/cli/src/lib/templating-utils.js           |  11 +-
 packages/cli/src/lifecycles/bundle.js              |  15 +-
 packages/cli/src/lifecycles/config.js              |  12 +-
 packages/cli/src/lifecycles/graph.js               |  40 +-
 packages/cli/src/lifecycles/prerender.js           |  21 +-
 packages/cli/src/lifecycles/serve.js               |  11 +-
 .../cli/src/plugins/resource/plugin-api-routes.js  |  52 +--
 .../cli/src/plugins/resource/plugin-dev-proxy.js   |   8 +-
 .../src/plugins/resource/plugin-standard-css.js    |   4 +
 .../src/plugins/resource/plugin-standard-html.js   |  22 +-
 .../src/plugins/resource/plugin-static-router.js   |  24 +-
 .../build.config-optimization-default.spec.js      |   2 +-
 .../fixtures/expected.css                          |   6 +-
 .../src/styles/main.css                            |   8 +
 .../build.config-optimization-inline.spec.js       |   8 +-
 .../build.config-optimization-none.spec.js         |   2 +-
 .../build.config-optimization-overrides.spec.js    |   2 +-
 .../build.config.static-router.spec.js             |   9 +-
 .../build.default.import-node-modules.spec.js      |   4 +-
 .../build.default.ssr-static-export.spec.js        |   3 +-
 .../src/pages/artists.js                           |   5 +-
 .../build.default.workspace-404-markdown.spec.js   |   2 +-
 .../build.default.workspace-404.spec.js            |   2 +-
 ...build.default.workspace-getting-started.spec.js |   6 +-
 .../build.default.workspace-javascript-css.spec.js |   8 +-
 ...default.workspace-template-page-and-app.spec.js |   2 +-
 .../build.default.workspace-template-page.spec.js  |   2 +-
 ...build.default.workspace-templates-empty.spec.js |   8 +-
 ...efault.workspace-user-directory-mapping.spec.js |   4 +-
 .../test/cases/build.default/build.default.spec.js |  11 +
 .../build.plugins.context.spec.js                  |   5 +-
 .../develop.config.base-path.spec.js               | 299 ++++++++++++++
 .../develop.config.base-path/greenwood.config.js   |   8 +
 .../cases/develop.config.base-path/package.json    |   4 +
 .../develop.config.base-path/src/api/greeting.js   |  11 +
 .../develop.config.base-path/src/assets/logo.png   | Bin 0 -> 2171 bytes
 .../src/components/card.js                         |  22 +
 .../develop.config.base-path/src/pages/index.html  |  16 +
 .../develop.config.base-path/src/pages/users.js    |  18 +
 .../develop.config.base-path/src/styles/main.css   |   3 +
 .../cases/develop.default/develop.default.spec.js  |  11 +
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js | 104 ++++-
 .../cli/test/cases/develop.ssr/src/pages/post.js   |  20 +
 .../serve.config.base-path/greenwood.config.js     |   9 +
 .../serve.config.base-path.spec.js                 | 446 +++++++++++++++++++++
 .../serve.config.base-path/src/api/greeting.js     |  11 +
 .../serve.config.base-path/src/assets/logo.png     | Bin 0 -> 2171 bytes
 .../serve.config.base-path/src/components/card.js  |  22 +
 .../serve.config.base-path/src/pages/about.md      |   7 +
 .../serve.config.base-path/src/pages/index.html    |  16 +
 .../serve.config.base-path/src/pages/users.js      |  18 +
 .../serve.config.base-path/src/styles/main.css     |   3 +
 .../serve.default.ssr-prerender-api-hybrid.spec.js |   4 +-
 .../serve.default.ssr-static-export.spec.js        |   4 +-
 .../src/pages/artists.js                           |   5 +-
 .../serve.default.ssr/serve.default.ssr.spec.js    |  59 ++-
 .../test/cases/serve.default.ssr/src/pages/post.js |  20 +
 .../test/cases/theme-pack/theme-pack.build.spec.js |   5 +-
 packages/init/package.json                         |   2 +-
 packages/plugin-adapter-netlify/package.json       |   4 +-
 packages/plugin-adapter-netlify/src/index.js       |   7 +-
 .../build.config.base-path.spec.js                 | 180 +++++++++
 .../build.config.base-path/greenwood.config.js     |   8 +
 .../build.config.base-path/src/api/greeting.js     |  11 +
 .../build.config.base-path/src/pages/users.js      |  24 ++
 .../test/cases/build.default/build.default.spec.js |  64 ++-
 .../test/cases/build.default/src/pages/post.js     |  20 +
 packages/plugin-adapter-vercel/package.json        |   4 +-
 packages/plugin-adapter-vercel/src/index.js        |   7 +-
 .../build.config.base-path.spec.js                 | 191 +++++++++
 .../build.config.base-path/greenwood.config.js     |   8 +
 .../build.config.base-path/src/api/greeting.js     |  11 +
 .../build.config.base-path/src/pages/users.js      |  24 ++
 .../test/cases/build.default/build.default.spec.js |  73 +++-
 .../test/cases/build.default/src/pages/post.js     |  20 +
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 .../test/cases/default/default.spec.js             |   2 +-
 .../option-anonymous/option-anonymous.spec.js      |   2 +-
 packages/plugin-graphql/README.md                  |  30 +-
 packages/plugin-graphql/package.json               |   5 +-
 packages/plugin-graphql/src/core/client.js         |   7 +-
 packages/plugin-graphql/src/index.js               |  28 +-
 packages/plugin-graphql/src/schema/graph.js        |  20 +-
 .../cases/develop.default/develop.default.spec.js  |  12 +-
 .../exp-prerender.query-children.spec.js           | 143 +++++++
 .../greenwood.config.js                            |   8 +
 .../exp-prerender.query-children/package.json      |   4 +
 .../src/components/posts-list.js                   |  34 ++
 .../src/pages/blog/first-post/index.md             |   8 +
 .../src/pages/blog/second-post/index.md            |   8 +
 .../src/pages/index.html                           |  12 +
 .../query-children/src/components/posts-list.js    |   6 +-
 .../cases/query-config/src/components/footer.js    |   4 +-
 .../src/components/posts-list.js                   |   2 +-
 .../cases/query-custom-schema/src/pages/index.html |   2 +-
 .../query-graph/src/components/debug-output.js     |   4 +-
 .../test/cases/query-menu/src/components/header.js |   4 +-
 .../test/unit/schema/graph.menu.spec.js            | 116 +++++-
 .../plugin-graphql/test/unit/schema/graph.spec.js  |   9 +-
 packages/plugin-import-commonjs/package.json       |   4 +-
 packages/plugin-import-css/package.json            |   4 +-
 .../exp-build.prerender.spec.js                    |   1 +
 packages/plugin-import-json/package.json           |   4 +-
 .../exp-build.prerender.spec.js                    |   1 +
 packages/plugin-import-jsx/package.json            |   6 +-
 .../test/cases/default/default.prerender.spec.js   |   2 +-
 .../exp-build.prerender.spec.js                    |   1 +
 packages/plugin-include-html/package.json          |   4 +-
 packages/plugin-polyfills/package.json             |   4 +-
 .../plugin-polyfills/test/cases/dsd/dsd.spec.js    |   2 +-
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-renderer-lit/README.md             |  11 +-
 packages/plugin-renderer-lit/package.json          |   4 +-
 .../test/cases/serve.default/serve.def...
Read more

v0.29.0-alpha.5

14 Oct 01:47
Compare
Choose a tag to compare
v0.29.0-alpha.5 Pre-release
Pre-release

Overview

This alpha release of the v0.29.0 release line fixes a number of bugs and known issues as well as upgrades the TypeScript plugin to 5.x.

In development docs here, full release blog will come out with the final release.

Changelog

https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.29.0+label%3Aalpha.5

  1. check for api assets build output directory before copying for vercel adapter
  2. custom loader hook not handling bare specifiers when resolve URLs (invalid URL)
  3. devServer proxy not returning content (when proxied response includes a content-encoding header)
  4. templates with (inline) template strings breaks bundling of SSR pages
  5. custom imports bundling breaks when used in API routes and SSR pages
  6. upgrade plugin-typescript to TypeScript 5.x

Breaking Changes

TypeScript Plugin

The upgrade to 5.x will likely require changes to your tsconfig.json.

Known Issues

N / A

Diff

$ git diff v0.29.0-alpha.4 v0.29.0-alpha.5 --stat | grep -v "www"
 .eslintignore                                      |   3 +-
 .ls-lint.yml                                       |   3 +-
 lerna.json                                         |   2 +-
 package.json                                       |  10 +-
 packages/cli/package.json                          |   3 +-
 packages/cli/src/config/rollup.config.js           | 183 ++++-
 packages/cli/src/lifecycles/bundle.js              |   1 +
 packages/cli/src/lifecycles/serve.js               |   2 +
 packages/cli/src/loader.js                         |  24 +-
 .../cli/src/plugins/resource/plugin-dev-proxy.js   |  12 +-
 .../cases/develop.default/develop.default.spec.js  |   6 +
 .../serve.default.ssr/serve.default.ssr.spec.js    |  64 +-
 .../cases/serve.default.ssr/src/components/card.js |   2 +
 .../cases/serve.default.ssr/src/images/logo.svg    |  45 +
 .../cases/serve.default.ssr/src/templates/app.html |   6 +
 packages/init/package.json                         |   2 +-
 packages/plugin-adapter-netlify/package.json       |   4 +-
 packages/plugin-adapter-vercel/package.json        |   4 +-
 packages/plugin-adapter-vercel/src/index.js        |  13 +-
 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 +-
 .../test/cases/exp-serve.ssr/exp-serve.ssr.spec.js | 178 ++++
 .../test/cases/exp-serve.ssr/greenwood.config.js   |   7 +
 .../test/cases/exp-serve.ssr/package.json          |   4 +
 .../test/cases/exp-serve.ssr/src/api/fragment.js   |  28 +
 .../cases/exp-serve.ssr/src/components/card.css    |  44 +
 .../cases/exp-serve.ssr/src/components/card.js     |  31 +
 .../test/cases/exp-serve.ssr/src/pages/products.js |  31 +
 .../cases/exp-serve.ssr/src/services/products.js   |  11 +
 .../test/cases/exp-serve.ssr/src/styles/some.css   |   3 +
 packages/plugin-import-json/package.json           |   4 +-
 .../test/cases/exp-serve.ssr/exp-serve.ssr.spec.js | 161 ++++
 .../test/cases/exp-serve.ssr/greenwood.config.js   |   7 +
 .../test/cases/exp-serve.ssr/package.json          |   4 +
 .../test/cases/exp-serve.ssr/src/api/fragment.js   |  27 +
 .../cases/exp-serve.ssr/src/components/card.js     |  26 +
 .../cases/exp-serve.ssr/src/data/products.json     |   7 +
 .../test/cases/exp-serve.ssr/src/pages/products.js |  26 +
 packages/plugin-import-jsx/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-renderer-puppeteer/package.json    |   4 +-
 packages/plugin-typescript/package.json            |   6 +-
 .../test/cases/exp-serve.ssr/exp-serve.ssr.spec.js | 118 +++
 .../test/cases/exp-serve.ssr/greenwood.config.js   |   7 +
 .../test/cases/exp-serve.ssr/package.json          |   4 +
 .../test/cases/exp-serve.ssr/src/api/fragment.js   |  33 +
 .../exp-serve.ssr/src/components/card/card.ts      |  33 +
 .../exp-serve.ssr/src/components/card/logo.png     | Bin 0 -> 2171 bytes
 .../exp-serve.ssr/src/components/card/styles.ts    |   7 +
 .../test/cases/exp-serve.ssr/src/pages/index.html  |  16 +
 .../options.extend-config/src/scripts/main.ts      |  12 +-
 yarn.lock                                          | 905 +++++++++++----------
 61 files changed, 1688 insertions(+), 543 deletions(-)

v0.29.0-alpha.4

01 Sep 14:15
Compare
Choose a tag to compare
v0.29.0-alpha.4 Pre-release
Pre-release

Overview

This alpha release of the v0.29.0 release line fixes some known issues with the serverless adapters implementation.

In development docs here, full release blog will come out with the final release.

Changelog

https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.29.0+label%3Aalpha.4

  1. shared adapter bundles missing for API routes
  2. handle URL encoded Netlify form params

Breaking Changes

N / A

Known Issues

  1. devServer proxy not returning content (when proxied response includes a content-encoding header)

Diff

$ git diff v0.29.0-alpha.3 v0.29.0-alpha.4 --stat | grep -v "www"
 lerna.json                                         |  2 +-
 packages/cli/package.json                          |  2 +-
 packages/init/package.json                         |  2 +-
 packages/plugin-adapter-netlify/package.json       |  4 +--
 packages/plugin-adapter-netlify/src/index.js       | 17 +++++++--
 .../test/cases/build.default/build.default.spec.js | 10 +++---
 .../test/cases/build.default/src/api/search.js     | 41 ++++++++++++++++++++++
 packages/plugin-adapter-vercel/package.json        |  4 +--
 packages/plugin-adapter-vercel/src/index.js        | 11 ++++++
 .../test/cases/build.default/build.default.spec.js |  6 ++--
 .../test/cases/build.default/src/api/search.js     | 41 ++++++++++++++++++++++
 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-import-jsx/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-renderer-puppeteer/package.json    |  4 +--
 packages/plugin-typescript/package.json            |  4 +--
 25 files changed, 152 insertions(+), 42 deletions(-)

v0.29.0-alpha.3

26 Aug 18:42
Compare
Choose a tag to compare
v0.29.0-alpha.3 Pre-release
Pre-release

Overview

This alpha release of the v0.29.0 release line fleshes out the available properties on the provided Request and Response properties and introduces support for Request.formData() method.

Note: not all Request properties are available yet, please see this two issues:

In development docs here, full release blog will come out with the final 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.29.0+label%3Aalpha.3

  1. handle merging additional Request / Response instance properties

Breaking Changes

N / A

Known Issues

  1. handle URL encoded Netlify form params
  2. handle shared adapter bundles missing for API routes

Diff

$ git diff v0.29.0-alpha.2 v0.29.0-alpha.3 --stat | grep -v "www"
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   3 +-
 packages/cli/src/lib/api-route-worker.js           |  23 ++-
 packages/cli/src/lib/resource-utils.js             |  48 ++++-
 packages/cli/src/lifecycles/bundle.js              |   5 -
 packages/cli/src/lifecycles/compile.js             |   4 -
 packages/cli/src/lifecycles/serve.js               | 103 +++++-----
 .../cli/src/plugins/resource/plugin-api-routes.js  |  54 ++++--
 .../src/plugins/resource/plugin-standard-font.js   |   2 +-
 .../develop.default.hud-disabled.spec.js           |   2 +-
 .../develop.default.hud.spec.js                    |   2 +-
 .../cases/develop.default/develop.default.spec.js  | 208 ++++++++++++++++++---
 .../test/cases/develop.default/src/api/fragment.js |  18 ++
 .../test/cases/develop.default/src/api/missing.js  |   3 +
 .../test/cases/develop.default/src/api/nothing.js  |   6 +-
 .../develop.default/src/api/submit-form-data.js    |  11 ++
 .../cases/develop.default/src/api/submit-json.js   |  12 ++
 .../cases/develop.default/src/components/card.js   |  11 ++
 .../develop.plugins.context.spec.js                |   4 +-
 .../cli/test/cases/develop.spa/develop.spa.spec.js |  10 +-
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js |   2 +-
 .../serve.config.static-router.spec.js             |   2 +-
 .../serve.default.api/serve.default.api.spec.js    | 145 +++++++++++++-
 .../cases/serve.default.api/src/api/fragment.js    |   8 +-
 .../cases/serve.default.api/src/api/missing.js     |   3 +
 .../cases/serve.default.api/src/api/nothing.js     |   4 +-
 .../serve.default.api/src/api/submit-form-data.js  |  11 ++
 .../cases/serve.default.api/src/api/submit-json.js |  12 ++
 .../serve.default.ssr-prerender-api-hybrid.spec.js |   4 +-
 .../serve.default.ssr-prerender.spec.js            |   2 +-
 .../serve.default.ssr-static-export.spec.js        |   2 +-
 .../serve.default.ssr/serve.default.ssr.spec.js    |   2 +-
 .../test/cases/serve.default/serve.default.spec.js |  12 +-
 .../cli/test/cases/serve.spa/serve.spa.spec.js     |   6 +-
 .../cases/theme-pack/theme-pack.develop.spec.js    |   4 +-
 packages/init/package.json                         |   2 +-
 .../cases/develop.default/develop.default.spec.js  |   2 +-
 packages/plugin-adapter-netlify/README.md          |   3 +
 packages/plugin-adapter-netlify/package.json       |   4 +-
 packages/plugin-adapter-netlify/src/index.js       |  30 ++-
 .../test/cases/build.default/build.default.spec.js |  91 ++++++++-
 .../build.default/src/api/submit-form-data.js      |  11 ++
 .../cases/build.default/src/api/submit-json.js     |  14 ++
 packages/plugin-adapter-vercel/package.json        |   4 +-
 packages/plugin-adapter-vercel/src/index.js        |  30 ++-
 .../test/cases/build.default/build.default.spec.js |  88 ++++++++-
 .../build.default/src/api/submit-form-data.js      |  11 ++
 .../cases/build.default/src/api/submit-json.js     |  14 ++
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/package.json               |   4 +-
 .../cases/develop.default/develop.default.spec.js  |   6 +-
 .../cases/qraphql-server/graphql-server.spec.js    |   4 +-
 packages/plugin-import-commonjs/package.json       |   4 +-
 packages/plugin-import-css/package.json            |   4 +-
 .../cases/develop.default/develop.default.spec.js  |   4 +-
 packages/plugin-import-json/package.json           |   4 +-
 packages/plugin-import-jsx/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/serve.default/serve.default.spec.js |   2 +-
 packages/plugin-renderer-puppeteer/package.json    |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 .../cases/develop.default/develop.default.spec.js  |   2 +-
 yarn.lock                                          |  88 ++++++++-
 68 files changed, 996 insertions(+), 218 deletions(-)

v0.29.0-alpha.2

12 Aug 19:35
Compare
Choose a tag to compare
v0.29.0-alpha.2 Pre-release
Pre-release

Overview

This alpha release of the v0.29.0 release line builds upon the previous release by publishing two new packages for Greenwood's plugin ecosystem; an adapter plugin each for Netlify and Vercel based hosting! In addition, it fixes an issue with no Content-Type header being sent by adapted SSR pages, and syncs with the latest changes in the mainline.

In development docs here, full release blog will come out with the final 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.29.0+label%3Aalpha.2

  1. Vercel Adapter Plugin
  2. Netlify Adapter Plugin
  3. adapter SSR pages are rendering with incorrect content type header

Breaking Changes

N / A

Known Issues

N / A

Diff

$ git diff v0.29.0-alpha.1 v0.29.0-alpha.2 --stat | grep -v "www"
 .gitignore                                         |    3 +
 lerna.json                                         |    2 +-
 package.json                                       |    2 +-
 packages/cli/package.json                          |    2 +-
 packages/cli/src/lifecycles/bundle.js              |    8 +-
 packages/cli/src/lifecycles/serve.js               |    7 +-
 .../src/plugins/resource/plugin-node-modules.js    |    2 +-
 .../src/plugins/resource/plugin-standard-html.js   |    3 +-
 .../cli/src/plugins/server/plugin-livereload.js    |    2 +-
 .../build.default.markdown.spec.js                 |   10 +-
 .../build.default.markdown/src/pages/index.md      |    2 +
 .../build.config.plugins-adapter.spec.js           |   20 +-
 .../cases/build.plugins.adapter/generic-adapter.js |    2 -
 .../cases/develop.default/develop.default.spec.js  |   23 +
 .../test/cases/develop.default/src/api/nothing.js  |    5 +
 .../serve.default.api/serve.default.api.spec.js    |   24 +-
 .../cases/serve.default.api/src/api/nothing.js     |    3 +
 packages/init/package.json                         |    2 +-
 packages/plugin-adapter-netlify/README.md          |   85 +
 packages/plugin-adapter-netlify/package.json       |   37 +
 packages/plugin-adapter-netlify/src/index.js       |  170 +
 .../test/cases/build.default/build.default.spec.js |  249 +
 .../test/cases/build.default/greenwood.config.js   |    7 +
 .../test/cases/build.default/src/api/fragment.js   |   27 +
 .../test/cases/build.default/src/api/greeting.js   |   14 +
 .../cases/build.default/src/components/card.js     |   27 +
 .../test/cases/build.default/src/pages/artists.js  |   25 +
 .../test/cases/build.default/src/pages/users.js    |   27 +
 .../cases/build.default/src/services/artists.js    |   11 +
 .../cases/build.default/src/services/message.js    |    7 +
 packages/plugin-adapter-vercel/README.md           |   64 +
 packages/plugin-adapter-vercel/package.json        |   32 +
 packages/plugin-adapter-vercel/src/index.js        |  150 +
 .../test/cases/build.default/build.default.spec.js |  265 +
 .../test/cases/build.default/greenwood.config.js   |    7 +
 .../test/cases/build.default/src/api/fragment.js   |   27 +
 .../test/cases/build.default/src/api/greeting.js   |   14 +
 .../cases/build.default/src/components/card.js     |   27 +
 .../test/cases/build.default/src/pages/artists.js  |   25 +
 .../test/cases/build.default/src/pages/users.js    |   27 +
 .../cases/build.default/src/services/artists.js    |   11 +
 .../cases/build.default/src/services/message.js    |    7 +
 packages/plugin-babel/package.json                 |    4 +-
 packages/plugin-google-analytics/package.json      |    4 +-
 packages/plugin-google-analytics/src/index.js      |    2 +-
 packages/plugin-graphql/package.json               |    4 +-
 packages/plugin-graphql/src/index.js               |    2 +-
 packages/plugin-import-commonjs/package.json       |    4 +-
 packages/plugin-import-css/package.json            |    4 +-
 packages/plugin-import-json/package.json           |    4 +-
 packages/plugin-import-jsx/README.md               |    2 +-
 packages/plugin-import-jsx/package.json            |    4 +-
 packages/plugin-include-html/package.json          |    4 +-
 packages/plugin-include-html/src/index.js          |    2 +-
 packages/plugin-polyfills/package.json             |    4 +-
 packages/plugin-polyfills/src/index.js             |    2 +-
 packages/plugin-postcss/package.json               |    4 +-
 packages/plugin-renderer-lit/package.json          |    4 +-
 packages/plugin-renderer-puppeteer/package.json    |    4 +-
 .../src/plugins/resource.js                        |    2 +-
 packages/plugin-typescript/package.json            |    4 +-
 .../options.extend-config/src/scripts/main.ts      |    1 +
 yarn.lock                                          | 5349 +++++++++++++++++++-
 65 files changed, 6754 insertions(+), 128 deletions(-)

v0.28.5

03 Aug 02:15
Compare
Choose a tag to compare

Overview

This patch release fixes a couple bugs around content templating and error handling around Responses.

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

  1. markdown rendering not correctly processing the text $1
  2. minimal Response throws errors in development and production lifecycles

Breaking Changes

N / A

Known Issues

N / A

Diff

$ git diff v0.28.4 v0.28.5 --stat | grep -v "www"
 .eslintrc.cjs                                      |  6 +-
 lerna.json                                         |  2 +-
 packages/cli/package.json                          |  2 +-
 packages/cli/src/commands/build.js                 | 10 +--
 packages/cli/src/commands/develop.js               |  4 +-
 packages/cli/src/commands/eject.js                 |  4 +-
 packages/cli/src/config/rollup.config.js           |  2 +-
 packages/cli/src/index.js                          |  2 +-
 packages/cli/src/lib/node-modules-utils.js         |  2 +-
 packages/cli/src/lib/server-interface.js           |  4 +-
 packages/cli/src/lib/walker-package-ranger.js      | 16 ++---
 packages/cli/src/lifecycles/bundle.js              |  2 +-
 packages/cli/src/lifecycles/context.js             |  2 +-
 packages/cli/src/lifecycles/graph.js               | 12 ++--
 packages/cli/src/lifecycles/prerender.js           |  2 +-
 packages/cli/src/lifecycles/serve.js               | 15 +++--
 packages/cli/src/loader.js                         |  2 +-
 .../cli/src/plugins/resource/plugin-api-routes.js  |  2 +-
 .../cli/src/plugins/resource/plugin-dev-proxy.js   |  2 +-
 .../src/plugins/resource/plugin-node-modules.js    |  8 +--
 .../cli/src/plugins/resource/plugin-source-maps.js |  2 +-
 .../src/plugins/resource/plugin-standard-audio.js  |  2 +-
 .../src/plugins/resource/plugin-standard-font.js   |  2 +-
 .../src/plugins/resource/plugin-standard-html.js   |  3 +-
 .../src/plugins/resource/plugin-standard-image.js  |  2 +-
 .../plugins/resource/plugin-standard-javascript.js |  2 +-
 .../src/plugins/resource/plugin-standard-json.js   |  2 +-
 .../src/plugins/resource/plugin-standard-video.js  |  4 +-
 .../src/plugins/resource/plugin-static-router.js   |  4 +-
 .../src/plugins/resource/plugin-user-workspace.js  |  4 +-
 .../cli/src/plugins/server/plugin-livereload.js    |  8 +--
 .../build.config.default.spec.js                   |  4 +-
 .../build.config.interpolate-frontmatter.spec.js   |  2 +-
 .../build.config.markdown-custom.spec.js           |  6 +-
 .../build.config.markdown-custom.settings.spec.js  |  2 +-
 .../build.config-optimization-default.spec.js      |  4 +-
 .../build.config-optimization-inline.spec.js       | 14 ++--
 .../build.config-optimization-none.spec.js         |  8 +--
 .../build.config-optimization-overrides.spec.js    | 12 ++--
 .../src/components/footer.js                       |  2 +-
 .../src/components/header.js                       |  2 +-
 .../build.config-optimization-static.spec.js       |  4 +-
 .../build.config.pages-directory.spec.js           |  4 +-
 .../build.config.prerender.spec.js                 |  6 +-
 .../src/pages/artists.js                           |  2 +-
 .../build.config.templates-directory.spec.js       |  4 +-
 .../build.default.import-node-modules.spec.js      | 66 +++++++++---------
 .../build.default.markdown.spec.js                 | 22 ++++--
 .../build.default.markdown/src/pages/index.md      |  2 +
 .../build.default.meta-files.spec.js               |  4 +-
 .../build.default.quick-start-npx.spec.js          | 10 +--
 .../build.default.spa/build.default.spa.spec.js    | 34 +++++-----
 .../build.default.spa/src/components/footer.js     |  2 +-
 .../src/components/footer.js                       |  2 +-
 .../build.default.ssr-static-export.spec.js        | 34 +++++-----
 .../src/components/counter.js                      |  4 +-
 .../src/components/footer.js                       |  2 +-
 .../src/pages/artists.js                           |  2 +-
 .../build.default.title.spec.js                    |  4 +-
 .../build.default.workspace-404-markdown.spec.js   | 14 ++--
 .../src/scripts/header.js                          |  2 +-
 .../build.default.workspace-404.spec.js            | 14 ++--
 .../src/scripts/header.js                          |  2 +-
 ...d.default.workspace-frontmatter-imports.spec.js | 16 ++---
 .../src/components/counter/counter.js              |  2 +-
 .../src/components/multi-hyphen/multi-hyphen.js    |  2 +-
 ...build.default.workspace-getting-started.spec.js | 58 ++++++++--------
 ...default.workspace-javascript-css-remote.spec.js | 14 ++--
 .../build.default.workspace-javascript-css.spec.js | 10 +--
 .../build.default.workspace-nested.spec.js         |  6 +-
 ...lt.workspace-template-page-bare-merging.spec.js | 14 ++--
 .../build.default.workspace-template-page.spec.js  | 18 ++---
 ...build.default.workspace-templates-empty.spec.js |  4 +-
 .../src/components/footer.js                       |  2 +-
 .../src/components/greeting.js                     |  2 +-
 .../src/components/header.js                       |  2 +-
 ...build.default.workspace-top-level-pages.spec.js |  2 +-
 .../test/cases/build.default/build.default.spec.js |  8 +--
 .../fixtures/components/greeting.js                |  2 +-
 .../theme-pack-context-plugin.js                   |  2 +-
 .../build.plugins.error-name/greenwood.config.js   |  4 +-
 .../greenwood.config.js                            |  4 +-
 .../build.plugins.error-type/greenwood.config.js   |  4 +-
 .../build.config.plugins-resource.spec.js          |  2 +-
 .../build.plugins.resource/greenwood.config.js     |  2 +-
 .../build.plugins-source.spec.js                   | 24 +++----
 .../develop.default.hud-disabled.spec.js           |  2 +-
 .../develop.default.hud.spec.js                    |  2 +-
 .../cases/develop.default/develop.default.spec.js  | 31 +++++++--
 .../test/cases/develop.default/src/api/nothing.js  |  5 ++
 .../develop.plugins.context.spec.js                |  2 +-
 .../fixtures/components/greeting.js                |  2 +-
 .../cli/test/cases/develop.spa/develop.spa.spec.js |  8 +--
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js | 30 ++++-----
 .../cases/develop.ssr/src/components/counter.js    |  4 +-
 .../cases/develop.ssr/src/components/footer.js     |  2 +-
 .../test/cases/develop.ssr/src/pages/artists.js    |  2 +-
 .../serve.config.static-router.spec.js             | 12 ++--
 .../src/pages/artists.js                           |  2 +-
 .../serve.default.api/serve.default.api.spec.js    | 30 +++++++--
 .../cases/serve.default.api/src/api/nothing.js     |  3 +
 .../serve.default.ssr-prerender-api-hybrid.spec.js |  4 +-
 .../src/components/footer.js                       |  2 +-
 .../serve.default.ssr-prerender.spec.js            |  4 +-
 .../src/components/footer.js                       |  2 +-
 .../serve.default.ssr-static-export.spec.js        | 34 +++++-----
 .../src/components/counter.js                      |  4 +-
 .../src/components/footer.js                       |  2 +-
 .../src/pages/artists.js                           |  2 +-
 .../serve.default.ssr/serve.default.ssr.spec.js    |  2 +-
 .../serve.default.ssr/src/components/counter.js    |  4 +-
 .../test/cases/serve.default/serve.default.spec.js |  2 +-
 .../cli/test/cases/serve.spa/serve.spa.spec.js     |  8 +--
 .../cli/test/cases/theme-pack/greenwood.config.js  |  2 +-
 .../test/cases/theme-pack/src/components/header.js |  2 +-
 .../test/cases/theme-pack/theme-pack.build.spec.js |  9 ++-
 .../cases/theme-pack/theme-pack.develop.spec.js    | 11 ++-
 packages/init/package.json                         |  2 +-
 packages/init/src/copy-folder.js                   |  2 +-
 packages/init/src/index.js                         | 18 ++---
 .../test/cases/build.default/build.default.spec.js |  4 +-
 .../cases/develop.default/develop.default.spec.js  |  8 +--
 .../test/cases/init.default/init.default.spec.js   |  6 +-
 .../test/cases/init.template/init.template.spec.js |  4 +-
 .../init/test/cases/init.yarn/init.yarn.spec.js    |  4 +-
 packages/plugin-babel/package.json                 |  4 +-
 packages/plugin-babel/src/index.js                 | 10 +--
 .../test/cases/default/default.spec.js             |  6 +-
 .../options.extend-config.spec.js                  |  8 +--
 packages/plugin-google-analytics/package.json      |  4 +-
 packages/plugin-google-analytics/src/index.js      |  4 +-
 packages/plugin-graphql/package.json               |  4 +-
 packages/plugin-graphql/src/core/cache.js          |  2 +-
 packages/plugin-graphql/src/core/client.js         |  2 +-
 packages/plugin-graphql/src/core/server.js         |  2 +-
 packages/plugin-graphql/src/index.js               |  6 +-
 packages/plugin-graphql/src/schema/schema.js       | 10 +--
 .../test/cases/develop.default/greenwood.config.js |  2 +-
 .../cases/qraphql-server/graphql-server.spec.js    |  2 +-
 .../test/cases/qraphql-server/greenwood.config.js  |  2 +-
 .../cases/query-children/query-children.spec.js    | 42 ++++++------
 .../test/cases/query-config/query-config.spec.js   |  8 +--
 .../cases/query-config/src/components/footer.js    |  2 +-
 .../query-custom-frontmatter.spec.js               | 42 ++++++------
 .../query-custom-schema.spec.js                    |  8 +--
 .../test/cases/query-graph/query-graph.spec.js     | 38 +++++------
 .../test/cases/query-menu/query-menu.spec.js       | 42 ++++++------
 packages/plugin-graphql/test/unit/common.spec.js   |  2 +-
 pa...
Read more

v0.29.0-alpha.1

23 Jul 19:11
Compare
Choose a tag to compare
v0.29.0-alpha.1 Pre-release
Pre-release

Overview

This release in the v0.29.0 release line introduces support for an adapter plugin API that can run code at the end of a Greenwood build to facilitate (in future PRs) the ability to deploy Greenwood to Serverless and Edge environments like Netlify and Vercel.

In development docs here, full release blog will come out with the final 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.29.0+label%3Aalpha.1

  1. Adapter Plugin API

Breaking Changes

N / A

Known Issues

N / A

Diff

Diff looks big because repo was formatted post v0.28.4 release - #1119

$ git diff v0.29.0-alpha.0 v0.29.0-alpha.1 --stat | grep -v "www"
 .gitignore                                         |   3 +-
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   2 +-
 packages/cli/src/commands/build.js                 |   7 ++
 packages/cli/src/config/rollup.config.js           |   1 -
 packages/cli/src/lifecycles/bundle.js              |   4 -
 packages/cli/src/lifecycles/config.js              |   2 +-
 .../build.config.plugins-adapter.spec.js           | 117 +++++++++++++++++++++
 .../cases/build.plugins.adapter/generic-adapter.js |  60 +++++++++++
 .../build.plugins.adapter/greenwood.config.js      |   7 ++
 .../build.plugins.adapter/src/api/greeting.js      |  12 +++
 .../build.plugins.adapter/src/components/card.js   |  22 ++++
 .../cases/build.plugins.adapter/src/pages/index.js |  24 +++++
 .../build.plugins.error-type.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-import-jsx/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-renderer-puppeteer/package.json    |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 38 files changed, 399 insertions(+), 46 deletions(-)

v0.29.0-alpha.0

29 Jun 02:42
Compare
Choose a tag to compare
v0.29.0-alpha.0 Pre-release
Pre-release

Overview

This initial release for v0.29.0 refactors the output for SSR builds and starts setting the groundwork for being able to run Greenwood in Serverless and Edge based runtimes.

In development docs here, full release blog will come out with the final 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.29.0+label%3Aalpha.0

  1. refactor Workers out of SSR builds

Breaking Changes

Renderer Plugin

As part of the refactor for how Greenwood handles Worker threads, the API for creating a renderer plugin has changed a bit.

  1. The options have changed and workerUrl has been renamed to executeModuleUrl.
  2. For the params into executeRouteModule now has route, label and id replaced with just the page graph data (which includes all of those and more)
  3. The URL for executeModuleUrl is now simply a function that produces the output the same way it did before, no need to bother with the Workers abstraction. Just export now.

Before

# before
import { parentPort } from 'worker_threads';
// ...

async function executeRouteModule({ moduleUrl, compilation, route, label, id, prerender, htmlContents, scripts }) {
  // ...
  parentPort.postMessage(data);
}

parentPort.on('message', async (task) => {
  await executeRouteModule(task);
});

After

// ...

async function executeRouteModule({ moduleUrl, compilation, page = {}, prerender = false, htmlContents = null, scripts = [] }) {
  // ...
  return data
}

export { executeRouteModule };

Known Issues

N / A

Diff

Diff looks big because repo was formatted post v0.28.4 release - #1119

$ git diff v0.28.4 v0.29.0-alpha.0 --stat | grep -v "www"
 .eslintrc.cjs                                      |   6 +-
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   2 +-
 packages/cli/src/commands/build.js                 |  12 +-
 packages/cli/src/commands/develop.js               |   4 +-
 packages/cli/src/commands/eject.js                 |   4 +-
 packages/cli/src/config/rollup.config.js           |  61 +++++++++-
 packages/cli/src/index.js                          |   2 +-
 packages/cli/src/lib/execute-route-module.js       |  42 +++++++
 packages/cli/src/lib/node-modules-utils.js         |   2 +-
 packages/cli/src/lib/server-interface.js           |   4 +-
 packages/cli/src/lib/ssr-route-worker.js           |  42 +------
 packages/cli/src/lib/templating-utils.js           |   2 +
 packages/cli/src/lib/walker-package-ranger.js      |  16 +--
 packages/cli/src/lifecycles/bundle.js              | 132 ++++++++-------------
 packages/cli/src/lifecycles/context.js             |   2 +-
 packages/cli/src/lifecycles/graph.js               |  28 +++--
 packages/cli/src/lifecycles/prerender.js           |   7 +-
 packages/cli/src/lifecycles/serve.js               |  10 +-
 packages/cli/src/loader.js                         |   2 +-
 .../plugins/renderer/plugin-renderer-default.js    |   2 +-
 .../cli/src/plugins/resource/plugin-api-routes.js  |   2 +-
 .../cli/src/plugins/resource/plugin-dev-proxy.js   |   2 +-
 .../src/plugins/resource/plugin-node-modules.js    |   6 +-
 .../cli/src/plugins/resource/plugin-source-maps.js |   2 +-
 .../src/plugins/resource/plugin-standard-audio.js  |   2 +-
 .../src/plugins/resource/plugin-standard-font.js   |   2 +-
 .../src/plugins/resource/plugin-standard-html.js   |   7 +-
 .../src/plugins/resource/plugin-standard-image.js  |   2 +-
 .../plugins/resource/plugin-standard-javascript.js |   2 +-
 .../src/plugins/resource/plugin-standard-json.js   |   2 +-
 .../src/plugins/resource/plugin-standard-video.js  |   4 +-
 .../src/plugins/resource/plugin-static-router.js   |   4 +-
 .../src/plugins/resource/plugin-user-workspace.js  |   4 +-
 .../cli/src/plugins/server/plugin-livereload.js    |   6 +-
 .../build.config.default.spec.js                   |   4 +-
 .../build.config.interpolate-frontmatter.spec.js   |   2 +-
 .../build.config.markdown-custom.spec.js           |   6 +-
 .../build.config.markdown-custom.settings.spec.js  |   2 +-
 .../build.config-optimization-default.spec.js      |   4 +-
 .../build.config-optimization-inline.spec.js       |  14 +--
 .../build.config-optimization-none.spec.js         |   8 +-
 .../build.config-optimization-overrides.spec.js    |  12 +-
 .../src/components/footer.js                       |   2 +-
 .../src/components/header.js                       |   2 +-
 .../build.config-optimization-static.spec.js       |   4 +-
 .../build.config.pages-directory.spec.js           |   4 +-
 .../build.config.prerender.spec.js                 |   6 +-
 .../src/pages/artists.js                           |   2 +-
 .../build.config.templates-directory.spec.js       |   4 +-
 .../build.default.import-node-modules.spec.js      |  66 +++++------
 .../build.default.markdown.spec.js                 |  12 +-
 .../build.default.meta-files.spec.js               |   4 +-
 .../build.default.quick-start-npx.spec.js          |  10 +-
 .../build.default.spa/build.default.spa.spec.js    |  34 +++---
 .../build.default.spa/src/components/footer.js     |   2 +-
 .../src/components/footer.js                       |   2 +-
 .../build.default.ssr-static-export.spec.js        |  34 +++---
 .../src/components/counter.js                      |   4 +-
 .../src/components/footer.js                       |   2 +-
 .../src/pages/artists.js                           |   4 +-
 .../build.default.title.spec.js                    |   4 +-
 .../build.default.workspace-404-markdown.spec.js   |  14 +--
 .../src/scripts/header.js                          |   2 +-
 .../build.default.workspace-404.spec.js            |  14 +--
 .../src/scripts/header.js                          |   2 +-
 ...d.default.workspace-frontmatter-imports.spec.js |  16 +--
 .../src/components/counter/counter.js              |   2 +-
 .../src/components/multi-hyphen/multi-hyphen.js    |   2 +-
 ...build.default.workspace-getting-started.spec.js |  58 ++++-----
 ...default.workspace-javascript-css-remote.spec.js |  14 +--
 .../build.default.workspace-javascript-css.spec.js |  10 +-
 .../build.default.workspace-nested.spec.js         |   6 +-
 ...lt.workspace-template-page-bare-merging.spec.js |  14 +--
 .../build.default.workspace-template-page.spec.js  |  18 +--
 ...build.default.workspace-templates-empty.spec.js |   4 +-
 .../src/components/footer.js                       |   2 +-
 .../src/components/greeting.js                     |   2 +-
 .../src/components/header.js                       |   2 +-
 ...build.default.workspace-top-level-pages.spec.js |   2 +-
 .../test/cases/build.default/build.default.spec.js |   8 +-
 .../fixtures/components/greeting.js                |   2 +-
 .../theme-pack-context-plugin.js                   |   2 +-
 .../build.plugins.error-name/greenwood.config.js   |   4 +-
 .../greenwood.config.js                            |   4 +-
 .../build.plugins.error-type/greenwood.config.js   |   4 +-
 .../build.config.plugins-resource.spec.js          |   2 +-
 .../build.plugins.resource/greenwood.config.js     |   2 +-
 .../build.plugins-source.spec.js                   |  24 ++--
 .../develop.default.hud-disabled.spec.js           |   2 +-
 .../develop.default.hud.spec.js                    |   2 +-
 .../cases/develop.default/develop.default.spec.js  |   8 +-
 .../develop.plugins.context.spec.js                |   2 +-
 .../fixtures/components/greeting.js                |   2 +-
 .../cli/test/cases/develop.spa/develop.spa.spec.js |   8 +-
 .../cli/test/cases/develop.ssr/develop.ssr.spec.js |  30 ++---
 .../cases/develop.ssr/src/components/counter.js    |   4 +-
 .../cases/develop.ssr/src/components/footer.js     |   2 +-
 .../test/cases/develop.ssr/src/pages/artists.js    |   6 +-
 .../serve.config.static-router.spec.js             |  65 +---------
 .../src/pages/artists.js                           |   2 +-
 .../serve.default.api/serve.default.api.spec.js    |   6 +-
 .../serve.default.ssr-prerender-api-hybrid.spec.js |   4 +-
 .../src/components/footer.js                       |   2 +-
 .../serve.default.ssr-prerender.spec.js            |   4 +-
 .../src/components/footer.js                       |   2 +-
 .../serve.default.ssr-static-export.spec.js        |  34 +++---
 .../src/components/counter.js                      |   4 +-
 .../src/components/footer.js                       |   2 +-
 .../src/pages/artists.js                           |   4 +-
 .../serve.default.ssr/serve.default.ssr.spec.js    |   8 +-
 .../serve.default.ssr/src/components/counter.js    |   4 +-
 .../cases/serve.default.ssr/src/pages/artists.js   |   4 +-
 .../test/cases/serve.default/serve.default.spec.js |   2 +-
 .../cli/test/cases/serve.spa/serve.spa.spec.js     |   8 +-
 .../cli/test/cases/theme-pack/greenwood.config.js  |   2 +-
 .../test/cases/theme-pack/src/components/header.js |   2 +-
 .../test/cases/theme-pack/theme-pack.build.spec.js |   9 +-
 .../cases/theme-pack/theme-pack.develop.spec.js    |  11 +-
 packages/init/package.json                         |   2 +-
 packages/init/src/copy-folder.js                   |   2 +-
 packages/init/src/index.js                         |  18 +--
 .../test/cases/build.default/build.default.spec.js |   4 +-
 .../cases/develop.default/develop.default.spec.js  |   8 +-
 .../test/cases/init.default/init.default.spec.js   |   6 +-
 .../test/cases/init.template/init.templ...
Read more