Publishing WordPress packages to npm

The WordPress project has started publishing its packages to npm – the largest package repository – over 4 years ago. As of today, there is a collection of nearly 80 actively maintained packages under the WordPress organization.

The latest updates to the process were documented on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ in PR#29028. I wanted to share some details about the latest addition to the process and summarize the overall strategy for publishing.

Development releases

WordPress trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. can be closed or in “feature-freeze” mode. Usually, this happens during the WordPress ongoing release cycle (like now with WordPress 5.7), which takes several weeks. It means that packages don’t get any enhancements and new features during the ongoing WordPress major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope. process.

Another type of release was introduced to address the limitation mentioned earlier and unblock ongoing development for projects that depend on WordPress packages. It takes advantage of package distribution tags that make it possible to consume the future version of the codebase according to npm guidelines:

By default, the latest tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) is used by npm to identify the current version of a package, and npm install <pkg> (without any @<version> or @<tag> specifier) installs the latest tag. Typically, projects only use the latest tag for stable release versions, and use other tags for unstable versions such as prereleases.

npm documentation

In this case, the next distribution tag is used for publishing the devolvement version of the packages. Developers can install a package in their project by typing:

npm install @wordpress/components@next

The release process is fully automated via a single command:

 ./bin/plugin/cli.js npm-next

The person in charge of the release needs only to run the script, and everything else happens through interactions in the terminal.

Behind the scenes, the wp/next branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". is synchronized with the latest release branch (release/*) created for the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. To avoid collisions in the versioning of packages, we always include the newest commit’s sha, for example, @wordpress/block-editor@5.2.10-next.645224df70.0.

Release types and their schedule

It’s worth clarifying that the Gutenberg plugin consumes the local copy of WordPress packages because they are developed inside the same repository. It’s a completely different story for the WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. that consumes the packages from the npm registry.

The following list includes the full list of supported release types for publishing WordPress packages to npm:

  • Synchronizing WordPress Trunk (latest dist tag) – when there is no “feature-freeze” mode in WordPress Core, then publishing happens every two weeks based on the new stable version of the Gutenberg plugin. Otherwise, only bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes get manually included and published to npm before every next betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. and RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). version of the following WordPress release. There is a script that automates the process: ./bin/commander.js npm-latest.
  • Minor WordPress Releases (patch dist tag) – only when bug fixes or security releases need to be backported into WordPress Core. It’s a manual process that requires cherry-picking individual commits and ends with executing npm run publish:patch command.
  • Development Releases (next dist tag) – at least every two weeks when the RC version for the Gutenberg plugin is released. There is a script that automates the process: ./bin/commander.js npm-next.

There is also an option to perform Standalone Package Releases at will. It should be reserved only for critical bug fixes or security releases that must be published to npm outside of a regular WordPress release cycle. It’s a manual process with many steps required that ends with executing npm run publish:prod command.


We are constantly seeking feedback to improve the processes around npm packages. The workflow for the WordPress core works quite well, and we didn’t discover any major issues when backporting the changes applied to the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor in the Gutenberg plugin. Let us know what else we can do to improve the experience for projects that consume WordPress packages from npm.

#core-js, #javascript, #npm-packages

JavaScript Core Chat Summary: 21 July 2020

This is a recap of the JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. chat held on Tuesday, July 21, 2020, 14:00 UTC. You can read the full meeting discussion here in Slack.

If you have an item you would like to discuss at the next meeting, please add it to the next agenda document.

@psykro hosted

There were no agenda items for today, so @psykro moved straight to the open floor

Open floor:

  • @itsjonq was having some problems with his laptop crashing when using a Docker local development environment.
    • If anyone has any other suggestions, please let him know.

@psykro closed meeting after 30 minutes.

Next chat is on Tuesday, July 28, 2020, 14:00 UTC in the #core-js channel on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.. If you have anything you would like to discuss, please add it to the agenda document.

Weekly JavaScript news round up

WordPress 5.5 related

