[Snyk] Upgrade p5 from 2.0.3 to 2.1.1#56
Open
NaveenDA wants to merge 1 commit into
Open
Conversation
Snyk has created this PR to upgrade p5 from 2.0.3 to 2.1.1. See this package in npm: p5 See this project in Snyk: https://app.snyk.io/org/naveenda/project/304cb0f0-f33c-4cd0-b6d0-bee73f70d410?utm_source=github&utm_medium=referral&page=upgrade-pr
There was a problem hiding this comment.
Pull request overview
This PR upgrades the p5.js library from version 2.0.3 to 2.1.1, a minor version update that includes new features like TypeScript integration, p5.strands branching/looping, Addon Events API, and color contrast checking functionality. The upgrade was initiated by Snyk and is 13 versions ahead of the current version.
- Updated p5 dependency from ^2.0.3 to ^2.1.1
- Updated transitive dependency requirements (including zod from ^3.23.8 to ^3.25.51)
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Updates p5 version from ^2.0.3 to ^2.1.1 |
| package-lock.json | Updates resolved p5 version to 2.1.1, updates transitive dependencies including zod to 3.25.67, and reflects changes to peer dependency markers for several unrelated packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade p5 from 2.0.3 to 2.1.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 13 versions ahead of your current version.
The recommended version was released 25 days ago.
Release notes
Package name: p5
Use this link to load the library: https://cdn.jsdelivr.net/npm/p5@2.1.1/lib/p5.js
What's new in p5.js 2.1 🌱
if/elseand loopingforfunction setup() {
createCanvas(100, 100);
bgColor = color(0);
fg1Color = color(100);
fg2Color = color(220);
}
function draw(){
background(bgColor);
}
oneColor.contrast(anotherColor)checks the contrast between two colors. This method returns a boolean value to indicate if the two color has enough contrast.truemeans that the colors has enough contrast to be used as background color and body text color.falsemeans there is not enough contrast.A second argument can be passed to the method,
options, which defines the algorithm to be used. The algorithms currently supported are WCAG 2.1 ('WCAG21') or APCA ('APCA'). The default is WCAG 2.1. If a value of'all'is passed to theoptionsargument, an object containing more details is returned. The details object will include the calculated contrast value of the colors and different passing criteria.function setup() {
createCanvas(100, 100);
bgColor = color(0);
fgColor = color(200);
contrast = bgColor.contrast(fgColor, 'all');
}
function draw(){
background(bgColor);
}
For more details about color contrast, you can check out this page from color.js, and the WebAIM color contrast checker.
Changes since 2.0 🎊
codein the refrence. by @ perminder-17 in #7902hue(),saturation(),brightness()andlightness()by @ limzykenneth in #8062