Skip to content

Commit 8adb527

Browse files
authored
Merge branch '2.0' into 1229-2.0
2 parents c366d89 + 4ff9332 commit 8adb527

File tree

26 files changed

+1067
-49
lines changed

26 files changed

+1067
-49
lines changed

.github/workflows/beta_deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
env:
2727
NODE_OPTIONS: "--max_old_space_size=4096"
2828
uses: withastro/action@v2
29+
with:
30+
node-version: 22
2931

3032
- name: Deploy to Netlify
3133
uses: nwtgck/actions-netlify@v3.0

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
steps:
1313
- name: Checkout your repository using git
1414
uses: actions/checkout@v4
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22'
1519
- name: Install dependencies
1620
run: npm ci
1721
- name: Test
@@ -21,6 +25,10 @@ jobs:
2125
steps:
2226
- name: Checkout your repository using git
2327
uses: actions/checkout@v4
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '22'
2432
- name: Install dependencies
2533
run: npm ci
2634
- name: Lint
@@ -30,6 +38,10 @@ jobs:
3038
steps:
3139
- name: Checkout your repository using git
3240
uses: actions/checkout@v4
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '22'
3345
- name: Install dependencies
3446
run: npm ci
3547
- name: Typecheck
@@ -39,6 +51,10 @@ jobs:
3951
steps:
4052
- name: Checkout your repository using git
4153
uses: actions/checkout@v4
54+
- name: Setup Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '22'
4258
- name: Install dependencies
4359
run: npm ci
4460
- name: Build

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Force npm to fail (not just warn) if the node.js version in "engines" isn't met
2+
engine-strict=true

docs/technical_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Setup
66

7-
1. Make sure you have [node and npm installed on your machine](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs).
7+
1. Make sure you have [node (at least version 22) and npm installed on your machine](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs).
88
2. Clone this repo by typing git clone https://github.com/processing/p5.js-website/ in your terminal. (You can also use [GitHub Desktop](https://desktop.github.com/)).
99
3. Then install the project's dependencies with:
1010

package-lock.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"custom:dev": "tsx ./src/scripts/branchTest.ts",
2020
"custom:cleanup": "tsx ./src/scripts/resetBranchTest.ts"
2121
},
22+
"engines": {
23+
"node": ">=22.0.0"
24+
},
2225
"dependencies": {
2326
"@astrojs/check": "^0.9.6",
2427
"@astrojs/mdx": "^4.3.13",

src/components/Banner/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ const { Content } = await entry.render();
55
const { link, title } = entry.data;
66
---
77

8-
<div class="banner bg-accent-color text-accent-type-color" style={{ display: 'none' }} data-title={title}>
8+
<footer class="banner bg-accent-color text-accent-type-color" style={{ display: 'none' }} data-title={title} aria-label="sticky">
99
<a class="banner-content" href={link} target="_blank">
1010
<Content />
1111
</a>
1212
<button id="hideBanner" aria-label="Hide banner"><Icon kind="close" /></button>
13-
</div>
13+
</footer>
1414

1515
<script>
1616
const banner = document.querySelector('.banner');

src/components/CodeEmbed/index.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useState, useEffect, useRef } from "preact/hooks";
22
import { useLiveRegion } from '../hooks/useLiveRegion';
33
import CodeMirror, { EditorView } from "@uiw/react-codemirror";
44
import { javascript } from "@codemirror/lang-javascript";
5-
import { cdnLibraryUrl, cdnSoundUrl } from "@/src/globals/globals";
5+
import { cdnLibraryUrl, cdnSoundUrl, cdnWebGPUUrl } from "@/src/globals/globals";
66

77
import { CodeFrame } from "./frame";
88
import { CopyCodeButton } from "../CopyCodeButton";
@@ -39,7 +39,7 @@ export const CodeEmbed = (props) => {
3939
);
4040

4141
let { previewWidth, previewHeight } = props;
42-
const canvasMatch = /createCanvas\(\s*(\d+),\s*(\d+)\s*(?:,\s*(?:\w+\.)?(?:P2D|WEBGL)\s*)?\)/m.exec(initialCode);
42+
const canvasMatch = /createCanvas\(\s*(\d+),\s*(\d+)\s*(?:,\s*(?:\w+\.)?(?:P2D|WEBGL|WEBGPU)\s*)?\)/m.exec(initialCode);
4343
if (canvasMatch) {
4444
previewWidth = previewWidth || parseFloat(canvasMatch[1]);
4545
previewHeight = previewHeight || parseFloat(canvasMatch[2]);
@@ -99,6 +99,7 @@ export const CodeEmbed = (props) => {
9999
lazyLoad={props.lazyLoad}
100100
scripts={[
101101
...(props.includeSound ? [cdnSoundUrl] : []),
102+
...(props.includeWebGPU ? [cdnWebGPUUrl] : []),
102103
...(props.scripts ?? []),
103104
]}
104105
/>

src/components/Dropdown/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ export const Dropdown = ({
152152
</div>
153153
<button
154154
onClick={() => handleOptionClick(option)}
155-
ref={el => {
156-
optionRefs.current[index] = el as HTMLButtonElement
155+
ref={(el) => {
156+
optionRefs.current[index] = el as HTMLButtonElement;
157157
}}
158158
onBlur={handleBlur}
159159
>

src/components/PageHeader/HomePage.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const { config } = Astro.props;
4141
im.linkTarget ?
4242
<a href={im.linkTarget} class={`max-lg:flex-1 max-lg:min-h-0 hero-image-container ${i > 0 ? "hidden" : ""}`}>
4343
<Image
44-
containerClass={"relative"}
44+
containerClass={"relative h-full"}
4545
class={"hero-image"}
4646
aspectRatio="none"
4747
src={im.image}
@@ -80,4 +80,4 @@ const { config } = Astro.props;
8080
}
8181
}
8282
});
83-
</script>
83+
</script>

0 commit comments

Comments
 (0)