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

Update documentation for resolutions #4

Closed
emilorol opened this issue Jun 28, 2023 · 5 comments
Closed

Update documentation for resolutions #4

emilorol opened this issue Jun 28, 2023 · 5 comments

Comments

@emilorol
Copy link

Thank you for taking over this project.

I think it make sense to add to the documentation the instructions on how to use your project as resolutions for yarn or overrides for npm.

Something alone the lines of:

If you are using yarn and a dependency needs your package then add the following to your package.json:

  "resolutions": {
    "**/word-wrap": "npm:@aashutoshrathi/word-wrap"
  },

If you are using npm and a dependency needs your package then add the following to your package.json:

  "overrides": {
    "**/word-wrap": "npm:@aashutoshrathi/word-wrap"
  },
@wellwelwel
Copy link

wellwelwel commented Jun 28, 2023

@aashutoshrathi, are you interested in maintaining support for this project?

I think I already know the answer 🙋🏻‍♂️

So, can we contribute to your repository?


I would like to say that this repository is currently used by Optionator, a direct dependency of ESLint 🚀

@aashutoshrathi
Copy link
Owner

Yup! I can

@aifrak
Copy link

aifrak commented Jun 30, 2023

Regarding the npm solution, the code above does not work for me (node 18, npm 9). This worked for me:

  "overrides": {
    "word-wrap": "@aashutoshrathi/word-wrap"
  },

@emilorol
Copy link
Author

emilorol commented Jul 5, 2023

To add this should I update the .verb.md or the README.md file ?

@wellwelwel
Copy link

@emilorol

Some users have listed different ways of reaching the same result. So it's interesting to test the proper ways before documenting them.


Something like:

Deep Dependencies Workaround

YARN

"resolutions": {
  "word-wrap": "@aashutoshrathi/word-wrap"
}

NPM (8 or higher)

"overrides": {
  "word-wrap" : "@aashutoshrathi/word-wrap"
}

About the appropriate place, README.md is ideal if you want it to appear at npm page and the default repository page.

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

No branches or pull requests

4 participants