A number of dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. and posts related to what’s coming in WordPress 5.5 (for the BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Editor and JavaScript were shared this week). I thought it’d be handy to group them all together in this week’s issue of the roundup.

  • The Dashicons library receives it’s final update in WordPress 5.5. If you’re using it in any products, it will still be available in WordPress, however its good switch to using the @wordpress/icons package instead (if suitable).
  • The register theme feature API is landed. This allows custom theme features to be registered and exposed on the theme features support REST endpoint.
  • In WordPress 5.5, images will be lazy loaded by default. Some great work here in preventing layout shifting.
  • An overview of all that is landing in WordPress 5.5 around Block Patterns.
  • New and modified REST API endpoints landing in WP 5.5. Includes notes on: wp/v2/block-types, wp/v2/plugins, wp/v2/block-directory, wp/v2/media/10/edit, block renderer route changes, and majority of theme headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. information is now being returned on the wp/v2/themes endpoint.
  • There are also some REST API Paramater and JSON Schema changes coming. In particular, the work that has gone into improving the options for more defined schema’s is sweet.
  • createInterpolateElement is landed. This is particularly useful for translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. string interpolation in ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. components.

dotOrg news

#javascript, #meeting-notes

JavaScript Core Chat Summary: 14 July 2020

This is a recap of the JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. chat held on Tuesday, July 14, 2020, 14:00 UTC. You can read the full meeting discussion here in Slack

@adamsilverstein hosted

There were no agenda items for today, so @adamsilverstein moved straight to the open floor

Open floor:

  • @adamsilverstein plans to publish the JavaScript Core team blogblog (versus network, site) post this week
    • You an view this post on ASBlocks here
    • The plan is for this to be “evergreen” and linked from our meeting record and slackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. room
  • @mkaz shared in issue he’s been trying to figure out here. Any feedback or suggestions to resolve it are welcome.

@adamsilverstein closed meeting after 25 minutes.

Next chat is on Wednesday, July 21, 2020, 14:00 UTC in the #core-js channel on Slack.

Weekly JavaScript news round up

#javascript, #meeting-notes

JavaScript Core Chat Summary: 07 July 2020

This is a recap of the JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. chat held on Tuesday, July 7, 2020, 14:00 UTC. You can read the full meeting discussion here in Slack

@nerrad hosted

There were no agenda items for today, so @nerrad moved straight to the open floor

Open floor:

  • @youknowriad has opened a PR for this ticket to bring the CSSCSS Cascading Style Sheets. variables support on GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ into Core, and is hoping it can be ready for 5.6. Feedback and testing is welcome
  • @gziolo mention that thanks to @aduth we now have the ability to lazily import a module, installing it automatically if missing.
    • @adamsilverstein discussed the implications of lazy importing a module and how that might change the structure of code in GB and elsewhere
    • @gziolo pointed out that this is meant for non-production code with many dependencies installed, so the idea was to install them on demand
  • @gziolo is exploring a way to provide a local path when you want to import something that isn’t a package name
  • @gziolo is also continuing work started on 3rd party templates for Create BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. based on prior work from @fabiankaegy and has run into an interesting challenge. Suggestions and feedback welcome.
  • @mkaz raised an issue he’s run into twice now  related to the static analysis failing on a commit.
    • this can be viewed on a live PR here
    • a lengthy discussion following with @nerrad summarizing the problem as follows: Gutenberg has a GithHub action check that ensures the package-lock.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. file is not changed when npm install is run. Since the Gutenberg project is set to require the latest version of npm, whenever a new version of npm is released, that could cause this check to fail and the fix is to commit a regenerated package-lock.json using the latest npm version.
    • Possible workarounds for this were discussed, including documenting the problem in the “testing docs” by @youknowriaad and raising the issue in the npm bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. tracker by @gziolo
    • @aduth also referenced an earlier discussion on the topic

As there were no other open floor items, @nerrad closed meeting 5 minutes to the hour

Next chat is on Wednesday, July 14, 2020, 14:00 UTC in the #core-js channel on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..

Weekly JavaScript news round up

#javascript, #meeting-notes

JS Core Summary: 23rd June 2020

@adamsilverstein hosted

today’s agenda: “Consider whether we should start using ESLint rules to recommend vanilla JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. functions”

@zebulan brought up that there are a lot of Lodash functions that provide little benefit over native JS equivalents, and in a lot of cases, the only difference is how nullish values are handled.
@adamsilverstein provided for reference: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore After discussing concerns, it was concluded that most issues were about style rather than dependencies. Action Item: Zeb will open an issue on the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ repository proposing specific linting or prettier rules.

open floor:

