-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Import paths for generated type definitions broken #270
Comments
One solution would be to run |
path issue can be seen with unpkg https://unpkg.com/browse/remark-lint-list-item-indent@3.0.0/index.d.ts The way it links the path, make me wonder if there are/were multiple conflicting versions of unified included by package.json at the time. 🤔 I'm not sure if |
This comment has been minimized.
This comment has been minimized.
I expected missmatching unified versions BUT it isn't only unified but several remark-lint packages referencing another remark-lint package too. I did clone this repository fresh and it resulted in the same build d.ts files so I suspect no conflicting versions.
|
The presets went weird becasue they were essentially untyped, hence trying to load tons of external types. I fixed that (see reference above this comment), e.g., they now look like this: export default remarkPresetLintRecommended;
export type Preset = import('unified').Preset;
/** @type {Preset} */
declare const remarkPresetLintRecommended: Preset; For rules, they don’t depend on each other. So that should leave the problem to |
Currently away from my PC but I remember imports like
Maybe this is fixed with this commit too. I will check this later. |
This comment has been minimized.
This comment has been minimized.
Released! |
Initial checklist
Affected packages and versions
remark-lint-list-item-indent and many more
Link to runnable example
No response
Steps to reproduce
Clone repository and run
npm run build
after bootstraping the repositoryExpected behavior
It should generate type defintions like so that type acquisition isn't broken if the dependency is somewhere else.
Actual behavior
But it generates which brakes if the unified package isn't a subpackage of unified-lint-rule for example on the same "level"
Additonally it results in many duplicate installs unified etc.
Runtime
Node v16
Package manager
npm v7
OS
Windows
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: