Comments (8)
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.
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.
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.
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.
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.
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.
Well, if homepage
seems to point to github perhaps you could use it as a fallback? ¯\_(ツ)_/¯
from npm-home.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-home.