Skip to content

Theme: Update precomputed color ramps script for Node.js v20.10 compatibility - #72971

Merged
aduth merged 1 commit into
trunkfrom
fix/theme-default-ramps-node-v20-10-compat
Nov 4, 2025
Merged

aduth merged 1 commit into
trunkfrom
fix/theme-default-ramps-node-v20-10-compat

Conversation

@aduth

@aduth aduth commented Nov 4, 2025

Copy link
Copy Markdown
Member

What?

Updates the script added in #72847 to ensure compatibility with Node.js v20.10.0, which is the current minimum version supported and current version of Node.js used on WordPress build servers.

Follow-up to #72847

Related Slack discussion: https://wordpress.slack.com/archives/C02QB2JS7/p1762245589360919

Why?

So that developers running versions of Node.js which are claimed to be supported don't encounter errors when running these scripts.

How?

Replaces import.meta.dirname with an equivalent implementation that is compatible with Node.js v20.10.0.

import.meta.dirname was added in Node.js v20.11.0.

Testing Instructions

Verify the script runs successfully on Node.js v20.10.0 and produces no errors:

nvm install 20.10.0
nvm use 20.10.0
npm run --workspace @wordpress/theme build

@aduth
aduth requested review from hbhalodia and jsnajdr November 4, 2025 14:22
@github-actions

github-actions Bot commented Nov 4, 2025 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>
Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@aduth aduth added [Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling [Package] Theme /packages/theme and removed [Type] Bug An existing feature does not function as intended labels Nov 4, 2025

@jsnajdr jsnajdr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :shipit:

@hbhalodia hbhalodia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aduth
aduth merged commit b1caf52 into trunk Nov 4, 2025
43 of 48 checks passed
@aduth
aduth deleted the fix/theme-default-ramps-node-v20-10-compat branch November 4, 2025 15:51
@github-actions github-actions Bot added this to the Gutenberg 22.1 milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Theme /packages/theme [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants