Skip to content

Commit 3807c0a

Browse files
committed
docs: add v5.0.0 blog entry, cleanup metafiles
1 parent dd1e516 commit 3807c0a

7 files changed

+168
-15020
lines changed

.travis.yml

-41
This file was deleted.

Dockerfile

-10
This file was deleted.

README.md

+6-17
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,30 @@
11
# Website
22

3-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
3+
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.
44

55
### Installation
66

77
```
8-
$ yarn
8+
$ npm install
99
```
1010

1111
### Local Development
1212

1313
```
14-
$ yarn start
14+
$ npm start
1515
```
1616

1717
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1818

1919
### Build
2020

2121
```
22-
$ yarn build
22+
$ npm run build
2323
```
2424

2525
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2626

2727
### Deployment
2828

29-
Using SSH:
30-
31-
```
32-
$ USE_SSH=true yarn deploy
33-
```
34-
35-
Not using SSH:
36-
37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
40-
41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
29+
The site is automatically deployed to GitHub pages whenever changes are made to the source branch.
30+
Create a new branch with your changes and submit a PR against `source`. Once merged, your changes will be visible at https://podium-lib.io/

blog/2023-12-01-version-5.0.0.md

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
---
2+
slug: version-5.0.0
3+
title: Version 5.0.0
4+
authors: richard
5+
tags: [podium, version, release]
6+
---
7+
8+
The Podium team is pleased to annouce and make available the release of version 5.0.0 of Podium. 🥳 🎉
9+
10+
This is a breaking change from the v4.x line but since most of the changes are either under the hood or the removal of deprecations, upgrading, except in a couple notible exceptions,
11+
should be pretty simple for most users and may require no changes at all.
12+
13+
<!--truncate-->
14+
15+
### Breaking changes
16+
17+
There are a couple breaking changes in this release that will need to be addressed if they affect you.
18+
19+
#### 1. The Podium codebase has been converted to ESM and no longer supports common JS.
20+
21+
While you can still mix and match podlets and layouts on Podium version 4 and 5, you will need to convert your codebase to ESM before upgrading to Podium version 5 podlets and layouts.
22+
See [this post](https://tsmx.net/convert-existing-nodejs-project-from-commonjs-to-esm/) for a guide if you need one.
23+
24+
#### 2. An instance of HttpIncoming must now be passed as the first argument to the Podium client
25+
26+
n.b. If you are currently not seeing any deprecation warnings in your Podium version 4 apps, this won't affect you.
27+
28+
The `.fetch()` and `.stream()` methods. Usage of the fetch/stream methods without passing in HttpIncoming was deprecated a long while ago.
29+
30+
In Podium version 4, the following was acceptable but will now throw with version 5.
31+
```js
32+
const header = layout.client.register({...});
33+
34+
app.get("/", (req, res) => {
35+
await header.fetch();
36+
});
37+
```
38+
39+
In Podium version 5, you need to ensure you pass in an HttpIncoming object like so:
40+
```js
41+
const header = layout.client.register({...});
42+
43+
app.get("/", (req, res) => {
44+
const incoming = res.locals.podium;
45+
await header.fetch(incoming);
46+
});
47+
```
48+
49+
#### 3. Removal of deprecated Podium v3 compatibility in the manifest file and codebase.
50+
51+
n.b. If you are currently not seeing any deprecation warnings in your Podium version 4 apps, this won't affect you.
52+
53+
The `assets` key and its sub keys `js` and `css` have been removed from the manifest file.
54+
55+
Previously through all of Podium version 4, we maintained both the `assets` key and `js` and `css` keys for backwards compatibility with Podium version 3.
56+
The value for `assets.js` would always be the same as for `js` and the value for `assets.css` would always be the same as `css`.
57+
58+
Like so:
59+
60+
```json
61+
{
62+
"assets": { "js": [], "css": [] },
63+
"js": [],
64+
"css": []
65+
}
66+
```
67+
68+
With Podium version 5, we've dropped the `assets` key (and therefore compatibility with Podium version 3) so that the manifest file will now look like:
69+
70+
```json
71+
{
72+
"js": [],
73+
"css": []
74+
}
75+
```
76+
77+
#### 4. Support for Node v10 and lower has been intentionally dropped and we are now actively only testing against Node v16 and higher.
78+
79+
Releases are now made against Node v20 and we actively run test suites against Node version 16 and up. Versions 12 and 14 should work but we make no guarantees.
80+
81+
#### 5. .js and .css methods on the Podium layout and Podium podlet modules, which are used to set assets, no longer return a value
82+
83+
n.b. If you are currently not seeing any deprecation warnings in your Podium version 4 apps, this won't affect you.
84+
85+
The podlet and layout `.js` and `.css` methods used to return a value. This was deprecated a long ways back and has now been removed.
86+
87+
```js
88+
const result = layout.js()
89+
// result is null
90+
const result = podlet.js()
91+
// result is null
92+
```
93+
94+
#### 6. Previously deprecated Podium client `change` and `dispose` events removed.
95+
96+
These client registry events, emitted from the Podium client, were previously deprecated and have now been removed.
97+
You most likely aren't, but check your codebase to ensure you aren't relying on these events.
98+
99+
### Other notable changes
100+
101+
None of the following changes require any action when upgrading.
102+
103+
#### 1. Under the hood, the Podium client request module has been replaced.
104+
105+
The [Request](https://www.npmjs.com/package/request) module is deprecated and we've opted to replace it with [Undici](https://www.npmjs.com/package/undici), a fast modern alternative.
106+
107+
#### 2. The podlet manifest file now supports an array of proxy endpoints instead of just an object.
108+
109+
Previously, proxy entries in the podlet manifest were defined as an object and looked like this:
110+
111+
```json
112+
{
113+
"proxy": {
114+
"one": "/target/path/one",
115+
"two": "/target/path/two",
116+
}
117+
}
118+
```
119+
120+
This has been changed to support an array syntax in which multiple proxies definitions can be added
121+
122+
```json
123+
{
124+
"proxy": [
125+
{ "name": "one": "target": "/target/path/one" },
126+
{ "name": "two": "target": "/target/path/two" },
127+
]
128+
}
129+
```
130+
131+
The object syntax has been preserved for backwards compatibility.
132+
133+
#### 3. Added prettier printing of Podium client responses when using console.log
134+
135+
Log output used to look like:
136+
137+
```js
138+
PodiumClientResponse {
139+
[Symbol(podium:client:response:redirect)]: '',
140+
[Symbol(podium:client:response:content)]: '',
141+
[Symbol(podium:client:response:headers)]: {},
142+
[Symbol(podium:client:response:css)]: [],
143+
[Symbol(podium:client:response:js)]: []
144+
}
145+
```
146+
147+
But now looks like:
148+
149+
```js
150+
{
151+
redirect: '',
152+
content: '',
153+
headers: {},
154+
css: [],
155+
js: []
156+
}
157+
```

blog/authors.yml

+5-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
1-
endi:
2-
name: Endilie Yacop Sucipto
3-
title: Maintainer of Docusaurus
4-
url: https://github.com/endiliey
5-
image_url: https://github.com/endiliey.png
6-
7-
yangshun:
8-
name: Yangshun Tay
9-
title: Front End Engineer @ Facebook
10-
url: https://github.com/yangshun
11-
image_url: https://github.com/yangshun.png
12-
13-
slorber:
14-
name: Sébastien Lorber
15-
title: Docusaurus maintainer
16-
url: https://sebastienlorber.com
17-
image_url: https://github.com/slorber.png
18-
191
trygve:
202
name: Trygve Lie
213
title: Lead maintainer
224
url: https://github.com/trygve-lie/
235
image_url: https://github.com/trygve-lie.png
246

7+
richard:
8+
name: Richard Walker
9+
title: Maintainer
10+
url: https://github.com/digitalsadhu/
11+
image_url: https://github.com/digitalsadhu.png

docker-compose.yml

-18
This file was deleted.

0 commit comments

Comments
 (0)