Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 027a052

Browse files
authored
chore: Remove unused deps; Upgrade protobufjs; Publish src (temporalio#719)
Bugfixes: - Clear logs from CoreLogger buffer after flushing - Closes temporalio#717
1 parent 3a5611a commit 027a052

File tree

27 files changed

+6906
-6028
lines changed

27 files changed

+6906
-6028
lines changed

package-lock.json

Lines changed: 6730 additions & 5856 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,47 @@
44
"doc": "docs"
55
},
66
"devDependencies": {
7-
"@commitlint/cli": "^13.1.0",
8-
"@commitlint/config-conventional": "^13.1.0",
9-
"@opentelemetry/api": "^1.0.3",
10-
"@opentelemetry/core": "^1.0.1",
11-
"@opentelemetry/sdk-node": "^0.27.0",
12-
"@opentelemetry/semantic-conventions": "^1.0.1",
13-
"@tsconfig/node14": "^1.0.1",
7+
"@commitlint/cli": "^17.0.2",
8+
"@commitlint/config-conventional": "^17.0.2",
9+
"@opentelemetry/api": "^1.1.0",
10+
"@opentelemetry/core": "^1.3.1",
11+
"@opentelemetry/sdk-node": "^0.29.2",
12+
"@opentelemetry/semantic-conventions": "^1.3.1",
13+
"@tsconfig/node14": "^1.0.3",
1414
"@types/dedent": "^0.7.0",
15-
"@types/fs-extra": "^9.0.12",
15+
"@types/fs-extra": "^9.0.13",
1616
"@types/ms": "^0.7.31",
17-
"@types/node": "^16.7.8",
18-
"@types/node-fetch": "^2.5.12",
19-
"@types/pidusage": "^2.0.1",
20-
"@types/ramda": "^0.27.44",
17+
"@types/node": "^18.0.0",
18+
"@types/node-fetch": "^2.6.2",
19+
"@types/pidusage": "^2.0.2",
20+
"@types/ramda": "^0.28.14",
2121
"@types/stack-utils": "^2.0.1",
22-
"@types/uuid": "^8.3.1",
23-
"@typescript-eslint/eslint-plugin": "^4.30.0",
24-
"@typescript-eslint/parser": "^4.30.0",
25-
"arg": "^5.0.1",
22+
"@types/uuid": "^8.3.4",
23+
"@typescript-eslint/eslint-plugin": "^5.29.0",
24+
"@typescript-eslint/parser": "^5.29.0",
25+
"arg": "^5.0.2",
2626
"ava": "^3.15.0",
27+
"chalk": "^4.1.2",
2728
"dedent": "^0.7.0",
28-
"eslint": "^7.32.0",
29-
"eslint-config-prettier": "^8.3.0",
30-
"eslint-plugin-deprecation": "^1.2.1",
31-
"eslint-plugin-tsdoc": "^0.2.14",
32-
"fs-extra": "^10.0.0",
29+
"escodegen": "^1.13.0",
30+
"eslint": "^8.18.0",
31+
"eslint-config-prettier": "^8.5.0",
32+
"eslint-plugin-deprecation": "^1.3.2",
33+
"eslint-plugin-import": "^2.26.0",
34+
"eslint-plugin-tsdoc": "^0.2.16",
35+
"fs-extra": "^10.1.0",
36+
"glob": "^7.1.7",
3337
"jsdoc": "^3.6.10",
34-
"json5": "^2.2.0",
35-
"lerna": "^4.0.0",
36-
"long": "^4.0.0",
38+
"json5": "^2.2.1",
39+
"lerna": "^5.1.4",
40+
"long": "^5.2.0",
3741
"npm-run-all": "^4.1.5",
38-
"pidusage": "^2.0.21",
39-
"prettier": "^2.3.2",
40-
"tail": "^2.2.3",
42+
"pidusage": "^3.0.0",
43+
"prettier": "^2.7.1",
44+
"tail": "^2.2.4",
4145
"ts-prune": "^0.10.3",
42-
"typescript": "^4.4.2",
43-
"uuid": "^3.4.0"
46+
"typescript": "^4.7.4",
47+
"uuid": "^8.3.2"
4448
},
4549
"scripts": {
4650
"rebuild": "npm run clean && npm run build",

packages/activity/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@
2323
"homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/activity",
2424
"publishConfig": {
2525
"access": "public"
26-
}
26+
},
27+
"files": [
28+
"src",
29+
"lib"
30+
]
2731
}

packages/client/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,24 @@
1313
"author": "Roey Berman <[email protected]>",
1414
"license": "MIT",
1515
"dependencies": {
16-
"@grpc/grpc-js": "^1.5.7",
16+
"@grpc/grpc-js": "^1.6.7",
1717
"@temporalio/common": "file:../common",
1818
"@temporalio/internal-non-workflow-common": "file:../internal-non-workflow-common",
1919
"@temporalio/internal-workflow-common": "file:../internal-workflow-common",
2020
"@temporalio/proto": "file:../proto",
2121
"ms": "^2.1.3",
22-
"protobufjs": "^6.11.2",
22+
"protobufjs": "6.11.2",
2323
"uuid": "^8.3.2"
2424
},
2525
"bugs": {
2626
"url": "https://github.com/temporalio/sdk-typescript/issues"
2727
},
2828
"homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/client",
29-
"files": [
30-
"lib"
31-
],
3229
"publishConfig": {
3330
"access": "public"
34-
}
31+
},
32+
"files": [
33+
"src",
34+
"lib"
35+
]
3536
}

packages/common/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"@temporalio/internal-workflow-common": "file:../internal-workflow-common",
1616
"@temporalio/proto": "file:../proto",
1717
"@opentelemetry/api": "^1.0.3",
18-
"proto3-json-serializer": "^0.1.6"
18+
"proto3-json-serializer": "^1.0.2",
19+
"protobufjs": "6.11.2"
1920
},
2021
"bugs": {
2122
"url": "https://github.com/temporalio/sdk-typescript/issues"
@@ -24,7 +25,8 @@
2425
"publishConfig": {
2526
"access": "public"
2627
},
27-
"devDependencies": {
28-
"protobufjs": "^6.11.2"
29-
}
28+
"files": [
29+
"src",
30+
"lib"
31+
]
3032
}

packages/core-bridge/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"author": "Roey Berman <[email protected]>",
2020
"license": "MIT",
2121
"dependencies": {
22-
"@opentelemetry/api": "^1.0.3",
22+
"@opentelemetry/api": "^1.1.0",
2323
"@temporalio/internal-non-workflow-common": "file:../internal-non-workflow-common",
24-
"arg": "^5.0.1",
25-
"cargo-cp-artifact": "^0.1.4",
24+
"arg": "^5.0.2",
25+
"cargo-cp-artifact": "^0.1.6",
2626
"which": "^2.0.2"
2727
},
2828
"bugs": {

packages/create-project/package.json

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,40 @@
1414
"init",
1515
"workflow"
1616
],
17-
"files": [
18-
"lib"
19-
],
2017
"author": "Roey Berman <[email protected]>",
2118
"license": "MIT",
2219
"dependencies": {
2320
"async-retry": "^1.3.3",
24-
"chalk": "^2.4.2",
25-
"chalk-template": "^0.2.0",
26-
"commander": "^8.2.0",
21+
"chalk": "^5.0.1",
22+
"chalk-template": "^0.4.0",
23+
"commander": "^9.3.0",
2724
"dedent": "^0.7.0",
28-
"glob": "^7.2.0",
29-
"got": "^10.7.0",
30-
"prompts": "^2.4.1",
31-
"tar": "^4.4.10",
25+
"glob": "^8.0.3",
26+
"got": "^12.1.0",
27+
"prompts": "^2.4.2",
28+
"tar": "^6.1.11",
3229
"update-check": "1.5.4",
33-
"validate-npm-package-name": "^3.0.0"
30+
"validate-npm-package-name": "^4.0.0"
3431
},
3532
"devDependencies": {
36-
"@types/async-retry": "^1.4.2",
33+
"@types/async-retry": "^1.4.4",
3734
"@types/cross-spawn": "^6.0.2",
3835
"@types/got": "^9.6.12",
39-
"@types/node": "^16.7.10",
40-
"@types/prompts": "2.0.1",
41-
"@types/rimraf": "^3.0.0",
42-
"@types/tar": "^4.0.3",
43-
"@types/validate-npm-package-name": "^3.0.0"
36+
"@types/node": "^18.0.0",
37+
"@types/prompts": "2.0.14",
38+
"@types/rimraf": "^3.0.2",
39+
"@types/tar": "^6.1.1",
40+
"@types/validate-npm-package-name": "^4.0.0"
4441
},
4542
"publishConfig": {
4643
"access": "public"
4744
},
4845
"engines": {
4946
"node": ">=14.0.0"
50-
}
47+
},
48+
"files": [
49+
"cli.js",
50+
"src",
51+
"lib"
52+
]
5153
}

