first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

16
node_modules/expo-router/build/doctor/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import type { PackageJSONConfig } from 'expo/config';
type IncorrectDependency = {
packageName: string;
packageType: 'dependencies' | 'devDependencies';
expectedVersionOrRange: string;
actualVersion: string;
};
export declare function doctor(pkg: PackageJSONConfig, appReactNavigationPath: string | undefined, { bold, learnMore, }: {
bold: (text: string) => string;
learnMore: (url: string, options?: {
learnMoreMessage?: string;
dim?: boolean;
}) => string;
}): IncorrectDependency[];
export {};
//# sourceMappingURL=index.d.ts.map

1
node_modules/expo-router/build/doctor/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/doctor/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,GAAG,iBAAiB,CAAC;IAChD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAgB,MAAM,CACpB,GAAG,EAAE,iBAAiB,EACtB,sBAAsB,EAAE,MAAM,GAAG,SAAS,EAE1C,EACE,IAAI,EACJ,SAAS,GACV,EAAE;IACD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,MAAM,CAAC;CAC5F,GACA,mBAAmB,EAAE,CA4DvB"}

68
node_modules/expo-router/build/doctor/index.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.doctor = doctor;
const debug_1 = __importDefault(require("debug"));
const subset_1 = __importDefault(require("semver/ranges/subset"));
const debug = (0, debug_1.default)('expo:router:doctor');
/**
* Small hack to get the package.json.
* We do no use import() as this would require changing the rootDir in `tsconfig.json`,
* which in turn will change the structure of the outDir.
*/
const routerPkg = require('../../package.json');
const routerDependencies = Object.entries(Object.assign({}, routerPkg.dependencies, routerPkg.peerDependencies)).filter((entry) => entry[0].startsWith('@react-navigation') && entry[1] !== '*');
function doctor(pkg, appReactNavigationPath,
// Reuse the formatting functions from expo-cli
{ bold, learnMore, }) {
const resolvedDependencies = { ...pkg.dependencies, ...pkg.devDependencies };
const libReactNavigationPath = require.resolve('@react-navigation/native');
const userExcluded = new Set(pkg.expo?.install?.exclude);
const incorrectDependencies = [];
/**
* If the user has a dependency with a sub-dependency on @react-navigation/native, this may install a different
* version of @react-navigation/native than the one required by expo-router.
*
* To detect this, we require the caller of this function to first resolve their path to @react-navigation/native, as
* they will get the 'top' level package. When expo-router resolves the path to @react-navigation/native, if it is different
* when the versions must not have matched and the package manager installed a nested node_module folder with a different
* version of @react-navigation/native.
*/
if (
// NOTE(@kitten): This looks inverted. However, this check will soon be redundant
userExcluded.has('@react-navigation/native') &&
appReactNavigationPath &&
appReactNavigationPath !== libReactNavigationPath) {
console.warn(`Detected multiple versions of ${bold('@react-navigation/native')} in your ${bold('node_modules')}. This may lead to unexpected navigation behavior and errors. ${learnMore('https://expo.fyi/router-navigation-deps')}.`);
}
for (const [dep, allowedRange] of routerDependencies) {
if (userExcluded.has(dep)) {
debug(`Skipping ${dep} because it is excluded in the config`);
continue;
}
const usersRange = resolvedDependencies[dep];
/**
* routerDependencies contains all the dependencies that are required by expo-router,
* both peerDependencies and dependencies. If the user has not manually installed
* them, then we should skip them.
*/
if (!usersRange) {
continue;
}
debug(`Checking ${dep} with ${allowedRange} and found ${usersRange}`);
if (!usersRange || (0, subset_1.default)(allowedRange, usersRange)) {
continue;
}
debug(`Incorrect dependency found for ${dep}`);
incorrectDependencies.push({
packageName: dep,
packageType: pkg.dependencies && dep in pkg.dependencies ? 'dependencies' : 'devDependencies',
expectedVersionOrRange: allowedRange,
actualVersion: usersRange,
});
}
return incorrectDependencies;
}
//# sourceMappingURL=index.js.map

1
node_modules/expo-router/build/doctor/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long