JavaScript Chat Summary – November 13th

Below is a summary of the discussion from this week’s JavaScript chat (agendaSlack transcript).

Have a topic for discussion for the next meeting? Leave a suggested edit on next week’s agenda.

Npm packages publishing workflow

Discussion: When working on the WordPress 5.0 release cycle we noticed that our workflow for publishing packages to npm isn’t ideal. Using Lerna helps a lot but it doesn’t solve all issues. We should work towards improving the workflow and address the items listed in this GitHub issue.

Considerations:

  • At the moment we defer to Lerna performing version increments for all packages. We only express our intent for the change inside of the corresponding changelog files when working on PRs. The biggest downside of this approach is that we need to scan all existing changelog files during publishing and re-apply manually the proper version bump for each package. It would be a nice improvement if we could update both changelog and package.json with a new version at the same time when PR gets merged. Lerna could use that and skip the step to ask what version should be applied.
  • In the past, we had publish failures caused by 2FA timeout where we had more packages to publish than it could be handled in 30 seconds. There is an open issue where improved 2FA Support is discussed. However, 2FA isn’t the only thing that could go wrong in the process so it would be nice to see publish re-tries in the flow and prompts for new OTP token when the current one expires.
  • It would be nice to see is a way to verify if published packages are healthy. As mentioned above, we had 2 cases where 2FA timeout caused some issues which led to having broken package.json files on npm. It might happen again, so we should be at least able to detect it immediately and take proper actions.

Action Items:

  • Share what we discussed today with Lerna team in RFC: Improving lerna publish issue in their repository and figure out how we can work together to improve our workflow.
  • Continue discussion next week.

i18n Core Merge Update

We have an update on the i18n front in that support for JavaScript localization has been committed for WordPress 5.0 and support added to translate.wordpress.org. You can read more at the following links:

The major functionality has launched and only bug fixes are likely to remain. It’s safe to say that plugin and theme support can be added after 5.0 release.

Open discussion

Question: @nerrad asked whether the @wordpress package namespace on npm is intended for only things used specifically by the WordPress team or project. Are they also things we think contribute to the larger JavaScript ecosystem that might use WordPress?

@aduth shared that we should be spending resources most toward things which are actively used in the development of WordPress. If someone wants to contribute enhancements or fixes, that on its own would be fine. We also don’t need to pull projects no longer used.

It was also discussed that the deprecation feature offered by npm should work well for cases when we know up front that a package won’t be maintained anymore.