Skip to content

Commit

Permalink
v0.19.x (temporalio#108)
Browse files Browse the repository at this point in the history
* Update to 0.19.0

* Update update script

* Revert "Update to 0.19.0"

This reverts commit 7edc75e.

* Non-mono

* Mono

* Fix build

* Fix linting

* Update interceptors version
  • Loading branch information
lorensr authored Mar 24, 2022
1 parent 75bdcd6 commit 4345287
Show file tree
Hide file tree
Showing 41 changed files with 65 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .scripts/copy-shared-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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] `
);

Expand Down
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"eslint.rules.customizations": [{ "rule": "*", "severity": "downgrade" }]
"eslint.rules.customizations": [
{
"rule": "*",
"severity": "downgrade"
}
],
"cSpell.words": [
"heartbeating"
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion activities-cancellation-heartbeating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion activities-dependency-injection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion activities-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion activities-sticky-queues/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x",
"temporalio": "0.19.x",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion child-workflows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion continue-as-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion cron-workflows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion dsl-interpreter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"js-yaml": "^4.1.0",
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion expense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion fetch-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion grpc-calls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions grpc-calls/src/client.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hello-world-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"eslint": "^7.32.0",
Expand Down
2 changes: 1 addition & 1 deletion hello-world-mtls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x",
"temporalio": "0.19.x",
"triple-beam": "^1.3.0",
"winston": "^3.3.3"
},
Expand Down
4 changes: 2 additions & 2 deletions interceptors-opentelemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion logging-sinks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions monorepo-folders/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
lib
.eslintrc.js
packages/*
.eslintrc.js
2 changes: 1 addition & 1 deletion monorepo-folders/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/*'],
},
Expand Down
7 changes: 4 additions & 3 deletions monorepo-folders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions monorepo-folders/packages/backend-apis/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
7 changes: 4 additions & 3 deletions monorepo-folders/packages/backend-apis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions monorepo-folders/packages/frontend-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions monorepo-folders/packages/temporal-worker/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
5 changes: 3 additions & 2 deletions monorepo-folders/packages/temporal-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 0 additions & 2 deletions monorepo-folders/packages/temporal-worker/worker.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
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
// the Temporal server.
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.
Expand Down
1 change: 1 addition & 0 deletions monorepo-folders/packages/temporal-workflows/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
2 changes: 1 addition & 1 deletion monorepo-folders/packages/temporal-workflows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "eslint ."
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion nextjs-ecommerce-oneclick/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion patching-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion production/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion query-subscriptions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion replay-history/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion search-attributes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion signals-queries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
]
},
"dependencies": {
"temporalio": "0.18.x"
"temporalio": "0.19.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
Loading

0 comments on commit 4345287

Please sign in to comment.