Skip to content

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

Merged
bgrgicak merged 4 commits into
trunkfrom
fix/npm-readmes
Feb 27, 2025
Merged

Ensure all NPM packages have readmes included in their builds#2156
bgrgicak merged 4 commits into
trunkfrom
fix/npm-readmes

Conversation

@bgrgicak

@bgrgicak bgrgicak commented Feb 25, 2025

Copy link
Copy Markdown
Collaborator

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
Comment thread packages/playground/components/project.json Outdated
@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

@adamziel adamziel left a comment

Copy link
Copy Markdown
Collaborator

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
@bgrgicak
bgrgicak deleted the fix/npm-readmes branch February 27, 2025 08:47
adamziel pushed a commit that referenced this pull request May 30, 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
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

2 participants