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

v10.3.7 is broken #558

Closed
Zippanova opened this issue Sep 25, 2023 · 7 comments
Closed

v10.3.7 is broken #558

Zippanova opened this issue Sep 25, 2023 · 7 comments

Comments

@Zippanova
Copy link

Had a heck of a time figuring out why my CI/CD pipeline broke today with no changes since last week. It looks like I was grabbing the latest package of blob published in npm (v10.3.7) and getting this error (note: using TS here):

error TS2307: Cannot find module 'glob' or its corresponding type declarations.

import { glob } from 'glob'
                     ~~~~~~

I downgraded to v10.3.6 and this works without errors. It appears this related commit is failing some GitHub checks as well. Just thought you'd like to know. 🙂

@jmjones-ping
Copy link

Same here for a TS project.

import { globSync } from 'glob'
error TS2724: '"glob"' has no exported member named 'globSync'. Did you mean 'GlobSync'

10.3.6 fixes it for me as well @Zippanova

@isaacs
Copy link
Owner

isaacs commented Sep 25, 2023

#557

It's not broken. It just stopped incorrectly advertising its types. Please enable packageJsonExports in your tsconfig, so that you will get the correct types for this module, which you weren't getting before.

@isaacs isaacs closed this as completed Sep 25, 2023
@Zippanova
Copy link
Author

Hmm, I did not find any release notes for this version related to this change. Thanks for the tip!

@isaacs
Copy link
Owner

isaacs commented Sep 26, 2023

I don't usually bother with release notes for patch versions, because nothing changed in the interface contract.

@martincostello
Copy link

Release notes are always useful - if I get a version bump from dependabot, I'd like to know why.

@jmjones-ping
Copy link

jmjones-ping commented Sep 26, 2023

Definitely thankful for the package - but please just realize even restoring things to the way they are supposed to be causes significant rework for some of us - especially in larger repos.

We're on a typescript version where packageJsonExports isn't available and in a monorepo, so we're stuck updating everything and testing, which I wouldn't really expect in a patch release update.

Thanks for sharing all the threads that share the reasoning as that makes sense, but just wanted to share a bit why some of us are a bit surprised by the patch version update.

@isaacs
Copy link
Owner

isaacs commented Sep 26, 2023

@jmjones-ping It is never fun to learn that there's been a subtle bug lying in wait threatening to cause undefined behavior at run time, or process gaps where you are on the bleeding edge of one piece but unmaintained legacy versions of another. I'm sensitive to the surprise and frustration, and also glad that you found out this way, rather than another.

If you are using a very old typescript version (or node, express, react, etc, any significant platform dep), I strongly recommend pinning all dependencies and being extremely cautious about any upgrades, until you can update the platform dep to a current supported version. Most library authors do current work on current platform versions, and expect that they are configured correctly in order to behave correctly.

This issue was closed.
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

No branches or pull requests

4 participants