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

chore(*): add directory details to the package.json of all packages #11145

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore(build): add directory details to the package.json of all packages
Specifying the directory as part of the `repository` field in a `package.json`
allows third party tools to provide better support when working with monorepos.
For example, it allows them to correctly construct a commit diff for a specific
package.

This format was accepted by npm in npm/rfcs#19.
greysteil authored and sidharthachatterjee committed Apr 25, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 25e1f01ea6fabdd1a98c2a54a1423ff44ef9de28
6 changes: 5 additions & 1 deletion packages/gatsby-cli/package.json
Original file line number Diff line number Diff line change
@@ -56,7 +56,11 @@
],
"license": "MIT",
"main": "lib/index.js",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-cli",
Copy link
Contributor

Choose a reason for hiding this comment

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

So as @wardpeet noted, this is something we'll want to do (eventually?), but I do think this is maybe a worse experience in two scenarios:

  1. Browsing on npmjs.org and using the repository link, e.g. gatsby-cli
  2. Using npm repo <repo-name>, e.g. npm repo gatsby-cli

In both of these scenarios, the root of the repo will open, rather than the specific package.

Copy link
Author

Choose a reason for hiding this comment

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

Agreed - until npm improves their links to support the new format properly the hack is probably a better experience.

Maybe worth leaving this open, but with a comment that support for npm/cli#140, and an implementation of the npmjs.org change (I believe that repo is private), would be awesome.

"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-cli"
},
"scripts": {
"build": "babel src --out-dir lib --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
3 changes: 2 additions & 1 deletion packages/gatsby-codemods/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-codemods#readme",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-codemods"
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-codemods"
},
"license": "MIT",
"dependencies": {
6 changes: 5 additions & 1 deletion packages/gatsby-dev-cli/package.json
Original file line number Diff line number Diff line change
@@ -34,7 +34,11 @@
],
"license": "MIT",
"main": "index.js",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-dev-cli",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-dev-cli"
},
"scripts": {
"build": "babel src --out-dir dist --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-image/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,11 @@
],
"license": "MIT",
"main": "index.js",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-image"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-link/package.json
Original file line number Diff line number Diff line change
@@ -30,7 +30,11 @@
"react": "^16.4.2",
"react-dom": "^16.4.2"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-link",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-link"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-canonical-urls/package.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-canonical-urls",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-canonical-urls"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-catch-links/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-catch-links",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-catch-links"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-coffeescript/package.json
Original file line number Diff line number Diff line change
@@ -33,7 +33,11 @@
"gatsby": "^2.0.0"
},
"readme": "README.md",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-coffeescript",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-coffeescript"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-create-client-paths/package.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-create-client-paths",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-create-client-paths"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-cxs/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,11 @@
"cxs": ">=5.0.0",
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-cxs",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-cxs"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-emotion/package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,11 @@
"@emotion/core": "^10.0.5",
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-emotion",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-emotion"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-facebook-analytics/package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,8 @@
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-facebook-analytics"
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-facebook-analytics"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-feed/package.json
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-feed",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-feed"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-flow/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-flow#readme",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-flow"
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-flow"
},
"license": "MIT",
"dependencies": {
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-fullstory/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-fullstory#readme",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-fullstory"
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-fullstory"
},
"license": "MIT",
"dependencies": {
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-glamor/package.json
Original file line number Diff line number Diff line change
@@ -27,7 +27,11 @@
"gatsby": "^2.0.0",
"glamor": "^2.20.29"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-glamor",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-glamor"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-google-analytics"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-google-gtag/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-gtag",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-google-gtag"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-google-tagmanager/package.json
Original file line number Diff line number Diff line change
@@ -27,7 +27,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-tagmanager",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-google-tagmanager"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-guess-js/package.json
Original file line number Diff line number Diff line change
@@ -23,7 +23,8 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-guess-js#readme",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-guess-js"
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-guess-js"
},
"license": "MIT",
"dependencies": {
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-jss/package.json
Original file line number Diff line number Diff line change
@@ -27,7 +27,11 @@
"peerDependencies": {
"gatsby": "^2.0.32"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-jss",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-jss"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-layout/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-layout#readme",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-layout"
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-layout"
},
"license": "MIT",
"dependencies": {
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-less/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,11 @@
"gatsby": "^2.0.0",
"less": "^3.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-less",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-less"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__,theme-test.js",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-lodash/package.json
Original file line number Diff line number Diff line change
@@ -27,7 +27,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-lodash",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-lodash"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-manifest/package.json
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@
"peerDependencies": {
"gatsby": "^2.0.15"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-manifest",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-manifest"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-netlify-cms/package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,11 @@
"gatsby": "^2.0.101",
"netlify-cms": "^2.0.6"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-netlify-cms",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-netlify-cms"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-netlify/package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-netlify",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-netlify"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-no-sourcemaps/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,11 @@
],
"license": "MIT",
"main": "index.js",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-no-sourcemaps",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-no-sourcemaps"
},
"peerDependencies": {
"gatsby": "^2.0.0"
}
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-nprogress/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-nprogress",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-nprogress"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-offline/package.json
Original file line number Diff line number Diff line change
@@ -33,7 +33,11 @@
"peerDependencies": {
"gatsby": "^2.0.100"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-offline",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-offline"
},
"scripts": {
"build": "npm run build:src && npm run build:sw-append",
"build:src": "babel src --out-dir . --ignore **/__tests__,src/sw-append.js",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-postcss/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,11 @@
"gatsby": "^2.0.0"
},
"readme": "README.md",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-postcss",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-postcss"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
6 changes: 5 additions & 1 deletion packages/gatsby-plugin-preact/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,11 @@
"peerDependencies": {
"gatsby": "^2.0.0"
},
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-preact",
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby.git",
"directory": "packages/gatsby-plugin-preact"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
Loading