Skip to content

changes for v1.1.0 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const SIDEBAR_DEFAULT = [
{
items: [{ text: 'API Reference', link: '/api' }],
},
{
items: [{ text: 'Changelog', link: '/changelog' }],
},
{
items: [{ text: 'Enterprise', link: '/enterprise' }],
},
Expand Down Expand Up @@ -88,6 +91,7 @@ export default defineConfig({
'/guides/': SIDEBAR_DEFAULT,
'/tutorial/': SIDEBAR_DEFAULT,
'/api': SIDEBAR_DEFAULT,
'/changelog': SIDEBAR_DEFAULT,
'/enterprise': SIDEBAR_DEFAULT,
'/contact': SIDEBAR_DEFAULT,
'/community-projects': SIDEBAR_DEFAULT,
Expand Down
19 changes: 19 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: &title Changelog
description: &description Changelog for the WebContainers API library
head:
- ['meta', {property: 'og:title', content: *title}]
- ['meta', {name: 'twitter:title', content: *title}]
- ['meta', {name: 'twitter:description', content: *description}]

---

# Changelog

## 1.1.0

* The value of the [`Cross-Origin-Embedder-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy) header
can be changed now with `BootOptions#coep`.
* The name of the working directory can be specified through `BootOptions#workdirName`.
* The default value of the `PATH` environment variable is exposed in `WebContainer#path`.
* The full path of the working directory is exposed in `WebContainer#workdir`.
Comment on lines +16 to +18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ These 3 items are minor stuff that I don't find particularly relevant for our tutorials.

10 changes: 9 additions & 1 deletion docs/guides/configuring-headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ head:

This guide provides an overview on how to configure COOP/COEP headers, including hosting platform configuration.

WebContainers require that your page, even in development, be served with these two headers:
WebContainers require that your page, even in development, is served with these two headers:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, thanks!


```yaml
Cross-Origin-Embedder-Policy: require-corp
Expand All @@ -21,6 +21,14 @@ Cross-Origin-Opener-Policy: same-origin

These headers are needed because WebContainer _requires_ SharedArrayBuffer, which, in turn, requires your website to be cross-origin isolated.

Some browsers support a different mode for cross-origin isolation: [`credentialless`](https://caniuse.com/mdn-http_headers_cross-origin-embedder-policy_credentialless). If you wish to serve your content in this way, set your headers instead to:
```yaml
Cross-Origin-Embedder-Policy: credentialless
Cross-Origin-Opener-Policy: same-origin
```
and make sure to boot your WebContainer specifying [`coep: 'credentialless'`](/api).


::: info Deep Dive: cross-origin isolation
Here are a few helpful resources if you'd like to learn more about these topics:

Expand Down