Skip to content

Commit b5beec1

Browse files
Claudehotlong
andauthored
fix: update pnpm-lock.yaml and fix TypeScript build errors
- Update pnpm-lock.yaml to include new packages (@object-ui/app-shell, @object-ui/providers, examples/minimal-console) - Fix TypeScript configurations for new packages: - Add jsx: "react-jsx" and lib: ["ES2020", "DOM"] to tsconfig - Add project references for dependency packages - Update to extend ../../tsconfig.json instead of tsconfig.base.json - Fix unused variable warnings: - Remove unused 'error' state in MetadataProvider - Prefix unused params with underscore in ObjectRenderer and mockDataSource - Add missing Tailwind dependencies to minimal-console example: - @tailwindcss/postcss, autoprefixer, postcss, tailwindcss All packages now build successfully without errors. Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/2149c28c-4689-4c16-a0ab-f9476f1d1ef7 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 6058e39 commit b5beec1

File tree

7 files changed

+147
-17
lines changed

7 files changed

+147
-17
lines changed

examples/minimal-console/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020
"react-router-dom": "^7.14.1"
2121
},
2222
"devDependencies": {
23+
"@tailwindcss/postcss": "^4.2.2",
2324
"@types/react": "19.2.14",
2425
"@types/react-dom": "19.2.3",
2526
"@vitejs/plugin-react": "^6.0.1",
27+
"autoprefixer": "^10.5.0",
28+
"postcss": "^8.5.9",
29+
"tailwindcss": "^4.2.2",
2630
"typescript": "^6.0.2",
2731
"vite": "^8.0.8"
2832
}

examples/minimal-console/src/mockDataSource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const mockMetadata = {
5757
};
5858

5959
export const mockDataSource: DataSource = {
60-
async find(objectName: string, params?: any) {
60+
async find(objectName: string, _params?: any) {
6161
await delay(300); // Simulate network delay
6262
const data = mockData[objectName] || [];
6363
return {

packages/app-shell/src/components/ObjectRenderer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export function ObjectRenderer({
1212
objectName,
1313
viewId,
1414
dataSource,
15-
onRecordClick,
16-
onEdit,
15+
onRecordClick: _onRecordClick,
16+
onEdit: _onEdit,
1717
objectDef: externalObjectDef,
1818
refreshKey = 0,
1919
}: ObjectRendererProps) {

packages/app-shell/tsconfig.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
2-
"extends": "../../tsconfig.base.json",
2+
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "./dist",
5-
"rootDir": "./src",
4+
"outDir": "dist",
5+
"rootDir": "src",
6+
"jsx": "react-jsx",
7+
"lib": ["ES2020", "DOM"],
8+
"noEmit": false,
69
"declaration": true,
7-
"declarationMap": true,
810
"composite": true
911
},
10-
"include": ["src/**/*"],
11-
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
12+
"include": ["src"],
13+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"],
14+
"references": [
15+
{ "path": "../types" },
16+
{ "path": "../core" },
17+
{ "path": "../react" },
18+
{ "path": "../components" }
19+
]
1220
}

packages/providers/src/MetadataProvider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export function MetadataProvider({
2222
}: MetadataProviderProps) {
2323
const [metadata, setMetadata] = useState(initialMetadata || null);
2424
const [loading, setLoading] = useState(!initialMetadata);
25-
const [error, setError] = useState<string | null>(null);
2625

2726
const refetch = () => {
2827
// Placeholder for refetch logic
@@ -43,7 +42,7 @@ export function MetadataProvider({
4342
const value: MetadataContextValue = {
4443
metadata,
4544
loading,
46-
error,
45+
error: null,
4746
refetch,
4847
};
4948

packages/providers/tsconfig.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{
2-
"extends": "../../tsconfig.base.json",
2+
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "./dist",
5-
"rootDir": "./src",
4+
"outDir": "dist",
5+
"rootDir": "src",
6+
"jsx": "react-jsx",
7+
"lib": ["ES2020", "DOM"],
8+
"noEmit": false,
69
"declaration": true,
7-
"declarationMap": true,
810
"composite": true
911
},
10-
"include": ["src/**/*"],
11-
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
12+
"include": ["src"],
13+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"],
14+
"references": [
15+
{ "path": "../types" }
16+
]
1217
}

pnpm-lock.yaml

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)