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

Type error when using strict package manager #20

Closed
4 tasks done
Methuselah96 opened this issue Aug 28, 2023 · 4 comments · Fixed by #21
Closed
4 tasks done

Type error when using strict package manager #20

Methuselah96 opened this issue Aug 28, 2023 · 4 comments · Fixed by #21
Labels
📦 area/deps This affects dependencies ☂️ area/types This affects typings 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem

Comments

@Methuselah96
Copy link
Contributor

Methuselah96 commented Aug 28, 2023

Initial checklist

Affected packages and versions

hast-util-raw@8.0.0 and hast-util-raw@9.0.0

Looks like the reference to @types/unist was introduced in #17.

Link to runnable example

No response

Steps to reproduce

  1. Create project using hast-util-raw with a strict package manager like Yarn PnP and skipLibCheck set to false.
  2. Type-check using TypeScript.

Expected behavior

No type errors.

Actual behavior

Type error:

ERROR in node_modules/hast-util-raw/lib/index.d.ts:28:28
TS2307: Cannot find module 'unist' or its corresponding type declarations.
    26 | export type Location = import('parse5').Token.Location;
    27 | export type TagToken = import('parse5').Token.TagToken;
  > 28 | export type Point = import('unist').Point;
       |                            ^^^^^^^
    29 | export type VFile = import('vfile').VFile;
    30 | /**
    31 |  * Configuration.

Affected runtime and version

N/A

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

No response

@Methuselah96 Methuselah96 changed the title Type error when using strict package managers Type error when using strict package manager Aug 28, 2023
@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 28, 2023
@remcohaszing
Copy link
Member

You’re right, this should be an explicit dependency. Would you like to add a PR for this?

@remcohaszing remcohaszing added 🐛 type/bug This is a problem 📦 area/deps This affects dependencies ☂️ area/types This affects typings 🙆 yes/confirmed This is confirmed and ready to be worked on labels Aug 28, 2023
@github-actions github-actions bot added 👍 phase/yes Post is accepted and can be worked on and removed 🤞 phase/open Post is being triaged manually labels Aug 28, 2023
@github-actions

This comment has been minimized.

@remcohaszing remcohaszing added 👶 semver/patch This is a backwards-compatible fix 🤞 phase/open Post is being triaged manually and removed 👍 phase/yes Post is accepted and can be worked on labels Aug 28, 2023
@github-actions github-actions bot removed the 🙆 yes/confirmed This is confirmed and ready to be worked on label Aug 28, 2023
@remcohaszing remcohaszing added the 🙆 yes/confirmed This is confirmed and ready to be worked on label Aug 28, 2023
@github-actions github-actions bot added 👍 phase/yes Post is accepted and can be worked on and removed 🤞 phase/open Post is being triaged manually labels Aug 28, 2023
@github-actions

This comment has been minimized.

@wooorm wooorm added the 💪 phase/solved Post is done label Aug 28, 2023
@github-actions github-actions bot removed 👍 phase/yes Post is accepted and can be worked on 🙆 yes/confirmed This is confirmed and ready to be worked on labels Aug 28, 2023
@wooorm
Copy link
Member

wooorm commented Aug 28, 2023

https://github.com/syntax-tree/hast-util-raw/releases/tag/9.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 area/deps This affects dependencies ☂️ area/types This affects typings 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging a pull request may close this issue.

3 participants