packages/interceptors-opentelemetry/package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "@temporalio/interceptors-opentelemetry",
33
"version": "1.0.0-rc.0",
44
"description": "Temporal.io SDK interceptors bundle for tracing with opentelemetry",
5-
"main": "lib/index.js",
6-
"types": "./lib/index.d.ts",
5+
"main": "lib/workflow/index.js",
6+
"types": "./lib/workflow/index.d.ts",
77
"scripts": {},
88
"keywords": [
99
"temporal",
@@ -14,10 +14,10 @@
1414
"author": "Roey Berman <[email protected]>",
1515
"license": "MIT",
1616
"dependencies": {
17-
"@opentelemetry/api": "^1.0.3",
18-
"@opentelemetry/core": "^1.0.0",
19-
"@opentelemetry/resources": "^1.0.0",
20-
"@opentelemetry/sdk-trace-base": "^1.0.0",
17+
"@opentelemetry/api": "^1.1.0",
18+
"@opentelemetry/core": "^1.3.1",
19+
"@opentelemetry/resources": "^1.3.1",
20+
"@opentelemetry/sdk-trace-base": "^1.3.1",
2121
"@temporalio/client": "file:../client",
2222
"@temporalio/common": "file:../common",
2323
"@temporalio/worker": "file:../worker",
@@ -27,10 +27,11 @@
2727
"url": "https://github.com/temporalio/sdk-typescript/issues"
2828
},
2929
"homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/interceptors-opentelemetry",
30-
"files": [
31-
"lib"
32-
],
3330
"publishConfig": {
3431
"access": "public"
35-
}
32+
},
33+
"files": [
34+
"src",
35+
"lib"
36+
]
3637
}

packages/interceptors-opentelemetry/src/workflow/definitions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ export interface SerializableSpan {
1414
readonly startTime: otel.HrTime;
1515
readonly endTime: otel.HrTime;
1616
readonly status: otel.SpanStatus;
17-
readonly attributes: otel.SpanAttributes;
17+
readonly attributes: otel.Attributes;
1818
readonly links: otel.Link[];
1919
readonly events: tracing.TimedEvent[];
2020
readonly duration: otel.HrTime;
2121
readonly ended: boolean;
2222
// readonly resource: Resource;
23+
// eslint-disable-next-line deprecation/deprecation
2324
readonly instrumentationLibrary: InstrumentationLibrary;
2425
}
2526

packages/internal-non-workflow-common/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"publishConfig": {
2525
"access": "public"
2626
},
27-
"devDependencies": {
28-
"@types/lodash": "^4.14.178"
29-
}
27+
"files": [
28+
"src",
29+
"lib"
30+
]
3031
}

packages/internal-workflow-common/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"license": "MIT",
1414
"dependencies": {
1515
"@temporalio/proto": "file:../proto",
16-
"long": "^4.0.0",
16+
"long": "^5.2.0",
1717
"ms": "^2.1.3"
1818
},
1919
"bugs": {
@@ -22,5 +22,9 @@
2222
"homepage": "https://github.com/temporalio/sdk-typescript/tree/main/packages/internal-workflow-common",
2323
"publishConfig": {
2424
"access": "public"
25-
}
25+
},
26+
"files": [
27+
"src",
28+
"lib"
29+
]
2630
}

packages/meta/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,9 @@
3030
},
3131
"engines": {
3232
"node": ">=14.0.0"
33-
}
33+
},
34+
"files": [
35+
"src",
36+
"lib"
37+
]
3438
}

packages/proto/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"types": "protos/index.d.ts",
77
"files": [
88
"protos/",
9+
"src/",
910
"lib/"
1011
],
1112
"scripts": {
@@ -19,12 +20,9 @@
1920
"author": "Roey Berman <[email protected]>",
2021
"license": "MIT",
2122
"dependencies": {
22-
"@types/long": "^4.0.1",
23-
"long": "^4.0.0",
24-
"protobufjs": "^6.11.2"
25-
},
26-
"devDependencies": {
27-
"glob": "^7.1.7"
23+
"@types/long": "^4.0.2",
24+
"long": "^5.2.0",
25+
"protobufjs": "6.11.2"
2826
},
2927
"bugs": {
3028
"url": "https://github.com/temporalio/sdk-typescript/issues"

packages/proto/scripts/compile-proto.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { resolve } = require('path');
33
const { promisify } = require('util');
44
const dedent = require('dedent');
55
const glob = require('glob');
6-
const { statSync, mkdirsSync, readFileSync, writeFileSync } = require('fs-extra');
6+
const { statSync, mkdirSync, readFileSync, writeFileSync } = require('fs');
77
const pbjs = require('protobufjs/cli/pbjs');
88
const pbts = require('protobufjs/cli/pbts');
99

@@ -63,18 +63,10 @@ async function compileProtos(dtsOutputFile, ...args) {
6363
${pbtsOutput}
6464
`
6565
);
66-
67-
// Get rid of most comments in file (cuts size in half)
68-
const pbjsOutput = readFileSync(jsOutputFile, 'utf8');
69-
const sanitizedOutput = pbjsOutput
70-
.split('\n')
71-
.filter((l) => !/^\s*(\*|\/\*\*)/.test(l))
72-
.join('\n');
73-
writeFileSync(jsOutputFile, sanitizedOutput);
7466
}
7567

7668
async function main() {
77-
mkdirsSync(outputDir);
69+
mkdirSync(outputDir, { recursive: true });
7870

7971
const protoFiles = glob.sync(resolve(protoBaseDir, '**/*.proto'));
8072
const protosMTime = Math.max(...protoFiles.map(mtime));

packages/test/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"author": "Roey Berman <[email protected]>",
2626
"license": "MIT",
2727
"dependencies": {
28-
"@opentelemetry/exporter-trace-otlp-grpc": "^0.27.0",
28+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.29.2",
2929
"@temporalio/activity": "file:../activity",
3030
"@temporalio/client": "file:../client",
3131
"@temporalio/common": "file:../common",
@@ -36,10 +36,9 @@
3636
"@temporalio/testing": "file:../testing",
3737
"@temporalio/worker": "file:../worker",
3838
"@temporalio/workflow": "file:../workflow",
39-
"@types/async-retry": "^1.3.3",
39+
"@types/async-retry": "^1.4.4",
4040
"async-retry": "^1.3.3",
41-
"protobufjs": "^6.11.2",
42-
"ramda": "^0.27.1",
41+
"ramda": "^0.28.0",
4342
"stack-utils": "^2.0.5"
4443
},
4544
"bugs": {

packages/test/src/test-otel.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ if (RUN_INTEGRATION_TESTS) {
178178
calls: [() => new OpenTelemetryWorkflowClientCallsInterceptor()],
179179
},
180180
});
181-
worker.runUntil(client.execute(workflows.cancelFakeProgress, { taskQueue: 'test-otel', workflowId: uuid4() }));
181+
await worker.runUntil(
182+
client.execute(workflows.cancelFakeProgress, { taskQueue: 'test-otel', workflowId: uuid4() })
183+
);
182184
// Allow some time to ensure spans are flushed out to collector
183185
await new Promise((resolve) => setTimeout(resolve, 5000));
184186
t.pass();

0 commit comments

Comments
 (0)