Skip to content

Commit 962fb83

Browse files
authored
Merge pull request #314 from objectstack-ai/copilot/upgrade-objectstack-core-package
2 parents 93fb914 + 3ac0983 commit 962fb83

38 files changed

Lines changed: 248 additions & 298 deletions

apps/console/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
"@object-ui/plugin-grid": "workspace:*",
3333
"@object-ui/react": "workspace:*",
3434
"@object-ui/types": "workspace:*",
35-
"@objectstack/client": "^0.7.2",
36-
"@objectstack/driver-memory": "^0.7.2",
37-
"@objectstack/objectql": "^0.7.2",
38-
"@objectstack/plugin-msw": "^0.7.2",
39-
"@objectstack/runtime": "^0.7.2",
40-
"@objectstack/spec": "^0.7.2",
35+
"@objectstack/client": "^0.8.0",
36+
"@objectstack/driver-memory": "^0.8.0",
37+
"@objectstack/objectql": "^0.8.0",
38+
"@objectstack/plugin-msw": "^0.8.0",
39+
"@objectstack/runtime": "^0.8.0",
40+
"@objectstack/spec": "^0.8.0",
4141
"@object-ui/example-crm": "workspace:*",
4242
"@object-ui/example-kitchen-sink": "workspace:*",
4343
"@object-ui/example-todo": "workspace:*",

apps/console/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default defineConfig({
5353
test: {
5454
globals: true,
5555
environment: 'happy-dom',
56-
setupFiles: ['./vitest.setup.ts'],
56+
setupFiles: ['./vitest.setup.tsx'],
5757
server: {
5858
deps: {
5959
inline: [/@objectstack/]

apps/console/vitest.setup.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/console/vitest.setup.tsx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import '@testing-library/jest-dom';
2+
import React from 'react';
3+
import '@object-ui/fields'; // Import fields first
4+
import '@object-ui/plugin-dashboard'; // Import to register dashboard components
5+
import '@object-ui/plugin-grid'; // Import to register grid components
6+
import '@object-ui/components'; // Imports @object-ui/components for types
7+
8+
// Manually re-register basic text component to override field widget
9+
// This is necessary because @object-ui/fields has @object-ui/components as a dependency,
10+
// so components gets loaded BEFORE fields registers its widgets, causing fields to overwrite.
11+
import { ComponentRegistry } from '@object-ui/core';
12+
import type { TextSchema } from '@object-ui/types';
13+
14+
ComponentRegistry.register('text',
15+
({ schema, ...props }: { schema: TextSchema; [key: string]: any }) => {
16+
const {
17+
'data-obj-id': dataObjId,
18+
'data-obj-type': dataObjType,
19+
style,
20+
...rest
21+
} = props;
22+
23+
if (dataObjId || schema.className || rest.className) {
24+
return (
25+
<span
26+
data-obj-id={dataObjId}
27+
data-obj-type={dataObjType}
28+
style={style}
29+
className={schema.className || rest.className}
30+
{...rest}
31+
>
32+
{schema.content || schema.value}
33+
</span>
34+
);
35+
}
36+
37+
return <>{schema.content || schema.value}</>;
38+
},
39+
{
40+
namespace: 'ui',
41+
label: 'Text',
42+
}
43+
);

examples/crm-app/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"@object-ui/react": "workspace:*",
2222
"@object-ui/types": "workspace:*",
2323
"@object-ui/example-crm": "workspace:*",
24-
"@objectstack/client": "^0.7.2",
25-
"@objectstack/core": "^0.7.2",
26-
"@objectstack/runtime": "^0.7.2",
24+
"@objectstack/client": "^0.8.0",
25+
"@objectstack/core": "^0.8.0",
26+
"@objectstack/runtime": "^0.8.0",
2727
"clsx": "^2.1.1",
2828
"lucide-react": "^0.563.0",
2929
"react": "^18.3.1",
@@ -32,9 +32,9 @@
3232
"tailwind-merge": "^3.4.0"
3333
},
3434
"devDependencies": {
35-
"@objectstack/driver-memory": "^0.7.2",
36-
"@objectstack/objectql": "^0.7.2",
37-
"@objectstack/plugin-msw": "^0.7.2",
35+
"@objectstack/driver-memory": "^0.8.0",
36+
"@objectstack/objectql": "^0.8.0",
37+
"@objectstack/plugin-msw": "^0.8.0",
3838
"@tailwindcss/postcss": "^4.1.18",
3939
"@tailwindcss/vite": "^4.1.18",
4040
"@testing-library/jest-dom": "^6.9.1",

examples/crm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"build": "objectstack compile objectstack.config.ts dist/objectstack.json"
1414
},
1515
"dependencies": {
16-
"@objectstack/spec": "^0.7.2"
16+
"@objectstack/spec": "^0.8.0"
1717
},
1818
"devDependencies": {
1919
"typescript": "^5.0.0",
20-
"@objectstack/cli": "^0.7.2"
20+
"@objectstack/cli": "^0.8.0"
2121
}
2222
}

examples/kitchen-sink/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"build": "objectstack compile objectstack.config.ts dist/objectstack.json"
1414
},
1515
"dependencies": {
16-
"@objectstack/spec": "^0.7.2"
16+
"@objectstack/spec": "^0.8.0"
1717
},
1818
"devDependencies": {
1919
"typescript": "^5.0.0",
20-
"@objectstack/cli": "^0.7.2"
20+
"@objectstack/cli": "^0.8.0"
2121
}
2222
}

examples/msw-todo/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@objectstack/client": "^0.7.2",
14-
"@objectstack/driver-memory": "^0.7.2",
13+
"@objectstack/client": "^0.8.0",
14+
"@objectstack/driver-memory": "^0.8.0",
1515
"@object-ui/example-todo": "workspace:*",
16-
"@objectstack/plugin-msw": "^0.7.2",
17-
"@objectstack/runtime": "^0.7.2",
18-
"@objectstack/objectql": "^0.7.2",
19-
"@objectstack/spec": "^0.7.2",
16+
"@objectstack/plugin-msw": "^0.8.0",
17+
"@objectstack/runtime": "^0.8.0",
18+
"@objectstack/objectql": "^0.8.0",
19+
"@objectstack/spec": "^0.8.0",
2020
"react": "^18.3.1",
2121
"react-dom": "^18.3.1"
2222
},

