Giter Club home page Giter Club logo

Comments (8)

sindresorhus avatar sindresorhus commented on June 5, 2024 1

Here's what we'll do: If github-url-from-git returns undefined, we'll use repository if it's a normal URL (http/https). If not, we'll just use homepage. We also print a message about it being an invalid repository URL and such, but not throw.

from npm-home.

kevva avatar kevva commented on June 5, 2024

Seems like github-url-from-git fails to parse https://github.com/babel/minify/tree/master/packages/babel-preset-minify. Should we just fall back to using pkg.repository.url directly if github-url-from-git returns undefined @sindresorhus?

from npm-home.

sindresorhus avatar sindresorhus commented on June 5, 2024

That URL is an invalid repository URL though. So maybe better to throw and tell the user to open an issue on the repo to fix it?

from npm-home.

kevva avatar kevva commented on June 5, 2024

I think it's because they are using the monorepo approach. Linking to the correct folder in the repo will result in that URL so I wouldn't say it's totally invalid.

from npm-home.

lydell avatar lydell commented on June 5, 2024

Not sure if it helps you at all, but the github link in the sidebar to the right is correct here: https://www.npmjs.com/package/babel-preset-minify

from npm-home.

kevva avatar kevva commented on June 5, 2024

It's because it points to the homepage field in package.json. It's pretty common to link to a landing page instead of the actual GitHub repo there so it's not guaranteed to work.

from npm-home.

lydell avatar lydell commented on June 5, 2024

Well, if homepage seems to point to github perhaps you could use it as a fallback? ¯\_(ツ)_/¯

from npm-home.

sindresorhus avatar sindresorhus commented on June 5, 2024

Linking to the correct folder in the repo will result in that URL so I wouldn't say it's totally invalid.

Technically it's totally invalid as repository is supposed to be an URL to a repository, meaning something you can git clone directly.

from npm-home.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.