Skip to content

Move @types/node to devDependency#202

Closed
ngocvantran wants to merge 1 commit intoinikulin:masterfrom
ngocvantran:patch-1
Closed

Move @types/node to devDependency#202
ngocvantran wants to merge 1 commit intoinikulin:masterfrom
ngocvantran:patch-1

Conversation

@ngocvantran
Copy link
Copy Markdown

Please make @types/node an development dependency so that it won't be installed when parse5 is used.

Please make @types/node an development dependency so that it won't be installed when parse5 is used.
@inikulin
Copy link
Copy Markdown
Owner

Why should we do this?

@ngocvantran
Copy link
Copy Markdown
Author

ngocvantran commented Jun 21, 2017

@types/node is only used for development, and is not used when parse5 is used as a library. By making @types/node a devDependency:

  1. @types/node is installed when parse5 is referneced, even though it doesn't need to. A slightly longer installation time for an additional package that is not really used.
  2. For my case, my project is using cheerio, which uses parse5, for some task during webpack bundling for a front end application with TypeScript. With this new update, @types/node is installed, causing typing conflict since our application is using front-end typings, not node typings.

@inikulin
Copy link
Copy Markdown
Owner

@types/node is only used for development, and is not used when parse5 is used as a library

It is used in production code in .d.ts file.

@ngocvantran
Copy link
Copy Markdown
Author

You're correct, I did not think about since our project does not use parse5 directly. I'll close the pull request.

@ngocvantran ngocvantran deleted the patch-1 branch June 21, 2017 11:36
@inikulin inikulin mentioned this pull request Jan 11, 2018
17 tasks
@inikulin
Copy link
Copy Markdown
Owner

@7pass Please take a look at #235

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.

2 participants