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

Miscellaneous unit test typing fixes, dependency bumps #154

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

surilindur
Copy link
Contributor

Here is a small set of changes to:

  • Fix the typing-related errors with unit tests that seemed to pop up when I ran them locally.
  • Bump the sparqlalgebrajs dependency to the latest one.
  • Refresh the Yarn lockfile to remove some seemingly unneeded entries.

Any feedback would be welcome, as usual. I hope there is not too much in the single PR, if there is, I can split it.

package.json Outdated
"ts-loader": "^9.4.4",
"typedoc": "^0.26.0",
"typescript": "^5.3.3",
"typescript": "~5.5.0",
Copy link
Member

Choose a reason for hiding this comment

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

Why the ~?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The newer TS compiler versions seem to dislike something in the lru-cache package, if I remember correctly, that is pulled in as a dependency of a dependency. The build would fail with typing errors for that package.

The reason the master branch works at the moment is because the TS version is locked in the Yarn lockfile. Bumping the TS version will introduce those errors, and it has been like this for a couple of months now (since version 5.6 was released, iirc, since the TS version is locked to 5.something).

Copy link
Member

Choose a reason for hiding this comment

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

I remember @smessie running into this recently.
What was your solution again @smessie?

Copy link
Member

Choose a reason for hiding this comment

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

In any case, we usually use yarn resolutions for locking to a specific version in the monorepo. So if needed, let's use that.

Copy link

Choose a reason for hiding this comment

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

Yes, it was because of an issue with lru-cache and TS, explained here isaacs/node-lru-cache#354 (comment)
I don't remember the exact location I encountered it, but we concluded that the issue was fixed in the newer lru-cache version, but that specific version does no longer support Node 18. With Comunica, we didn't want to drop support for Node 18 yet, as it only reaches its end of life by the end of April 2025. The idea was to then drop Node 18 support and update the lru-cache dependency.
A temporary workaround/fix was to downgrade TypeScript to 5.5.4.

Copy link
Member

Choose a reason for hiding this comment

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

Right, thanks for the reminder @smessie! (and good that we have this written down here for future reference)

@surilindur surilindur force-pushed the chore/test-typing-fixes-and-dep-bumps branch from 057fff3 to 5d94dde Compare December 4, 2024 10:47
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.

3 participants