Skip to content

Commit 1394965

Browse files
authored
doc: Avoid doctype reexports canonicalization issue (#1354)
1 parent 4d87689 commit 1394965

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

packages/meta/src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
export * as worker from '@temporalio/worker';
2-
export * as client from '@temporalio/client';
1+
// ORDER IS IMPORTANT! When a type is re-exported, TypeDoc will keep the first
2+
// one it encountered as canonical, and mark others as references to that one.
3+
export * as protobufs from '@temporalio/common/lib/protobufs';
34
export * as proto from '@temporalio/proto';
45
export * as common from '@temporalio/common';
5-
export * as protobufs from '@temporalio/common/lib/protobufs';
66
export * as workflow from '@temporalio/workflow';
77
export * as activity from '@temporalio/activity';
8+
export * as worker from '@temporalio/worker';
9+
export * as client from '@temporalio/client';
810
export * as testing from '@temporalio/testing';
911
export * as opentelemetry from '@temporalio/interceptors-opentelemetry';

scripts/prepublish.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ const packages = await fs.readdir(packagesPath);
1212
for (const dir of packages) {
1313
const packageJsonPath = path.join(packagesPath, dir, 'package.json');
1414
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));
15-
for (const dep of Object.keys(packageJson.dependencies)) {
16-
if (dep.startsWith('@temporalio/')) {
17-
packageJson.dependencies[dep] = `${version}`;
15+
for (const depType of ['dependencies', 'devDependencies', 'peerDependencies']) {
16+
for (const dep of Object.keys(packageJson[depType] ?? {})) {
17+
if (dep.startsWith('@temporalio/')) {
18+
packageJson[depType][dep] = `${version}`;
19+
}
1820
}
1921
}
2022
const replacedContent = JSON.stringify(packageJson, null, 2);

0 commit comments

Comments
 (0)