chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase
This commit is contained in:
parent
970e08c466
commit
1f7e365a4e
237 changed files with 1951 additions and 49413 deletions
|
|
@ -34,7 +34,7 @@ describe('VFS Graph Relationships', () => {
|
|||
const readmeId = await vfs.resolvePath('/projects/brainy/README.md')
|
||||
|
||||
// Verify relationships are created properly
|
||||
const projectRelations = await brain.getRelations({
|
||||
const projectRelations = await brain.related({
|
||||
from: projectsId,
|
||||
type: VerbType.Contains
|
||||
})
|
||||
|
|
@ -43,7 +43,7 @@ describe('VFS Graph Relationships', () => {
|
|||
expect(projectRelations[0].to).toBe(brainyId)
|
||||
|
||||
// Verify brainy directory contains its files
|
||||
const brainyRelations = await brain.getRelations({
|
||||
const brainyRelations = await brain.related({
|
||||
from: brainyId,
|
||||
type: VerbType.Contains
|
||||
})
|
||||
|
|
@ -89,7 +89,7 @@ describe('VFS Graph Relationships', () => {
|
|||
const doc1Id = await vfs.resolvePath('/doc1.md')
|
||||
const doc2Id = await vfs.resolvePath('/doc2.md')
|
||||
|
||||
const directRelations = await brain.getRelations({
|
||||
const directRelations = await brain.related({
|
||||
from: doc1Id,
|
||||
type: VerbType.References
|
||||
})
|
||||
|
|
@ -114,7 +114,7 @@ describe('VFS Graph Relationships', () => {
|
|||
const testId = entity.id
|
||||
|
||||
// Check that root contains test.txt via relationships
|
||||
const rootRelations = await brain.getRelations({
|
||||
const rootRelations = await brain.related({
|
||||
from: rootId,
|
||||
type: VerbType.Contains
|
||||
})
|
||||
|
|
@ -135,7 +135,7 @@ describe('VFS Graph Relationships', () => {
|
|||
|
||||
// Verify it's using relationships, not metadata queries
|
||||
const manyId = await vfs.resolvePath('/many')
|
||||
const relations = await brain.getRelations({
|
||||
const relations = await brain.related({
|
||||
from: manyId,
|
||||
type: VerbType.Contains
|
||||
})
|
||||
|
|
@ -158,14 +158,14 @@ describe('VFS Graph Relationships', () => {
|
|||
const fileId = await vfs.resolvePath('/dest/file.txt')
|
||||
|
||||
// Source should not contain file anymore
|
||||
const sourceRelations = await brain.getRelations({
|
||||
const sourceRelations = await brain.related({
|
||||
from: sourceId,
|
||||
type: VerbType.Contains
|
||||
})
|
||||
expect(sourceRelations).toHaveLength(0)
|
||||
|
||||
// Dest should contain file
|
||||
const destRelations = await brain.getRelations({
|
||||
const destRelations = await brain.related({
|
||||
from: destId,
|
||||
type: VerbType.Contains
|
||||
})
|
||||
|
|
@ -204,7 +204,7 @@ describe('VFS Graph Relationships', () => {
|
|||
const fileEntityId = await vfs.resolvePath('/test-new.txt')
|
||||
|
||||
// Check that Contains relationship exists
|
||||
const relations = await brain.getRelations({
|
||||
const relations = await brain.related({
|
||||
from: rootId,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -221,7 +221,7 @@ describe('VFS Graph Relationships', () => {
|
|||
await vfs.writeFile('/test-new.txt', 'Updated content')
|
||||
|
||||
// Relationship should still exist after update
|
||||
const relationsAfterUpdate = await brain.getRelations({
|
||||
const relationsAfterUpdate = await brain.related({
|
||||
from: rootId,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -237,7 +237,7 @@ describe('VFS Graph Relationships', () => {
|
|||
await vfs.writeFile('/test-new.txt', 'Another update')
|
||||
await vfs.writeFile('/test-new.txt', 'Yet another update')
|
||||
|
||||
const finalRelations = await brain.getRelations({
|
||||
const finalRelations = await brain.related({
|
||||
from: rootId,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -258,7 +258,7 @@ describe('VFS Graph Relationships', () => {
|
|||
const fileEntityId = await vfs.resolvePath('/orphan-test.txt')
|
||||
|
||||
// Manually delete the Contains relationship to simulate the bug
|
||||
const initialRelations = await brain.getRelations({
|
||||
const initialRelations = await brain.related({
|
||||
from: rootId,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -270,7 +270,7 @@ describe('VFS Graph Relationships', () => {
|
|||
}
|
||||
|
||||
// Verify the relationship is gone
|
||||
const brokenRelations = await brain.getRelations({
|
||||
const brokenRelations = await brain.related({
|
||||
from: rootId,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -285,7 +285,7 @@ describe('VFS Graph Relationships', () => {
|
|||
await vfs.writeFile('/orphan-test.txt', 'Fixed content')
|
||||
|
||||
// Verify the relationship is restored
|
||||
const fixedRelations = await brain.getRelations({
|
||||
const fixedRelations = await brain.related({
|
||||
from: rootId,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -314,7 +314,7 @@ describe('VFS Graph Relationships', () => {
|
|||
const fileEntityId = await vfs.resolvePath('/level1/level2/level3/deep.txt')
|
||||
|
||||
// Verify Contains relationship exists
|
||||
const relations = await brain.getRelations({
|
||||
const relations = await brain.related({
|
||||
from: level3Id,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
@ -329,7 +329,7 @@ describe('VFS Graph Relationships', () => {
|
|||
// Update the file and verify relationship persists
|
||||
await vfs.writeFile('/level1/level2/level3/deep.txt', 'Updated deep content')
|
||||
|
||||
const relationsAfterUpdate = await brain.getRelations({
|
||||
const relationsAfterUpdate = await brain.related({
|
||||
from: level3Id,
|
||||
to: fileEntityId,
|
||||
type: VerbType.Contains
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue