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

move exsiting dependnecy @types/node from run-time to build-time #165

Closed
jkowalleck opened this issue Apr 26, 2023 · 3 comments · Fixed by #166
Closed

move exsiting dependnecy @types/node from run-time to build-time #165

jkowalleck opened this issue Apr 26, 2023 · 3 comments · Fixed by #166
Assignees
Labels
bug Something isn't working

Comments

@jkowalleck
Copy link
Contributor

jkowalleck commented Apr 26, 2023

Describe the bug

the package currently requires @types/node for RUNTIME. this appeases to be an error.

therefore, every productive installation of this package will install @types/node -- for what reason?!
Caused by

"@types/node": "*",

To Reproduce
install this package without any dev nor optional dependencies, as a downstream dependency,
and you will find @types/node installed

Expected behavior
no dev-dependencies are installed downstream.

Version:

  • node.js: *
  • xmlbuilder2: <= 3.1.0

Additional context

@types/node is a dev dependency, that provides type hints digested by developer tools and TypeScript, on build-time.
It is not required on run-time.

@jkowalleck
Copy link
Contributor Author

jkowalleck commented Apr 26, 2023

I read #84 (comment)
and this wrong. @types/node does not bring any runtime-functionality to the table. And has therefore no effect at runtime, and is no runtime requirement. It is a devDepencency of this very package. If downstream users want to use typescript, they will have the appropriate dependency to set downstream.

I read #52 (comment)
and this appears to be wrong.
It exposes no types at all, as this is no capability of nodejs in the first place.
Instead, @types/node provides type hints that might be optionally digested downstream (by tools in dev-time OR by TypeScript on build-time)

Please see https://www.npmjs.com/package/@types/node?activeTab=code's package.json
you will find that there is not even an entry point nor any *.js file in the package.
@types/node has no effect on runtime. And shall therefore be removed from runtimeDependencies.

@jkowalleck
Copy link
Contributor Author

Possibly related: #153

@universalhandle
Copy link
Collaborator

Hi, @jkowalleck. Thanks for the issue and pull request. I'm inclined to agree that @types packages need only be dev dependencies. I'm going to revisit the threads you linked just to be thorough, but I expect I'll be merging and shipping it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants