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

Common tsconfigs #2947

Merged
merged 6 commits into from
Jan 10, 2024
Merged

Common tsconfigs #2947

merged 6 commits into from
Jan 10, 2024

Conversation

berekuk
Copy link
Collaborator

@berekuk berekuk commented Jan 9, 2024

New configs are stored in packages/configs (@quri/configs internal package).

There are two configs, one for most packages (tsconfig.base.json) and another for Next.js apps (tsconfig.nextjs.json).

Packages still have to define rootDir and outDir, because of microsoft/TypeScript#29172.

This PR also fixes #2684 by storing tsbuildinfo file in a different location.

Other changes:

  • removed preserveConstEnums setting (I think we didn't use them)
  • noPropertyAccessFromIndexSignature which we had enabled in squiggle-lang but not in other packages is now a common setting; this means that e.g. process.env.FOO now needs to be process.env["FOO"]
  • similarly, noImplicitOverride is now enabled everywhere; this forced me to add override keyword in ErrorBoundary components, but otherwise didn't affect anything
  • target (ES version) might be slightly different than before, for some packages, but I hope it won't break anything

@berekuk berekuk requested a review from OAGr as a code owner January 9, 2024 21:35
Copy link

changeset-bot bot commented Jan 9, 2024

⚠️ No Changeset found

Latest commit: 40f760d

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.

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

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package "@quri/squiggle-components" depends on the ignored package "@quri/configs", but "@quri/squiggle-components" is not being ignored. Please add "@quri/squiggle-components" to the `ignore` option.
The package "@quri/prettier-plugin-squiggle" depends on the ignored package "@quri/configs", but "@quri/prettier-plugin-squiggle" is not being ignored. Please add "@quri/prettier-plugin-squiggle" to the `ignore` option.
The package "@quri/squiggle-lang" depends on the ignored package "@quri/configs", but "@quri/squiggle-lang" is not being ignored. Please add "@quri/squiggle-lang" to the `ignore` option.
The package "@quri/ui" depends on the ignored package "@quri/configs", but "@quri/ui" is not being ignored. Please add "@quri/ui" to the `ignore` option.
The package "@quri/versioned-squiggle-components" depends on the ignored package "@quri/configs", but "@quri/versioned-squiggle-components" is not being ignored. Please add "@quri/versioned-squiggle-components" to the `ignore` option.
The package "vscode-squiggle" depends on the ignored package "@quri/configs", but "vscode-squiggle" is not being ignored. Please add "vscode-squiggle" to the `ignore` option.

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ✅ Ready (Inspect) Visit Preview Jan 9, 2024 10:54pm
quri-ui ✅ Ready (Inspect) Visit Preview Jan 9, 2024 10:54pm
squiggle-components ✅ Ready (Inspect) Visit Preview Jan 9, 2024 10:54pm
squiggle-website ✅ Ready (Inspect) Visit Preview Jan 9, 2024 10:54pm

Copy link
Contributor

@OAGr OAGr left a comment

Choose a reason for hiding this comment

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

Happy to see this fixed! It works on my machine, which is the main thing I was looking for. Code roughly looks good to me, though I don't understand some of the TSConfig so well.

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5f9f24b) 69.78% compared to head (40f760d) 69.81%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2947      +/-   ##
==========================================
+ Coverage   69.78%   69.81%   +0.03%     
==========================================
  Files         120      120              
  Lines        6781     6782       +1     
  Branches     1446     1446              
==========================================
+ Hits         4732     4735       +3     
+ Misses       2041     2039       -2     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@OAGr OAGr merged commit 6b4a506 into main Jan 10, 2024
9 checks passed
@OAGr OAGr deleted the common-tsconfig branch January 10, 2024 00:08
@OAGr
Copy link
Contributor

OAGr commented Jan 10, 2024

image

@OAGr
Copy link
Contributor

OAGr commented Jan 10, 2024

Seems like this broke Squiggle Hub. I rolled back via Vercel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cleaning, then Building squiggle-language breaks
2 participants