Skip to content

Commit c5453e4

Browse files
committed
Merge branch 'dev-2.0' into sketch-id
2 parents d76f26a + e83e9d4 commit c5453e4

674 files changed

Lines changed: 54672 additions & 30143 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.all-contributorsrc

Lines changed: 629 additions & 9 deletions
Large diffs are not rendered by default.

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/1-p5.js-2.0-bug-report.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
name: 📃 p5.js 2.0 Beta Bug Report
2-
description: This template is for submitting a bug report for bugs found in the p5.js 2.0 beta releases.
3-
title: "[p5.js 2.0 Beta Bug Report]: "
4-
labels: [p5.js 2.0]
1+
name: 📃 p5.js 2.0+ Bug Report
2+
description: This template is for submitting a bug report for bugs found in p5v2!
3+
title: "[p5.js 2.0+ Bug Report]: "
4+
labels: [p5.js 2.0+]
55
body:
66
- type: markdown
77
attributes:
88
value: |
99
### What falls under this category?
10-
There has been many changes to p5.js in 2.0 that is currently released as beta versions. If you suspect there may be a bug, please follow the below steps before opening a bug report using this template:
11-
12-
1. There are some differences in behavior between p5.js 1.x and 2.0 beta, please check the changelog and/or [proposal list](https://github.com/orgs/processing/projects/21) to see if the difference in behavior is intended. If in doubt, feel free to open the issue anyway and ask.
13-
2. Breaking changes may still happen between beta versions, please make sure to include the full beta version number and use the latest beta release where possible.
14-
3. We are not considering any new proposal for p5.js 2.0 at this stage and if you would like to request new features, please use the "New feature request" issue template.
15-
4. The documentation and examples may be outdated at this stage while we work on updating them.
10+
There has been many changes to p5.js in 2.0! You can try it in p5.js Editor by updating the version in "Settings," and reference is available [on the beta version of the site](https://beta.p5js.org/). If you suspect there may be a bug, please follow the below steps before opening a bug report using this template:
11+
1. There are some differences in behavior between p5.js 1.x and 2.0 beta, please check the changelog and/or [2.0 status board](https://github.com/orgs/processing/projects/21) to see if the difference in behavior is intended. If in doubt, feel free to open the issue anyway and ask.
12+
2. New proposals for future p5.js 2.x minor releases may be considered! Please use the "New feature request" issue template, or check the [2.0 status board](https://github.com/orgs/processing/projects/21) is there is already discussion abotu this proposal.
13+
3. Reports of errors or potential improvements in documentation and examples is expecially helpful, since many things have been updated from 1.x to 2.0!
1614
- type: checkboxes
1715
id: sub-area
1816
attributes:
@@ -31,6 +29,8 @@ body:
3129
- label: Typography
3230
- label: Utilities
3331
- label: WebGL
32+
- label: WebGPU
33+
- label: p5.strands
3434
- label: Build process
3535
- label: Unit testing
3636
- label: Internationalization
@@ -78,4 +78,4 @@ body:
7878
7979
```"
8080
validations:
81-
required: true
81+
required: true

.github/config.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@
44

55
# Comment to be posted to on first time issues
66
newIssueWelcomeComment: >
7-
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
8-
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
7+
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms.
8+
9+
For guidance on contributing, check out our [contributing guidelines](https://github.com/processing/p5.js/blob/main/CONTRIBUTING.md) and other [resources for contributors](https://p5js.org/contribute/).
10+
11+
💬 If you have questions or need support, feel free to join the [Processing Foundation Forum](https://discourse.processing.org/) or visit our [Community page](https://p5js.org/community/).
912
13+
📜 Please also review our [Code of Conduct](https://p5js.org/code-of-conduct/) to understand our community standards.
14+
15+
Thank You!
16+
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
1017
# Comment to be posted to on PRs from first time contributors in your repository
1118
newPRWelcomeComment: >
12-
🎉 Thanks for opening this pull request! Please check out our [contributing guidelines](https://github.com/processing/p5.js/blob/main/CONTRIBUTING.md) if you haven't already. And be sure to add yourself to the [list of contributors on the readme page](https://github.com/processing/p5.js#contributors)!
19+
🎉 Thanks for opening this pull request! For guidance on contributing, check out our [contributor guidelines](https://p5js.org/contribute/contributor_guidelines/) and other [resources for contributors](https://p5js.org/contribute)!
20+
21+
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
22+
23+
🌸 Once your PR is merged, be sure to [add yourself](https://github.com/processing/p5.js/issues/2309) to the [list of contributors on the readme page](https://github.com/processing/p5.js#contributors) !
24+
25+
26+
Thank You!
1327
1428
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
1529

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Close Linked Issues on PR Merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- dev-2.0
8+
9+
jobs:
10+
close_issues:
11+
if: github.event.pull_request.merged == true
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Close linked issues on non-default branches
15+
uses: processing/branch-pr-close-issue@v1
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
branch: dev-2.0

.github/workflows/ci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v1
17-
- name: Use Node.js 20.x
17+
- name: Use Node.js 22.x
1818
uses: actions/setup-node@v1
1919
with:
20-
node-version: 20.x
20+
node-version: 22.x
2121
- name: Get node modules
2222
run: npm ci
2323
env:

.github/workflows/ci-test.yml

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,72 @@ on:
1111

1212
jobs:
1313
test:
14-
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
browser: chrome
19+
# - os: windows-latest
20+
# browser: chrome
21+
22+
runs-on: ${{ matrix.os }}
1523

1624
steps:
17-
- uses: actions/checkout@v1
18-
- name: Use Node.js 20.x
19-
uses: actions/setup-node@v1
25+
- uses: actions/checkout@v4
26+
27+
- name: Use Node.js 22.x
28+
uses: actions/setup-node@v4
2029
with:
21-
node-version: 20.x
30+
node-version: 22.x
31+
32+
- name: Verify Chrome (Ubuntu)
33+
if: matrix.os == 'ubuntu-latest' && matrix.browser == 'chrome'
34+
run: |
35+
google-chrome --version
36+
37+
- name: Verify Chrome (Windows)
38+
if: matrix.os == 'windows-latest' && matrix.browser == 'chrome'
39+
run: |
40+
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --version
41+
2242
- name: Get node modules
2343
run: npm ci
2444
env:
2545
CI: true
26-
- name: build and test
27-
run: npm test
46+
47+
- name: Build and test (Ubuntu)
48+
id: test
49+
if: matrix.os == 'ubuntu-latest'
50+
run: npm test -- --project=unit-tests
51+
continue-on-error: true
52+
env:
53+
CI: true
54+
55+
- name: Generate Visual Test Report
56+
if: always()
57+
run: node visual-report.js
58+
env:
59+
CI: true
60+
- name: Upload Visual Test Report
61+
if: always()
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: visual-test-report
65+
path: test/unit/visual/visual-report.html
66+
retention-days: 14
67+
- name: generate TypeScript types
68+
run: npm run generate-types
69+
env:
70+
CI: true
71+
- name: test TypeScript types
72+
run: npm run test:types
2873
env:
2974
CI: true
3075
- name: report test coverage
76+
if: steps.test.outcome == 'success'
3177
run: bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json
3278
env:
3379
CI: true
80+
- name: fail job if tests failed
81+
if: steps.test.outcome != 'success'
82+
run: exit 1
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish approved pull requests and latest commit to pkg.pr.new
2+
on:
3+
pull_request:
4+
branches:
5+
- 'dev-2.0'
6+
push:
7+
branches:
8+
- 'dev-2.0'
9+
tags:
10+
- '!**'
11+
12+
permissions:
13+
pull-requests: write
14+
issues: write
15+
16+
jobs:
17+
publish:
18+
if: github.repository == 'processing/p5.js'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build library
31+
run: npm run build
32+
33+
- name: Publish library
34+
run: npx pkg-pr-new publish --no-template --json output.json --comment=off
35+
36+
- name: Include PR info in output file
37+
uses: actions/github-script@v8
38+
env:
39+
PR_NUMBER: ${{ github.event.pull_request.number }}
40+
with:
41+
script: |
42+
const fs = require('fs');
43+
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
44+
output.workflow = {
45+
pull_request: process.env.PR_NUMBER ? {
46+
number: process.env.PR_NUMBER
47+
} : null
48+
};
49+
fs.writeFileSync('output.json', JSON.stringify(output));
50+
51+
- name: Upload output data
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: output.zip
55+
path: output.json
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Generate Contributors PNG
2+
3+
on:
4+
push:
5+
paths:
6+
- '.all-contributorsrc'
7+
8+
jobs:
9+
build:
10+
if: github.ref == 'refs/heads/main' && github.repository == 'processing/p5.js'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- name: Install dependencies
21+
run: npm install canvas
22+
23+
- name: Run contributors-png generator
24+
run: node utils/contributors-png.js
25+
26+
- name: Reset all changes except contributors.png
27+
run: |
28+
git restore --staged .
29+
git add contributors.png
30+
git checkout -- .
31+
32+
- name: Create Pull Request
33+
uses: peter-evans/create-pull-request@v7
34+
with:
35+
commit-message: "Update contributors.png from .all-contributorsrc"
36+
branch: update-contributors-png
37+
title: "chore: update contributors.png from .all-contributorsrc"
38+
body: "This PR updates the contributors.png to reflect changes in .all-contributorsrc"
39+
add-paths: contributors.png
40+
token: ${{ secrets.ACCESS_TOKEN }}

0 commit comments

Comments
 (0)