Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/wp-now/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ Some similarities between `wp-env` and `wp-now` to be aware of:
- deployments are not possible with neither `wp-env`, nor `wp-now`;
- possible to switch easily the PHP version

## Publishing to npm

The `wp-now` package is part of a larger monorepo, sharing its space with other sibiling packages. To publish the `wp-now` package to npm, you must first understand the automated release process facilitated by lerna. This process includes automatically incrementing the version number, creating a new tag, and publishing all modified packages to npm simultaneously. Notably, all published packages share the same version number.

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.

Are any steps required here?

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.

Nope, Lerna does that automatically. The readme could be clearer about that though, @sejas


Each package identifies a distinct organization in its `package.json` file. To publish the `wp-now` package, you need access to the npm organizations `@wp-playground`, `@php-wasm`, and `@wp-now`.

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.

Who should publish releases?

@adamziel adamziel May 15, 2023 •

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.

This is related to governance, I'll kick off that project soon.


To initiate the publishing process for the all the modified packages, execute the following commands:

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.

Should we make it possible to only publish a single package?

@adamziel adamziel May 15, 2023 •

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.

Lerna detects changes and only publishes the ones that changed. It is not possible to publish just a single package when it depends on other packages from the monorepo. You can always use npm publish for that if you feel confident and also bump the versions, add tags etc manually.

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.


```bash
npm login # this is required only once and it will store the credentials in ~/.npmrc file.
npm run release
```

## Contributing

We welcome contributions from the community! Please refer to the main [README.md](../../README.md) file for instructions on how to contribute to this project.