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

📝 Docs: add an 'install' section to the README? #83

Closed
3 tasks done
jclaveau opened this issue Dec 20, 2023 · 5 comments · Fixed by #84
Closed
3 tasks done

📝 Docs: add an 'install' section to the README? #83

jclaveau opened this issue Dec 20, 2023 · 5 comments · Fixed by #84
Labels
area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this!

Comments

@jclaveau
Copy link

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

  • Have no misleading error during dev
  • Be able to auto-import dedent

Actual

I installed dedent with pnpm install dmnd/dedent

Then Typescript can't find the declaration but at runtime (Vite devServer) my strings are dedented:
image

Also trying to auto-import it with https://github.com/unplugin/unplugin-auto-import configured with

              'dedent': [
                [`default`, `dedent`],
              ],

I get
image

Additional Info

  • My project is a pnpm monorepo with one tsconfig per package. dedent is a dep of only one of the packages

  • When I go to node_modules/dedent, the dist folder is missing.

  • When I install the dev dependencies and build it, the dist folder is created and everything works well

  • Investigating I realized that my package.json was odd
    image

  • so I run a pnpm remove dedent then pnpm install dedent and everythin works well now (removing it first is mandatory)

  • I open this bug anyway as it may be useful to add an 'install' section to the README to avoid this. I personally didn't know that pnpm would automatically map to github if I added the vendor in the install command.

@jclaveau jclaveau added the type: bug Something isn't working :( label Dec 20, 2023
Copy link

Uh oh! @jclaveau, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@JoshuaKGoldberg JoshuaKGoldberg changed the title 🐛 Bug: Cannot find module 'dedent' ... 📝 Docs: add an 'install' section to the README? Dec 20, 2023
Copy link

Uh oh! @jclaveau, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@JoshuaKGoldberg
Copy link
Collaborator

JoshuaKGoldberg commented Dec 20, 2023

Whew, got me scared with this title 😄 but this is really a docs request. I don't recall ever seeing an issue reported on the github:... syntax. It feels to me that if a project is going to link to a repository in that way, it should really be willing to work with details of how the tooling works (read: this is a userland issue, not a dedent issue). That tooling is -to my understanding- mostly meant for developers to be able to try something locally or pin to a specific in-development / unpublished version of the repository.

Furthermore, if you're going to link to a repository, you should really pin to a specific commit. Linking to "github:..." is the equivalent of "*" for the version number. No guarantees your builds won't suddenly start failing from a breaking change upon a coincidental lockfile update.

...all that being said, most of my other repos have an explicit install command in their readme. I can add one in here. Thanks for the suggestion!

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! area: documentation Improvements or additions to docs and removed type: bug Something isn't working :( labels Dec 20, 2023
@jclaveau
Copy link
Author

I didn't expect dedent to be added with a github:... url when I ran pnpm install dmnd/dedent, I just noticed it afterwards (including the absence of commit).

Thank you for your time!

JoshuaKGoldberg added a commit that referenced this issue Dec 21, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #83
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/dmnd/dedent/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/dmnd/dedent/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Adds an explicit `npm install dedent` code block to the top of the
README.md
Copy link

🎉 This is included in version v1.5.2 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants