v0.29.0-alpha.0
Pre-release
Pre-release
thescientist13
released this
29 Jun 02:42
·
166 commits
to master
since this 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
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.
- The options have changed and
workerUrl
has been renamed toexecuteModuleUrl
. - For the params into
executeRouteModule
now hasroute
,label
andid
replaced with just thepage
graph data (which includes all of those and more) - The URL for
executeModuleUrl
is now simply a function that produces the output the same way it did before, no need to bother with theWorkers
abstraction. Justexport
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.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 | 2 +-
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 | 4 +-
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 +-
packages/plugin-graphql/test/unit/mocks/config.js | 2 +-
.../plugin-graphql/test/unit/schema/config.spec.js | 2 +-
packages/plugin-import-commonjs/package.json | 4 +-
packages/plugin-import-commonjs/src/index.js | 6 +-
.../test/cases/default/default.spec.js | 8 +-
packages/plugin-import-css/package.json | 4 +-
packages/plugin-import-css/src/index.js | 4 +-
.../test/cases/default/default.spec.js | 2 +-
.../exp-build.prerender.spec.js | 2 +-
packages/plugin-import-json/package.json | 4 +-
packages/plugin-import-json/src/index.js | 2 +-
.../test/cases/default/default.spec.js | 4 +-
.../cases/develop.default/develop.default.spec.js | 2 +-
.../test/cases/develop.default/greenwood.config.js | 2 +-
.../exp-build.prerender.spec.js | 2 +-
packages/plugin-import-jsx/package.json | 4 +-
packages/plugin-import-jsx/src/index.js | 2 +-
.../test/cases/default/default.prerender.spec.js | 2 +-
.../exp-build.prerender.spec.js | 2 +-
packages/plugin-include-html/package.json | 4 +-
.../build.default.custom-element.spec.js | 6 +-
.../build.default.link-tag.spec.js | 6 +-
packages/plugin-polyfills/package.json | 4 +-
.../test/cases/default/default.spec.js | 2 +-
packages/plugin-postcss/package.json | 4 +-
packages/plugin-postcss/src/index.js | 2 +-
.../test/cases/default/default.spec.js | 2 +-
.../options.extend-config.spec.js | 4 +-
packages/plugin-renderer-lit/package.json | 4 +-
...route-worker-lit.js => execute-route-module.js} | 20 ++--
packages/plugin-renderer-lit/src/index.js | 2 +-
.../build.prerender.getting-started.spec.js | 10 +-
.../test/cases/serve.default/serve.default.spec.js | 41 ++++---
.../cases/serve.default/src/components/footer.js | 2 +-
.../test/cases/serve.default/src/pages/artists.js | 6 +-
packages/plugin-renderer-puppeteer/package.json | 4 +-
.../plugin-renderer-puppeteer/src/lib/browser.js | 2 +-
.../src/plugins/server.js | 2 +-
.../src/puppeteer-handler.js | 2 +-
.../test/cases/build.default/build.default.spec.js | 78 ++++++------
packages/plugin-typescript/package.json | 4 +-
.../test/cases/default/default.spec.js | 8 +-
.../test/cases/default/greenwood.config.js | 2 +-
.../test/cases/develop.default/greenwood.config.js | 2 +-
.../options.extend-config/greenwood.config.js | 2 +-
.../options.extend-config.spec.js | 6 +-
test/smoke-test.js | 4 +-
test/utils.js | 2 +-
206 files changed, 879 insertions(+), 917 deletions(-)