Skip to content

chore: Add typescript@next to devDependencies#45148

Closed
ExE-Boss wants to merge 1 commit intoDefinitelyTyped:masterfrom
ExE-Boss:chore/deps/add-typescript
Closed

chore: Add typescript@next to devDependencies#45148
ExE-Boss wants to merge 1 commit intoDefinitelyTyped:masterfrom
ExE-Boss:chore/deps/add-typescript

Conversation

@ExE-Boss
Copy link
Copy Markdown
Contributor

@ExE-Boss ExE-Boss commented May 29, 2020

This is a workaround for microsoft/dtslint#281.

npm would end up deduping typescript@latest, since it encounters it first as a dependency of @definitelytyped/definitions‑parser and dts‑critic, then it would dedupe tslint, and lastly dtslint would get typescript@next:

node_modules/
	@definitelytyped/dtslint-runner/ 0.0.35
	@definitelytyped/definitions-parser/ 0.0.35
	dts-critic/ 3.2.3
	dtslint/ 3.6.6
		node_modules/
			typescript/ 4.0.0-dev
	tslint/ 5.14
	typescript/ 3.9.3

This results in microsoft/dtslint#281.


Adding typescript@next forces the node_modules structure to:

node_modules/
	@definitelytyped/dtslint-runner/ 0.0.35
	@definitelytyped/definitions-parser/ 0.0.35
		node_modules/
			typescript/ 3.9.3
	dts-critic/ 3.2.3
		node_modules/
			typescript/ 3.9.3
	dtslint/ 3.6.6
	tslint/ 5.14
	typescript/ 4.0.0-dev

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

review?(@sandersn)

@sandersn
Copy link
Copy Markdown
Contributor

Thanks for the explanation. I'll merge this as soon as I confirm that it works with the version of dtslint with the lint rules still enabled.

Copy link
Copy Markdown
Contributor

@Maxim-Mazurok Maxim-Mazurok left a comment

Choose a reason for hiding this comment

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

LGTM!

@ExE-Boss
Copy link
Copy Markdown
Contributor Author

ExE-Boss commented Jun 2, 2020

Duplicate of #45226

@ExE-Boss ExE-Boss closed this Jun 2, 2020
@ExE-Boss ExE-Boss deleted the chore/deps/add-typescript branch June 6, 2020 12:46
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.

4 participants