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 missing dependency #13

Merged
merged 3 commits into from
Nov 3, 2021
Merged

Add missing dependency #13

merged 3 commits into from
Nov 3, 2021

Conversation

Ayc0
Copy link
Contributor

@Ayc0 Ayc0 commented Nov 2, 2021

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Add @types/unist in dependencies (in the deps and not devDeps, because those types are exposed to users)

Related to #12

@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 Nov 2, 2021
@Ayc0
Copy link
Contributor Author

Ayc0 commented Nov 2, 2021

@wooorm, I didn't know which version to choose, so I just picked the latest

@Ayc0
Copy link
Contributor Author

Ayc0 commented Nov 2, 2021

I could also use peer deps instead of deps, WDYT?

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

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

Thanks @Ayc0!
The rule of thumb for picking versions in unified.
Generally go for the first release of the latest major and use ^ to allow for newer releases in the same line.

package.json Outdated Show resolved Hide resolved
Co-authored-by: Christian Murphy <christian.murphy.42@gmail.com>
@Ayc0
Copy link
Contributor Author

Ayc0 commented Nov 2, 2021

Thanks @ChristianMurphy

And what about deps vs peerDeps?
Any preferences?

@ChristianMurphy
Copy link
Member

ChristianMurphy commented Nov 2, 2021

I'd lean depedencies.
peerDependencies should be used sparingly, and specifically where either: a user needs to be able to select another version of a package, or the location of a package's folder relative to another package is important.
Here the relative folder isn't important, and selecting a specific version of the dependency manually is unlikely and could cause issues.

@wooorm wooorm changed the title Add @types/unist in dependencies Add missing dependency Nov 3, 2021
@wooorm wooorm merged commit bdddcb5 into syntax-tree:main Nov 3, 2021
@wooorm wooorm added ☂️ area/types This affects typings 💪 phase/solved Post is done 📦 area/deps This affects dependencies labels Nov 3, 2021
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Nov 3, 2021
@Ayc0 Ayc0 deleted the patch-1 branch November 3, 2021 08:52
@Ayc0
Copy link
Contributor Author

Ayc0 commented Nov 3, 2021

Thanks!

@wooorm
Copy link
Member

wooorm commented Nov 3, 2021

Thank you Benjamin!

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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants