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

[legacy-framework] remove typescript bits from package.json generated for js projects #1402

Merged
merged 5 commits into from
Sep 23, 2021

Conversation

bcye
Copy link

@bcye bcye commented Nov 1, 2020

Closes: blitz-js/legacy-framework#951

What are the changes and their implications?

  • create two seperate files for JS and TS package.json (package.js.json and package.ts.json)
  • rename the selected one to package.json during the generation process, discard the other

Checklist

  • Tests added for changes (does this matter here? seems to be covered by existing ones)
  • PR submitted to blitzjs.com for any user facing changes

@bcye bcye requested a review from aem as a code owner November 1, 2020 21:24
@flybayer
Copy link
Member

flybayer commented Nov 5, 2020

@bcye thanks so much! This solution would definitely work, but it would be better to only have a single package.json that has a few conditional changes based on whether it is JS or TS. Because with two package.json's, it will be easy for them to get out of sync.

@aem does our custom template engine support conditional checks in json files?

@flybayer
Copy link
Member

Bump @aem

@beerose beerose requested review from beerose and removed request for aem September 22, 2021 17:58
@beerose beerose self-assigned this Sep 22, 2021
@bcye bcye requested a review from flybayer as a code owner September 22, 2021 18:41
Copy link
Member

@flybayer flybayer left a comment

Choose a reason for hiding this comment

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

@beerose looks good, but we should remove @types packages from js package.json. Once that's changed, you are good to merge without another check from me.

Also I remembered that we run tsc inside the husky pre-push hook. We need to remove that for JS version. Can do that as a separate PR though.

@beerose
Copy link
Contributor

beerose commented Sep 23, 2021

Also I remembered that we run tsc inside the husky pre-push hook. We need to remove that for JS version. Can do that as a separate PR though.

Yep! Will work on that in a separate pr

@beerose beerose changed the title Fix #1309: package.json generated for JS projects contains bits for TS projects remove typescript bits from package.json generated for js projects Sep 23, 2021
@beerose beerose merged commit f9e7d16 into blitz-js:canary Sep 23, 2021
@blitzjs-bot
Copy link
Contributor

Added @bcye contributions for code

@flybayer
Copy link
Member

@bcye so sorry for the long delay on this!!! I was thinking we needed to make changes in our codegen process, but ultimately decided to just go with your original approach for now, even though there is some duplication we have to worry about.

@itsdillon itsdillon changed the title remove typescript bits from package.json generated for js projects [legacy-framework] remove typescript bits from package.json generated for js projects Jul 7, 2022
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.

package.json generated for JS projects contains bits for TS projects
4 participants