-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use TS references to link monorepo packages #1277
Conversation
I've checked how the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look fine to me but I found an issue.
When I, for example, remove the log function from the logger from airnode-utilities package and run a command from airnode-admin package (yarn cli generate-mnemonic
) it still works. I would expect it to throw an error since the function for printing was removed from the airnode-utilities package.
Thanks for the review, I didn't think that ts-node would behave differently. As discussed on slack, While investigating this issue I realized there is a setting https://www.typescriptlang.org/tsconfig#tsBuildInfoFile which allows us to move the tsbuildinfo files from the |
a270dd2
to
2f6dc0f
Compare
Closes #1227
This feature enables real time errors and compilation cross-project. This means that when
airnode-admin
depends on function X inairnode-abi
and this function is removed, you will receive instant error inairnode-admin
.We assume that every dependency is used in the monorepo project sources and we require that the
tsconfig.json
of the sources references all other monorepo dependencies.When another tsconfig A (e.g. the tests) references the tsconfig B of project sources, the referenced projects in B are already already referenced by A. This means that importing stuff from monorepo packages in tests will still provide the same features as in sources.