@dxos/migrations 0.4.10-main.2cf0959 → 0.4.10-main.2e2de51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/migrations",
3
- "version": "0.4.10-main.2cf0959",
3
+ "version": "0.4.10-main.2e2de51",
4
4
  "description": "",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -20,9 +20,10 @@
20
20
  "src"
21
21
  ],
22
22
  "dependencies": {
23
- "@dxos/client": "0.4.10-main.2cf0959",
24
- "@dxos/invariant": "0.4.10-main.2cf0959",
25
- "@dxos/util": "0.4.10-main.2cf0959"
23
+ "@dxos/client": "0.4.10-main.2e2de51",
24
+ "@dxos/echo-schema": "0.4.10-main.2e2de51",
25
+ "@dxos/invariant": "0.4.10-main.2e2de51",
26
+ "@dxos/util": "0.4.10-main.2e2de51"
26
27
  },
27
28
  "devDependencies": {},
28
29
  "publishConfig": {
@@ -5,8 +5,10 @@
5
5
  import { expect } from 'chai';
6
6
 
7
7
  import { Client } from '@dxos/client';
8
- import { Expando, type Space } from '@dxos/client/echo';
8
+ import { type Space } from '@dxos/client/echo';
9
9
  import { TestBuilder } from '@dxos/client/testing';
10
+ import * as E from '@dxos/echo-schema';
11
+ import { ExpandoType } from '@dxos/echo-schema';
10
12
  import { describe, test, beforeEach, beforeAll, afterAll } from '@dxos/test';
11
13
 
12
14
  import { Migrations } from './migrations';
@@ -15,7 +17,7 @@ Migrations.define('test', [
15
17
  {
16
18
  version: 1,
17
19
  up: async ({ space }) => {
18
- space.db.add(new Expando({ namespace: 'test', count: 1 }));
20
+ space.db.add(E.object(E.ExpandoType, { namespace: 'test', count: 1 }));
19
21
  },
20
22
  down: async ({ space }) => {
21
23
  const { objects } = space.db.query({ namespace: 'test' });
@@ -82,7 +84,7 @@ describe('Migrations', () => {
82
84
 
83
85
  test('if some migrations have been run before, runs only the remaining migrations', async () => {
84
86
  space.properties['test.version'] = 2;
85
- space.db.add(new Expando({ namespace: 'test', count: 5 }));
87
+ space.db.add(E.object(ExpandoType, { namespace: 'test', count: 5 }));
86
88
  await Migrations.migrate(space);
87
89
  const { objects } = space.db.query({ namespace: 'test' });
88
90
  expect(objects).to.have.length(1);