Skip to content

Commit

Permalink
Update TS SDK to 1.4.0 (#201)
Browse files Browse the repository at this point in the history
* Update TS SDK to 1.4.0

* Fix bad wait strategy
  • Loading branch information
slinkydeveloper authored Oct 21, 2024
1 parent ffbdbf9 commit aaf3199
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 53 deletions.
4 changes: 3 additions & 1 deletion .tools/update_node_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ bump_ts_sdk $PROJECT_ROOT/templates/typescript
bump_ts_sdk $PROJECT_ROOT/templates/typescript-testing
bump_ts_sdk_clients $PROJECT_ROOT/templates/typescript-testing
bump_ts_sdk $PROJECT_ROOT/templates/typescript-lambda-cdk
bump_ts_sdk $PROJECT_ROOT/templates/cloudflare-worker
bump_ts_sdk $PROJECT_ROOT/templates/bun

# Cloudflare workers has a different module
npm --prefix $PROJECT_ROOT/templates/cloudflare-worker install @restatedev/restate-sdk-cloudflare-workers@^$NEW_VERSION

# deno bump - it doesn't use a package.json, only import strings
# -i works differently in gnu sed and mac (bsd) sed - best avoided
tmp=$(mktemp)
Expand Down
4 changes: 2 additions & 2 deletions basics/basics-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"example-6": "ts-node-dev --transpile-only src/6_events_state.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk-clients": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0",
"@restatedev/restate-sdk-clients": "^1.4.0"
},
"devDependencies": {
"@restatedev/restate": "^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"workflow-service": "ts-node-dev --watch ./src --respawn --transpile-only src/workflow/workflow.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk": "^1.4.0",
"axios": "^1.6.7",
"axios-retry": "^4.0.0",
"express": "^4.18.2",
Expand Down
2 changes: 1 addition & 1 deletion end-to-end-applications/typescript/chat-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"flights-task": "RESTATE_LOGGING=INFO ts-node-dev --watch ./src --transpile-only ./src/tasks/flight_prices.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk": "^1.4.0",
"@slack/bolt": "^3.19.0",
"@slack/web-api": "^7.0.4"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"app-dev": "RESTATE_DEBUG_LOGGING=JOURNAL ts-node-dev --watch src --respawn --transpile-only src/order-app/app.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk": "^1.4.0",
"@types/node": "^20.6.3",
"@types/uuid": "^9.0.0",
"axios": "^1.4.0",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": "14.17.3"
},
"dependencies": {
"@restatedev/restate-sdk-clients": "^1.3.3",
"@restatedev/restate-sdk-clients": "^1.4.0",
"axios": "^0.26.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"app-dev": "ts-node-dev --watch ./src --transpile-only ./src/payment_handler.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk": "^1.4.0",
"stripe": "^14.15.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"example3": "ts-node --transpile-only ./src/3_example_parallel_processes.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk-clients": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0",
"@restatedev/restate-sdk-clients": "^1.4.0"
},
"devDependencies": {
"@restatedev/restate": "^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"app-dev": "ts-node-dev --watch ./src --transpile-only ./src/payment_service.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0"
},
"devDependencies": {
"@types/node": "^20.12.7",
Expand Down
2 changes: 1 addition & 1 deletion patterns-use-cases/sagas/sagas-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "tsc --noEmitOnError"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0"
},
"devDependencies": {
"@types/node": "^20.12.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"example-crash": "CRASH_PROCESS=true ./utils/restart-process.sh 'RESTATE_DEBUG_LOGGING=OFF ts-node-dev --transpile-only src/state_machine.ts'"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0"
},
"devDependencies": {
"@restatedev/restate": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"format": "prettier --write \"src/*.+(js|ts|json)\""
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0"
},
"devDependencies": {
"@types/bun": "^1.1.5",
Expand Down
4 changes: 2 additions & 2 deletions templates/cloudflare-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"format": "prettier --write \"src/*.+(js|ts|json)\""
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3"
"@restatedev/restate-sdk-cloudflare-workers": "^1.4.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240605.0",
"prettier": "^3.3.2",
"typescript": "^5.4.5",
"wrangler": "^3.0.0"
"wrangler": "^3.81.0"
}
}
2 changes: 1 addition & 1 deletion templates/cloudflare-worker/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Context, endpoint, service } from "@restatedev/restate-sdk/fetch";
import { Context, endpoint, service } from "@restatedev/restate-sdk-cloudflare-workers/fetch";

// Template of a Restate service and handler
//
Expand Down
2 changes: 1 addition & 1 deletion templates/deno/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Context,
endpoint,
service,
} from "npm:@restatedev/restate-sdk@^1.2.1/fetch";
} from "npm:@restatedev/restate-sdk@^1.4.0/fetch";

// Template of a Restate service and handler
//
Expand Down
4 changes: 2 additions & 2 deletions templates/typescript-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test": "DEBUG=testcontainers,testcontainers:exec,testcontainers:containers jest --maxWorkers=1 --detectOpenHandles"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk-clients": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0",
"@restatedev/restate-sdk-clients": "^1.4.0"
},
"devDependencies": {
"@types/jest": "^29.4.0",
Expand Down
5 changes: 3 additions & 2 deletions templates/typescript-testing/test/restate_test_environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ async function prepareRestateTestContainer(
restateServerPort: number
): Promise<StartedTestContainer> {
const restateContainer = new GenericContainer(
"docker.io/restatedev/restate:1.0.1"
"docker.io/restatedev/restate:1.1"
)
// Expose ports
.withExposedPorts(8080, 9070)
// Wait start on health checks
.withWaitStrategy(
Wait.forAll([
Wait.forHttp("/health", 9070),
Wait.forHttp("/restate/health", 8080),
Wait.forHttp("/health", 9070)
])
);

Expand Down
2 changes: 1 addition & 1 deletion templates/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"app-dev": "ts-node-dev --watch ./src --respawn --transpile-only ./src/app.ts"
},
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3"
"@restatedev/restate-sdk": "^1.4.0"
},
"devDependencies": {
"@types/node": "^20.14.2",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour-of-restate-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"author": "Restate Developers",
"email": "[email protected]",
"dependencies": {
"@restatedev/restate-sdk": "^1.3.3",
"@restatedev/restate-sdk": "^1.4.0",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit aaf3199

Please sign in to comment.