@gziolo shared a PR, to make registration of component related filters to work nearly the same as you would do it now for SlotFill. https://github.com/WordPress/gutenberg/pull/22185  https://wordpress.slack.com/archives/C5UNMSU4R/p1592921896081600

Adam & Grzegorz discuss the details of the PR, which includes the differences of filters and SlotFill. Side questions bring up the Gutenberg equivalent to php WordPress HooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. (actions & filters). It was, also, mentioned how we could we register blocks as components.

@zebulan brought up the topic: Thoughts on usingTypeScript in WP?
It was mentioned that there is currently support for it. The way we’re doing that now is through JSDoc comments, which the TypeScript compiler parses.
eg https://github.com/WordPress/gutenberg/pull/18942
#18942 Build: Output package type declarations
 https://github.com/WordPress/gutenberg/issues/18838
There is also recorded stream where @aduth shows how to add types to WordPress package.

Announcement:
@gziolo shared: https://github.com/WordPress/gutenberg/pull/22714 – we should see Gutenberg Mobile merged into Gutenberg repository later this week, which received a warm round of positive responses.
@gziolo continued, there are 3 new WordPress packages – private for now (no publishing to npm). The best part is that it will be possible to run the demo apps (iOSiOS The operating system used on iPhones and iPads. and Android) inside Gutenberg.

@adamsilverstein closed meeting on the hour

#core-js, #javascript, #meeting-notes

JavaScript Chat Summary: Tuesday, June 16, 2020

Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. chat (agendaSlack transcript).

Have a topic for discussion for the next meeting? Leave a comment with a suggestion.

Administrative: Meeting Hosts

Darren Ethier @nerrad and Jonathan Bossenger @psykro have volunteered to help lead the JavaScript chat each week. Responsibilities as outlined by @adamsilverstein are: show up, announce meeting, guide conversation through agenda, end on time, create next week’s agenda. Adam will create a shared calendar and continue to coordinate the meetings.

The team is still need of volunteers to help take and publish weekly meeting notes. If you have some availability and want to get more involved in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. JavaScript, please leave a note in the comments. Your help is much appreciated.

Team Documentation

The team discussed the various pieces of documentation about our work and where they live. We have a GitHub project with links, a Google drive folder with Agendas and a document for note takers.

Everyone agreed it would be great to have a single public page somewhere (ideally on make.wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org//core) that described our work and linked to all the relevant places.

Since JavaScript is a focus and not a component, the current site structure doesn’t have a clear home for the team. Adam offered to bring up the topic at the core dev chat to ask about the best location for a new page.

NPM Package Publishing

Greg (@gziolo) summarized the current state of WordPress npm packages:

  • We maintain over 70 packages on npm: https://www.npmjs.com/org/wordpress.
  • We develop all the packages on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ repository: https://github.com/WordPress/gutenberg/tree/master/packages.
  • The same packages are used in WordPress core and that’s why we have the release timeline tied to both release schedule of Gutenberg pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and WordPress core.
  • We try to release to npm every 2 weeks, at the time when the new Gutenberg plugin is published.

Discussion continued around who should get access to publishing npm packages and the best way to time the releases.

Currently only a small number of people have access to publishing packages. One suggestion was to expand this to include all core committers and Gutenberg core team members who are already highly trusted contributors. No final decision was made.

Andrés (@nosolosw) published the packages for the first time recently and offered this feedback:

  • It’s fairly automated, although there are parts that could see some improvement.
  • Challenging when you try to backportbackport A port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. to master the package’s changelogs from the release branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". wp/trunk . In this case, there may be conflicts.

One way to address this would be:

  • At time of plugin RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).: we also release the RC version of packages (this could be done by using the next dist-tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) or something along those lines)
  • At time of plugin release: we release the stable version of packages.

@nosolosw offered to look at what other projects do to come up with the best approach.

#core-js, #javascript, #meeting-notes

JavaScript Chat Summary: Tuesday, June 2, 2020

Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. chat (agendaSlack transcript).

Have a topic for discussion for the next meeting? Leave a comment with a suggestion.

Administrative: Meeting Hosts

@aduth announced he would not be able to host the next chats. @gziolo stepped in and volunteered to host some of the next chats.

Participants in the chat gave thanks to @aduth for hosting many meetings during the last years. Thank you @aduth!!

@gziolo mentions he is going to take three months leave starting in July. That makes us in need of volunteers to run the chats and take notes.

