Yesterday I was moving the old repositories to clean up the organization on GitHub and start with the new repositories. I have also created a monorepo and I have been investigating a bit how to execute scripts with Lerna just after launching a new version.
What I’ve seen is that people use the postversion script in the package.json, as explained in npm-scripts, to perform that task, and not something Lerna-specific.
I’ve been working with Pablo setting our goals for the first two months so didn’t have time yesterday either. I hope today is the day to finish at least 1-2 of those posts.
I’m working right now in setup a monorepo for the wp-org plugins, using Lerna. I was a bit stuck trying to update the plugin’s version in the .php file after bumping them in the package.json but I think I have an idea to solve it.
Yesterday I was looking at both WordPress REST APIs (wordpress.org and wordpress.com) and I found something funny with the last one.
If you are using wp.com REST API it seems that you can’t make a GET /sites/$site/media call without authentication, which is bad.
Also, when you retrieve posts using a GET /sites/$site/posts call, the attachment attribute will contain up to 20 attachments, no more, as explained below.
parameter
type
description
attachment
Object
Hash of post attachments (keyed by attachment ID). Returns the most recent 20 attachments. Use the /sites/$site/media endpoint to query the attachments beyond the default of 20 that are returned here.
I’m going to investigate if there’s something else that can be done, but at the moment it seems that the only way to get all media items in a post (if it has more than 20) is to use authentication.
Yesterday I was working in a communication with @SantosGuillamot and @Reyes and today I’ll try to merge the npm run dev script and help @David and @orballo with the Settings API, the Source API, Overmind and TypeScript.
I want to take a look at the way we produce bundles to see if we can make one client bundle per mode and per site as outlined here: How to resolve dynamic imports in Webpack