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 and declare missing peer dependencies #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

romdej
Copy link

@romdej romdej commented May 6, 2022

Change Summary

Some peer dependencies were missing in the package.json. This resulted in warnings during the installation of the package. So I added the missing dependencies for a better developper experience. The added dependencies are:

  • @babel/runtime
  • algoliasearch

I've also updated the versions of the docusaurus dependencies to allow a compatibility with more versions of docusaurus.

PR Checklist

romdej added 3 commits May 4, 2022 17:39
Running `npm install`, with a recent version of npm, triggers a fix up which add metadata in the lock file. Here is the output :

$ npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 8 packages, removed 33 packages, changed 25 packages, and audited 1039 packages in 23s
- @babel/runtime is requested by typesense-instantsearch-adapter and typesense.
- algoliasearch is requested by algoliasearch-helper.
"@docusaurus/utils-validation": "2.0.0-beta.17",
"@docusaurus/utils": "~2.0.0-beta.17",
"@docusaurus/utils-validation": "~2.0.0-beta.17",
"algoliasearch": "^4.13.0",
Copy link
Member

Choose a reason for hiding this comment

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

@romdej algoliasearch is actually not a required dependency. It's probably set as a peer dependency in another dependency, when it should really be an optional peer dependency...

@@ -32,10 +33,11 @@
"typesense-instantsearch-adapter": "^2.4.0"
},
"peerDependencies": {
"@babel/runtime": "^7.17.9",
Copy link
Member

Choose a reason for hiding this comment

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

@babel/runtime should also be set as an optional peer dependency because projects could have some other transpiration mechanism built-in, like in the case of docusaurus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants