Skip to content

Commit f3ef35b

Browse files
Remove cra prefix from craSourceWorkspaces, now sourceWorkspaces.
1 parent 2a60b09 commit f3ef35b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/react-dev-utils/workspaceUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const findMonorepo = appDir => {
3838
const workspaces = monoPkg && monoPkg.workspaces;
3939
const patterns = (workspaces && workspaces.packages) || workspaces;
4040
const isYarnWs = Boolean(patterns);
41-
const srcPatterns = appPkg && appPkg.craSourceWorkspaces;
41+
const srcPatterns = appPkg && appPkg.sourceWorkspaces;
4242
const allPkgs = patterns && findPkgs(path.dirname(monoPkgPath), patterns);
4343
const allSrcPkgs =
4444
srcPatterns && findPkgs(path.dirname(monoPkgPath), srcPatterns);

packages/react-scripts/fixtures/monorepos/yarn-ws/packages/cra-app1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"not ie < 11"
3131
]
3232
},
33-
"craSourceWorkspaces": [
33+
"sourceWorkspaces": [
3434
"packages/comp*"
3535
]
3636
}

packages/react-scripts/template/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ monorepo/
18851885
"devDependencies": {
18861886
"react-scripts": "2.0.0"
18871887
},
1888-
"craSourceWorkspaces" : [
1888+
"sourceWorkspaces" : [
18891889
"comp*"
18901890
]
18911891
src/
@@ -1899,7 +1899,7 @@ monorepo/
18991899
"devDependencies": {
19001900
"react-scripts": "2.0.0"
19011901
},
1902-
"craSourceWorkspaces" : [
1902+
"sourceWorkspaces" : [
19031903
"comp*"
19041904
]
19051905
src/
@@ -1923,7 +1923,7 @@ monorepo/
19231923
```
19241924
* Monorepo tools work on a package level, the same level as an npm package.
19251925
* The "workspaces" entry in the top-level package.json is an array of glob patterns specifying where shared packages are located in the monorepo.
1926-
* The "craSourceWorkspaces" entry in an app's package.json is array of glob patterns similar to "workspaces", but specifying which packages in the monorepo should be treated as source.
1926+
* The "sourceWorkspaces" entry in an app's package.json is array of glob patterns similar to "workspaces", but specifying which packages in the monorepo should be treated as source.
19271927
* The scoping prefixes, e.g. @myorg/, are not required, but are recommended, allowing you to differentiate your packages from others of the same name. See [scoped packages ](https://docs.npmjs.com/misc/scope) for more info.
19281928
* Using a package in the monorepo is accomplished in the same manner as a published npm package, by specifying the shared package as dependency.
19291929
* In order to pick up the monorepo version of a package, the specified dependency version must semantically match the package version in the monorepo. See [semver](https://docs.npmjs.com/misc/semver) for info on semantic version matching.

0 commit comments

Comments
 (0)