If you have some availability and want to help the next coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-js chats happen, please leave a note in the comments. Your help is much appreciated.

Prettier 2.0 upgrade

Prettier 2.0 major version upgrade has now been merged https://github.com/WordPress/gutenberg/pull/22610.

The upgrade brings some code changes:

// Before
var doFoo = function() {}
// After
var doFoo = function () {}

There are not many of these cases in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ because we mostly use arrow functions. But @aduth referred we need at a minimum that the few code samples in the coding standards be updated to the new syntax.

@adamsilverstein volunteered to work on this task. Thank you!

ESLint 7 upgrade

@ocean90 has opened a pull request seeking to do a similar major version upgrade for ESLint, to v7.1.0. https://github.com/WordPress/gutenberg/pull/22771.

@gziolo said the just needs testing, code-wise it looks great.

@ocean90 said we just need a final decision on how to proceed with the new warnings/errors and volunteered to fix as many errors as possible after the merge.

End-to-end test lifecycle utilities

We are facing a problem because the paired test lifecycle “set up” and “tear down” can be error-prone if managed manually as described in the issue https://github.com/WordPress/gutenberg/issues/22804. The issue contains a proposal to create abstraction utilities that manage the full lifecycle.

Participants in the chat talked a little bit about the proposal. It was generally received well, and the conversations will continue on the issue. If you have some thoughts on the subject, feel free to check the issue and leave a comment or help implement the concept.

#core-js, #javascript, #meeting-notes

JavaScript Chat Summary: May 26, 2020

Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. chat (agenda, Slack Transcript).

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

(Note: There were no suggested agenda items for this week’s meeting, so an open floor was held instead)

Open Floor

Several updates were shared:

@adamsilverstein notes that WordCamp Europe Contributor Day is fast approaching, and shared a link to a post which describes “What To Know” for experienced contributors and team facilitators. Adam will volunteer to help lead a JavaScript team, and would appreciate any others to express interest in helping to lead or participate.

#core-js, #javascript

JavaScript Chat Summary: May 19, 2020

Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. chat (agenda, Slack Transcript).

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

Dependency Group Comment Blocks

(Slack conversation)

Pull request: https://github.com/WordPress/gutenberg/pull/21730

Proposal:

