Skip to content

p5.VERSION reports "2.3.1" in the 2.3.3 release build (build-time version replacement regression) #9202

Description

@haukun

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.3.3

Web browser and version

Any (issue is in the published build artifact, browser-independent)

Operating system

Any

Steps to reproduce this

Description

p5.VERSION in the published 2.3.3 build reports 2.3.1 instead of 2.3.3.

The source keeps the version as a build-time placeholder:

// src/core/constants.js
export const VERSION = 'VERSION_WILL_BE_REPLACED_BY_BUILD';

So the value is injected during the build/release step. In the 2.3.3
artifact this placeholder was replaced with 2.3.1 rather than 2.3.3,
which points to a regression in the release version-replacement step
(2.3.2 was correct).

Steps:

  1. Load https://cdn.jsdelivr.net/npm/p5@2.3.3/lib/p5.min.js

  2. Run console.log(p5.VERSION) in the browser console

  3. Observed: 2.3.1 — Expected: 2.3.3

Evidence from the published CDN artifacts

Extracting the 2.x.x version string literal embedded in each minified build:

  • 2.3.3 lib/p5.min.js → embedded version literal is 2.3.1 (wrong)
  • 2.3.2 lib/p5.min.js → embedded version literal is 2.3.2 (correct)

package.json version is correct in both (2.3.2 / 2.3.3), so only the
in-bundle VERSION constant is affected.

Snippet:

function setup() {
  createCanvas(100, 100);
  console.log(p5.VERSION); // logs "2.3.1" on p5.js 2.3.3
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions