diff --git a/.scripts/copy-shared-files.mjs b/.scripts/copy-shared-files.mjs index 4c976b15..2c584a65 100644 --- a/.scripts/copy-shared-files.mjs +++ b/.scripts/copy-shared-files.mjs @@ -8,7 +8,7 @@ const ADDITIONAL_SAMPLES = []; const TSCONFIG_EXCLUDE = ['nextjs-ecommerce-oneclick', 'monorepo-folders', 'fetch-esm', 'production', 'hello-world-js']; const GITIGNORE_EXCLUDE = ['nextjs-ecommerce-oneclick', 'monorepo-folders', 'production', 'hello-world-js']; const ESLINTRC_EXCLUDE = ['nextjs-ecommerce-oneclick', 'monorepo-folders', 'fetch-esm', 'hello-world-js']; -const ESLINTIGNORE_EXCLUDE = ['production', 'monorepo-folders', 'hello-world-js']; +const ESLINTIGNORE_EXCLUDE = ['production', 'hello-world-js']; const POST_CREATE_EXCLUDE = [ 'timer-examples', @@ -28,7 +28,7 @@ $.verbose = false; let [answer] = await question( `Running pre-commit hook. -This will overwrite any changes made to config files in samples (like ${chalk.bold('hello-world/tsconfig.json')}). +This will overwrite any changes made to most config files in samples (like ${chalk.bold('hello-world/tsconfig.json')}). Proceed? [Y/n] ` ); diff --git a/.vscode/settings.json b/.vscode/settings.json index f1f914bf..1aaff89b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,11 @@ { - "eslint.rules.customizations": [{ "rule": "*", "severity": "downgrade" }] + "eslint.rules.customizations": [ + { + "rule": "*", + "severity": "downgrade" + } + ], + "cSpell.words": [ + "heartbeating" + ] } diff --git a/README.md b/README.md index 70dd54ce..1b65c711 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ npm run lint ```sh shopt -s extglob for f in !(monorepo-folders)/package.json; do jq '.dependencies.temporalio = "NEW_VERSION_HERE"' $f | sponge $f; done +jq '.devDependencies."@temporalio/client" = "NEW_VERSION_HERE"' package.json | sponge package.json; +jq '.dependencies."@temporalio/interceptors-opentelemetry" = "NEW_VERSION_HERE"' interceptors-opentelemetry/package.json | sponge interceptors-opentelemetry/package.json; for f in monorepo-folders/packages/!(frontend-ui)/package.json; do jq '.dependencies.temporalio = "NEW_VERSION_HERE"' $f | sponge $f; done ``` diff --git a/activities-cancellation-heartbeating/package.json b/activities-cancellation-heartbeating/package.json index 540eaba7..62678567 100644 --- a/activities-cancellation-heartbeating/package.json +++ b/activities-cancellation-heartbeating/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/activities-dependency-injection/package.json b/activities-dependency-injection/package.json index 0c455ddb..7ecaff77 100644 --- a/activities-dependency-injection/package.json +++ b/activities-dependency-injection/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/activities-examples/package.json b/activities-examples/package.json index 396b118b..3cbea50a 100644 --- a/activities-examples/package.json +++ b/activities-examples/package.json @@ -24,7 +24,7 @@ "dependencies": { "axios": "0.21.1", "node-fetch": "2.x", - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/activities-sticky-queues/package.json b/activities-sticky-queues/package.json index ebe4982c..7257cf33 100644 --- a/activities-sticky-queues/package.json +++ b/activities-sticky-queues/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x", + "temporalio": "0.19.x", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/child-workflows/package.json b/child-workflows/package.json index 28646060..453c6999 100644 --- a/child-workflows/package.json +++ b/child-workflows/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/continue-as-new/package.json b/continue-as-new/package.json index 2f18013a..7362d60d 100644 --- a/continue-as-new/package.json +++ b/continue-as-new/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/cron-workflows/package.json b/cron-workflows/package.json index 05eea632..545ab915 100644 --- a/cron-workflows/package.json +++ b/cron-workflows/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/dsl-interpreter/package.json b/dsl-interpreter/package.json index a001ed0e..d0d781a6 100644 --- a/dsl-interpreter/package.json +++ b/dsl-interpreter/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "js-yaml": "^4.1.0", - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/expense/package.json b/expense/package.json index c7951153..1b91b718 100644 --- a/expense/package.json +++ b/expense/package.json @@ -25,7 +25,7 @@ "dependencies": { "axios": "0.21.1", "express": "~4.17.1", - "temporalio": "0.18.x", + "temporalio": "0.19.x", "uuid": "8.3.2" }, "devDependencies": { diff --git a/fetch-esm/package.json b/fetch-esm/package.json index ca0e010c..73b9b517 100644 --- a/fetch-esm/package.json +++ b/fetch-esm/package.json @@ -21,7 +21,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/grpc-calls/package.json b/grpc-calls/package.json index 3c24d31f..254d3ce5 100644 --- a/grpc-calls/package.json +++ b/grpc-calls/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/grpc-calls/src/client.ts b/grpc-calls/src/client.ts index 7f313ae2..a36ce936 100644 --- a/grpc-calls/src/client.ts +++ b/grpc-calls/src/client.ts @@ -1,5 +1,5 @@ import { Connection } from '@temporalio/client'; -import { defaultDataConverter } from '@temporalio/common'; +import { defaultPayloadConverter, toPayloads } from '@temporalio/common'; async function run() { const workflowId = 'wf-id-' + Math.floor(Math.random() * 1000); @@ -19,9 +19,9 @@ async function run() { taskQueue: { name: 'grpc-calls' }, workflowType: { name: 'example' }, input: { - // the client passes every payload through Data Converter; with gRPC calls have to do it yourself - // import { defaultDataConverter } from '@temporalio/common'; - payloads: await defaultDataConverter.toPayloads('Temporal'), + // WorkflowClient passes data through Data Converter to convert to Payloads; with gRPC calls have to do it yourself + // import { defaultPayloadConverter, toPayloads } from '@temporalio/common'; + payloads: toPayloads(defaultPayloadConverter, 'Temporal'), }, }); // @@@SNIPEND diff --git a/hello-world-js/package.json b/hello-world-js/package.json index 534af81a..8d01dd36 100644 --- a/hello-world-js/package.json +++ b/hello-world-js/package.json @@ -15,7 +15,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "eslint": "^7.32.0", diff --git a/hello-world-mtls/package.json b/hello-world-mtls/package.json index 14446dda..9ef5d2c8 100644 --- a/hello-world-mtls/package.json +++ b/hello-world-mtls/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/hello-world/package.json b/hello-world/package.json index 6130eb3b..1916466c 100644 --- a/hello-world/package.json +++ b/hello-world/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/instrumentation/package.json b/instrumentation/package.json index b5610540..0bda6256 100644 --- a/instrumentation/package.json +++ b/instrumentation/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x", + "temporalio": "0.19.x", "triple-beam": "^1.3.0", "winston": "^3.3.3" }, diff --git a/interceptors-opentelemetry/package.json b/interceptors-opentelemetry/package.json index adb543e6..2a2e3a35 100644 --- a/interceptors-opentelemetry/package.json +++ b/interceptors-opentelemetry/package.json @@ -24,8 +24,8 @@ "@opentelemetry/resources": "^1.0.0", "@opentelemetry/sdk-node": "^0.26.0", "@opentelemetry/sdk-trace-base": "^1.0.0", - "@temporalio/interceptors-opentelemetry": "0.18.x", - "temporalio": "0.18.x" + "@temporalio/interceptors-opentelemetry": "0.19.x", + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/logging-sinks/package.json b/logging-sinks/package.json index dab729af..7735835f 100644 --- a/logging-sinks/package.json +++ b/logging-sinks/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/monorepo-folders/.eslintignore b/monorepo-folders/.eslintignore index d1ca100d..7bd99a41 100644 --- a/monorepo-folders/.eslintignore +++ b/monorepo-folders/.eslintignore @@ -1,4 +1,3 @@ node_modules lib -.eslintrc.js -packages/* \ No newline at end of file +.eslintrc.js \ No newline at end of file diff --git a/monorepo-folders/.eslintrc.js b/monorepo-folders/.eslintrc.js index bc8a9ab3..5f9a780e 100644 --- a/monorepo-folders/.eslintrc.js +++ b/monorepo-folders/.eslintrc.js @@ -3,7 +3,7 @@ module.exports = { parser: '@typescript-eslint/parser', ignorePatterns: ['**/package/*.js', '**/package/*.ts'], parserOptions: { - project: './tsconfig.json', + project: './packages/*/tsconfig.json', tsconfigRootDir: __dirname, include: ['packages/*'], }, diff --git a/monorepo-folders/package.json b/monorepo-folders/package.json index 8db5cb10..1cc60e37 100644 --- a/monorepo-folders/package.json +++ b/monorepo-folders/package.json @@ -5,12 +5,13 @@ "packages/*" ], "scripts": { + "start": "yarn build.workflows & concurrently --kill-others-on-fail -n 'frontend,api-server,worker' \"yarn frontend\" \"yarn backend\" \"yarn worker\"", "backend": "yarn workspace backend-apis start", + "frontend": "yarn workspace frontend-ui start", + "worker": "yarn workspace temporal-worker start", "build": "yarn workspaces run build", "build.workflows": "yarn workspace temporal-workflows build.watch", - "frontend": "yarn workspace frontend-ui start", - "start": "yarn build.workflows & concurrently --kill-others-on-fail -n 'frontend,api-server,worker' \"yarn frontend\" \"yarn backend\" \"yarn worker\"", - "worker": "yarn workspace temporal-worker start" + "lint": "yarn workspaces run lint" }, "dependencies": { "concurrently": "^6.3.0" diff --git a/monorepo-folders/packages/backend-apis/.eslintignore b/monorepo-folders/packages/backend-apis/.eslintignore new file mode 100644 index 00000000..7951405f --- /dev/null +++ b/monorepo-folders/packages/backend-apis/.eslintignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/monorepo-folders/packages/backend-apis/package.json b/monorepo-folders/packages/backend-apis/package.json index c5e9da64..dfe70c93 100644 --- a/monorepo-folders/packages/backend-apis/package.json +++ b/monorepo-folders/packages/backend-apis/package.json @@ -3,13 +3,14 @@ "version": "0.0.0", "private": true, "scripts": { - "build": "tsc --build", - "start": "nodemon server.ts --watch . --watch ../temporal-workflows" + "start": "nodemon server.ts --watch . --watch ../temporal-workflows", + "lint": "eslint .", + "build": "tsc --build" }, "dependencies": { "express": "~4.16.1", "temporal-workflows": "*", - "temporalio": "0.18.x", + "temporalio": "0.19.x", "ts-node": "^10.4.0" }, "devDependencies": { diff --git a/monorepo-folders/packages/frontend-ui/package.json b/monorepo-folders/packages/frontend-ui/package.json index b45f1721..8e612b42 100644 --- a/monorepo-folders/packages/frontend-ui/package.json +++ b/monorepo-folders/packages/frontend-ui/package.json @@ -3,10 +3,11 @@ "version": "0.1.0", "private": true, "scripts": { - "build": "react-scripts build", - "eject": "react-scripts eject", "start": "react-scripts start", - "test": "react-scripts test" + "test": "react-scripts test", + "build": "react-scripts build", + "lint": "react-scripts build", + "eject": "react-scripts eject" }, "browserslist": { "production": [ diff --git a/monorepo-folders/packages/temporal-worker/.eslintignore b/monorepo-folders/packages/temporal-worker/.eslintignore new file mode 100644 index 00000000..7951405f --- /dev/null +++ b/monorepo-folders/packages/temporal-worker/.eslintignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/monorepo-folders/packages/temporal-worker/package.json b/monorepo-folders/packages/temporal-worker/package.json index 9fb886f4..427b3485 100644 --- a/monorepo-folders/packages/temporal-worker/package.json +++ b/monorepo-folders/packages/temporal-worker/package.json @@ -3,12 +3,13 @@ "version": "0.0.0", "private": true, "scripts": { + "start": "nodemon worker.ts --watch ./worker.ts --watch ../temporal-workflows", "build": "tsc --build", - "start": "nodemon worker.ts --watch ./worker.ts --watch ../temporal-workflows" + "lint": "eslint ." }, "dependencies": { "temporal-workflows": "*", - "temporalio": "0.18.x", + "temporalio": "0.19.x", "ts-node": "^10.4.0" }, "devDependencies": { diff --git a/monorepo-folders/packages/temporal-worker/worker.ts b/monorepo-folders/packages/temporal-worker/worker.ts index 09872e44..36ca2367 100644 --- a/monorepo-folders/packages/temporal-worker/worker.ts +++ b/monorepo-folders/packages/temporal-worker/worker.ts @@ -1,6 +1,5 @@ import { Worker } from '@temporalio/worker'; import * as activities from '../temporal-workflows/src/all-activities'; -import path from 'path'; async function run() { // Step 1: Register Workflows and Activities with the Worker and connect to @@ -8,7 +7,6 @@ async function run() { const worker = await Worker.create({ workflowsPath: require.resolve('../temporal-workflows/lib/all-workflows.js'), activities, - nodeModulesPaths: [path.join(__dirname, '../../node_modules')], taskQueue: 'monorepo', }); // Worker connects to localhost by default and uses console.error for logging. diff --git a/monorepo-folders/packages/temporal-workflows/.eslintignore b/monorepo-folders/packages/temporal-workflows/.eslintignore new file mode 100644 index 00000000..7951405f --- /dev/null +++ b/monorepo-folders/packages/temporal-workflows/.eslintignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/monorepo-folders/packages/temporal-workflows/package.json b/monorepo-folders/packages/temporal-workflows/package.json index f833b050..2bdf4831 100644 --- a/monorepo-folders/packages/temporal-workflows/package.json +++ b/monorepo-folders/packages/temporal-workflows/package.json @@ -8,7 +8,7 @@ "lint": "eslint ." }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/nextjs-ecommerce-oneclick/package.json b/nextjs-ecommerce-oneclick/package.json index 717f9724..a38d0af5 100644 --- a/nextjs-ecommerce-oneclick/package.json +++ b/nextjs-ecommerce-oneclick/package.json @@ -22,7 +22,7 @@ "react-dom": "^17.0.2", "react-toastify": "^8.0.3", "swr": "^1.0.1", - "temporalio": "0.18.x", + "temporalio": "0.19.x", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/patching-api/package.json b/patching-api/package.json index 69104132..2e2dd52e 100644 --- a/patching-api/package.json +++ b/patching-api/package.json @@ -23,7 +23,7 @@ "axios": "0.21.1", "eslint": "7", "node-fetch": "2.x", - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/production/package.json b/production/package.json index 485e19e0..0391bace 100644 --- a/production/package.json +++ b/production/package.json @@ -21,7 +21,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/query-subscriptions/package.json b/query-subscriptions/package.json index d9b29d61..d401f722 100644 --- a/query-subscriptions/package.json +++ b/query-subscriptions/package.json @@ -22,7 +22,7 @@ "dependencies": { "immer": "^9.0.6", "ioredis": "^4.28.0", - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/replay-history/package.json b/replay-history/package.json index 269a5448..73ac40bd 100644 --- a/replay-history/package.json +++ b/replay-history/package.json @@ -21,7 +21,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/search-attributes/package.json b/search-attributes/package.json index 44b51338..094d9262 100644 --- a/search-attributes/package.json +++ b/search-attributes/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/signals-queries/package.json b/signals-queries/package.json index c068ee1f..34849562 100644 --- a/signals-queries/package.json +++ b/signals-queries/package.json @@ -23,7 +23,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/timer-examples/package.json b/timer-examples/package.json index ca376e56..a4f14b74 100644 --- a/timer-examples/package.json +++ b/timer-examples/package.json @@ -24,7 +24,7 @@ "dependencies": { "dotenv": "^10.0.0", "mailgun-js": "^0.22.0", - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0", diff --git a/timer-progress/package.json b/timer-progress/package.json index 4d72c012..590fd8f5 100644 --- a/timer-progress/package.json +++ b/timer-progress/package.json @@ -20,7 +20,7 @@ ] }, "dependencies": { - "temporalio": "0.18.x" + "temporalio": "0.19.x" }, "devDependencies": { "@tsconfig/node16": "^1.0.0",