web icon indicating copy to clipboard operation
web copied to clipboard

feat(dev-server-esbuild): allow extended tsconfig

Open venikx opened this issue 2 years ago • 13 comments

What I did

  1. Added a test case when referencing a tsconfig.json in the esbuildPlugin that uses extends to extend from a base tsconfig.json
  2. Added a possible implementation how it could work using --showConfig when running tsc. See https://www.typescriptlang.org/docs/handbook/compiler-options.html
  3. Change the target of the fixture, since es2022 was reported as invalid by tsc

I'm not sure about the actual implementation, but it covers my test case, without breaking the other tests of dev-server-esbuild (at least on Mac) 🤷🏽

venikx avatar Mar 15 '23 17:03 venikx

🦋 Changeset detected

Latest commit: 99ae9054ca8136464edb20173c69ccc37bdfeca9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/dev-server-esbuild Patch

Not sure what this means? Click here to learn what changesets are.

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

changeset-bot[bot] avatar Mar 15 '23 17:03 changeset-bot[bot]

changeset-bot message...

So if I understand this correctly, I can trigger an automatic release of the package, by applying a change set?

venikx avatar Mar 15 '23 18:03 venikx

Apply the changeset to clarify that there are changes requiring a release.

Full the changeset with a lingual representation of the changes so that they are included in the CHANGELOG.md.

Westbrook avatar Mar 15 '23 19:03 Westbrook

Apply the changeset to clarify that there are changes requiring a release.

Full the changeset with a lingual representation of the changes so that they are included in the CHANGELOG.md.

Let me know if the formatting of the changeset should be adjusted!

venikx avatar Mar 17 '23 22:03 venikx

I rebased the PR to be up to date with latest changes.

venikx avatar Apr 17 '23 20:04 venikx

We've got #2180 queued up to merge to master soon. I want to make sure we land that first so that we don't delay that release any more. We'll merge this once that PR has landed.

koddsson avatar Apr 18 '23 06:04 koddsson

No worries, I've come across another way to possibly solve it while going through the dependabot PR's at work. Would something like this be preferred over shelling out tsc? https://github.com/qmhc/vite-plugin-dts/pull/202

You are still using the typescript ecosystem, but have to do a bit more manual recursion in favour of not having to run a command.

EDIT: Also sorry for the re-review, I was worried you might not have seen this message, before potentially merging this PR.

venikx avatar Apr 18 '23 10:04 venikx

No worries, I've come across another way to possibly solve it while going through the dependabot PR's at work. Would something like this be preferred over shelling out tsc? qmhc/vite-plugin-dts#202

Oh, yeah! I would love to do this instead. Looks like we need to upgrade to TypeScript 5 first, which I think is also a positive, so I'd prefer that.

What do you think?

koddsson avatar Apr 18 '23 17:04 koddsson

No worries, I've come across another way to possibly solve it while going through the dependabot PR's at work. Would something like this be preferred over shelling out tsc? qmhc/vite-plugin-dts#202

Oh, yeah! I would love to do this instead. Looks like we need to upgrade to TypeScript 5 first, which I think is also a positive, so I'd prefer that.

What do you think?

Yeah, I think it might be better, but it does indeed seem to require typescript 5. Would that then be considered a breaking change for dev-server-esbuild?

venikx avatar Apr 20 '23 10:04 venikx

Would that then be considered a breaking change for dev-server-esbuild?

Probably! But that's no worries, we can just make a breaking change.

koddsson avatar Apr 22 '23 19:04 koddsson

We should be on TypeScript 5 now if you pull master 👯

koddsson avatar Apr 25 '23 07:04 koddsson

We should be on TypeScript 5 now if you pull master 👯

I'll modify my PR somewhere this weekend, I have busy schedule for this week unfortunately.

venikx avatar Apr 25 '23 08:04 venikx

We should be on TypeScript 5 now if you pull master 👯

I'll modify my PR somewhere this weekend, I have busy schedule for this week unfortunately.

No worries! Let me know if we can help :)

koddsson avatar Apr 26 '23 07:04 koddsson