Let’s use /* multi-line comment instead of /** JSDoc.

Rationale:

/** risks being interpreted as the JSDoc documentation of the first import in a grouping, especially in the case of variable assignment. Some examples: TypeScript (editor integrations, etc), @wordpress/docgen automatic documentation.

Action items:

  • @aduth will double check to see if the ESLint rule at least allows for this convention. If not, update to allow.
  • Documented examples could be updated to promote this pattern.
  • At some point, do a mass conversion of comments.
  • Finally, maybe consider to forbid the /** convention.

CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. project on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/

(Slack conversation)

There is now a project board for Core JS tasks. It should include primarily framework tasks, the sorts of items we might want to discuss in the weekly meetings.

We also briefly discussed a few distinct tasks which could use some attention. New issues to work on:

Final check needed for:

  • Review CSSCSS Cascading Style Sheets. support for build – PR #21730.

News Roundup

This roundup contains a few links for GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ and JavaScript related news curated (and commented on) by @nerrad.

  • Justin Tadlock offers some thoughts on where Gutenberg went wrong: Theme developer edition.
  • I somehow missed a gem of a post written by Matías back in April. He does a good job of providing some context to answering some of the questions out there regarding the direction of WordPress theming in the future. Read his post, Thoughts on Themes.
  • Gutenberg 8.1 has shipped. Highlights are: a new pattern search to make it easier to insert the desired pattern, a new testimonials pattern, and a new blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. action for copying single or multiple blocks. You can read the WPTavern’s take on this release here.
  • The recent Gutenberg Phase 2 Friday Design Update #53 shares some interesting updates on the Query block, the Block Navigator, Welcome guide, the “What’s new Modal”, and Template parts.
  • Speaking of templates, Envato launches a template kits marketplace for Elementor.
  • NPM 7 is getting some interesting new features including workspaces.
  • Next.js 9.4 is shipped. Notably, the inclusion of the new ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. Fast Refresh feature.
  • ESLint v7.0.0 was released.
  • Tom MacWright’s article Second-guessing the modern web has been making the rounds. There’s a counterpoint article by Rich Harris, “In defense of the modern web” (h/t @mkaz). I’m still processing both articles, there’s much I agree with in both, but much I’m shaking my head with too. As with everything in the development world, it’s hard to present a compelling argument while avoiding painting too broad a brush. As with all things coding, a good argument often includes some variation of “it depends”. My oversimplified hot take/response from/to all this? Frameworks are still evolving. By the way, is it just me, or does it seem like posts/controversies like this seem to surface every two years or so?
  • React recoil is public. Facebook’s take on a state management library for React. It’s intriguing to me, the tight integration with React itself suggests some really nice performance improvements over most other state management packages. In particular, how it handles asynchronous behavior seems really straightforward (and nicely integrates <Suspense> for handling pending state – which isn’t required).

#core-js, #javascript

JavaScript Chat Summary: May 12, 2020

Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. chat (agenda, Slack Transcript).

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

@wordpress/scripts CSSCSS Cascading Style Sheets. support

(Slack conversation)

Pull request: https://github.com/WordPress/gutenberg/pull/21730

Discussion topics:

  • There was surprise that this wasn’t already supported.
  • The pull request will add a new package @wordpress/postcss-plugins-preset, which would provide a default set of WordPress’ preferred PostCSS plugins configuration.
    • Similar to @wordpress/babel-preset-default@wordpress/jest-preset-default@wordpress/prettier-config
  • Question: Was there any consideration for CSS-in-JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors.? (styled-components)
    • Needs clarity on desired end-goal
    • Still valuable for pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party authors regardless, if it’s easy enough feature to simply not use if they’d prefer to use an alternative approach.
  • Advantages: Dead code elimination and bundle splitting for CSS
  • It was suggested to request feedback from the CSS group

Action items:

@wordpress/create-block third-party templates

(Slack conversation)

Pull request: https://github.com/WordPress/gutenberg/pull/22175

Discussion topics:

  • It could help to support flexibility of third-party templates, in order to alleviate pressure for first-party templates to support all features.
  • Concern: Is it the purpose of the tool to support third-party templates? If so, why not use something like Yeoman?
    • Counter-point: It’s not unlike Yeoman, but utilizes NPM’s own npm init <initializer> functionality. They’re comparable, but it’s not necessarily a criticism.
    • Suggestion: Focus less on third-party template flexibility, more on first-party “knowledge of blocks”, including additional commands and customizations.
    • Point of contention: Should customizability come from third-party templates, or first-party support?

Action items:

BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Identifier

(Slack conversation)

Topic: Should the block editor provide a stable way to connect server and client data? For example, associate posts to blocks using post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress..

Additional context can be found in the agenda document.

Discussion topics:

  • Question: Is this suggesting some value saved in post meta which corresponds to individual blocks of a post?
    • Answer: Yes
  • Question: What’s the use-case? Is there an example?
    • Answer: It’s needed for the image block.
  • It might be something which is fine to have an ad hoc implementation specific to one or a few blocks, if it’s not a common requirement.
  • Concern: Duplicating data can risk desync (see related post)

Action items:

  • Create an issue which describes the use-case and requirements (Owned by: @sageshilling)

Open Floor

Miscellaneous Updates

@aduth shared a number of updates from the past week:

The coding guidelines documentations we discussed last week are most all merged:
https://github.com/WordPress/gutenberg/pull/22090
https://github.com/WordPress/gutenberg/pull/22030
https://github.com/WordPress/gutenberg/pull/22029

That last one prompted the idea for a new ESLint rule, currently in progress, but potentially blocked on the fact that there appears to be legitimate cases for wanting the “gotcha” behavior.
https://github.com/WordPress/gutenberg/pull/22041

Now pinning .nvmrc to specify Node version in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/, to avoid issues when running on older branches:
https://github.com/WordPress/gutenberg/pull/22236
(As far as I know, CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. does the same)

ESLint 7.0 was released the other day, which notably includes an interesting feature to allow comments within the inline configuration tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.)
https://eslint.org/blog/2020/02/whats-coming-in-eslint-7.0.0
Example:
/* eslint-disable no-new -- this class has a side-effect in the constructor. */
Very relevant for this previously-suggested rule proposal: https://github.com/WordPress/gutenberg/pull/16795

@sageshilling shared features announced in Next.js 9.4.

News Roundup

This roundup contains a few links for Gutenberg and JavaScript related news curated (and commented on) by @nerrad.

#core-js, #javascript