-
Notifications
You must be signed in to change notification settings - Fork 15
Reorg monorepo #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorg monorepo #619
Conversation
nikrooz
commented
Nov 10, 2025
- use pnpm workspaces
- use turbo for caching tasks
- use plop.js for generating new libs
- use changeset for release
- Deleted all files except .git - Copied typescript-monorepo-template structure - Updated root package.json with SDK metadata: - Name: @restatedev/sdk-typescript - Version: 1.9.0 - Repository URLs - Added typedoc and wasm-pack dependencies - Added build-docs script - Updated .templates/package.json.hbs with SDK metadata Step 2: Create restate-sdk-core package - Created package using plop template (lib, publishable) - Copied source code from main branch: - src/core.ts - src/duration.ts - src/entry_codec.ts - src/index.ts - src/serde_api.ts - Copied README.md from main - Updated tsconfig.json with path mappings - Single entry point (main only) Step 3: Create restate-sdk package with multiple entry points - Created package using plop template (lib, publishable) - Added 3 additional entry points using add-entry: - fetch (src/fetch.ts) - lambda (src/lambda.ts) - node (src/node.ts) - Added dependency: @restatedev/restate-sdk-core (workspace) - Added external to tsdown config to prevent bundling core - Added devDependency: @types/aws-lambda - Copied all source code from main branch - Copied tests from main branch - Copied README from main - Updated tsconfig.json with path mappings Step 4: Create restate-sdk-clients package - Created package using plop template (lib, publishable) - Added dependency: @restatedev/restate-sdk-core (workspace) - Added external to tsdown config - Copied source code from main branch - Copied README from main - Copied buf.yaml for protocol buffers - Single entry point - Updated tsconfig.json with path mappings Step 5: Create restate-sdk-zod package - Created package using plop template (lib, publishable) - Added devDependencies: - @restatedev/restate-sdk-core (workspace) - zod (catalog from pnpm-workspace.yaml) - Added peerDependency: zod ^3.25.0 || ^4.0.0 - Added external to tsdown config for both core and zod - Copied source code from main branch - Copied tests from main branch - Copied README from main - Single entry point - Updated tsconfig.json with path mappings Step 6: Create restate-sdk-testcontainers package - Created package using plop template (lib, publishable) - Added dependencies: - @restatedev/restate-sdk (workspace) - @restatedev/restate-sdk-clients (workspace) - apache-arrow: ^18.0.0 - testcontainers: ^10.24.1 - Added external to tsdown config for SDK packages - Copied source code from main branch - Copied README from main - Single entry point - Updated tsconfig.json with path mappings Step 7: Create restate-sdk-cloudflare-workers package (FINAL SDK PACKAGE!) - Created package using plop template (lib, publishable) - Added fetch entry point using add-entry - Added dependencies: - @restatedev/restate-sdk-core (workspace) - Added devDependencies: - @types/aws-lambda - @restatedev/restate-sdk (workspace) - Added external to tsdown config - Copied patches/ directory (Cloudflare-specific patches) - Copied patch_sdk_cf_workers.sh script - Copied source code from main branch - Two entry points: main and fetch - Updated tsconfig.json with path mappings All 6 SDK library packages complete! Step 8: Create restate-e2e-services test package - Created using plop template (type: test) - Added dependencies: - @restatedev/restate-sdk (workspace) - @restatedev/restate-sdk-clients (workspace) - heapdump, uuid - Copied all source code from main - Copied Docker files and config from main - Test package (private, no build step) Add 7 example packages with source code - packages/examples/restate-sdk-examples - Main SDK examples - packages/examples/node - Node.js example - packages/examples/bun - Bun example - packages/examples/deno - Deno example - packages/examples/lambda - AWS Lambda example - packages/examples/cloudflare - Cloudflare Workers example - packages/examples/vercel - Vercel example Add WASM bindings, build tools, and TypeDoc config - sdk-shared-core-wasm-bindings/ - Rust WASM package for core bindings - .tools/build_core.sh - Build script for WASM bindings - typedoc.json - TypeScript documentation configuration Fix tsconfig.base.json - add lib and other compiler options Add missing compiler options from original SDK: - lib: ["esnext"] - Required for proper fetch API types - allowSyntheticDefaultImports - noImplicitThis Add SDK templates, VSCode settings, and API directory - templates/ - Original SDK templates for different runtimes - .vscode/settings.json - VSCode workspace configuration - .api/.gitkeep - Placeholder for API directory Replace template workflows with SDK workflows - Remove template CI/release workflows - Add SDK-specific workflows: - Template testing workflows (bun, cloudflare, deno, lambda, node, vercel) - compatibility.yaml - SDK compatibility testing - docker.yml - Docker image building - integration.yaml - Integration tests - test.yml - Unit tests - release-docs.yml - Documentation releases - Add CLA configuration Clean up duplicate package directories from git checkout operations Update generated TypeScript configs and format code - Regenerate path mappings in tsconfig.json - Update tsconfig.build.json references in all packages - Format code with prettier Reorder exports in restate-sdk-cloudflare-workers package.json Move package.json export to end for consistency Restore SDK-specific ignore patterns Add back SDK-specific patterns that were in main: - .gitignore: Add generated sources, buf.lock, test reports, .restate, docs-out, build artifacts - .prettierignore: Add generated sources, buf.lock, IDE files, test reports, build artifacts Restore original README.md and LICENSE from SDK Keep the SDK's original README and LICENSE instead of template versions Restore original eslint.config.js from SDK Keep SDK-specific ESLint configuration: - Additional ignore patterns (Next.js, Wrangler, WASM files, etc.) - SDK-specific rules (no-console, template-expressions) - Special rules for examples and test packages Remove placeholder index.ts files from example packages Remove template-generated placeholder files: - packages/examples/restate-sdk-examples/src/index.ts - packages/examples/vercel/src/index.ts These packages have their actual source code in other files. Restore original tsdown.config.ts settings from SDK Key changes to match original SDK configs: - Add 'unbundle: true' to core, sdk, and clients packages - Restore Node.js built-in externals for restate-sdk - Restore 'http2' external for testcontainers - Remove cloudflare-workers and zod externals (bundled by default) - Remove 'clean' flag (not in originals) - Reorder entry points to match original Reorder exports in restate-sdk package.json Move package.json export to end for consistency with other packages Fix version and description in all library packages Update all library package.json files: - Set version to 1.9.0 (from 0.0.0 placeholder) - Set description to 'Typescript SDK for Restate' (from TODO placeholder) Restore original .prettierrc from SDK Keep SDK's minimal prettier config with only trailingComma setting pnpm i Signed-off-by: Nik Nasr <nik@restate.dev> Remove templates/ directory and update workflows to use packages/examples/ - Update all template test workflows to use packages/examples/ instead of templates/ - Remove templates/ directory (now redundant with packages/examples/) - Remove 'templates' from .prettierignore - This completes the migration: examples are now part of the monorepo structure Remove placeholder README from restate-sdk-cloudflare-workers Restore original formatting for cloudflare-workers patches Keep original single-line import formatting instead of prettier-formatted multi-line imports Clean up temporary patch files from wrong location Restore original WASM-generated files for clean rename detection Remove placeholder source files from cloudflare-workers and e2e-services Fix cloudflare-workers package to use patch script instead of tsdown Restore original formatting for WASM TypeScript declarations add src Signed-off-by: Nik Nasr <nik@restate.dev> fix examples Signed-off-by: Nik Nasr <nik@restate.dev> fix examples Signed-off-by: Nik Nasr <nik@restate.dev> some fixes Signed-off-by: Nik Nasr <nik@restate.dev> fix lint Signed-off-by: Nik Nasr <nik@restate.dev> fix import Signed-off-by: Nik Nasr <nik@restate.dev> fix build Signed-off-by: Nik Nasr <nik@restate.dev> fix vercel Signed-off-by: Nik Nasr <nik@restate.dev> fix Signed-off-by: Nik Nasr <nik@restate.dev> update workflows Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
|
Hey @nikrooz , i tried to use this but still nothing... Why do we even use these modules? in the test-services image? can we make those optional and install them only in the test-services image? |
slinkydeveloper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a bunch of comments. Once those are solved, you can go ahead and merge
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Signed-off-by: Nik Nasr <nik@restate.dev>
Thank you for the review. I've addressed all the comments. |