diff --git a/.attw.json b/.attw.json new file mode 100644 index 0000000000..b36f7e5d31 --- /dev/null +++ b/.attw.json @@ -0,0 +1,4 @@ +{ + "profile": "esm-only", + "ignoreRules": ["internal-resolution-error", "cjs-resolves-to-esm"] +} diff --git a/.github/scripts/attw/.yarnrc.yml b/.github/scripts/attw/.yarnrc.yml new file mode 100644 index 0000000000..1e931d38d2 --- /dev/null +++ b/.github/scripts/attw/.yarnrc.yml @@ -0,0 +1,3 @@ +yarnPath: ../../../.yarn/releases/yarn-4.14.1.cjs + +npmMinimalAgeGate: 7d diff --git a/.github/scripts/attw/package.json b/.github/scripts/attw/package.json new file mode 100644 index 0000000000..2cba33d373 --- /dev/null +++ b/.github/scripts/attw/package.json @@ -0,0 +1,16 @@ +{ + "name": "attw-check", + "version": "1.0.0", + "private": true, + "scripts": { + "check": "tsx src/index.ts" + }, + "dependencies": { + "@arethetypeswrong/cli": "^0.18.4" + }, + "devDependencies": { + "tsx": "^4.21.0", + "typescript": "^6.0.3" + }, + "packageManager": "yarn@4.14.1" +} diff --git a/.github/scripts/attw/src/index.ts b/.github/scripts/attw/src/index.ts new file mode 100644 index 0000000000..6febc19d5e --- /dev/null +++ b/.github/scripts/attw/src/index.ts @@ -0,0 +1,420 @@ +/** + * Validate published package types with @arethetypeswrong/cli (attw). + * + * Usage (from repo root): + * yarn attw:check + * + * Scope is defined in okf-bundle/testing/architecture-decisions.md (Types-AD-1..4) + * and repo-root .attw.json (profile esm-only + ignored rules). + * + * Also smoke-tests Expo config plugins the way Expo prebuild loads them: + * app.plugin.js -> require('./plugin/build/app.plugin') under Node CJS with peers installed. + * + * All child processes use spawnSync with argument arrays (no shell) to avoid + * cross-platform command-parsing issues. + * + * Exit codes: + * 0 — all checks pass + * 1 — attw failures and/or Expo plugin smoke failures + */ + +import { spawnSync } from 'node:child_process'; +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; + +const repoRoot = path.resolve(__dirname, '../../../..'); +const packagesDir = path.join(repoRoot, 'packages'); +const attwBin = path.join(__dirname, '../node_modules/.bin/attw'); +const attwConfigPath = path.join(repoRoot, '.attw.json'); + +const EXPO_PLUGIN_PACKAGES = [ + 'app', + 'analytics', + 'auth', + 'messaging', + 'crashlytics', + 'perf', + 'app-check', + 'app-distribution', +] as const; + +type AttwConfig = { + profile?: 'strict' | 'node16' | 'esm-only'; + ignoreRules?: string[]; +}; + +type AttwProblem = { + kind: string; + entrypoint?: string; + resolutionKind?: string; + resolutionOption?: string; + moduleSpecifier?: string; + fileName?: string; + message?: string; +}; + +type AttwAnalysis = { + packageName?: string; + problems?: AttwProblem[]; + entrypoints?: Record< + string, + { + resolutions?: Record< + string, + { + visibleProblems?: number[]; + } + >; + } + >; +}; + +type AttwResult = { + analysis?: AttwAnalysis; + problems?: Record; +}; + +type IssueRow = { + package: string; + entrypoint: string; + resolution: string; + problem: string; + detail: string; +}; + +type ExpoPluginFailure = { + package: string; + detail: string; +}; + +type AttwRunResult = { + passed: boolean; + issues: IssueRow[]; +}; + +const PROBLEM_KIND_TO_IGNORE_RULE: Record = { + NoResolution: 'no-resolution', + UntypedResolution: 'untyped-resolution', + FalseCJS: 'false-cjs', + FalseESM: 'false-esm', + CJSResolvesToESM: 'cjs-resolves-to-esm', + FallbackCondition: 'fallback-condition', + CJSOnlyExportsDefault: 'cjs-only-exports-default', + NamedExports: 'named-exports', + FalseExportDefault: 'false-export-default', + MissingExportEquals: 'missing-export-equals', + UnexpectedModuleSyntax: 'unexpected-module-syntax', + InternalResolutionError: 'internal-resolution-error', +}; + +const PROFILE_SKIPPED_RESOLUTIONS: Record, string[]> = { + strict: [], + node16: ['node10'], + 'esm-only': ['node10', 'node16-cjs'], +}; + +function readAttwConfig(): AttwConfig { + return JSON.parse(fs.readFileSync(attwConfigPath, 'utf8')) as AttwConfig; +} + +function listPublishedPackages(): string[] { + return fs + .readdirSync(packagesDir) + .filter(dir => { + const pkgJsonPath = path.join(packagesDir, dir, 'package.json'); + if (!fs.existsSync(pkgJsonPath)) { + return false; + } + try { + // Skip packages that are not published to npm (private: true). + return JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')).private !== true; + } catch { + return false; + } + }) + .sort(); +} + +function runAttw(packageDir: string, dirName: string, config: AttwConfig): AttwRunResult { + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'attw-')); + const tgz = path.join(tmpDir, `${dirName}.tgz`); + const jsonFile = path.join(tmpDir, `${dirName}.json`); + + const pack = spawnSync('yarn', ['pack', '--out', tgz], { + cwd: packageDir, + encoding: 'utf8', + stdio: ['ignore', 'pipe', 'pipe'], + }); + if (pack.status !== 0) { + throw new Error(`yarn pack failed for ${dirName}: ${pack.stderr || pack.stdout}`); + } + + // Redirect attw's stdout straight to a file descriptor. This guarantees the + // full JSON report is captured regardless of size (no stdout maxBuffer + // truncation) while still avoiding a shell. + const outFd = fs.openSync(jsonFile, 'w'); + let exitCode = 0; + try { + const result = spawnSync( + attwBin, + ['--config-path', attwConfigPath, '--format', 'json', '--no-color', '--no-emoji', tgz], + { cwd: tmpDir, stdio: ['ignore', outFd, 'pipe'] }, + ); + // attw exits non-zero when it finds problems; the JSON report is still written. + exitCode = result.status ?? 1; + } finally { + fs.closeSync(outFd); + } + + if (!fs.existsSync(jsonFile) || !fs.readFileSync(jsonFile, 'utf8').trim()) { + throw new Error(`attw produced no output for ${dirName}`); + } + + const data = JSON.parse(fs.readFileSync(jsonFile, 'utf8')) as AttwResult; + + try { + fs.unlinkSync(tgz); + fs.rmSync(tmpDir, { recursive: true, force: true }); + } catch { + // ignore cleanup errors + } + + return { + passed: exitCode === 0, + issues: exitCode === 0 ? [] : extractEnforcedIssues(data, config), + }; +} + +function extractEnforcedIssues(data: AttwResult, config: AttwConfig): IssueRow[] { + const analysis = data.analysis; + if (!analysis?.problems || !analysis.entrypoints) { + return extractLegacyIssues(data); + } + + const profile = config.profile || 'strict'; + const skippedResolutions = new Set(PROFILE_SKIPPED_RESOLUTIONS[profile]); + const ignoredRules = new Set(config.ignoreRules || []); + const packageName = analysis.packageName || 'unknown'; + const seen = new Set(); + const rows: IssueRow[] = []; + + for (const [entrypoint, entrypointInfo] of Object.entries(analysis.entrypoints)) { + for (const [resolutionKind, resolution] of Object.entries(entrypointInfo.resolutions || {})) { + if (skippedResolutions.has(resolutionKind)) { + continue; + } + + for (const problemIndex of resolution.visibleProblems || []) { + if (seen.has(problemIndex)) { + continue; + } + + const problem = analysis.problems[problemIndex]; + if (!problem) { + continue; + } + + const ignoreRule = PROBLEM_KIND_TO_IGNORE_RULE[problem.kind]; + if (ignoreRule && ignoredRules.has(ignoreRule)) { + continue; + } + + seen.add(problemIndex); + rows.push({ + package: packageName, + entrypoint: problem.entrypoint || entrypoint, + resolution: problem.resolutionKind || resolutionKind, + problem: problem.kind, + detail: problem.moduleSpecifier || problem.message || problem.fileName || '', + }); + } + } + } + + return rows; +} + +function extractLegacyIssues(data: AttwResult): IssueRow[] { + const rows: IssueRow[] = []; + if (!data.problems) { + return rows; + } + + const packageName = data.analysis?.packageName || 'unknown'; + for (const [kind, items] of Object.entries(data.problems)) { + for (const item of items) { + rows.push({ + package: packageName, + entrypoint: item.entrypoint || item.fileName || '.', + resolution: item.resolutionKind || item.resolutionOption || '', + problem: kind, + detail: item.moduleSpecifier || item.message || '', + }); + } + } + return rows; +} + +function packPackage(packageDir: string, outputPath: string): void { + const pack = spawnSync('yarn', ['pack', '--out', outputPath], { + cwd: packageDir, + encoding: 'utf8', + stdio: ['ignore', 'pipe', 'pipe'], + }); + if (pack.status !== 0) { + throw new Error(`yarn pack failed: ${pack.stderr || pack.stdout}`); + } +} + +function checkExpoPlugins(): ExpoPluginFailure[] { + const failures: ExpoPluginFailure[] = []; + const tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'rnfb-expo-plugin-')); + const appTgz = path.join(tmpRoot, 'app.tgz'); + + try { + packPackage(path.join(packagesDir, 'app'), appTgz); + + for (const dir of EXPO_PLUGIN_PACKAGES) { + const packageDir = path.join(packagesDir, dir); + const pkgJsonPath = path.join(packageDir, 'package.json'); + const pluginEntry = path.join(packageDir, 'app.plugin.js'); + const pluginBuild = path.join(packageDir, 'plugin/build/app.plugin.js'); + + if (!fs.existsSync(pluginEntry)) { + continue; + } + + if (!fs.existsSync(pluginBuild)) { + failures.push({ + package: JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')).name, + detail: 'plugin/build/app.plugin.js missing — run build:plugin', + }); + continue; + } + + const pkgTgz = path.join(tmpRoot, `${dir}.tgz`); + const installDir = path.join(tmpRoot, `install-${dir}`); + packPackage(packageDir, pkgTgz); + + fs.mkdirSync(installDir, { recursive: true }); + const init = spawnSync('npm', ['init', '-y'], { cwd: installDir, stdio: 'ignore' }); + if (init.status !== 0) { + failures.push({ + package: JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')).name, + detail: 'npm init failed', + }); + continue; + } + + // @expo/config-plugins is intentionally unpinned so the smoke test tracks + // the latest release — Expo consumers upgrade quickly, and this surfaces + // breaking changes in new versions early rather than hiding them behind a pin. + const install = spawnSync( + 'npm', + ['install', '--silent', '--no-fund', '--no-audit', appTgz, pkgTgz, '@expo/config-plugins'], + { cwd: installDir, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }, + ); + if (install.status !== 0) { + failures.push({ + package: JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')).name, + detail: `npm install failed: ${install.stderr || install.stdout || 'unknown error'}`, + }); + continue; + } + + const pkgName = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')).name as string; + const requireCheck = spawnSync( + 'node', + [ + '-e', + `const plugin = require('${pkgName}/app.plugin.js'); if (typeof plugin !== 'function' && typeof plugin.default !== 'function') { process.exit(2); }`, + ], + { cwd: installDir, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }, + ); + if (requireCheck.status !== 0) { + failures.push({ + package: pkgName, + detail: `require('${pkgName}/app.plugin.js') failed: ${ + requireCheck.stderr || `exit ${requireCheck.status}` + }`, + }); + } + } + } finally { + try { + fs.rmSync(tmpRoot, { recursive: true, force: true }); + } catch { + // ignore cleanup errors + } + } + + return failures; +} + +function printAttwReport(rows: IssueRow[]): void { + if (rows.length === 0) { + console.log('\n✅ attw: all published packages pass scoped analysis (.attw.json).\n'); + return; + } + + console.log(`\n❌ attw: ${rows.length} enforced problem(s) under .attw.json scope:\n`); + console.log('| # | Package | Entrypoint | Resolution | Problem | Detail |'); + console.log('|---:|---|---|---|---|---|'); + rows.forEach((row, index) => { + const cells = [ + String(index + 1), + row.package, + row.entrypoint, + row.resolution, + row.problem, + row.detail, + ].map(value => value.replace(/\|/g, '\\|')); + console.log(`| ${cells.join(' | ')} |`); + }); + console.log(''); +} + +function printExpoPluginReport(failures: ExpoPluginFailure[]): void { + if (failures.length === 0) { + console.log('✅ Expo config plugins: consumer smoke test passed.\n'); + return; + } + + console.log(`❌ Expo config plugins: ${failures.length} failure(s):\n`); + failures.forEach((failure, index) => { + console.log(`${index + 1}. ${failure.package}: ${failure.detail}`); + }); + console.log(''); +} + +function main(): void { + if (!fs.existsSync(attwBin)) { + console.error('attw binary not found — run `yarn install` in .github/scripts/attw first'); + process.exit(1); + } + + if (!fs.existsSync(attwConfigPath)) { + console.error(`Missing ${attwConfigPath}`); + process.exit(1); + } + + const config = readAttwConfig(); + const allRows: IssueRow[] = []; + for (const dir of listPublishedPackages()) { + const result = runAttw(path.join(packagesDir, dir), dir, config); + if (!result.passed) { + allRows.push(...result.issues); + } + } + + const expoFailures = checkExpoPlugins(); + + printAttwReport(allRows); + printExpoPluginReport(expoFailures); + + const hasFailures = allRows.length > 0 || expoFailures.length > 0; + process.exit(hasFailures ? 1 : 0); +} + +main(); diff --git a/.github/scripts/attw/tsconfig.json b/.github/scripts/attw/tsconfig.json new file mode 100644 index 0000000000..6b1c9c1b1b --- /dev/null +++ b/.github/scripts/attw/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "outDir": "dist", + "rootDir": "." + }, + "include": ["src/**/*.ts"] +} diff --git a/.github/scripts/attw/yarn.lock b/.github/scripts/attw/yarn.lock new file mode 100644 index 0000000000..8f84118a9e --- /dev/null +++ b/.github/scripts/attw/yarn.lock @@ -0,0 +1,1021 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 9 + cacheKey: 10 + +"@andrewbranch/untar.js@npm:^1.0.3": + version: 1.0.3 + resolution: "@andrewbranch/untar.js@npm:1.0.3" + checksum: 10/a32de53839fc61af90a394cf93d4368aacd167c9c80f0b3ba0c268460942a6ce2bfe257b6d3f03986b9dcb7368f10b9dc7f66c2f94254d2662da8278454e7d12 + languageName: node + linkType: hard + +"@arethetypeswrong/cli@npm:^0.18.4": + version: 0.18.4 + resolution: "@arethetypeswrong/cli@npm:0.18.4" + dependencies: + "@arethetypeswrong/core": "npm:0.18.4" + chalk: "npm:^4.1.2" + cli-table3: "npm:^0.6.3" + commander: "npm:^10.0.1" + marked: "npm:^9.1.2" + marked-terminal: "npm:^7.1.0" + semver: "npm:^7.5.4" + bin: + attw: ./dist/index.js + checksum: 10/1fa80ebef4602363856e3edeea584f8fe625a5d14c7f82e6258a9c436c701cbd21f81e92b94794dde0a701c04ddc7376e10d008a98927f0b8e8cecb4e4eba857 + languageName: node + linkType: hard + +"@arethetypeswrong/core@npm:0.18.4": + version: 0.18.4 + resolution: "@arethetypeswrong/core@npm:0.18.4" + dependencies: + "@andrewbranch/untar.js": "npm:^1.0.3" + "@loaderkit/resolve": "npm:^1.0.2" + cjs-module-lexer: "npm:^1.2.3" + fflate: "npm:^0.8.3" + lru-cache: "npm:^11.0.1" + semver: "npm:^7.5.4" + typescript: "npm:5.6.1-rc" + validate-npm-package-name: "npm:^5.0.0" + checksum: 10/c4ba9fc03cece747b8f955061141cd169879dfdc7bdacbe79c45d5bc1c9cc1086889be8373796b442ff436cb45271205ffef4aad6f2a9fae7dbd0f247a6db538 + languageName: node + linkType: hard + +"@braidai/lang@npm:^1.0.0": + version: 1.1.2 + resolution: "@braidai/lang@npm:1.1.2" + checksum: 10/04ece1b744eb8b6c2417afe220ad96c7078f83ed533117cc49300b6322f6b58f5e649c80bd990c27e2d16bfdd976481d5252ff3206b7069fc863890ab1b96277 + languageName: node + linkType: hard + +"@colors/colors@npm:1.5.0": + version: 1.5.0 + resolution: "@colors/colors@npm:1.5.0" + checksum: 10/9d226461c1e91e95f067be2bdc5e6f99cfe55a721f45afb44122e23e4b8602eeac4ff7325af6b5a369f36396ee1514d3809af3f57769066d80d83790d8e53339 + languageName: node + linkType: hard + +"@esbuild/aix-ppc64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/aix-ppc64@npm:0.28.1" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/android-arm64@npm:0.28.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/android-arm@npm:0.28.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/android-x64@npm:0.28.1" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/darwin-arm64@npm:0.28.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/darwin-x64@npm:0.28.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/freebsd-arm64@npm:0.28.1" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/freebsd-x64@npm:0.28.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-arm64@npm:0.28.1" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-arm@npm:0.28.1" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-ia32@npm:0.28.1" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-loong64@npm:0.28.1" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-mips64el@npm:0.28.1" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-ppc64@npm:0.28.1" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-riscv64@npm:0.28.1" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-s390x@npm:0.28.1" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/linux-x64@npm:0.28.1" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/netbsd-arm64@npm:0.28.1" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/netbsd-x64@npm:0.28.1" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/openbsd-arm64@npm:0.28.1" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/openbsd-x64@npm:0.28.1" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openharmony-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/openharmony-arm64@npm:0.28.1" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/sunos-x64@npm:0.28.1" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/win32-arm64@npm:0.28.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/win32-ia32@npm:0.28.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.28.1": + version: 0.28.1 + resolution: "@esbuild/win32-x64@npm:0.28.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10/4412e9e6713c89c1e66d80bb0bb5a2a93192f10477623a27d08f228ba0316bb880affabc5bfe7f838f58a34d26c2c190da726e576cdfc18c49a72e89adabdcf5 + languageName: node + linkType: hard + +"@loaderkit/resolve@npm:^1.0.2": + version: 1.0.6 + resolution: "@loaderkit/resolve@npm:1.0.6" + dependencies: + "@braidai/lang": "npm:^1.0.0" + checksum: 10/73b4551ead53430490a1571086b84243cffd0b0cf87889b292ef11791638d8406e794c99153af311cc2555af4c0d04b68d1a170d51244658fd0d7e34da018666 + languageName: node + linkType: hard + +"@sindresorhus/is@npm:^4.6.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 + languageName: node + linkType: hard + +"abbrev@npm:^5.0.0": + version: 5.0.0 + resolution: "abbrev@npm:5.0.0" + checksum: 10/a32641fb7a8ba0ad6f65efda80a632c965a2567f52c988897bffc47f473c4e9c3f0166de19d939866b1ed58ec50ce36f697d54a476589ca2706f8b5605ed41f0 + languageName: node + linkType: hard + +"ansi-escapes@npm:^7.0.0": + version: 7.3.0 + resolution: "ansi-escapes@npm:7.3.0" + dependencies: + environment: "npm:^1.0.0" + checksum: 10/189e23e75aacf00ee647ba0545687456cc4bc62547dd0cf6c7728f91fce88854c8e885d5819a278b39981bb846d9427693d2380c562aecdb0cf91d3342141e93 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.1.0": + version: 6.2.2 + resolution: "ansi-regex@npm:6.2.2" + checksum: 10/9b17ce2c6daecc75bcd5966b9ad672c23b184dc3ed9bf3c98a0702f0d2f736c15c10d461913568f2cf527a5e64291c7473358885dd493305c84a1cfed66ba94f + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + +"any-promise@npm:^1.0.0": + version: 1.3.0 + resolution: "any-promise@npm:1.3.0" + checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb + languageName: node + linkType: hard + +"attw-check@workspace:.": + version: 0.0.0-use.local + resolution: "attw-check@workspace:." + dependencies: + "@arethetypeswrong/cli": "npm:^0.18.4" + tsx: "npm:^4.21.0" + typescript: "npm:^6.0.3" + languageName: unknown + linkType: soft + +"chalk@npm:^4.0.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + +"chalk@npm:^5.4.1": + version: 5.6.2 + resolution: "chalk@npm:5.6.2" + checksum: 10/1b2f48f6fba1370670d5610f9cd54c391d6ede28f4b7062dd38244ea5768777af72e5be6b74fb6c6d54cb84c4a2dff3f3afa9b7cb5948f7f022cfd3d087989e0 + languageName: node + linkType: hard + +"char-regex@npm:^1.0.2": + version: 1.0.2 + resolution: "char-regex@npm:1.0.2" + checksum: 10/1ec5c2906adb9f84e7f6732a40baef05d7c85401b82ffcbc44b85fbd0f7a2b0c2a96f2eb9cf55cae3235dc12d4023003b88f09bcae8be9ae894f52ed746f4d48 + languageName: node + linkType: hard + +"chownr@npm:^3.0.0": + version: 3.0.0 + resolution: "chownr@npm:3.0.0" + checksum: 10/b63cb1f73d171d140a2ed8154ee6566c8ab775d3196b0e03a2a94b5f6a0ce7777ee5685ca56849403c8d17bd457a6540672f9a60696a6137c7a409097495b82c + languageName: node + linkType: hard + +"cjs-module-lexer@npm:^1.2.3": + version: 1.4.3 + resolution: "cjs-module-lexer@npm:1.4.3" + checksum: 10/d2b92f919a2dedbfd61d016964fce8da0035f827182ed6839c97cac56e8a8077cfa6a59388adfe2bc588a19cef9bbe830d683a76a6e93c51f65852062cfe2591 + languageName: node + linkType: hard + +"cli-highlight@npm:^2.1.11": + version: 2.1.11 + resolution: "cli-highlight@npm:2.1.11" + dependencies: + chalk: "npm:^4.0.0" + highlight.js: "npm:^10.7.1" + mz: "npm:^2.4.0" + parse5: "npm:^5.1.1" + parse5-htmlparser2-tree-adapter: "npm:^6.0.0" + yargs: "npm:^16.0.0" + bin: + highlight: bin/highlight + checksum: 10/05d2b5beb8a4d3259f693517d013bf53d04ad20f470b77c3d02e051963092fae388388e3127f67d3679884a0c32cb855bf590292017c5e68c0f8d86f4b8e146e + languageName: node + linkType: hard + +"cli-table3@npm:^0.6.3, cli-table3@npm:^0.6.5": + version: 0.6.5 + resolution: "cli-table3@npm:0.6.5" + dependencies: + "@colors/colors": "npm:1.5.0" + string-width: "npm:^4.2.0" + dependenciesMeta: + "@colors/colors": + optional: true + checksum: 10/8dca71256f6f1367bab84c33add3f957367c7c43750a9828a4212ebd31b8df76bd7419d386e3391ac7419698a8540c25f1a474584028f35b170841cde2e055c5 + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"commander@npm:^10.0.1": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + +"emojilib@npm:^2.4.0": + version: 2.4.0 + resolution: "emojilib@npm:2.4.0" + checksum: 10/bef767eca49acaa881388d91bee6936ea57ae367d603d5227ff0a9da3e2d1e774a61c447e5f2f4901797d023c4b5239bc208285b6172a880d3655024a0f44980 + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"environment@npm:^1.0.0": + version: 1.1.0 + resolution: "environment@npm:1.1.0" + checksum: 10/dd3c1b9825e7f71f1e72b03c2344799ac73f2e9ef81b78ea8b373e55db021786c6b9f3858ea43a436a2c4611052670ec0afe85bc029c384cc71165feee2f4ba6 + languageName: node + linkType: hard + +"esbuild@npm:~0.28.0": + version: 0.28.1 + resolution: "esbuild@npm:0.28.1" + dependencies: + "@esbuild/aix-ppc64": "npm:0.28.1" + "@esbuild/android-arm": "npm:0.28.1" + "@esbuild/android-arm64": "npm:0.28.1" + "@esbuild/android-x64": "npm:0.28.1" + "@esbuild/darwin-arm64": "npm:0.28.1" + "@esbuild/darwin-x64": "npm:0.28.1" + "@esbuild/freebsd-arm64": "npm:0.28.1" + "@esbuild/freebsd-x64": "npm:0.28.1" + "@esbuild/linux-arm": "npm:0.28.1" + "@esbuild/linux-arm64": "npm:0.28.1" + "@esbuild/linux-ia32": "npm:0.28.1" + "@esbuild/linux-loong64": "npm:0.28.1" + "@esbuild/linux-mips64el": "npm:0.28.1" + "@esbuild/linux-ppc64": "npm:0.28.1" + "@esbuild/linux-riscv64": "npm:0.28.1" + "@esbuild/linux-s390x": "npm:0.28.1" + "@esbuild/linux-x64": "npm:0.28.1" + "@esbuild/netbsd-arm64": "npm:0.28.1" + "@esbuild/netbsd-x64": "npm:0.28.1" + "@esbuild/openbsd-arm64": "npm:0.28.1" + "@esbuild/openbsd-x64": "npm:0.28.1" + "@esbuild/openharmony-arm64": "npm:0.28.1" + "@esbuild/sunos-x64": "npm:0.28.1" + "@esbuild/win32-arm64": "npm:0.28.1" + "@esbuild/win32-ia32": "npm:0.28.1" + "@esbuild/win32-x64": "npm:0.28.1" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/openharmony-arm64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/aaa4a922644afffac45e735c99caf343f881e2d36abcc6b6fb53c230bd69940504a5bb6b0041bdd1a690e748ebc681d3308a7d178987c523d74c63c2c280bac8 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10/9d7169e3965b2f9ae46971afa392f6e5a25545ea30f2e2dd99c9b0a95a3f52b5653681a84f5b2911a413ddad2d7a93d3514165072f349b5ffc59c75a899970d6 + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.3 + resolution: "exponential-backoff@npm:3.1.3" + checksum: 10/ca25962b4bbab943b7c4ed0b5228e263833a5063c65e1cdeac4be9afad350aae5466e8e619b5051f4f8d37b2144a2d6e8fcc771b6cc82934f7dade2f964f652c + languageName: node + linkType: hard + +"fdir@npm:^6.5.0": + version: 6.5.0 + resolution: "fdir@npm:6.5.0" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10/14ca1c9f0a0e8f4f2e9bf4e8551065a164a09545dae548c12a18d238b72e51e5a7b39bd8e5494b56463a0877672d0a6c1ef62c6fa0677db1b0c847773be939b1 + languageName: node + linkType: hard + +"fflate@npm:^0.8.3": + version: 0.8.3 + resolution: "fflate@npm:0.8.3" + checksum: 10/6ebf528dc9c56e78e715eac615b009b25dc33e15c1920b11ebba44e6d76181c647756a81a23e19247907496b93aa99928514c53090579a65109e026ac2824aa7 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"highlight.js@npm:^10.7.1": + version: 10.7.3 + resolution: "highlight.js@npm:10.7.3" + checksum: 10/db8d10a541936b058e221dbde77869664b2b45bca75d660aa98065be2cd29f3924755fbc7348213f17fd931aefb6e6597448ba6fe82afba6d8313747a91983ee + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"isexe@npm:^4.0.0": + version: 4.0.0 + resolution: "isexe@npm:4.0.0" + checksum: 10/2ead327ef596042ef9c9ec5f236b316acfaedb87f4bb61b3c3d574fb2e9c8a04b67305e04733bde52c24d9622fdebd3270aadb632adfbf9cadef88fe30f479e5 + languageName: node + linkType: hard + +"lru-cache@npm:^11.0.1": + version: 11.5.1 + resolution: "lru-cache@npm:11.5.1" + checksum: 10/02c4f73967d91fb101f4accf8ebac9e0541e08e16d987bdb9e9737f13e5f2c4bc33c593b98ec30e4486bf899bc97edb36fbd133684b36087336559e41edafdea + languageName: node + linkType: hard + +"marked-terminal@npm:^7.1.0": + version: 7.3.0 + resolution: "marked-terminal@npm:7.3.0" + dependencies: + ansi-escapes: "npm:^7.0.0" + ansi-regex: "npm:^6.1.0" + chalk: "npm:^5.4.1" + cli-highlight: "npm:^2.1.11" + cli-table3: "npm:^0.6.5" + node-emoji: "npm:^2.2.0" + supports-hyperlinks: "npm:^3.1.0" + peerDependencies: + marked: ">=1 <16" + checksum: 10/1dfdfe752a4ebe6aec8de4a51180612a5f29982026b104a86215efb46b82b2a1942531a6bb840163c8d827e3eadc5cf93272e6eb29ec549f72b73b8b2eb97cfe + languageName: node + linkType: hard + +"marked@npm:^9.1.2": + version: 9.1.6 + resolution: "marked@npm:9.1.6" + bin: + marked: bin/marked.js + checksum: 10/29d073500c70b6b53cd35a8d19f5e43df6e2819ddeca8848a31901b87b82ca0ea46a8a831920c656c69c33ad5dce4b75654c4c4ced34a67f4e4e4a31c7620cfe + languageName: node + linkType: hard + +"minipass@npm:^7.0.4, minipass@npm:^7.1.2": + version: 7.1.3 + resolution: "minipass@npm:7.1.3" + checksum: 10/175e4d5e20980c3cd316ae82d2c031c42f6c746467d8b1905b51060a0ba4461441a0c25bb67c025fd9617f9a3873e152c7b543c6b5ac83a1846be8ade80dffd6 + languageName: node + linkType: hard + +"minizlib@npm:^3.1.0": + version: 3.1.0 + resolution: "minizlib@npm:3.1.0" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10/f47365cc2cb7f078cbe7e046eb52655e2e7e97f8c0a9a674f4da60d94fb0624edfcec9b5db32e8ba5a99a5f036f595680ae6fe02a262beaa73026e505cc52f99 + languageName: node + linkType: hard + +"mz@npm:^2.4.0": + version: 2.7.0 + resolution: "mz@npm:2.7.0" + dependencies: + any-promise: "npm:^1.0.0" + object-assign: "npm:^4.0.1" + thenify-all: "npm:^1.0.0" + checksum: 10/8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87 + languageName: node + linkType: hard + +"node-emoji@npm:^2.2.0": + version: 2.2.0 + resolution: "node-emoji@npm:2.2.0" + dependencies: + "@sindresorhus/is": "npm:^4.6.0" + char-regex: "npm:^1.0.2" + emojilib: "npm:^2.4.0" + skin-tone: "npm:^2.0.0" + checksum: 10/2548668f5cc9f781c94dc39971a630b2887111e0970c29fc523e924819d1b39b53a2694a4d1046861adf538c4462d06ee0269c48717ccad30336a918d9a911d5 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 13.0.1 + resolution: "node-gyp@npm:13.0.1" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + graceful-fs: "npm:^4.2.6" + nopt: "npm:^10.0.0" + proc-log: "npm:^7.0.0" + semver: "npm:^7.3.5" + tar: "npm:^7.5.4" + tinyglobby: "npm:^0.2.12" + undici: "npm:^8.4.1" + which: "npm:^7.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/227ad4aaa7cda1b5d3bc20a58e36d354e400db9b0682a6540ce8e9aa530a56feec963100d7c449ccfcd85efd850383c9988b62a1d95dadef246117be42c78316 + languageName: node + linkType: hard + +"nopt@npm:^10.0.0": + version: 10.0.1 + resolution: "nopt@npm:10.0.1" + dependencies: + abbrev: "npm:^5.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/8021371365e78a2cbab015cac50d8449aa2cc411f0b8f2edb466c1336c3dfee4e61c5bf5bde22ee7dcea80d5f4510a7a8705ed3646c8d782f28b550c62bc4fdf + languageName: node + linkType: hard + +"object-assign@npm:^4.0.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f + languageName: node + linkType: hard + +"parse5-htmlparser2-tree-adapter@npm:^6.0.0": + version: 6.0.1 + resolution: "parse5-htmlparser2-tree-adapter@npm:6.0.1" + dependencies: + parse5: "npm:^6.0.1" + checksum: 10/3400a2cd1ad450b2fe148544154f86ea53d3ed6b6eab56c78bb43b9629d3dfe9f580dffd75bbf32be134ffef645b68081fc764bf75c210f236ab9c5c8c38c252 + languageName: node + linkType: hard + +"parse5@npm:^5.1.1": + version: 5.1.1 + resolution: "parse5@npm:5.1.1" + checksum: 10/5b509744cfe81488a33be05578df490c460690e64519fa67f0a0acb9c1bca05914e8acad17a977e2cf5964a000e43959b40024f0c243dd6595dd0cca8a32f71b + languageName: node + linkType: hard + +"parse5@npm:^6.0.1": + version: 6.0.1 + resolution: "parse5@npm:6.0.1" + checksum: 10/dfb110581f62bd1425725a7c784ae022a24669bd0efc24b58c71fc731c4d868193e2ebd85b74cde2dbb965e4dcf07059b1e651adbec1b3b5267531bd132fdb75 + languageName: node + linkType: hard + +"picomatch@npm:^4.0.4": + version: 4.0.5 + resolution: "picomatch@npm:4.0.5" + checksum: 10/8bad770af9dcdb7f94ad1a893adcbe08a97d75a18872f8fed37161d3124217471c402b3929f051532f795f4ff2e53dcebb1644df4c1a5f3a9c476fef3b9f8c51 + languageName: node + linkType: hard + +"proc-log@npm:^7.0.0": + version: 7.0.0 + resolution: "proc-log@npm:7.0.0" + checksum: 10/97cd9f4a8a0d84e42ee91e106e5ba5edcb954521e8dbe26ee6ad31396e5c12cc2be5e5b6be7b53fa5a69959afbacd32719106e2d6f45802e34b31d9a3a01ec20 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.5.4": + version: 7.8.5 + resolution: "semver@npm:7.8.5" + bin: + semver: bin/semver.js + checksum: 10/9b01d2ff11e6e4a4539b7ca3c5f280c8704cb397a28504469f2ed4f00ad2194748d756647362a9712fff30984d15772ab7f083108c2fb508e2096ae9e708f22c + languageName: node + linkType: hard + +"skin-tone@npm:^2.0.0": + version: 2.0.0 + resolution: "skin-tone@npm:2.0.0" + dependencies: + unicode-emoji-modifier-base: "npm:^1.0.0" + checksum: 10/19de157586b8019cacc55eb25d9d640f00fc02415761f3e41a4527142970fd4e7f6af0333bc90e879858766c20a976107bb386ffd4c812289c01d51f2c8d182c + languageName: node + linkType: hard + +"string-width@npm:^4.1.0, string-width@npm:^4.2.0": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + +"supports-hyperlinks@npm:^3.1.0": + version: 3.2.0 + resolution: "supports-hyperlinks@npm:3.2.0" + dependencies: + has-flag: "npm:^4.0.0" + supports-color: "npm:^7.0.0" + checksum: 10/f7924de6049fc30bc808f98d3561318c1a4e3d55d786f9fede5e23dc5a7b0f625485bd1143135b496d521ccd0110463f2c077eb71a4ce0cf783b8b31f7909242 + languageName: node + linkType: hard + +"tar@npm:^7.5.4": + version: 7.5.19 + resolution: "tar@npm:7.5.19" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.1.0" + yallist: "npm:^5.0.0" + checksum: 10/0b06a0917fe68a4dff361e147db30fd67ae2ee85ab2863d62046a6ccef46f0d1906eed20f92277a436300eaaa0e3cd31d8763d7f02fa389f41d7966e58388db8 + languageName: node + linkType: hard + +"thenify-all@npm:^1.0.0": + version: 1.6.0 + resolution: "thenify-all@npm:1.6.0" + dependencies: + thenify: "npm:>= 3.1.0 < 4" + checksum: 10/dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e + languageName: node + linkType: hard + +"thenify@npm:>= 3.1.0 < 4": + version: 3.3.1 + resolution: "thenify@npm:3.3.1" + dependencies: + any-promise: "npm:^1.0.0" + checksum: 10/486e1283a867440a904e36741ff1a177faa827cf94d69506f7e3ae4187b9afdf9ec368b3d8da225c192bfe2eb943f3f0080594156bf39f21b57cd1411e2e7f6d + languageName: node + linkType: hard + +"tinyglobby@npm:^0.2.12": + version: 0.2.17 + resolution: "tinyglobby@npm:0.2.17" + dependencies: + fdir: "npm:^6.5.0" + picomatch: "npm:^4.0.4" + checksum: 10/f85e8a217d675c3f78d5f0ad25ea4557e7e023ed13ddc2b014da10bd0312eea53a34cd52356af07ccdff777f1243012547656282a4ca70936f68bf5065fbaa71 + languageName: node + linkType: hard + +"tsx@npm:^4.21.0": + version: 4.22.5 + resolution: "tsx@npm:4.22.5" + dependencies: + esbuild: "npm:~0.28.0" + fsevents: "npm:~2.3.3" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: 10/606a90576cbaae27c0359b187226f292397ee171b72c42436d58c34be596b31bf325920b86a88f2fcf4c8fead3fead961881c2830b0595448c062e1b953110b7 + languageName: node + linkType: hard + +"typescript@npm:5.6.1-rc": + version: 5.6.1-rc + resolution: "typescript@npm:5.6.1-rc" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/5716659d5baf142b5c84b96209b30730a5e9dcc0202f879349f9974823f7452ec4ef3904397b6d89d861c688acdbb1dad0a449d753163519fae2ee06ea4a68be + languageName: node + linkType: hard + +"typescript@npm:^6.0.3": + version: 6.0.3 + resolution: "typescript@npm:6.0.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/0ef2357a4cffd916b52b683a021cdab0f81eea4e9aa35f2d254581c9a5106da02224e3392e1b0ed42b7a48f80c966e5f52b8e1a27941fa0523c1705a9c2e0330 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.6.1-rc#optional!builtin": + version: 5.6.1-rc + resolution: "typescript@patch:typescript@npm%3A5.6.1-rc#optional!builtin::version=5.6.1-rc&hash=8c6c40" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/462e0bb46c63abfc5bfc43f2bb00b9777a4228f3ed52d8930b46404dce71dbada63c27a99262ff4570b5ff7d01455701bfd36823bd3c766e443b6fa33cd31dea + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A^6.0.3#optional!builtin": + version: 6.0.3 + resolution: "typescript@patch:typescript@npm%3A6.0.3#optional!builtin::version=6.0.3&hash=5786d5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/22b67a18dafedf9b1468b64ca20d9aa02ea61d449b65413d8aa6552aeb63f52ef369e86beb25b6b4c91a803d9726ee5c196f391a9b64201263263410a4223ee6 + languageName: node + linkType: hard + +"undici@npm:^8.4.1": + version: 8.6.0 + resolution: "undici@npm:8.6.0" + checksum: 10/a8a66ea9142f3df6ef6cb5ec5c8a2cafb6525f028b74c5dd4066de855bf9b7ad1089b3e516db23c920d1444e8e16f9a1530b6306d3d9046c62386a9c34c4ac3d + languageName: node + linkType: hard + +"unicode-emoji-modifier-base@npm:^1.0.0": + version: 1.0.0 + resolution: "unicode-emoji-modifier-base@npm:1.0.0" + checksum: 10/6e1521d35fa69493207eb8b41f8edb95985d8b3faf07c01d820a1830b5e8403e20002563e2f84683e8e962a49beccae789f0879356bf92a4ec7a4dd8e2d16fdb + languageName: node + linkType: hard + +"validate-npm-package-name@npm:^5.0.0": + version: 5.0.1 + resolution: "validate-npm-package-name@npm:5.0.1" + checksum: 10/0d583a1af23aeffea7748742cf22b6802458736fb8b60323ba5949763824d46f796474b0e1b9206beb716f9d75269e19dbd7795d6b038b29d561be95dd827381 + languageName: node + linkType: hard + +"which@npm:^7.0.0": + version: 7.0.0 + resolution: "which@npm:7.0.0" + dependencies: + isexe: "npm:^4.0.0" + bin: + node-which: bin/which.js + checksum: 10/913a43ac10df37602ba9795a004dd7ab12ba7dd592aca1f08ec333be1fdd6a49bbf119a88c3f8d0ea70eeb6251726e77069251424d73000299a0a840ed000732 + languageName: node + linkType: hard + +"wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + +"yallist@npm:^5.0.0": + version: 5.0.0 + resolution: "yallist@npm:5.0.0" + checksum: 10/1884d272d485845ad04759a255c71775db0fac56308764b4c77ea56a20d56679fad340213054c8c9c9c26fcfd4c4b2a90df993b7e0aaf3cdb73c618d1d1a802a + languageName: node + linkType: hard + +"yargs-parser@npm:^20.2.2": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + +"yargs@npm:^16.0.0": + version: 16.2.2 + resolution: "yargs@npm:16.2.2" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/4ea83fae599077207a663d07c3b8de5d6879e7030bef3ebcddd1e6f9ed63f6622b04c84bf9c2121df626d25f3e2d832a6573e47343a75f05d982df2b60d5e9bd + languageName: node + linkType: hard diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index fc1bc75bbb..611a734ef0 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -122,6 +122,48 @@ jobs: key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} + attw: + name: Published Package Types (attw) + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + # https://github.com/actions/checkout/releases + - uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3 + with: + fetch-depth: 1 + # https://github.com/actions/setup-node/releases + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: 22 + # https://github.com/actions/cache/releases + - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + name: Yarn Cache Restore + id: yarn-cache + continue-on-error: true + with: + path: .yarn/cache + key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} + restore-keys: ${{ runner.os }}-yarn-v1 + - name: Yarn Install + # https://github.com/nick-fields/retry/releases + uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 + with: + timeout_minutes: 15 + retry_wait_seconds: 30 + max_attempts: 3 + command: yarn + - name: Are The Types Wrong + run: yarn attw:check + # https://github.com/actions/cache/releases + - uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + name: Yarn Cache Save + if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true + with: + path: .yarn/cache + key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} + + consumer-types: name: Consumer Type Test runs-on: ubuntu-latest diff --git a/okf-bundle/index.md b/okf-bundle/index.md index 878024af23..5557f89f6f 100644 --- a/okf-bundle/index.md +++ b/okf-bundle/index.md @@ -18,6 +18,7 @@ okf_version: "0.1" * [Iteration vocabulary](/testing/iteration-vocabulary.md) — work type, tier, and queue field identifiers * [Running e2e tests](/testing/running-e2e.md) — canonical e2e commands, narrowing, environment, diagnosis * [Validation checklist](/testing/validation-checklist.md) — compile, Jest, lint, `compare:types`, e2e, coverage +* [Published types ADR](/testing/architecture-decisions.md) — attw scope, Expo plugin checks, discarded resolutions * [Coverage design](/testing/coverage-design.md) — unit/e2e coverage policy, native gates, Codecov * [Firebase testing project](/testing/firebase-testing-project.md) — cloud vs emulator, live FIS/RC, helper callables, rules/indexes, deploy diff --git a/okf-bundle/testing/architecture-decisions.md b/okf-bundle/testing/architecture-decisions.md new file mode 100644 index 0000000000..84d1f16cbd --- /dev/null +++ b/okf-bundle/testing/architecture-decisions.md @@ -0,0 +1,115 @@ +--- +type: Reference +title: Published types and CI decisions (ADR) +description: Canonical owner of durable decisions for published-package type checking (attw, consumer tsc, Expo config plugins). +tags: [testing, types, attw, expo, adr] +timestamp: 2026-07-10T00:00:00Z +--- + +# Published types and CI decisions (ADR) + +**Canonical owner** of durable decisions for how RNFB validates published package types in CI. Procedure and commands: [validation checklist](validation-checklist.md). Implementation: `.attw.json`, `.github/scripts/attw/`, `tsconfig.consumer.json`. + +**Policy:** [OKF documentation policy](../documentation-policy.md). Do not duplicate these decisions in work queues. + +## Decision ID convention + +Use the **`Types-AD-`** prefix when citing these decisions in code or docs. + +## Status legend + +| Status | Meaning | +|--------|---------| +| **Accepted** | Decided; CI enforces this. | +| **Proposed** | Planned; not yet enforced. | + +--- + +## Types-AD-1 — Consumer matrix drives attw scope — **Accepted** + +RNFB published types are validated against the **actual consumer matrix**, not generic npm “strict” resolution. + +**Supported consumer chain (current direction):** + +| Layer | Minimum | Notes | +|-------|---------|-------| +| iOS / Xcode | firebase-ios-sdk 12.12.0+ → Xcode 26.2+ | Drives recent RN only | +| React Native | New Architecture only (coordinated major) | Metro bundler, not Node `require()` for app JS | +| Node (dev) | RN 0.84+ → Node **22.11.0+**; RN 0.81–0.83 → Node **20.19.4+** | See [RN support matrix](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md) | +| TypeScript (app) | `moduleResolution: "bundler"` | `yarn tsc:compile:consumer` | + +**Why:** Node 10 and Node 16 are EOL. RN apps resolve `@react-native-firebase/*` through Metro (`bundler`), not through Node10/Node16-CJS `require()`. attw `strict` (185 findings on current packages) mostly reports resolution modes our consumers never use. + +**CI gates (ordered):** + +1. `yarn tsc:compile` — monorepo internal TS +2. `yarn tsc:compile:consumer` — **primary RN app consumer gate** (`bundler`) +3. `yarn attw:check` — published tarball hygiene (scoped per Types-AD-2) +4. Expo plugin smoke test inside `yarn attw:check` (Types-AD-3) + +--- + +## Types-AD-2 — attw profile and ignored rules — **Accepted** + +`yarn attw:check` uses repo-root [`.attw.json`](../../.attw.json): + +```json +{ + "profile": "esm-only", + "ignoreRules": ["internal-resolution-error", "cjs-resolves-to-esm"] +} +``` + +| attw mode | Enforced? | Discarded because | +|-----------|-----------|-------------------| +| **node10** | No (`esm-only` ignores) | EOL; no RN consumer uses Node10 resolution | +| **node16-cjs** | No (`esm-only` ignores) | RN apps do not `require()` RNFB JS from Node; plugins are separate (Types-AD-3) | +| **node16-esm `InternalResolutionError`** | No (`ignoreRules`) | Extensionless `.d.ts` relative imports fail Node16 but **`bundler` passes** — covered by consumer tsc | +| **`CJSResolvesToESM`** | No (`ignoreRules`) | ESM-only published JS is intentional; Metro/bundler consumers resolve correctly | +| **node16-esm + bundler (remaining)** | **Yes** | Real export/type surface regressions for modern consumers | + +attw has **no Node 22 or bundler-only profile**. This config is the closest match to the RN consumer matrix until upstream adds finer profiles. + +**Advisory only (not a merge gate):** `attw --profile strict` may be run locally to see the full generic-npm report. + +--- + +## Types-AD-3 — Expo config plugins: separate validation path — **Accepted** + +Expo config plugins are **not** validated by discarding `app.plugin.js` from attw. They use a dedicated smoke test in `yarn attw:check`. + +**How Expo loads library plugins:** + +1. User adds `"@react-native-firebase/"` to `app.json` / `app.config` `plugins`. +2. Expo CLI resolves `app.plugin.js` at the package root ([Expo library plugin docs](https://docs.expo.dev/config-plugins/development-for-libraries/)). +3. Root `app.plugin.js` is a one-line shim: `module.exports = require('./plugin/build/app.plugin')` (required at package root for Expo filesystem probe). +4. Plugin sources compile with `tsc --build plugin` (`@tsconfig/node-lts`) into `plugin/build/` — including `app.plugin.ts` (`export =`) for types and runtime entry. + +**What we check for each package with `app.plugin.js`:** + +| Check | Purpose | +|-------|---------| +| `plugin/build/app.plugin.js` exists after `prepare` | Tarball contains compiled Expo entry (`export =` from `plugin/src/app.plugin.ts`) | +| `exports["./app.plugin"]` + `exports["./app.plugin.js"].types` → `plugin/build/app.plugin.d.ts` | Strict Expo resolver + attw `export =` matches CJS shim | +| Consumer smoke: `npm pack` → temp install with `@react-native-firebase/app` (when needed) + `@expo/config-plugins` → `require('/app.plugin.js')` | Matches Expo prebuild Node resolution | + +**Packages with plugins (8):** `app`, `analytics`, `auth`, `messaging`, `crashlytics`, `perf`, `app-check`, `app-distribution`. + +**Why attw `UntypedResolution` / `FalseExportDefault` on `app.plugin.js` was misleading:** attw compares the root CJS shim against declaration shape. `plugin/src/app.plugin.ts` compiles to `plugin/build/app.plugin.d.ts` with `export =`, matching `module.exports = require('./plugin/build/app.plugin')`. `plugin/build/index.d.ts` keeps `export default` for the implementation module. Runtime correctness is additionally covered by the consumer smoke test. + +**Plugin layout:** committed TypeScript under `plugin/src/` (including `app.plugin.ts`); built JS + `.d.ts` under `plugin/build/` (gitignored). Package root keeps only the one-line `app.plugin.js` shim. + +**Plugin authoring lint:** `yarn lint:plugin` per package (eslint on `plugin/src`) — run when editing plugin sources; not duplicated in attw script. + +--- + +## Types-AD-4 — Perfection target — **Accepted** + +**Merge gate “perfection”** means: + +- `yarn tsc:compile:consumer` — zero errors +- `yarn attw:check` — zero errors under Types-AD-2 config **and** Expo plugin smoke passes + +Fixing all 185 `strict` findings is **not** a merge requirement unless Types-AD-2 is revised. + +Future improvement (Proposed): emit `.d.ts` with `.js` extension suffixes in relative imports to clear Node16 `InternalResolutionError` without ignoring the rule — only if we expand supported consumers beyond `bundler`. diff --git a/okf-bundle/testing/validation-checklist.md b/okf-bundle/testing/validation-checklist.md index 553e6af2f7..7cfc71a689 100644 --- a/okf-bundle/testing/validation-checklist.md +++ b/okf-bundle/testing/validation-checklist.md @@ -34,6 +34,7 @@ yarn lerna:prepare # after packages/*/lib/** edits — transp yarn lerna run prepare --scope @react-native-firebase/ # single package only when needed yarn tsc:compile yarn tsc:compile:consumer +yarn attw:check # scoped attw + Expo plugin smoke — [Types-AD-1..4](architecture-decisions.md) ``` `yarn lerna:prepare` runs each package **`prepare`** script (`build` then `compile`/bob). That is the canonical **`lib/**` → `dist/module/**`** path. Do **not** use `cd packages/ && yarn compile` as a substitute — `compile` is a step **inside** `prepare`, not a standalone agent entrypoint. @@ -152,6 +153,7 @@ Before closing **`implementation_gate`**, **`review_gate`**, **`commit_gate`**, - [ ] `yarn lerna:prepare` (after any `packages/*/lib/**` edits) - [ ] `yarn tsc:compile`, `yarn tsc:compile:consumer` +- [ ] `yarn attw:check` when `package.json` `exports`, `plugin/build`, or published types changed ([Types-AD](architecture-decisions.md)) - [ ] `yarn reference:api` - [ ] Redirect audit when TypeDoc config changed ([documentation site maintenance § redirect audit](../documentation-site-maintenance.md#redirect-audit-required-when-typedoc-config-changes)) - [ ] `yarn tests:jest` diff --git a/package.json b/package.json index a33b152201..99e79ee690 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build:all:build": "lerna run build", "test:functions:build": "cd .github/workflows/scripts/functions && yarn build", "compare:types": "cd .github/scripts/compare-types && yarn install && yarn compare", + "attw:check": "cd .github/scripts/attw && yarn install && yarn check", "codegen:all": "lerna run codegen", "codegen:verify": "node ./scripts/codegen-verify.mjs && git diff --exit-code -- 'packages/*/android/**/generated/**' 'packages/*/ios/generated/**'", "lint": "yarn lint:js && yarn lint:android && yarn lint:ios:check", diff --git a/packages/analytics/app.plugin.js b/packages/analytics/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/analytics/app.plugin.js +++ b/packages/analytics/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/analytics/package.json b/packages/analytics/package.json index b96e75ded3..7337bb0338 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -68,7 +68,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/analytics/plugin/src/app.plugin.ts b/packages/analytics/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/analytics/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/app-check/app.plugin.js b/packages/app-check/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/app-check/app.plugin.js +++ b/packages/app-check/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/app-check/package.json b/packages/app-check/package.json index 3bdcb78014..af6bde4d29 100644 --- a/packages/app-check/package.json +++ b/packages/app-check/package.json @@ -66,7 +66,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/app-check/plugin/src/app.plugin.ts b/packages/app-check/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/app-check/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/app-distribution/app.plugin.js b/packages/app-distribution/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/app-distribution/app.plugin.js +++ b/packages/app-distribution/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/app-distribution/package.json b/packages/app-distribution/package.json index 995ed56c7b..95a78db301 100644 --- a/packages/app-distribution/package.json +++ b/packages/app-distribution/package.json @@ -64,7 +64,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/app-distribution/plugin/src/app.plugin.ts b/packages/app-distribution/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/app-distribution/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/app/app.plugin.js b/packages/app/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/app/app.plugin.js +++ b/packages/app/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/app/package.json b/packages/app/package.json index f01a9dffbe..dd576f68f1 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -96,7 +96,14 @@ "types": "./dist/typescript/lib/common/*.d.ts", "default": "./dist/module/common/*.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "peerDependencies": { diff --git a/packages/app/plugin/src/app.plugin.ts b/packages/app/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/app/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/auth/app.plugin.js b/packages/auth/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/auth/app.plugin.js +++ b/packages/auth/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/auth/package.json b/packages/auth/package.json index 3e5c0e68a7..0fb57eb1e5 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -68,7 +68,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/auth/plugin/src/app.plugin.ts b/packages/auth/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/auth/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/crashlytics/app.plugin.js b/packages/crashlytics/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/crashlytics/app.plugin.js +++ b/packages/crashlytics/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/crashlytics/package.json b/packages/crashlytics/package.json index e66d7c51dc..2c48ffba50 100644 --- a/packages/crashlytics/package.json +++ b/packages/crashlytics/package.json @@ -73,7 +73,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/crashlytics/plugin/src/app.plugin.ts b/packages/crashlytics/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/crashlytics/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/messaging/app.plugin.js b/packages/messaging/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/messaging/app.plugin.js +++ b/packages/messaging/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/messaging/package.json b/packages/messaging/package.json index f3c678ac5c..937b04a75e 100644 --- a/packages/messaging/package.json +++ b/packages/messaging/package.json @@ -65,7 +65,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/messaging/plugin/src/app.plugin.ts b/packages/messaging/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/messaging/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin; diff --git a/packages/perf/app.plugin.js b/packages/perf/app.plugin.js index 3c7d11b615..183ab215a2 100644 --- a/packages/perf/app.plugin.js +++ b/packages/perf/app.plugin.js @@ -1 +1 @@ -module.exports = require('./plugin/build'); +module.exports = require('./plugin/build/app.plugin'); diff --git a/packages/perf/package.json b/packages/perf/package.json index 9d3d85c6e7..69d4d729a3 100644 --- a/packages/perf/package.json +++ b/packages/perf/package.json @@ -69,7 +69,14 @@ "types": "./dist/typescript/lib/index.d.ts", "default": "./dist/module/index.js" }, - "./app.plugin.js": "./app.plugin.js", + "./app.plugin": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, + "./app.plugin.js": { + "types": "./plugin/build/app.plugin.d.ts", + "default": "./app.plugin.js" + }, "./package.json": "./package.json" }, "react-native-builder-bob": { diff --git a/packages/perf/plugin/src/app.plugin.ts b/packages/perf/plugin/src/app.plugin.ts new file mode 100644 index 0000000000..822e60b7f6 --- /dev/null +++ b/packages/perf/plugin/src/app.plugin.ts @@ -0,0 +1,3 @@ +import plugin from './index'; + +export = plugin;