@react-native-windows/find-repo-root
Advanced tools
Comparing version 0.68.0 to 0.69.0-preview.1
@@ -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 |
{ | ||
"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
5636
60
4
+ Added@eslint-community/eslint-utils@4.4.1(transitive)
+ Added@eslint-community/regexpp@4.12.1(transitive)
+ Added@eslint/eslintrc@2.1.4(transitive)
+ Added@eslint/js@8.57.1(transitive)
+ Added@humanwhocodes/config-array@0.13.0(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/object-schema@2.0.3(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@react-native-windows/fs@0.69.0-preview.1(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Added@types/semver@7.5.8(transitive)
+ Added@typescript-eslint/eslint-plugin@5.62.0(transitive)
+ Added@typescript-eslint/parser@5.62.0(transitive)
+ Added@typescript-eslint/scope-manager@5.62.0(transitive)
+ Added@typescript-eslint/type-utils@5.62.0(transitive)
+ Added@typescript-eslint/types@5.62.0(transitive)
+ Added@typescript-eslint/typescript-estree@5.62.0(transitive)
+ Added@typescript-eslint/utils@5.62.0(transitive)
+ Added@typescript-eslint/visitor-keys@5.62.0(transitive)
+ Added@ungap/structured-clone@1.3.0(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-jsx@5.3.2(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addeddoctrine@3.0.0(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedeslint@8.57.1(transitive)
+ Addedeslint-scope@5.1.17.2.2(transitive)
+ Addedeslint-visitor-keys@3.4.3(transitive)
+ Addedespree@9.6.1(transitive)
+ Addedesquery@1.6.0(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@4.3.05.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-glob@3.3.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfastq@1.18.0(transitive)
+ Addedfile-entry-cache@6.0.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedflat-cache@3.2.0(transitive)
+ Addedflatted@3.3.2(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedglob-parent@5.1.26.0.2(transitive)
+ Addedglobals@13.24.0(transitive)
+ Addedglobby@11.1.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedgraphemer@1.4.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedis-path-inside@3.0.3(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson-buffer@3.0.1(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stable-stringify-without-jsonify@1.0.1(transitive)
+ Addedkeyv@4.5.4(transitive)
+ Addedlevn@0.4.1(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedms@2.1.3(transitive)
+ Addednatural-compare@1.4.0(transitive)
+ Addednatural-compare-lite@1.4.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedoptionator@0.9.4(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedprelude-ls@1.2.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrimraf@3.0.2(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtext-table@0.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedtsutils@3.21.0(transitive)
+ Addedtype-check@0.4.0(transitive)
+ Addedtype-fest@0.20.2(transitive)
+ Addedtypescript@5.7.3(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedyocto-queue@0.1.0(transitive)