Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storybook): add useDefineForClassFields false #289

Merged
merged 2 commits into from
Dec 29, 2021

Conversation

daneah
Copy link
Member

@daneah daneah commented Dec 28, 2021

This change: (check at least one)

  • Adds a new feature
  • Fixes a bug
  • Improves maintainability
  • Improves documentation
  • Is a release activity

Is this a breaking change? (check one)

  • Yes
  • No

Is the: (complete all)

  • Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
  • Test suite(s) passing?
  • Code coverage maximal?
  • Changeset added?

What does this change address?

Resolves #287

As of TypeScript 4.3.1+, one must specify useDefineForClassFields: false explicitly when targeting ESNext, because TC39 now uses the same syntax and these would conflict otherwise.

How does this change work?

Updating this configuration allows the Storybook configuration to continue working.

Additional context

Pharos itself never broke because it is currently targeting es2019. Chromatic didn't catch this because it targets firefox65 because Chromatic has a really crusty old Firefox. Womp.

As of TypeScript 4.3.1+, [one must specify `useDefineForClassFields:
false`
explicitly](evanw/esbuild#1354 (comment))
when targeting ESNext, because [TC39 now uses the same
syntax](https://www.typescriptlang.org/tsconfig#useDefineForClassFields)
and these would conflict otherwise.

Updating this configuration allows the Storybook configuration to
continue working. Pharos itself never broke because it is currently
targeting `es2019`. Chromatic didn't catch this because it targets
`firefox65` because Chromatic has a really crusty old Firefox. Womp.
@changeset-bot
Copy link

changeset-bot bot commented Dec 28, 2021

⚠️ No Changeset found

Latest commit: 9ac3233

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 28, 2021

size-limit report 📦

Path Size
lib/index.js 47.72 KB (0%)

@daneah
Copy link
Member Author

daneah commented Dec 28, 2021

I wonder: Should we pre-emptively add useDefineForClassFields to packages/pharos/tsconfig.json so that if/when it starts targeting es2020+ we don't run into this there as well?

Copy link
Collaborator

@Niznikr Niznikr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in favor of explicitly setting useDefineForClassFields in the package's tsconfig.

@daneah daneah merged commit 2423d94 into develop Dec 29, 2021
@daneah daneah deleted the fix/use-define-for-class-fields branch December 29, 2021 04:07
sirrah-tam pushed a commit to sirrah-tam/pharos that referenced this pull request Dec 1, 2023
* fix(storybook): add useDefineForClassFields false

As of TypeScript 4.3.1+, [one must specify `useDefineForClassFields:
false`
explicitly](evanw/esbuild#1354 (comment))
when targeting ESNext, because [TC39 now uses the same
syntax](https://www.typescriptlang.org/tsconfig#useDefineForClassFields)
and these would conflict otherwise.

Updating this configuration allows the Storybook configuration to
continue working. Pharos itself never broke because it is currently
targeting `es2019`. Chromatic didn't catch this because it targets
`firefox65` because Chromatic has a really crusty old Firefox. Womp.

* fix(pharos): add useDefineForClassFields to main package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken storybook
3 participants