Skip to content

[TASK] first attempt to reduce NPM need bu using the Core nightly bui… - #246

Open
ramonfincken wants to merge 1 commit into
WordPress:masterfrom
ramonfincken:reduce-need-for-npm
Open

ramonfincken wants to merge 1 commit into
WordPress:masterfrom
ramonfincken:reduce-need-for-npm

Conversation

@ramonfincken

Copy link
Copy Markdown

first attempt to reduce NPM need bu using the Core nightly build as source of truth for CSS and JS files

…ld as source of truth for CSS and JS files
@desrosj

desrosj commented Jun 11, 2025

Copy link
Copy Markdown
Member

Perhaps I'm missing something. But why can't the test runner just use the https://github.com/WordPress/WordPress repository instead of the nightly?

Using the nightly loses a level of fidelity because you can't control which commit is tested. But the WordPress SVN repository is updated by the build server after every commit to wordpress-develop and mirrored here to GitHub.

The only challenge there is a search would need to be performed to find the corresponding changeset.

@ramonfincken

Copy link
Copy Markdown
Author

The point is to copy the nightly JS/CSs files, not the PHP ones.

But hold on, i will try using another path.

@ramonfincken

Copy link
Copy Markdown
Author

Thanks for your talk at WordCamp by the way :)

@ekamran

ekamran commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Picking this up, thanks Ramon for the first attempt.

The original direction here still makes sense, but the implementation needs a different shape now. #246 still runs npm install, patches core's Gruntfile, downloads the nightly, and copies built assets into build/. With #351, the runner's test build path is moving to build:dev, so the files the tests need live under src/ instead.

The alternative desrosj suggested looks viable: the WordPress/WordPress built mirror carries the exact develop revision in each commit message (Built from https://develop.svn.wordpress.org/trunk@NNNNN). I verified the current trunk revision maps to the mirror about a minute later, and the mirror contains the built files that wordpress-develop ignores under src/, including wp-includes/js/dist, jQuery, block CSS/JS, wp-admin/js, and CSS dist files.

Plan: a new opt-in WPT_ASSETS_SOURCE=mirror path that finds the mirror commit for the checked-out develop revision, downloads that built tree, copies the ignored asset paths into src/, runs sentinel checks, and falls back to the normal npm build:dev path if the mirror commit or required files are not available. Default behavior stays npm.

I will push the new approach to this PR, with a same-revision comparison of the npm route and the mirror route.

@github-actions

github-actions Bot commented Oct 7, 2026

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @ramon@creativepulses.nl.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Unlinked contributors: ramon@creativepulses.nl.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: ramonfincken <ramon-fincken@git.wordpress.org>
Co-authored-by: ekamran <ekamran@git.wordpress.org>

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

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

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

4 participants