Skip to content

Conversation

@joshblack
Copy link
Member

@joshblack joshblack commented Dec 12, 2023

This is a follow-up to: #3920

This PR updates some of the options in our TypeScript config to use newer options or fields that help making developing in TypeScript more consistent and predictable. The changes either come from the PR mentioned above or the corresponding article: https://www.totaltypescript.com/tsconfig-cheat-sheet

Changelog

New

Changed

  • Update the following options in tsconfig.json
    • Set module to ESNext
    • Set moduleResolution to Bundler
    • Set isolatedModules to true
    • Set moduleDetection to 'force'
  • Use tsx instead of ts-node to compile our TypeScript scripts as ts-node was difficult to work with when using these new settings
  • Update color2k in order to use their new type declarations

Removed

Rollout strategy

  • None; if selected, include a brief description as to why

These are only related to our internal config and should not impact the output of Primer React

Testing & Reviewing

  • Review the config settings changed to make sure they're appropriate
  • Review the code changes to make sure they are in line with how we want to be writing TypeScript 👀

@joshblack joshblack requested review from a team and pksjce December 12, 2023 19:07
@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2023

⚠️ No Changeset found

Latest commit: c79e2c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@joshblack joshblack added the skip changeset This change does not need a changelog label Dec 12, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 104.75 KB (+0.01% 🔺)
dist/browser.umd.js 105.3 KB (+0.02% 🔺)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants