JavaScript Chat Summary: March 31, 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). Many thanks to @cbravobernal for compiling these notes!

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

TypeScript Types from Packages

(Slack conversation)

WordPress packages will now ship with their own first-party TypeScript types!

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

The types (declaration files) will be published with the packages, so folks using the packages via npm will have access without doing anything else.

The type generation is built into the existing package build/publish flow, so things should remain largely the same from the perspective of 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/ development (hopefully with better information in our IDEs!)

npm run build:package-types is the script that generates them.

Awesome job! Kudos!

Action:

JSX support for wordpress/scripts

(Slack conversation)

Link to the issue

PR proposing it for formatting command.

There is a small discussion about seeing if it is necessary to discourage or not jsx files. Noticing that changes to accept jsx are quite simple. And are even accepted in some code already. There are different opinions, so the team prefer to continue the discussion.

Action: 

Open Floor

Updating Jest Error

@gziolo had issues upgrading Jest with the last version. See pull request. Asks if is it a good reason to refactor them to use the ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. Testing Library?

@aduth comments that is Enzyme related issue. That expects a DOM to exist.

Airbnb transferred the project to the community. Seems that everyone is going to switch away from Enzyme.

Also they comment that Jest, Babel and Puppeteer should be upgraded, and would be nice to have some strategya arount all that. The project seems to have too many dependencies.

Action:

  • No action defined.

News Roundup

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

#core-js, #javascript