Skip to content

Commit

Permalink
Add directory details to packages/* package.json (#6826)
Browse files Browse the repository at this point in the history
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](npm/rfcs#19).
  • Loading branch information
feelepxyz authored and ianschmitz committed Apr 16, 2019
1 parent 207d931 commit ced3fd4
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 11 deletions.
8 changes: 6 additions & 2 deletions packages/babel-plugin-named-asset-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
"name": "babel-plugin-named-asset-import",
"version": "0.3.1",
"description": "Babel plugin for named asset imports in Create React App",
"repository": "facebookincubator/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/babel-plugin-named-asset-import"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
"url": "https://github.com/facebook/create-react-app/issues"
},
"main": "index.js",
"files": [
Expand Down
6 changes: 5 additions & 1 deletion packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "babel-preset-react-app",
"version": "7.0.2",
"description": "Babel preset used by Create React App",
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/babel-preset-react-app"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
6 changes: 5 additions & 1 deletion packages/confusing-browser-globals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"scripts": {
"test": "jest"
},
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/confusing-browser-globals"
},
"keywords": [
"eslint",
"globals"
Expand Down
6 changes: 5 additions & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"react"
],
"description": "Create React apps with no build configuration.",
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/create-react-app"
},
"license": "MIT",
"engines": {
"node": ">=8"
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "eslint-config-react-app",
"version": "3.0.8",
"description": "ESLint configuration used by Create React App",
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/eslint-config-react-app"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
6 changes: 5 additions & 1 deletion packages/react-app-polyfill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "react-app-polyfill",
"version": "0.2.2",
"description": "Polyfills for various browsers including commonly used language features",
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/react-app-polyfill"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
6 changes: 5 additions & 1 deletion packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "react-dev-utils",
"version": "8.0.0",
"description": "Webpack utilities used by Create React App",
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/react-dev-utils"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
6 changes: 5 additions & 1 deletion packages/react-error-overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"build": "cross-env NODE_ENV=development node build.js",
"build:prod": "cross-env NODE_ENV=production node build.js"
},
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/react-error-overlay"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
8 changes: 6 additions & 2 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "react-scripts",
"version": "2.1.8",
"description": "Configuration and scripts for Create React App.",
"repository": "facebook/create-react-app",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/create-react-app.git",
"directory": "packages/react-scripts"
},
"license": "MIT",
"engines": {
"node": ">=8.10"
Expand Down Expand Up @@ -59,7 +63,7 @@
"pnp-webpack-plugin": "1.2.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "7.0.1",
"postcss-normalize": "7.0.1",
"postcss-preset-env": "6.6.0",
"postcss-safe-parser": "4.0.1",
"react-app-polyfill": "^0.2.2",
Expand Down

0 comments on commit ced3fd4

Please sign in to comment.