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
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
import { describe, expect, it } from 'vitest'
|
|
import { lockedVersion, lockfileRootImporter } from './pnpm-lockfile-root-importer.mjs'
|
|
|
|
describe('lockfileRootImporter', () => {
|
|
it('merges the root importer across pnpm 12 lockfile documents', () => {
|
|
const contents = [
|
|
'---',
|
|
"lockfileVersion: '9.0'",
|
|
'importers:',
|
|
' .:',
|
|
' packageManagerDependencies: {}',
|
|
'---',
|
|
"lockfileVersion: '9.0'",
|
|
'importers:',
|
|
' .:',
|
|
' devDependencies:',
|
|
' electron:',
|
|
' specifier: 43.7.5',
|
|
' version: 43.7.5(supports-color@7.2.0)',
|
|
''
|
|
].join('\n')
|
|
expect(lockfileRootImporter(contents).devDependencies.electron.version).toBe(
|
|
'43.7.5(supports-color@7.2.0)'
|
|
)
|
|
})
|
|
})
|
|
|
|
describe('lockedVersion', () => {
|
|
it('strips the peer suffix from an entry or a bare string', () => {
|
|
expect(lockedVersion({ version: '4.6.7(typescript@6.0.3)' })).toBe('4.6.7')
|
|
expect(lockedVersion('8.22.0(patch_hash=abc)')).toBe('8.22.0')
|
|
expect(lockedVersion(undefined)).toBeNull()
|
|
})
|
|
})
|