Skip to content

[Discussion#59192] Declaration export does not match the levelup package#59253

Merged
typescript-bot merged 3 commits intoDefinitelyTyped:masterfrom
istherepie:feature/59192-fix-export-declaration
Mar 17, 2022
Merged

[Discussion#59192] Declaration export does not match the levelup package#59253
typescript-bot merged 3 commits intoDefinitelyTyped:masterfrom
istherepie:feature/59192-fix-export-declaration

Conversation

@istherepie
Copy link
Copy Markdown
Contributor

@istherepie istherepie commented Mar 13, 2022

Please fill in this template.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Mar 13, 2022

@istherepie Thank you for submitting this PR!

This is a live comment which I will keep updated.

4 packages in this PR

Code Reviews

Because this PR edits multiple packages, it can be merged once it's reviewed by a DT maintainer.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ A DT maintainer needs to approve changes which affect more than one package

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 59253,
  "author": "istherepie",
  "headCommitOid": "bd8558802ff63806a00bf06606dc3735e0b96c04",
  "mergeBaseOid": "13b76775202f1eda53b9f92207fe5572d513f7fc",
  "lastPushDate": "2022-03-14T11:08:27.000Z",
  "lastActivityDate": "2022-03-17T11:32:52.000Z",
  "mergeOfferDate": "2022-03-16T21:46:32.000Z",
  "mergeRequestDate": "2022-03-17T11:32:52.000Z",
  "mergeRequestUser": "istherepie",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "level-ttl",
      "kind": "edit",
      "files": [
        {
          "path": "types/level-ttl/level-ttl-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "carsonfarmer"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "level",
      "kind": "edit",
      "files": [
        {
          "path": "types/level/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "danielfx90"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "levelup",
      "kind": "edit",
      "files": [
        {
          "path": "types/levelup/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/levelup/levelup-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/levelup/tslint.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "MeirionHughes",
        "danwbyrne",
        "carsonfarmer",
        "istherepie"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    },
    {
      "name": "subleveldown",
      "kind": "edit",
      "files": [
        {
          "path": "types/subleveldown/subleveldown-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "carsonfarmer",
        "demensky"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "gabritto",
      "date": "2022-03-16T21:45:51.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "danielfx90",
      "date": "2022-03-14T11:32:14.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1066142398,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Edits multiple packages labels Mar 13, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @carsonfarmer @danielfx90 @MeirionHughes @danwbyrne @demensky — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@istherepie istherepie mentioned this pull request Mar 13, 2022
7 tasks
@danielfx90
Copy link
Copy Markdown
Contributor

I am not using LevelDB anymore, so I am a bit rusty with its usage.

Are these changes needed for a newer version of LevelDB or were the type definitions wrong from the beginning?

If the changes are needed for a newer version, let's add a comment in the type definitions.

If they were wrong from the beginning, i'll approve them so that we can merge them ASAP.

@istherepie
Copy link
Copy Markdown
Contributor Author

istherepie commented Mar 14, 2022

I am not using LevelDB anymore, so I am a bit rusty with its usage.

Are these changes needed for a newer version of LevelDB or were the type definitions wrong from the beginning?

If the changes are needed for a newer version, let's add a comment in the type definitions.

If they were wrong from the beginning, i'll approve them so that we can merge them ASAP.

Specifically for the levelup wrapper the export has changed from earlier versions,
this should have been fixed in the last update to version 5.1 - but I missed it because the check for export = was disabled.

In either case, it should change to match the current 5.x version of levelup,
and to resolve discussion #59192 as the declaration does not currently work!

Line 333:

module.exports = LevelUP

Link: https://github.com/Level/levelup/blob/e73f536a46d7b8b2fa3d9b5abd0ae6efca41653e/lib/levelup.js#L333

@istherepie istherepie force-pushed the feature/59192-fix-export-declaration branch from 71feb35 to b75995b Compare March 14, 2022 11:07
The rule NeedsExportEquals was previously disabled.
Due to this, we didn't notice that declaration export was broken.
@istherepie istherepie force-pushed the feature/59192-fix-export-declaration branch from b75995b to bd85588 Compare March 14, 2022 11:08
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Mar 14, 2022
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Mar 16, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

@istherepie: Everything looks good here. I am ready to merge this PR (at bd85588) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

@istherepie
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit c4e1b16 into DefinitelyTyped:master Mar 17, 2022
@istherepie istherepie deleted the feature/59192-fix-export-declaration branch March 17, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Edits multiple packages Maintainer Approved Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants