Skip to content
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

Ensure all NPM packages have readmes included in their builds #2156

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

bgrgicak
Copy link
Collaborator

@bgrgicak bgrgicak commented Feb 25, 2025

Motivation for the change, related issues

This PR ensures all public package builds include a README.md file,
because some of our NPM packages don't include a readme on the npmjs.com package page.

The readmes exist in project folders, but before this PR they were not added to the built version of the package.

Implementation details

Add build:README step to these public packages:

  • @php-wasm/cli
  • @php-wasm/progress
  • @php-wasm/scopes
  • @php-wasm/web-service-worker
  • @wp-playground/blueprints
  • @wp-playground/cli
  • @wp-playground/client
  • @wp-playground/components
  • @wp-playground/remote
  • @wp-playground/sync

Testing Instructions (or ideally a Blueprint)

  • Remove the dist folder if it exists
  • Run npm run build
  • Check that all PHP-wasm builds have a README.md
find dist/packages/php-wasm -mindepth 1 -maxdepth 1 -type d '!' -exec test -e '{}/README.md' \; -print
  • The above command should only return dist/packages/php-wasm/out-tsc-phpwasm-node which isn't a package
  • Check that all Playground builds have a README.md
find dist/packages/playground -mindepth 1 -maxdepth 1 -type d '!' -exec test -e '{}/README.md' \; -print
  • The above command should only return dist/packages/playground/website which isn't a published package

@bgrgicak bgrgicak self-assigned this Feb 25, 2025
@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Type] Documentation Improvements or additions to documentation [Type] Developer Experience [Type] Developer Documentation Documentation for developers labels Feb 26, 2025
@bgrgicak bgrgicak linked an issue Feb 26, 2025 that may be closed by this pull request
@bgrgicak bgrgicak marked this pull request as ready for review February 26, 2025 08:30
@bgrgicak bgrgicak requested a review from a team February 26, 2025 08:31
Copy link
Collaborator

@adamziel adamziel left a comment

Choose a reason for hiding this comment

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

Nicely done!

@bgrgicak bgrgicak merged commit b9a1267 into trunk Feb 27, 2025
10 checks passed
@bgrgicak bgrgicak deleted the fix/npm-readmes branch February 27, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Developer Documentation Documentation for developers [Type] Developer Experience [Type] Documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Some NPM packages do not have a README
2 participants