mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
* fix(deps): root and mobile resolve one zod, and CI fails if they drift
Mobile type-checks src/shared zod schemas. With mobile on zod 4.6.5 and the
root on 4.6.7, TypeScript treated them as unrelated packages, so wrapped
schemas inferred {} (tests/e2e/helpers/phone-feed-list.ts:154) whenever a
job installed mobile deps.
* fix(deps): guard every package mobile's tsconfig remaps, not only zod
* test(ci): pin the shared-dependency version check to the static phase
20 lines
691 B
JavaScript
20 lines
691 B
JavaScript
import { parseAllDocuments } from 'yaml'
|
|
|
|
/** Strips pnpm's peer suffix: `43.7.5(supports-color@7.2.0)` -> `43.7.5`. */
|
|
export function lockedVersion(entry) {
|
|
const version = typeof entry === 'string' ? entry : entry?.version
|
|
return typeof version === 'string' ? version.replace(/\(.*$/, '') : null
|
|
}
|
|
|
|
/** pnpm 12 splits the lockfile into a package-manager document and the project one; merge both. */
|
|
export function lockfileRootImporter(contents) {
|
|
const importer = {}
|
|
for (const document of parseAllDocuments(contents)) {
|
|
if (document.errors.length) {
|
|
throw document.errors[0]
|
|
}
|
|
Object.assign(importer, document.toJS()?.importers?.['.'])
|
|
}
|
|
return importer
|
|
}
|