Releases: ProjectEvergreen/greenwood
v0.30.2
Overview
A couple more post release enhancements coming out of the v0.30.0 release.
Changelog
https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.30.2
- sync additional
peerDependencies
on the Greenwood CLI for plugins - set
shamefully-hoist
pnpm flag in .npmrc for init scaffolding
Breaking Changes
N / A
Known Issues
N / A
Diff
v0.30.1
Overview
The v0.30.1 addresses a handful of reported issues found post launch of the v0.30.0 release.
Changelog
https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.30.1
- table of contents sometimes missing first heading tag
- @greenwood/init fails when no args are provided
- bump all plugins
peerDependencies
to match latest minor release range - thanks @lschierer 🙌 - new website cutover and docs refresh
- TypeScript plugin not honoring default
servePage
setting when additional options are provided - fix sample code in PostCSS plugin README.md to use correct case sensitive name - thanks @lschierer 🙌
Breaking Changes
N / A
Known Issues
N / A
Diff
v0.30.0
Overview
The v0.30.0 release is here! Please check out our blog post to learn about some of the new features now available.
Changelog
https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.30.0
- Isolation Mode
- Lit v3 Upgrade and SSR Enhancements
- Single File Bundles (SFBs) for SSR pages and API routes - thanks @DevLab2425 🙌
- Upgrade Rollup (and friends) to
3.x
- thanks @DevLab2425 🙌 - CSS and JSON import attributes
- support bundling of
url
properties (like for@font-face
+src
) during CSS file optimization - Layouts (Templates) and Pages
- support all CSS function pseudo classes / elements for CSS optimizing
- Sitemap Generation (static) (thanks @jstockdi 🙌 )
- improve naming for (nested) bundled SSR page and API route entry points to better reflect original file based routing name](#1226)
- nested SSR pages (and API routes) are throwing a module not found error (needs additional patch for adapters)
- "real" production import attributes
- CSS optimization workflow parity during development
- attributes for frontmatter imports
- polyfill configurations for import maps and attributes
- improve init package scaffolding baseline starting point
- livereload not reloading on SVG (image) file changes consistently
- CSS Nesting Support
- HTML Web Components
- CSS Modules ™️ plugin
- Content as Data
Breaking Changes
Minimum NodeJS Version
The new minimum NodeJS version for Greenwood is now v18.20.0
. Make sure to update your CI and hosting scripts accordingly.
Layouts
The templates/ directory has now re-named to the layouts/ directory. This includes your frontmatter.
# before
src/
templates/
app.html
# after
src/
layouts/
app.html
API Routes
API routes have now been nested under the pages/ directory to better emphasis the shared routing of file based routing for pages, as the URLs all end up in the same "namspace" anyway
# before
src/
api/
search.js
# after
src/
pages/
api/
search.js
Important
Don't forget to update any references to any relative ESM imports in your API routes.
Custom Imports
This now means that using custom imports no longer requires the experimental flag, though a flag is still needed
# before
$ node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood <command>
# after
$ node --loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood <command>
Note
We hope that before our 1.0 release this flag will not be required.
Active Frontmatter
The activeFrontmatter
configuration setting has been renamed to activeContent
and now enabled with it all the related Content as Data feature set. The old interpolateFrontmatter
behavior is still there, and now additional frontmatter is has been exposed to users. The full list includes
id
route
title
label
data
tableOfContents
(which isArray<Object{ label, route }>
Menus
Menus have been renamed / re-implemented as Collections and their usage for GraphQL users will need to be updated to adopt that convention.
In general, these will the steps you will need to take:
- Frontmatter
<!-- before --> --- menu: navigation --- <!-- after --> --- collection: navigation order: 1 ---
MenuQuery
will need to be renamed toCollectionQuery
and you will pass aname
instead ofmenu
property// before import MenuQuery from '@greenwood/plugin-graphql/src/queries/menu.gql'; const response = await client.query({ query: MenuQuery, variables: { menu: 'navigation' } }); const navigation = response.data.menu.children.map(item => item.item); // after import CollectionQuery from '@greenwood/plugin-graphql/src/queries/collection.gql'; const response = await client.query({ query: CollectionQuery, variables: { name: 'navigation' } }); this.navigation = response.data.collection;
Polyfills (Import Maps / Import Attributes)
Import Maps
As Import Maps are now pretty widely supported by browser, their polyfilling has been disabled by default. To enable this for development (only), add this configuration to your greenwood.config.js
export default {
polyfills: {
importMaps: true
}
}
Import Attributes
As Import Attributes (CSS, JSON) are not widely supported across all browsers, an option has been added to greenwood.config.js if you want Greenwood to polyfill these behaviors (essentially inlining the modules contents as a default export
.
export default {
polyfills: {
importAttributes: ['css', 'json'] // choose which ones you want polyfilled
}
}
Import CSS / JSON Plugin deprecations
Now that loading CSS and JSON are web standards, the following plugins will no longer be recieving updates and will be deprecated as part of this release.
Import Raw
However, if you still need to load arbitrary content as an ES Module like the CSS plugin provided, there is now a general purpose plugin called plugin-import-raw which can provided this functionality, e.g.
/* my-component.css */
h1 {
color: red;
}
import styles from './my-component.css?type=raw'`;
console.log(styles); // h1 { color: red; }
Tip
If you were using these plugins within something like WTR, you'll want to modify your customizations accordingly by making sure to pass the Sec-Fetch-Dest
header. See this file for reference.
Lit Renderer Plugin
The Lit Renderer has a few breaking changes to be aware of
- You must use the
getBody
API (Custom Elements as Pages are not support with Lit) - The compatible version of Lit is now v3
- You'll want to use
isolation
mode for your API routes (in particular when usinggreenwood serve
as it is also the default for SSR pages)
See a working example here
Known Issues
- Import CSS / JSON plugins not showing as deprecated
- TypeScript plugin not working with
servePage
and additional options npx @greenwood/init
failing when no custom directory provided
Diff
v0.30.0-alpha.8
Overview
This release in the v0.30.0 line fixes a couple bugs related to Lit SSR support with import maps, and addressing some misleading prompts in the init scaffolding command.
In progress docs available 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.30.0+label%3Aalpha.8
init
scaffolding can give misleading / broken next steps instructions- ensure Lit SSR hydration script loads after importmaps
Breaking Changes
N / A
Known Issues
N / A
Diff
v0.30.0-alpha.7
Overview
This release in the v0.30.0 release introduces a robust set of "Content as Data" APIs for Greenwood, a CSS Modules ™️ plugin, support for HTML (Light DOM) Web Components, and added the ability for the init
to create a directory.
In progress docs available 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.30.0+label%3Aalpha.7
- CSS Nesting Support
- add initial directory option for init scaffolding
- HTML Web Components
- CSS Modules ™️ plugin
- Content as Data
Breaking Changes
Active Frontmatter
The activeFrontmatter
configuration setting has been renamed to activeContent
and now enabled with it all the related Content as Data feature set. The old interpolateFrontmatter
behavior is still there, and now additional frontmatter is has been exposed to users. The full list includes
id
route
title
label
data
tableOfContents
(which isArray<Object{ label, route }>
Menus
Menus have been renamed / re-implemented as Collections and their usage for GraphQL users will need to be updated to adopt that convention.
In general, these will the steps you will need to take:
- Frontmatter
<!-- before --> --- menu: navigation --- <!-- after --> --- collection: navigation order: 1 ---
MenuQuery
will need to be renamed toCollectionQuery
and you will pass aname
instead ofmenu
property// before import MenuQuery from '@greenwood/plugin-graphql/src/queries/menu.gql'; const response = await client.query({ query: MenuQuery, variables: { menu: 'navigation' } }); const navigation = response.data.menu.children.map(item => item.item); // after import CollectionQuery from '@greenwood/plugin-graphql/src/queries/collection.gql'; const response = await client.query({ query: CollectionQuery, variables: { name: 'navigation' } }); this.navigation = response.data.collection;
Known Issues
init
scaffolding can give misleading / broken next steps instructions- ensure Lit SSR hydration script loads after importmaps
Diff
v0.30.0-alpha.6
Overview
This release in the v0.30.0 release introduces a new configuration flag for enabling the polyfilling of import maps or import attributes, and refreshed the starting contents of the @greenwood/init
scaffolding package.
In progress docs available 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.30.0+label%3Aalpha.6
- polyfill configurations for import maps and attributes
- improve init package scaffolding baseline starting point
- refine standard CSS plugin intercepting
- provide initialized
compilation
to custom loader script (and resource plugins) - livereload not reloading on SVG (image) file changes consistently
Breaking Changes
Polyfills (Import Maps / Import Attributes)
Import Maps
As Import Maps are now pretty widely supported by browser, their polyfilling has been disabled by default. To enable this for development (only), add this configuration to your greenwood.config.js
export default {
polyfills: {
importMaps: true
}
}
Import Attributes
As Import Attributes (CSS, JSON) are not widely supported across all browsers, an option has been added to greenwood.config.js if you want Greenwood to polyfill these behaviors (essentially inlining the modules contents as a default export
.
export default {
polyfills: {
importAttributes: ['css', 'json'] // choose which ones you want polyfilled
}
}
Known Issues
N / A
Diff
v0.30.0-alpha.5
Overview
This release in the v0.30.0 release improves handling of CSS Modules (Constructable Stylesheets bundling), add support for providing attributes to frontmatter imports, and brings CSS optimization / bundling parity to the development workflow.
In progress docs available 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.30.0+label%3Aalpha.5
- real production import attributes
- CSS optimization workflow parity during development
- attributes for frontmatter imports
Breaking Changes
N / A
Known Issues
- Standard CSS bundling handling non CSS files
- Race condition with
inline
optimization and bundling Constructable Stylesheets
Diff
v0.30.0-alpha.4
Overview
This release in the v0.30.0 release line resolves a number of bugs and backports.
In progress docs available 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.30.0+label%3Aalpha.4
- refine SPA local dev routing for HTML requests
- prerendering breaks optimization configuration with multi-line formatted
<script>
/<style>
/<link>
tags - improve naming for (nested) bundled SSR page and API route entry points to better reflect original file based routing name](#1226)
- nested SSR pages (and API routes) are throwing a module not found error (needs additional patch for adapters)
Breaking Changes
N / A
Known Issues
N / A
Diff
v0.30.0-alpha.3
Overview
This release in the v0.30.0 release line adds a number of new features, bug fixes, and performance improvements.
In progress docs available 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.30.0+label%3Aalpha.3
- Layouts (Templates) and Pages
- warnings emitted about undefined page level custom element tags when pre-rendering SSR pages
- duplicate HTML when using
prerender
and shared components used in both SSR pages and templates - support all CSS function pseudo classes / elements for CSS optimizing
- Sitemap Generation (static) (thanks @jstockdi 🙌 )
- functions in CSS declarations (like CSS
var
) are being incorrectly optimized
Breaking Changes
Layouts
The templates/ directory has now re-named to the layouts/ directory. This includes your frontmatter.
# before
src/
templates/
app.html
# after
src/
layouts/
app.html
API Routes
API routes have now been nested under the pages/ directory to better emphasis the shared routing of file based routing for pages, as the URLs all end up in the same "namspace" anyway
# before
src/
api/
search.js
# after
src/
pages/
api/
search.js
Important
Don't forget to update any references to any relative ESM imports in your API routes.
Known Issues
Diff
v0.29.4
Overview
This patch release fixes a bug with bundling of script tags of type application/json
from breaking the build.
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.4
Breaking Changes
None
Known Issues
Diff
$ git diff v0.29.3 v0.29.4 --stat | grep -v "www"
lerna.json | 2 +-
packages/cli/package.json | 2 +-
packages/cli/src/lib/resource-utils.js | 3 ++-
.../build.default.workspace-javascript-css.spec.js | 9 ++++++++-
.../build.default.workspace-javascript-css/src/pages/index.html | 4 ++++
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 | 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 ++--
20 files changed, 46 insertions(+), 34 deletions(-)