Skip to content

Commit ced3fd4

Browse files
feelepxyzianschmitz
authored andcommitted
Add directory details to packages/* package.json (#6826)
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).
1 parent 207d931 commit ced3fd4

File tree

9 files changed

+47
-11
lines changed

9 files changed

+47
-11
lines changed

Diff for: packages/babel-plugin-named-asset-import/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
"name": "babel-plugin-named-asset-import",
33
"version": "0.3.1",
44
"description": "Babel plugin for named asset imports in Create React App",
5-
"repository": "facebookincubator/create-react-app",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/create-react-app.git",
8+
"directory": "packages/babel-plugin-named-asset-import"
9+
},
610
"license": "MIT",
711
"bugs": {
8-
"url": "https://github.com/facebookincubator/create-react-app/issues"
12+
"url": "https://github.com/facebook/create-react-app/issues"
913
},
1014
"main": "index.js",
1115
"files": [

Diff for: packages/babel-preset-react-app/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "babel-preset-react-app",
33
"version": "7.0.2",
44
"description": "Babel preset used by Create React App",
5-
"repository": "facebook/create-react-app",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/create-react-app.git",
8+
"directory": "packages/babel-preset-react-app"
9+
},
610
"license": "MIT",
711
"bugs": {
812
"url": "https://github.com/facebook/create-react-app/issues"

Diff for: packages/confusing-browser-globals/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"scripts": {
88
"test": "jest"
99
},
10-
"repository": "facebook/create-react-app",
10+
"repository": {
11+
"type" : "git",
12+
"url" : "https://github.com/facebook/create-react-app.git",
13+
"directory": "packages/confusing-browser-globals"
14+
},
1115
"keywords": [
1216
"eslint",
1317
"globals"

Diff for: packages/create-react-app/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"react"
66
],
77
"description": "Create React apps with no build configuration.",
8-
"repository": "facebook/create-react-app",
8+
"repository": {
9+
"type" : "git",
10+
"url" : "https://github.com/facebook/create-react-app.git",
11+
"directory": "packages/create-react-app"
12+
},
913
"license": "MIT",
1014
"engines": {
1115
"node": ">=8"

Diff for: packages/eslint-config-react-app/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "eslint-config-react-app",
33
"version": "3.0.8",
44
"description": "ESLint configuration used by Create React App",
5-
"repository": "facebook/create-react-app",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/create-react-app.git",
8+
"directory": "packages/eslint-config-react-app"
9+
},
610
"license": "MIT",
711
"bugs": {
812
"url": "https://github.com/facebook/create-react-app/issues"

Diff for: packages/react-app-polyfill/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "react-app-polyfill",
33
"version": "0.2.2",
44
"description": "Polyfills for various browsers including commonly used language features",
5-
"repository": "facebook/create-react-app",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/create-react-app.git",
8+
"directory": "packages/react-app-polyfill"
9+
},
610
"license": "MIT",
711
"bugs": {
812
"url": "https://github.com/facebook/create-react-app/issues"

Diff for: packages/react-dev-utils/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "react-dev-utils",
33
"version": "8.0.0",
44
"description": "Webpack utilities used by Create React App",
5-
"repository": "facebook/create-react-app",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/create-react-app.git",
8+
"directory": "packages/react-dev-utils"
9+
},
610
"license": "MIT",
711
"bugs": {
812
"url": "https://github.com/facebook/create-react-app/issues"

Diff for: packages/react-error-overlay/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
"build": "cross-env NODE_ENV=development node build.js",
1111
"build:prod": "cross-env NODE_ENV=production node build.js"
1212
},
13-
"repository": "facebook/create-react-app",
13+
"repository": {
14+
"type" : "git",
15+
"url" : "https://github.com/facebook/create-react-app.git",
16+
"directory": "packages/react-error-overlay"
17+
},
1418
"license": "MIT",
1519
"bugs": {
1620
"url": "https://github.com/facebook/create-react-app/issues"

Diff for: packages/react-scripts/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "react-scripts",
33
"version": "2.1.8",
44
"description": "Configuration and scripts for Create React App.",
5-
"repository": "facebook/create-react-app",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/create-react-app.git",
8+
"directory": "packages/react-scripts"
9+
},
610
"license": "MIT",
711
"engines": {
812
"node": ">=8.10"
@@ -59,7 +63,7 @@
5963
"pnp-webpack-plugin": "1.2.1",
6064
"postcss-flexbugs-fixes": "4.1.0",
6165
"postcss-loader": "3.0.0",
62-
"postcss-normalize": "7.0.1",
66+
"postcss-normalize": "7.0.1",
6367
"postcss-preset-env": "6.6.0",
6468
"postcss-safe-parser": "4.0.1",
6569
"react-app-polyfill": "^0.2.2",

0 commit comments

Comments
 (0)