remarkjs / remark

markdown processor powered by plugins part of the @unifiedjs collective
https://remark.js.org
MIT License
7.66k stars 358 forks source link

Request cutting out a new release #1162

Closed OmarTawfik closed 1 year ago

OmarTawfik commented 1 year ago

Initial checklist

Problem

Following up on https://github.com/syntax-tree/mdast-util-from-markdown/pull/32 .. cc @wooorm

The problem is that remark-parse was last published (2 years ago) before "moduleResolution": "node16" was a thing (it’s not even in remark yet: https://github.com/remarkjs/remark/blob/main/tsconfig.json). 2 years ago, the TS CLI generated code that doesn’t work in todays TS with moduleResolution: node16.

I believe that the solution is to use a current correct TS config (e.g., like this: https://github.com/syntax-tree/mdast-util-from-markdown/blob/cd10e598ae2492c8b61131d2ace46e0ea7cc37e5/tsconfig.json), then regenerate all types in remark, and cut a new release

I checked remark-parse, and it looks like it is already extending the root tsconfig.json, which was up to date .

I tried rebuilding the package locally, and the type error is no longer reported:

node_modules/remark-parse/lib/index.d.ts:3:26 - error TS2307: Cannot find module 'mdast-util-from-markdown/lib' or its corresponding type declarations.

3   options: void | import('mdast-util-from-markdown/lib').Options | undefined

Found 1 error in node_modules/remark-parse/lib/index.d.ts:3

Solution

It looks like all what we need is cutting out a new release should fix this.

Please let me know if there is anything else I can do.

Alternatives

N/A

wooorm commented 1 year ago

Done, thanks! https://github.com/remarkjs/remark/releases/tag/14.0.3

OmarTawfik commented 1 year ago

Thank you!