Skip to content

Commit 60da570

Browse files
greysteiljetoneza
authored andcommitted
Add directory details to the package.json of all packages (facebook#14628)
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.
1 parent cefbf93 commit 60da570

File tree

16 files changed

+80
-16
lines changed

16 files changed

+80
-16
lines changed

packages/create-subscription/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "create-subscription",
33
"description": "utility for subscribing to external data sources inside React components",
44
"version": "16.7.0",
5-
"repository": "facebook/react",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/react.git",
8+
"directory": "packages/create-subscription"
9+
},
610
"files": [
711
"LICENSE",
812
"README.md",

packages/eslint-plugin-react-hooks/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"name": "eslint-plugin-react-hooks",
44
"description": "ESLint rules for React Hooks",
55
"version": "0.0.0",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/eslint-plugin-react-hooks"
10+
},
711
"files": [
812
"LICENSE",
913
"README.md",

packages/jest-mock-scheduler/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"version": "0.1.0",
55
"description": "Jest matchers and utilities for testing the scheduler package.",
66
"main": "index.js",
7-
"repository": "facebook/react",
7+
"repository": {
8+
"type" : "git",
9+
"url" : "https://github.com/facebook/react.git",
10+
"directory": "packages/jest-mock-scheduler"
11+
},
812
"keywords": [
913
"jest",
1014
"scheduler"

packages/jest-react/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"version": "0.5.0",
44
"description": "Jest matchers and utilities for testing React components.",
55
"main": "index.js",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/jest-react"
10+
},
711
"keywords": [
812
"react",
913
"jest",

packages/react-art/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"description": "React ART is a JavaScript library for drawing vector graphics using React. It provides declarative and reactive bindings to the ART library. Using the same declarative API you can render the output to either Canvas, SVG or VML (IE8).",
44
"version": "16.7.0",
55
"main": "index.js",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/react-art"
10+
},
711
"keywords": [
812
"react",
913
"art",

packages/react-cache/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"name": "react-cache",
44
"description": "A basic cache for React applications",
55
"version": "2.0.0-alpha.0",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/react-cache"
10+
},
711
"files": [
812
"LICENSE",
913
"README.md",

packages/react-debug-tools/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
"cjs/"
1818
],
1919
"main": "index.js",
20-
"repository": "facebook/react",
20+
"repository": {
21+
"type" : "git",
22+
"url" : "https://github.com/facebook/react.git",
23+
"directory": "packages/react-debug-tools"
24+
},
2125
"engines": {
2226
"node": ">=0.10.0"
2327
},

packages/react-dom/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"version": "16.7.0",
44
"description": "React package for working with the DOM.",
55
"main": "index.js",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/react-dom"
10+
},
711
"keywords": [
812
"react"
913
],

packages/react-is/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"version": "16.7.0",
44
"description": "Brand checking of React Elements.",
55
"main": "index.js",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/react-is"
10+
},
711
"keywords": [
812
"react"
913
],

packages/react-native-renderer/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "react-native-renderer",
33
"version": "16.0.0",
44
"private": true,
5-
"repository": "facebook/react",
5+
"repository": {
6+
"type" : "git",
7+
"url" : "https://github.com/facebook/react.git",
8+
"directory": "packages/react-native-renderer"
9+
},
610
"dependencies": {
711
"object-assign": "^4.1.1",
812
"prop-types": "^15.6.2",

packages/react-noop-renderer/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"private": true,
55
"description": "React package for testing the Fiber reconciler.",
66
"main": "index.js",
7-
"repository": "facebook/react",
7+
"repository": {
8+
"type" : "git",
9+
"url" : "https://github.com/facebook/react.git",
10+
"directory": "packages/react-noop-renderer"
11+
},
812
"license": "MIT",
913
"dependencies": {
1014
"object-assign": "^4.1.1",

packages/react-reconciler/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
"cjs/"
1919
],
2020
"main": "index.js",
21-
"repository": "facebook/react",
21+
"repository": {
22+
"type" : "git",
23+
"url" : "https://github.com/facebook/react.git",
24+
"directory": "packages/react-reconciler"
25+
},
2226
"engines": {
2327
"node": ">=0.10.0"
2428
},

packages/react-stream/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
"cjs/"
1717
],
1818
"main": "index.js",
19-
"repository": "facebook/react",
19+
"repository": {
20+
"type" : "git",
21+
"url" : "https://github.com/facebook/react.git",
22+
"directory": "packages/react-stream"
23+
},
2024
"engines": {
2125
"node": ">=0.10.0"
2226
},

packages/react-test-renderer/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"version": "16.7.0",
44
"description": "React package for snapshot testing.",
55
"main": "index.js",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/react-test-renderer"
10+
},
711
"keywords": [
812
"react",
913
"react-native",

packages/react/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
"umd/"
1818
],
1919
"main": "index.js",
20-
"repository": "facebook/react",
20+
"repository": {
21+
"type" : "git",
22+
"url" : "https://github.com/facebook/react.git",
23+
"directory": "packages/react"
24+
},
2125
"engines": {
2226
"node": ">=0.10.0"
2327
},

packages/scheduler/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"version": "0.12.0",
44
"description": "Cooperative scheduler for the browser environment.",
55
"main": "index.js",
6-
"repository": "facebook/react",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/facebook/react.git",
9+
"directory": "packages/scheduler"
10+
},
711
"license": "MIT",
812
"keywords": [
913
"react"

0 commit comments

Comments
 (0)