jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Add TypeScript support for blocks

Open manzoorwanijk opened this issue 3 years ago • 4 comments

Although we added TypeScript support in monorepo in #23522, but it seems like blocks are built using separate webpack config.

Related #16375

Changes proposed in this Pull Request:

  • Update webpack config for extensions/blocks to allow usage of TypeScript
  • Create utils module in js-packages/webpack-config to use for webpack specific utility functions

Jetpack product discussion

#16375

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Boot up the PR
  • Run jetpack build plugins/jetpack
  • Confirm that all the blocks are built successfully

manzoorwanijk avatar Apr 27 '22 05:04 manzoorwanijk

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • :white_check_mark: Include a description of your PR changes.
  • :white_check_mark: All commits were linted before commit.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: Specify whether this PR includes any changes to data or privacy.
  • :white_check_mark: Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation :robot:


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Then, add the "[Status] Needs Team review" label and ask someone from your team review the code. Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: May 3, 2022.
  • Scheduled code freeze: April 25, 2022.

github-actions[bot] avatar Apr 27 '22 05:04 github-actions[bot]

  • On one hand, it doesn't hurt to add support now, this way we'll be ready for TypeScript later.

Yeah, that's what I think. It doesn't add any TypeScript, yet. Since we have all the other areas ready for TypeScript, it doesn't hurt to prepare blocks for the same. We can start using TS in blocks whenever we want.

manzoorwanijk avatar Apr 27 '22 07:04 manzoorwanijk

We can start using TS in blocks whenever we want.

I'd rather we didn't, to be clear. I would suggest we hold off using TS in blocks until we decide that we should use TS, and only TS. This would make for a more consistent experience for both contributors and reviewers. Having different people doing different things will be messy for everyone involved.

jeherve avatar Apr 27 '22 07:04 jeherve

I'd rather we didn't, to be clear. I would suggest we hold off using TS in blocks until we decide that we should use TS, and only TS. This would make for a more consistent experience for both contributors and reviewers. Having different people doing different things will be messy for everyone involved.

Alright, sounds like a good plan. Thanks.

manzoorwanijk avatar Apr 27 '22 07:04 manzoorwanijk