Skip to content

p5.js CDN @latest jumps to version 2.0 rather than 1.0, website + editor don't #7783

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

Closed
ffd8 opened this issue Apr 28, 2025 · 2 comments
Closed

Comments

@ffd8
Copy link
Contributor

ffd8 commented Apr 28, 2025

Topic

I just realized that P5LIVE was temporarily broken, because I had the online version's access of p5.min.js gathered using the latest version on jsdelivr, ie:

https://cdn.jsdelivr.net/npm/p5@latest/lib/p5.min.js

That is actually loading 2.0.1 – which technically IS the latest version, however by default the p5.js website and editor, are still suggesting and loading the latest version of 1.0 (actually 1.11.5). I believe 1.0 will remain official until Aug 2026? Therefore I'm curious, if there's a more custom way to have that CDN split between the latest of two version?? I don't know if there's a way to link to the latest@1.0 version latest@2.0, or something like that? Just a small issue to figure out during this moment between two versions.

@limzykenneth
Copy link
Member

Yes, there is indeed a way to get the latest 1.x: https://cdn.jsdelivr.net/npm/p5@1/lib/p5.min.js

JSDelivr supports any valid semver on the version string (the part after @). Or if you want specifically a tag, https://cdn.jsdelivr.net/npm/p5@r1/lib/p5.min.js is also valid which we will publish all future 1.x version updates to the r1 tag on NPM and in turn jsDelivr.

@ffd8
Copy link
Contributor Author

ffd8 commented Apr 28, 2025

@limzykenneth – aha, that's perfect!
Will use this for implementing latest v1 and v2 as default options.

@ffd8 ffd8 closed this as completed Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants