Skip to content

[markdown-it,mdurl,linkify-it,markdown-it-emoji] update type definitions#69355

Merged
typescript-bot merged 24 commits intoDefinitelyTyped:masterfrom
brc-dd:markdown-it
May 1, 2024
Merged

[markdown-it,mdurl,linkify-it,markdown-it-emoji] update type definitions#69355
typescript-bot merged 24 commits intoDefinitelyTyped:masterfrom
brc-dd:markdown-it

Conversation

@brc-dd
Copy link
Copy Markdown
Contributor

@brc-dd brc-dd commented Apr 15, 2024

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this file is no longer present in v14 - https://unpkg.com/browse/markdown-it@14.1.0/lib/common/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

wasn't converted in #68924

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this was left over from cjs->esm migration (#68924), and the types shouldn't contain lines: number (https://unpkg.com/browse/markdown-it@14.1.0/lib/helpers/parse_link_destination.mjs -- there is no mention of any lines property)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the types were wrong (or likely old) here. syncs with https://unpkg.com/browse/markdown-it@14.1.0/lib/helpers/parse_link_title.mjs

/**
* renderer
*/
result: string;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@brc-dd brc-dd changed the title [markdown-it,mdurl] Fix broken definitions and add types for uc.micro [markdown-it,mdurl] Fix broken definitions and sync doc comments Apr 15, 2024
@brc-dd brc-dd changed the title [markdown-it,mdurl] Fix broken definitions and sync doc comments [markdown-it,mdurl] Update type definitions and sync doc comments Apr 15, 2024
@brc-dd brc-dd marked this pull request as ready for review April 15, 2024 08:43
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 15, 2024

@brc-dd 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 is a widely-used package, a DT maintainer will need to review it 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
  • ✅ 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": 69355,
  "author": "brc-dd",
  "headCommitOid": "c2f43c9fbcc2fbbdc85d77bea2faef4e9e1c7490",
  "mergeBaseOid": "1bed4c3ae1d8206236b1ffe98f96075046705813",
  "lastPushDate": "2024-04-15T07:38:19.000Z",
  "lastActivityDate": "2024-05-01T17:41:55.000Z",
  "mergeOfferDate": "2024-05-01T17:38:56.000Z",
  "mergeRequestDate": "2024-05-01T17:41:55.000Z",
  "mergeRequestUser": "brc-dd",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "linkify-it",
      "kind": "edit",
      "files": [
        {
          "path": "types/linkify-it/build/index.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/linkify-it/index.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/linkify-it/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/linkify-it/linkify-it-tests.mts",
          "kind": "test"
        },
        {
          "path": "types/linkify-it/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/linkify-it/tsconfig.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "praxxis",
        "alexplumb",
        "ragafus"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    },
    {
      "name": "markdown-it-emoji",
      "kind": "edit",
      "files": [
        {
          "path": "types/markdown-it-emoji/bare.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/bare.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/full.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/index.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/light.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/markdown-it-emoji-bare.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/markdown-it-emoji-bare.min.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/markdown-it-emoji-light.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/markdown-it-emoji-light.min.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/markdown-it-emoji.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/dist/markdown-it-emoji.min.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/index.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/lib/bare.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/lib/full.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/lib/light.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/light.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it-emoji/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/markdown-it-emoji/test/markdown-it-emoji-global.ts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it-emoji/test/markdown-it-emoji.mts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it-emoji/test/markdown-it-emoji.ts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it-emoji/tsconfig.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/markdown-it-emoji/tsconfig.non-umd.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/markdown-it-emoji/tsconfig.umd.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "Shinigami92",
        "peterblazejewicz"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "markdown-it",
      "kind": "edit",
      "files": [
        {
          "path": "types/markdown-it/dist/index.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/dist/markdown-it.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/dist/markdown-it.min.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/common/entities.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/common/html_blocks.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/common/html_re.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/common/utils.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/helpers/parse_link_destination.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/helpers/parse_link_label.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/helpers/parse_link_title.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/index.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/parser_block.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/parser_core.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/parser_inline.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/renderer.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/ruler.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/rules_block/state_block.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/rules_inline/state_inline.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/lib/token.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/markdown-it/markdown-it-tests.mts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it/markdown-it-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/markdown-it/test/common/utils.mts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it/test/index.mts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it/test/rules_block/state_block.mts",
          "kind": "test"
        },
        {
          "path": "types/markdown-it/tsconfig.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "plantain-00",
        "rapropos",
        "duduluu",
        "peterblazejewicz"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    },
    {
      "name": "mdurl",
      "kind": "edit",
      "files": [
        {
          "path": "types/mdurl/build/index.cjs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/decode.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/encode.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/format.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/index.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/lib/decode.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/lib/encode.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/lib/format.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/lib/parse.d.mts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/mdurl-tests.mts",
          "kind": "test"
        },
        {
          "path": "types/mdurl/mdurl-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/mdurl/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/mdurl/parse.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mdurl/tsconfig.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "rokt33r"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "rbuckton",
      "date": "2024-05-01T17:38:08.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "peterblazejewicz",
      "date": "2024-04-15T19:42:52.000Z",
      "abbrOid": "ba4c53d"
    }
  ],
  "mainBotCommentID": 2056235611,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 15, 2024

🔔 @praxxis @alexplumb @ragafus @Shinigami92 @peterblazejewicz @plantain-00 @rapropos @duduluu @Rokt33r — 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.

@brc-dd brc-dd marked this pull request as draft April 15, 2024 08:55
@brc-dd brc-dd closed this Apr 15, 2024
@brc-dd brc-dd reopened this Apr 15, 2024
@brc-dd brc-dd marked this pull request as ready for review April 15, 2024 16:15
@yoitsro
Copy link
Copy Markdown

yoitsro commented May 1, 2024

To be clear, I'm not even using markdown-it or linkify-it directly in my project - it's a transitive dependency of jsdoc, I think.

@brc-dd
Copy link
Copy Markdown
Contributor Author

brc-dd commented May 1, 2024

Ah, I see. I'm not sure what's the proper way to handle this because the v13 of @types/markdown-it specifies those deps as *. Even if we update now the older versions won't have any effect. We did do a major version bump here and in #68924, but that * is pulling the latest deps.

/cc @jakebailey

@yoitsro
Copy link
Copy Markdown

yoitsro commented May 1, 2024

Is it worth doing a patch release of v13 to fix the version of linkify-it it targets?

@brc-dd
Copy link
Copy Markdown
Contributor Author

brc-dd commented May 1, 2024

Is it worth doing a patch release of v13 to fix the version of linkify-it it targets?

As contributors, I don't think there is any flow in DT bot for that. Maintainers will probably have to do that manually 👀

Or maybe we can do this - https://github.com/DefinitelyTyped/DefinitelyTyped/blob/HEAD/README.md#if-a-library-is-updated-to-a-new-major-version-with-breaking-changes-how-should-i-update-its-type-declaration-package - create types/markdown-it/v13 with v13 code and updated package.json 👀

@yoitsro
Copy link
Copy Markdown

yoitsro commented May 1, 2024

Ouch! Is it something the @DefinitelyTyped team could look at @rbuckton?

If not, and sorry to drag you in here, but @hegemonic, you might need to manually set the version of linkify-it which is used in jsdoc sooner rather than later.

@jakebailey
Copy link
Copy Markdown
Member

The first thing to do is to revert this PR. If you want to resurrect and old version of a DT package, you'll have to pull it out of git history and make a subdir.

@jakebailey
Copy link
Copy Markdown
Member

@brc-dd Are you sending the revert? Or should I?

@brc-dd
Copy link
Copy Markdown
Contributor Author

brc-dd commented May 1, 2024

Ah do it. I'm creating the subdir PR in meanwhile.

@jakebailey
Copy link
Copy Markdown
Member

Actually, I didn't realize this PR bumped the major versions of linkify-it, markdown-it-emoji, and mdurl. Reverting isn't going to unpublish those changes.

@brc-dd
Copy link
Copy Markdown
Contributor Author

brc-dd commented May 1, 2024

It'll still break for people on markdown-it v12. Apparently the usage of v12 is 16 times v13 🥲

v13.0.8 should fix this for v13 users.

@jakebailey
Copy link
Copy Markdown
Member

It'll still break for people on markdown-it v12. Apparently the usage of v12 is 16 times v13 🥲

Yeah, that would also need to be pulled back into the repo for a release, if you want those to be fixed without package manager locking or resolution overrides.

@rajsite
Copy link
Copy Markdown

rajsite commented May 1, 2024

Verified @types/markdown-it@13.0.8 prevented build issues for me, thanks! 👍

hegemonic added a commit to jsdoc/jsdoc that referenced this pull request May 2, 2024
Hopefully this fixes the [TypeScript compilation issues](DefinitelyTyped/DefinitelyTyped#69355 (comment)) reported in DefinitelyTyped/DefinitelyTyped#69355.

To my surprise, all of these updated packages appear to be compatible with Node.js 12.0.0, which is what JSDoc 4.x claims to support.
@hegemonic
Copy link
Copy Markdown

@yoitsro and other JSDoc users: I just published JSDoc 4.0.3, which should fix the build issue. If you're still seeing issues after you upgrade, please file a bug. Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Edits multiple packages Maintainer Approved 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.

8 participants