Skip to content

Commit

Permalink
release v0.20.0 blog post (#825)
Browse files Browse the repository at this point in the history
* draft a v0.20.0 blog post

* grammar tweaks
  • Loading branch information
thescientist13 committed Dec 18, 2021
1 parent 00696bd commit 86ebee0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions www/pages/blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ template: blog

# News and Announcements

- [Release: v0.20.0](/blog/release/v0-20-0/) 📝
- [Release: v0.19.0](/blog/release/v0-19-0/) 📝
- [Release: v0.18.0](/blog/release/v0-18-0/) 📝
- [Release: v0.15.0](/blog/release/v0-15-0/) 📝
34 changes: 34 additions & 0 deletions www/pages/blog/release/v0-20-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
label: 'blog'
title: v0.20.0 Release
template: blog
---

# Greenwood v0.20.0

## What's New

<img src="/assets/nodejs.png" style="display: block; width: 30%; margin: 0 auto;"/>

So although there are no new features in [this release](https://github.com/ProjectEvergreen/greenwood/releases/tag/v0.20.0), there is quite a major change incoming... we are proud and excited to announce Greenwood has moved towards [**ECMAScript Modules (ESM)**](https://nodejs.org/api/esm.html)!!! 📦 🥳


## Why We Did It
It was a lot of work, and although ESM is not quite in a perfect place yet within the ecosystem (CJS <> ESM interop and the "dual module hazard"), there were two key motivations for us that made us want to make the jump now, especially before htting a 1.0 release.

### Browser Parity ♻️
As Greenwood expands past just static sites with our upcoming plans to add support for [**Server Side Rendering**](https://github.com/ProjectEvergreen/greenwood/issues/708) and [**External Data Sources**](https://github.com/ProjectEvergreen/greenwood/issues/21), user's would be able to start writing server side code within their project's workspace. This meant there would be NodeJS and browser code right next to each other, and as part of Greenwood's [mission to make writing sites for the web easier](/about/), taking advantage of a consolidated module system makes perfect sense for developer experience. We want the NodeJS code you have to write to be as close to the code that you write for the browser, and so for Greenwood, this means supporting ESM in NodeJS.

### Server Rendering 🚀
Additionally, libraries like [**Lit**](https://lit.dev/) that provide [support for SSR](https://github.com/lit/lit/tree/main/packages/labs/ssr) are themselves written in ESM and unfortutely because interop between CJS and ESM doesn't go both ways, we would not be able to support these projects if we stayed on CJS. For this reason, the first party code by users will need to be written in ESM. we also expect more packages to become ESM first / only, and so this helps us get ahead of an eventual migration anyway.


## Upgrade Path
As would be expected, there are some breaking changes and new conventions that come along with adopting ESM. If you are coming from an existing Greenwood application, you can follow the _Upgrade Notes_ in the release notes and check out some of our links in the _Learn More_ section below. 👇


## Learn More
Below are some great resources to learn a bit more a CJS and ESM in NodeJS that are worth reading. In addition, the Greenwood website and all documentation examples have been written in ESM.

- [Pure ESM Package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)
- [https://github.com/johnloy/esm-commonjs-interop-manual](https://github.com/johnloy/esm-commonjs-interop-manual)

0 comments on commit 86ebee0

Please sign in to comment.