Skip to content

Commit

Permalink
Upgrade SDK to 0.20.0 (temporalio#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergundy authored Apr 7, 2022
1 parent b342366 commit 3527a6f
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 50 deletions.
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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x",
"temporalio": "0.20.x",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions activities-examples/src/test/workflow.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActivityFailure, ApplicationFailure, WorkflowClient, WorkflowFailedError } from '@temporalio/client';
import { Core, DefaultLogger, Worker } from '@temporalio/worker';
import { Runtime, DefaultLogger, Worker } from '@temporalio/worker';
import assert from 'assert';
import axios from 'axios';
import { after, afterEach, before, describe, it } from 'mocha';
Expand All @@ -17,7 +17,7 @@ describe('example workflow', function () {
before(async function () {
this.timeout(10 * 1000);
// Filter INFO log messages for clearer test output
await Core.install({ logger: new DefaultLogger('WARN') });
Runtime.install({ logger: new DefaultLogger('WARN') });
const worker = await Worker.create({
taskQueue: 'test-activities',
workflowsPath: require.resolve('../workflows'),
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.19.x",
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion ejson/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"ejson": "^2.2.2",
"temporalio": "0.19.x",
"temporalio": "0.20.x",
"uuid": "^8.3.2"
},
"devDependencies": {
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.2",
"express": "~4.17.1",
"temporalio": "0.19.x",
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
25 changes: 12 additions & 13 deletions hello-world-mtls/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs';

// @@@SNIPSTART typescript-mtls-worker
import { Worker, Core } from '@temporalio/worker';
import { Worker, NativeConnection } from '@temporalio/worker';
import * as activities from './activities';

/**
Expand All @@ -22,23 +22,22 @@ async function run({
serverRootCACertificate = fs.readFileSync(serverRootCACertificatePath);
}

await Core.install({
serverOptions: {
address,
namespace,
tls: {
serverNameOverride,
serverRootCACertificate,
// See docs for other TLS options
clientCertPair: {
crt: fs.readFileSync(clientCertPath),
key: fs.readFileSync(clientKeyPath),
},
const connection = await NativeConnection.create({
address,
tls: {
serverNameOverride,
serverRootCACertificate,
// See docs for other TLS options
clientCertPair: {
crt: fs.readFileSync(clientCertPath),
key: fs.readFileSync(clientKeyPath),
},
},
});

const worker = await Worker.create({
connection,
namespace,
workflowsPath: require.resolve('./workflows'),
activities,
taskQueue,
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.19.x"
"temporalio": "0.20.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.19.x",
"temporalio": "0.20.x",
"triple-beam": "^1.3.0",
"winston": "^3.3.3"
},
Expand Down
8 changes: 4 additions & 4 deletions instrumentation/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Core, DefaultLogger, Worker, InjectedSinks } from '@temporalio/worker';
import { Runtime, DefaultLogger, Worker, InjectedSinks } from '@temporalio/worker';
import { LoggerSinks } from './workflows/logger';
import * as activities from './activities';
import { ActivityInboundLogInterceptor } from './activities/interceptors';
Expand All @@ -16,8 +16,8 @@ async function main() {
const activityLogger = logger.child({ label: 'activity' });

// @@@SNIPSTART typescript-core-telemetry-options
// Configure Rust Core to export SDK logs, metrics and (optionally) internal traces
await Core.install({
// Configure Rust Core runtime to export SDK logs, metrics and (optionally) internal traces
Runtime.install({
// Install a logger to collect logs generated by Node.js Workers and Rust Core.
logger: new DefaultLogger('DEBUG', (entry) => {
workerLogger.log({
Expand Down Expand Up @@ -73,7 +73,7 @@ async function main() {
};

// @@@SNIPSTART typescript-worker-full-logging-setup
// Create a worker that will use the Core instance installed above
// Create a worker that uses the Runtime instance installed above
const worker = await Worker.create({
workflowsPath: require.resolve('./workflows'),
activities,
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.19.x",
"temporalio": "0.19.x"
"@temporalio/interceptors-opentelemetry": "0.20.x",
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions interceptors-opentelemetry/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultLogger, Worker, Core } from '@temporalio/worker';
import { DefaultLogger, Worker, Runtime } from '@temporalio/worker';
import { Resource } from '@opentelemetry/resources';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-base';
Expand All @@ -20,7 +20,7 @@ async function main() {
await otel.start();

// Silence the Worker logs to better see the span output in this sample
await Core.install({ logger: new DefaultLogger('WARN') });
Runtime.install({ logger: new DefaultLogger('WARN') });

const worker = await Worker.create({
workflowsPath: require.resolve('./workflows'),
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.19.x"
"temporalio": "0.20.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.19.x",
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion protobufs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
]
},
"dependencies": {
"temporalio": "0.19.x",
"temporalio": "0.20.x",
"uuid": "^8.3.2"
},
"devDependencies": {
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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.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.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion timer-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"dotenv": "^10.0.0",
"mailgun-js": "^0.22.0",
"temporalio": "0.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion timer-progress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.19.x"
"temporalio": "0.20.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down

0 comments on commit 3527a6f

Please sign in to comment.