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

fix(NODE-4302): typo in typesVersions filename #499

Closed
wants to merge 1 commit into from

Conversation

jablko
Copy link

@jablko jablko commented Jun 9, 2022

Description

Older versions of TypeScript aren't working since #494 (comment) (BSON parser >= 4.6.3):

error TS7016: Could not find a declaration file for module 'bson'. 'node_modules/bson/lib/bson.js' implicitly has an 'any' type.

Looks like one instance was missed in 740ce30.

What is changing?

The typesVersions filename, so older versions of TypeScript can find the declaration file.

Is there new documentation needed for these changes?

No.

What is the motivation for this change?

I ran into this editing unrelated types on DefinitelyTyped that have a transitive dependency on BSON parser and are automatically tested on older versions of TypeScript. This typo causes that automation to complain, blocking edits to those transitively-dependent types.

@durran durran added Team Review Needs review from team tracked-in-jira There is a ticket in Mongo's Jira instance tracking this issue/PR labels Jun 10, 2022
@durran durran changed the title fix: typo in typesVersions filename fix(NODE-4302): typo in typesVersions filename Jun 10, 2022
@dariakp dariakp requested a review from nbbeeken June 10, 2022 18:06
@nbbeeken
Copy link
Contributor

Hi @jablko surprisingly I believe that downleveling the types isn't actually doing anything necessary here (our library should work on TS v4.0.0+) I've started another PR (#501) where I'm testing against a range of TS versions and the nightly version.

If you still have your environment setup, can you see if locally removing the typesVersions alleviates the issue? if so we should be able to go with that approach in the next release.

@jablko
Copy link
Author

jablko commented Jun 14, 2022

@nbbeeken Thanks! You're right: I confirmed that dropping the typesVersions field entirely likewise fixes the issue.

Looks like the only difference in the downleveled types are the ambient get/set accessors, which aren't a problem for TS >=3.6.

I'll close this PR in favor of #501 (comment). 👍

@jablko jablko closed this Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team tracked-in-jira There is a ticket in Mongo's Jira instance tracking this issue/PR
Projects
None yet
3 participants