examples/todo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"build": "objectstack compile objectstack.config.ts dist/objectstack.json"
1212
},
1313
"dependencies": {
14-
"@objectstack/spec": "^0.7.2",
15-
"@objectstack/client": "^0.7.2"
14+
"@objectstack/spec": "^0.8.0",
15+
"@objectstack/client": "^0.8.0"
1616
},
1717
"devDependencies": {
1818
"typescript": "^5.0.0",
19-
"@objectstack/cli": "^0.7.2"
19+
"@objectstack/cli": "^0.8.0"
2020
}
2121
}

package.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
"devDependencies": {
6060
"@changesets/cli": "^2.29.8",
6161
"@eslint/js": "^9.39.1",
62-
"@objectstack/cli": "^0.7.2",
63-
"@objectstack/core": "^0.7.2",
64-
"@objectstack/driver-memory": "^0.7.2",
65-
"@objectstack/objectql": "^0.7.2",
66-
"@objectstack/plugin-msw": "^0.7.2",
67-
"@objectstack/runtime": "^0.7.2",
62+
"@objectstack/cli": "^0.8.0",
63+
"@objectstack/core": "^0.8.0",
64+
"@objectstack/driver-memory": "^0.8.0",
65+
"@objectstack/objectql": "^0.8.0",
66+
"@objectstack/plugin-msw": "^0.8.0",
67+
"@objectstack/runtime": "^0.8.0",
6868
"@storybook/addon-essentials": "^8.6.14",
6969
"@storybook/addon-interactions": "^8.6.14",
7070
"@storybook/addon-links": "^8.6.15",
@@ -113,9 +113,6 @@
113113
"react-dom": "19.2.3",
114114
"@types/react": "19.2.9",
115115
"@types/react-dom": "19.2.3"
116-
},
117-
"patchedDependencies": {
118-
"@objectstack/core@0.7.2": "patches/@objectstack__core@0.7.2.patch"
119116
}
120117
},
121118
"dependencies": {

0 commit comments

Comments
 (0)