Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-windows/find-repo-root

Package Overview
Dependencies
Maintainers
2
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-windows/find-repo-root - npm Package Compare versions

Comparing version 0.0.0-canary.28 to 0.0.0-canary.29

11

lib-commonjs/findRepoRoot.d.ts

@@ -8,6 +8,13 @@ /**

*/
declare const _default: () => Promise<string>;
/**
* Find the root directory of a repo upward from cwd
*/
export default _default;
declare function findRepoRoot(): Promise<string>;
/**
* Synchronously finds the root directory of a repo upward from cwd
*/
declare function findRepoRootSync(): string;
declare const exportObj: typeof findRepoRoot & {
sync: typeof findRepoRootSync;
};
export default exportObj;

@@ -14,2 +14,3 @@ "use strict";

const find_up_1 = __importDefault(require("find-up"));
const fs_1 = __importDefault(require("@react-native-windows/fs"));
const path_1 = __importDefault(require("path"));

@@ -19,3 +20,3 @@ /**

*/
exports.default = async () => {
async function findRepoRoot() {
const root = await (0, find_up_1.default)(async (dir) => {

@@ -28,3 +29,17 @@ return (await find_up_1.default.exists(path_1.default.join(dir, '.git'))) ? dir : undefined;

return root;
};
}
/**
* Synchronously finds the root directory of a repo upward from cwd
*/
function findRepoRootSync() {
const root = find_up_1.default.sync((dir) => {
return fs_1.default.existsSync(path_1.default.join(dir, '.git')) ? dir : undefined;
}, { type: 'directory' });
if (!root) {
throw new Error('Unable to find the root of react-native-windows. Are you running within the repo?');
}
return root;
}
const exportObj = Object.assign(findRepoRoot, { sync: findRepoRootSync });
exports.default = exportObj;
//# sourceMappingURL=findRepoRoot.js.map

3

package.json
{
"name": "@react-native-windows/find-repo-root",
"version": "0.0.0-canary.28",
"version": "0.0.0-canary.29",
"license": "MIT",

@@ -19,2 +19,3 @@ "scripts": {

"dependencies": {
"@react-native-windows/fs": "^1.0.1",
"find-up": "^4.1.0"

@@ -21,0 +22,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc