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

Production Dependency Includes Typescript #878

Closed
c1moore opened this issue Nov 19, 2023 · 7 comments · Fixed by #892
Closed

Production Dependency Includes Typescript #878

c1moore opened this issue Nov 19, 2023 · 7 comments · Fixed by #892
Labels
enhancement New feature or request

Comments

@c1moore
Copy link

c1moore commented Nov 19, 2023

Describe the bug
It seems that the last few versions of @oclif/core has re-introduced TypeScript as a production dependency, significantly increase the bundle size of CLIs using OCLIF. This appears to be due to the tsconfck dependency

└─┬ @oclif/[email protected]
  └─┬ [email protected]
    └── [email protected]

This seems to increase bundle size by about 10MB depending on compression technique and OS target.

To Reproduce
Steps to reproduce the behavior:

  1. Build an OCLIF CLI using the latest version
  2. Inspect the bundles

Expected behavior
TypeScript is not a production dependency.

Screenshots
N/A

Environment (please complete the following information):

  • OS & version: N/A
  • Shell/terminal & version: N/A

Additional context
N/A

@mdonnalley mdonnalley added the enhancement New feature or request label Nov 20, 2023
Copy link

git2gus bot commented Nov 20, 2023

This issue has been linked to a new work item: W-14526758

@AllanOricil
Copy link
Contributor

It is weird to see tsconfck depends on ts. If you go to npm, and search for tsconfck you will see it does not have dependencies

https://www.npmjs.com/package/tsconfck

@c1moore
Copy link
Author

c1moore commented Nov 23, 2023

It's marked as a peer dependency, which, if I'm understanding the docs correctly, means it will be installed with npm v7 if not installed by another dependency.

@AllanOricil
Copy link
Contributor

AllanOricil commented Nov 23, 2023

you are right. It is a peer dependency. Is this tsconfck used in the bundled code? if not I believe it can just be set as a devDependency and the issue will be gone

image

@c1moore
Copy link
Author

c1moore commented Nov 23, 2023

It looks like it's used in production code here I'm not sure the value it's adding over just using JSON.parse or using require directly.

@c1moore
Copy link
Author

c1moore commented Nov 29, 2023

@AllanOricil Any updates on this?

@AllanOricil
Copy link
Contributor

@AllanOricil Any updates on this?

I can take a look at this next weekend if isn't fixed by Salesforce by than

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants