Skip to content

Commit 1ef7eb1

Browse files
bergundylorensrmjameswh
authored
chore: Docs improvements (#979)
Co-authored-by: Loren ☺️ <251288+lorensr@users.noreply.github.com> Co-authored-by: James Watkins-Harvey <mjameswh@users.noreply.github.com>
1 parent d5161be commit 1ef7eb1

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99
</a>
1010
</div>
1111

12-
[Temporal](https://temporal.io) is a microservice orchestration platform that enables developers to build scalable applications without sacrificing productivity or reliability. Temporal Server executes units of application logic—Workflows—in a resilient manner that automatically handles intermittent failures and retries failed operations.
12+
[Temporal](https://temporal.io) is a durable execution system that transparently makes your code durable, fault-tolerant, and simple.
1313

14-
Temporal is a mature technology—it's a fork of Uber's Cadence. Temporal is being developed by Temporal Technologies, a startup by the creators of Cadence.
14+
"Temporal TypeScript SDK" is the framework for authoring workflows and activities using either the TypeScript or JavaScript programming languages.
1515

16-
## Documentation
17-
18-
The documentation is divided into several sections:
16+
For documentation and samples, see:
1917

18+
- [Code Samples](https://github.com/temporalio/samples-typescript)
2019
- [TypeScript SDK docs](https://docs.temporal.io/typescript/introduction)
2120
- [TypeScript SDK API reference](https://typescript.temporal.io/)
2221
- [General Temporal docs](https://docs.temporal.io)
2322

24-
We welcome help improving the docs. You can submit issues for things that aren't clear or send pull requests to this repository (for the API reference) or to the [`docs.temporal.io` repository](https://github.com/temporalio/documentation) (for everything else).
25-
2623
## Packages
2724

2825
This monorepo contains the following packages:
@@ -39,7 +36,7 @@ This monorepo contains the following packages:
3936
| [`packages/interceptors-opentelemetry/`](packages/interceptors-opentelemetry/) | [`@temporalio/interceptors-opentelemetry`](https://www.npmjs.com/package/@temporalio/interceptors-opentelemetry) |
4037
| [`packages/meta/`](packages/meta/) | [`temporalio`](https://www.npmjs.com/package/@temporalio/meta) (deprecated) |
4138
| [`packages/test/`](packages/test/) | SDK internal tests |
42-
| [`packages/create-project/`](packages/create-project/) | [`@temporalio/create`](https://www.npmjs.com/package/@temporalio/create-project) |
39+
| [`packages/create-project/`](packages/create-project/) | [`@temporalio/create`](https://www.npmjs.com/package/@temporalio/create-project) |
4340
| [`packages/docs/`](packages/docs/) | [API docs](https://typescript.temporal.io/) |
4441

4542
## Contributors

packages/activity/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
* The reason for the Cancellation is available at {@link CancelledFailure.message} or
4545
* {@link Context#cancellationSignal | Context.cancellationSignal.reason}.
4646
*
47-
* There are two ways to handle Activity Cancellation:
47+
* Activity implementations should opt-in and subscribe to cancellation using one of the following methods:
4848
*
49-
* 1. await on {@link Context.cancelled | `Context.current().cancelled`} or
49+
* 1. `await` on {@link Context.cancelled | `Context.current().cancelled`} or
5050
* {@link Context.sleep | `Context.current().sleep()`}, which each throw a {@link CancelledFailure}.
5151
* 1. Pass the context's {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | `AbortSignal`} at
5252
* {@link Context.cancellationSignal | `Context.current().cancellationSignal`} to a library that supports it.

packages/test/src/test-bundler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if (RUN_INTEGRATION_TESTS) {
8686
}),
8787
{
8888
instanceOf: Error,
89-
message: /is importing the following built-in Node modules.*dns/s,
89+
message: /is importing the following disallowed modules.*dns/s,
9090
}
9191
);
9292
});

packages/worker/src/workflow/bundler.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,16 @@ exports.importInterceptors = function importInterceptors() {
269269

270270
if (this.foundProblematicModules.size) {
271271
const err = new Error(
272-
`Your Workflow code (or a library used by your Workflow code) is importing the following built-in Node modules:\n` +
272+
`Your Workflow code (or a library used by your Workflow code) is importing the following disallowed modules:\n` +
273273
Array.from(this.foundProblematicModules)
274274
.map((module) => ` - '${module}'\n`)
275275
.join('') +
276-
`Workflow code doesn't have access to built-in Node modules (in order to help enforce determinism). If you are certain ` +
277-
`these modules will not be used at runtime, then you may add their names to 'WorkerOptions.bundlerOptions.ignoreModules' in order to ` +
278-
`dismiss this warning. However, if your code execution actually depends on these modules, then you must change the code ` +
279-
`or remove the library.\n` +
280-
`See https://typescript.temporal.io/api/interfaces/worker.workeroptions/#bundleroptions for details.`
276+
`These modules can't be used in workflow context as they might break determinism.` +
277+
`HINT: Consider the following options:\n` +
278+
` • Make sure that activity code is not imported from workflow code. Use \`import type\` to import activity function signatures.\n` +
279+
` • Move code that has non-deterministic behaviour to activities.\n` +
280+
` • If you know for sure that a disallowed module will not be used at runtime, add its name to 'WorkerOptions.bundlerOptions.ignoreModules' in order to dismiss this warning.\n` +
281+
`See also: https://typescript.temporal.io/api/interfaces/worker.workeroptions/#bundleroptions and https://docs.temporal.io/typescript/determinism.`
281282
);
282283

283284
reject(err);

0 commit comments

Comments
 (0)