@rnw-scripts/find-repo-root
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -5,6 +5,36 @@ { | ||
{ | ||
"date": "Thu, 01 Oct 2020 05:05:41 GMT", | ||
"date": "Wed, 21 Oct 2020 05:04:21 GMT", | ||
"tag": "@rnw-scripts/find-repo-root_v0.0.12", | ||
"version": "0.0.12", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Allow non-RNW repos", | ||
"author": "ngerlem@microsoft.com", | ||
"commit": "cd0d904f4779ef919654bc006c6d4525bbf1b724", | ||
"package": "@rnw-scripts/find-repo-root" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Fri, 09 Oct 2020 05:06:32 GMT", | ||
"tag": "@rnw-scripts/find-repo-root_v0.0.11", | ||
"version": "0.0.11", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "Update just-scipts (remove npm-registry-fetch)", | ||
"author": "ngerlem@microsoft.com", | ||
"commit": "00b2d84b8effce0b7405a67bd4903eed88cb9aaf", | ||
"package": "@rnw-scripts/find-repo-root" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 01 Oct 2020 05:08:11 GMT", | ||
"tag": "@rnw-scripts/find-repo-root_v0.0.11", | ||
"version": "0.0.11", | ||
"comments": { | ||
"patch": [ | ||
@@ -11,0 +41,0 @@ { |
# Change Log - @rnw-scripts/find-repo-root | ||
This log was last generated on Thu, 01 Oct 2020 05:05:41 GMT and should not be manually modified. | ||
This log was last generated on Wed, 21 Oct 2020 05:04:21 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 0.0.12 | ||
Wed, 21 Oct 2020 05:04:21 GMT | ||
### Patches | ||
- Allow non-RNW repos (ngerlem@microsoft.com) | ||
## 0.0.11 | ||
Thu, 01 Oct 2020 05:05:41 GMT | ||
Thu, 01 Oct 2020 05:08:11 GMT | ||
@@ -11,0 +19,0 @@ ### Patches |
@@ -10,4 +10,4 @@ /** | ||
/** | ||
* Find the root directory of the repo upward from cwd | ||
* Find the root directory of a repo upward from cwd | ||
*/ | ||
export default _default; |
@@ -11,17 +11,9 @@ "use strict"; | ||
const findUp = require("find-up"); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
/** | ||
* Find the root directory of the repo upward from cwd | ||
* Find the root directory of a repo upward from cwd | ||
*/ | ||
exports.default = async () => { | ||
const root = await findUp(async (dir) => { | ||
const packagePath = path.join(dir, 'package.json'); | ||
if (!(await findUp.exists(packagePath))) { | ||
return undefined; | ||
} | ||
const pkg = (await fs.promises.readFile(packagePath)).toString(); | ||
return JSON.parse(pkg).name === 'react-native-windows-repo' | ||
? dir | ||
: undefined; | ||
return (await findUp.exists(path.join(dir, '.git'))) ? dir : undefined; | ||
}, { type: 'directory' }); | ||
@@ -28,0 +20,0 @@ if (!root) { |
{ | ||
"name": "@rnw-scripts/find-repo-root", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"license": "MIT", | ||
@@ -22,3 +22,3 @@ "scripts": { | ||
"eslint": "6.8.0", | ||
"just-scripts": "^0.36.1", | ||
"just-scripts": "^0.44.7", | ||
"prettier": "1.19.1", | ||
@@ -25,0 +25,0 @@ "typescript": "^3.8.3" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
6658
160
1