New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.68.0 to 0.69.0-preview.1

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

15

package.json
{
"name": "@react-native-windows/find-repo-root",
"version": "0.68.0",
"version": "0.69.0-preview.1",
"license": "MIT",

@@ -19,8 +19,11 @@ "scripts": {

"dependencies": {
"@react-native-windows/fs": "0.69.0-preview.1",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"find-up": "^4.1.0"
},
"devDependencies": {
"@rnw-scripts/eslint-config": "1.1.10",
"@rnw-scripts/just-task": "2.2.2",
"@rnw-scripts/ts-config": "2.0.1",
"@rnw-scripts/eslint-config": "1.1.12",
"@rnw-scripts/just-task": "2.2.3",
"@rnw-scripts/ts-config": "2.0.2",
"@types/find-up": "^4.0.0",

@@ -34,7 +37,7 @@ "@types/node": "^14.14.22",

"beachball": {
"defaultNpmTag": "latest",
"defaultNpmTag": "preview",
"disallowedChangeTypes": [
"major",
"minor",
"prerelease"
"patch"
]

@@ -41,0 +44,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