diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53e5059a..b7a0b55f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,12 +15,22 @@ The repository is organized as follows: │ ├── browser_app_entry.tsx # Entry point for browser app, hosted on GitHub pages. │ └── vscode_entry.tsx # Entry point for VS Code app, output placed under `vscode/assets`. ├── vscode/ # The VS Code extension. -└── rustlib/ # Rust library exporting Wasm functions. - └── pkg/ # Output directory for rustlib, installed from package.json via `"./rustlib/pkg"`. +├── rustlib/ # Rust library exporting Wasm functions. +│ └── pkg/ # Output directory for rustlib, installed from package.json via `"./rustlib/pkg"`. +└── tslib/ # TypeScript library shared for common use. + ├── react/ # Common React components. + ├── storage/ # Common code for handling storage. + └── types/ # Common TypeScript types. ``` ## Python package +#### Building TypeScript packages + +``` +$ make tslib +``` + #### Compiling TypeScript files Node.js v16 is required to compile TypeScript files. diff --git a/optuna_dashboard/package-lock.json b/optuna_dashboard/package-lock.json index d888df64..df49f5e1 100644 --- a/optuna_dashboard/package-lock.json +++ b/optuna_dashboard/package-lock.json @@ -60,7 +60,10 @@ "name": "@optuna/types", "version": "0.0.1", "dev": true, - "license": "MIT" + "license": "MIT", + "devDependencies": { + "typescript": "^5.4.5" + } }, "node_modules/@ampproject/remapping": { "version": "2.3.0", diff --git a/tslib/react/package-lock.json b/tslib/react/package-lock.json index 9ae27b21..c2a6befa 100644 --- a/tslib/react/package-lock.json +++ b/tslib/react/package-lock.json @@ -43,19 +43,25 @@ } }, "../storage": { + "name": "@optuna/storage", "version": "0.0.1", "license": "MIT", "dependencies": { "@sqlite.org/sqlite-wasm": "^3.45.1-build1" }, "devDependencies": { - "@optuna/types": "../types/" + "@optuna/types": "../types/", + "typescript": "^5.4.5" } }, "../types": { + "name": "@optuna/types", "version": "0.0.1", "dev": true, - "license": "MIT" + "license": "MIT", + "devDependencies": { + "typescript": "^5.4.5" + } }, "node_modules/@adobe/css-tools": { "version": "4.3.3", diff --git a/tslib/storage/package-lock.json b/tslib/storage/package-lock.json index 754056e1..6f6cda06 100644 --- a/tslib/storage/package-lock.json +++ b/tslib/storage/package-lock.json @@ -12,7 +12,8 @@ "@sqlite.org/sqlite-wasm": "^3.45.1-build1" }, "devDependencies": { - "@optuna/types": "../types/" + "@optuna/types": "../types/", + "typescript": "^5.4.5" } }, "../entity": { @@ -25,7 +26,10 @@ "name": "@optuna/types", "version": "0.0.1", "dev": true, - "license": "MIT" + "license": "MIT", + "devDependencies": { + "typescript": "^5.4.5" + } }, "node_modules/@optuna/types": { "resolved": "../types", @@ -38,6 +42,19 @@ "bin": { "sqlite-wasm": "bin/index.js" } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } } } } diff --git a/tslib/storage/package.json b/tslib/storage/package.json index bc2c5707..d02b75ed 100644 --- a/tslib/storage/package.json +++ b/tslib/storage/package.json @@ -26,6 +26,7 @@ "@sqlite.org/sqlite-wasm": "^3.45.1-build1" }, "devDependencies": { - "@optuna/types": "../types/" + "@optuna/types": "../types/", + "typescript": "^5.4.5" } } diff --git a/tslib/types/package-lock.json b/tslib/types/package-lock.json index 77fdf974..8b7fe247 100644 --- a/tslib/types/package-lock.json +++ b/tslib/types/package-lock.json @@ -7,7 +7,23 @@ "": { "name": "@optuna/types", "version": "0.0.1", - "license": "MIT" + "license": "MIT", + "devDependencies": { + "typescript": "^5.4.5" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } } } } diff --git a/tslib/types/package.json b/tslib/types/package.json index 2123fd9d..7cdeb1ac 100644 --- a/tslib/types/package.json +++ b/tslib/types/package.json @@ -19,5 +19,8 @@ "bugs": { "url": "https://github.com/optuna/optuna-dashboard/issues" }, - "homepage": "https://github.com/optuna/optuna-dashboard#readme" + "homepage": "https://github.com/optuna/optuna-dashboard#readme", + "devDependencies": { + "typescript": "^5.4.5" + } }