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

feat: restore typesVersions #2878

Merged
merged 1 commit into from
May 31, 2024
Merged

feat: restore typesVersions #2878

merged 1 commit into from
May 31, 2024

Conversation

holic
Copy link
Member

@holic holic commented May 30, 2024

closes #2871

for backwards compatibility with moduleResolution: "node"
we had removed this in #2828 but it broke projects when upgrading MUD verisons

(intentionally didn't include a changeset because this can be considered part of the changes in #2828 and #2873)

Copy link

changeset-bot bot commented May 30, 2024

⚠️ No Changeset found

Latest commit: a28149e

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

@holic
Copy link
Member Author

holic commented May 30, 2024

confirmed this works in templates by

  • creating a project using mud latest (doesn't yet have these TS changes)
  • upgrading mud to tag main
  • checking that there are type errors
  • upgrading mud to tag restore-typeversions
  • checking that there are no type errors and the project can be built and IDE can resolve imports
pnpm create mud@latest test-project-types
cd test-project-types
pnpm mud set-version --tag main && pnpm install
pnpm mud set-version --tag restore-typeversions && pnpm install

@holic holic marked this pull request as ready for review May 30, 2024 11:58
@holic holic requested review from alvrs and yonadaa as code owners May 30, 2024 11:58
"bin": {
"gas-report": "./dist/gas-report.js"
},
"files": [
"dist",
"out",
"src",
"foundry.toml"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you re-added this in a previous PR right? There are several other packages where this was removed as well, so just wanted to make sure that was intended.

Copy link
Member Author

@holic holic May 30, 2024

Choose a reason for hiding this comment

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

yeah I had added one foundry.toml in #2867 but can't recall if this was motivated by an error that appeared or if I just spotted it was missing and inconsistent with the rest.

but I don't think these are actually needed (they're similar to tsconfig.json in that they just get used to build)

Copy link
Member Author

Choose a reason for hiding this comment

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

to be certain, I just made a fresh template with this version/PR (published to npm via snapshot action) and confirmed that a local anvil deploy rolled out fine! so I think the resulting app has all it needs inside the out dir and doesn't need foundry.toml in the npm package

Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool! I know I wanted to remove it originally, just wanted to make sure there wasn't some weird reason it needed to be kept.

@holic holic merged commit 7f07e9d into main May 31, 2024
17 checks passed
@holic holic deleted the restore-typeversions branch May 31, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

restore types/typeVersions for moduleResolution: node compat
3 participants