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

Add basic types for sub-encoder #68390

Merged
merged 7 commits into from Feb 2, 2024

Conversation

EvanHahn
Copy link
Contributor

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 30, 2024

@EvanHahn Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes when there are new packages added

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": 68390,
  "author": "EvanHahn",
  "headCommitOid": "eb6572e53925e4cd2b362ef89dd6812d5643fa20",
  "mergeBaseOid": "09544432db06d33976eb328945253b53a4e0b646",
  "lastPushDate": "2024-01-30T22:57:38.000Z",
  "lastActivityDate": "2024-02-02T21:14:44.000Z",
  "mergeOfferDate": "2024-02-02T20:42:49.000Z",
  "mergeRequestDate": "2024-02-02T21:14:44.000Z",
  "mergeRequestUser": "EvanHahn",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "sub-encoder",
      "kind": "add",
      "files": [
        {
          "path": "types/sub-encoder/.npmignore",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/sub-encoder/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/sub-encoder/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/sub-encoder/sub-encoder-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/sub-encoder/tsconfig.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [],
      "addedOwners": [
        "EvanHahn"
      ],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2024-02-02T20:42:07.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "codershiba",
      "date": "2024-01-31T15:31:27.000Z",
      "abbrOid": "50db144"
    }
  ],
  "mainBotCommentID": 1918054974,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the New Definition This PR creates a new definition package. label Jan 30, 2024
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Jan 30, 2024
@typescript-bot
Copy link
Contributor

🔔 @EvanHahn — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Jan 30, 2024
@EvanHahn
Copy link
Contributor Author

There are several CI failures which seem unrelated to my changes. Apologies if I did something wrong here.

@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Jan 31, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Jan 31, 2024
@EvanHahn
Copy link
Contributor Author

@codershiba Happy to export those types, but why? (Not saying you're wrong, just that I don't know the reason.)

@codershiba
Copy link
Contributor

codershiba commented Jan 31, 2024

For user consumption. Example could be the the tests itself where you have used JsonValue type. Also doesn't seem to be a harm to export these utility types which maybe used with the sub-encoder lib

Co-authored-by: codershiba <155646804+codershiba@users.noreply.github.com>
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Jan 31, 2024
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Jan 31, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Jan 31, 2024
@typescript-bot
Copy link
Contributor

@EvanHahn The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

This reverts commit d46f6b6.
@EvanHahn
Copy link
Contributor Author

Actually, this doesn't work because this module has only one export. Reverted.

@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Jan 31, 2024
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Jan 31, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Jan 31, 2024
@typescript-bot
Copy link
Contributor

@codershiba Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Feb 2, 2024
@typescript-bot
Copy link
Contributor

@peterblazejewicz, @codershiba Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Feb 2, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Feb 2, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Feb 2, 2024
Copy link
Member

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

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

LGTM!
@EvanHahn thanks!

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Feb 2, 2024
@typescript-bot
Copy link
Contributor

@EvanHahn: Everything looks good here. I am ready to merge this PR (at eb6572e) 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! ❤️

@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Author to Merge in New Pull Request Status Board Feb 2, 2024
@EvanHahn
Copy link
Contributor Author

EvanHahn commented Feb 2, 2024

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Feb 2, 2024
@typescript-bot typescript-bot merged commit 84ead3d into DefinitelyTyped:master Feb 2, 2024
4 checks passed
@EvanHahn EvanHahn deleted the sub-encoder branch February 2, 2024 22:14
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Feb 3, 2024
codershiba added a commit to codershiba/DefinitelyTyped that referenced this pull request Feb 3, 2024
…EvanHahn

* Add basic types for sub-encoder

* Format types/sub-encoder/tsconfig.json

* Reference Node types

* Export JSON types

Co-authored-by: codershiba <155646804+codershiba@users.noreply.github.com>

* Revert "Export JSON types"

This reverts commit d46f6b6.

* sub-encoder: export JsonValue type

* sub-encoder: run formatter

---------

Co-authored-by: codershiba <155646804+codershiba@users.noreply.github.com>
EvanHahn added a commit to digidem/mapeo-core-next that referenced this pull request Feb 5, 2024
[@types/sub-encoder was recently created][0] so we can use that instead
of defining our own type.

[0]: DefinitelyTyped/DefinitelyTyped#68390
EvanHahn added a commit to digidem/mapeo-core-next that referenced this pull request Feb 5, 2024
[@types/sub-encoder was recently created][0] so we can use that instead
of defining our own type.

[0]: DefinitelyTyped/DefinitelyTyped#68390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer Approved New Definition This PR creates a new definition package. 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.

None yet

4 participants