Skip to content

Remove postinstall scripts.#11275

Open
desrosj wants to merge 1 commit intoWordPress:trunkfrom
desrosj:fix/postinstall-incompatibilities
Open

Remove postinstall scripts.#11275
desrosj wants to merge 1 commit intoWordPress:trunkfrom
desrosj:fix/postinstall-incompatibilities

Conversation

@desrosj
Copy link
Member

@desrosj desrosj commented Mar 17, 2026

It seems that postinstall can cause issues with certain setups, notably nodevenv.

Trac ticket: Core-64874.

Use of AI Tools

Claude was used to investigate the problem using the original error log provided.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

It seems that `postinstall` can cause issues with certain setups, notably `nodevenv`.
@desrosj desrosj self-assigned this Mar 17, 2026
@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@desrosj desrosj marked this pull request as ready for review March 17, 2026 15:28
@desrosj desrosj requested a review from johnbillion March 17, 2026 15:28
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj, johnbillion.

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

@johnbillion
Copy link
Member

To answer the first question that popped into my head, what's the impact of this change?

Answer: The verifyGutenbergVersion() function no longer runs post install. This function verifies that the Gutenberg package was installed to its correct location with the correct SHA hash.

How necessary is that check? Can it be moved to the build script?

@desrosj
Copy link
Member Author

desrosj commented Mar 17, 2026

How necessary is that check? Can it be moved to the build script?

@johnbillion Essentially, that's what this PR does. Because gutenberg:verify is the first task listed in the build task, it just kicks the can down the road a bit.

After r62021, verifyGutenbergVersion() has the following responsibilities currently:

  • Confirm the presence of the gutenberg directory.
  • Confirm that the gutenberg.sha value in the package.json file matches the contents of the .gutenberg-hash file in the gutenberg directory.
  • Download the gutenberg.sha asset if either of these are false.

It should run prior to any build step to confirm the correct assets are present locally.

@desrosj desrosj requested a review from aaronjorbin March 18, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants