robertwb commented on code in PR #29889:
URL: https://github.com/apache/beam/pull/29889#discussion_r1446293329
##########
sdks/typescript/package.json:
##########
@@ -35,30 +39,33 @@
"lint": "eslint . --ext .ts"
},
"dependencies": {
- "@google-cloud/pubsub": "^2.19.4",
- "@grpc/grpc-js": "~1.4.6",
- "@protobuf-ts/grpc-transport": "^2.1.0",
- "@protobuf-ts/plugin": "^2.1.0",
- "bson": "^4.6.0",
- "capture-console": "^1.0.1",
+ "@google-cloud/pubsub": "^4.1.0",
+ "@grpc/grpc-js": "~1.9.13",
+ "@protobuf-ts/grpc-transport": "^2.9.3",
+ "@protobuf-ts/plugin": "^2.9.3",
+ "@types/node": "^20.10.6",
+ "bson": "^6.2.0",
+ "capture-console": "^1.0.2",
"chai": "^4.3.4",
- "date-fns": "^2.28.0",
+ "date-fns": "^3.0.6",
"fast-deep-equal": "^3.1.3",
"find-git-root": "^1.0.4",
- "long": "^4.0.0",
- "protobufjs": "~6.11.3",
+ "long": "^5.2.3",
+ "protobufjs": "~7.2.5",
"queue-typescript": "^1.0.1",
- "serialize-closures": "^0.2.7",
- "ts-closure-transform": "^0.1.7",
- "ttypescript": "^1.5.15",
- "uuid": "^8.3.2"
+ "serialize-closures": "^0.3.0",
+ "ts-closure-transform": "^0.2.0",
+ "typescript": "5.3",
+ "uuid": "^9.0.1"
},
"main": "./dist/src/apache_beam/index.js",
"exports": {
".": "./dist/src/apache_beam/index.js",
"./io": "./dist/src/apache_beam/io/index.js",
"./runners": "./dist/src/apache_beam/index.js",
"./transforms": "./dist/src/apache_beam/transforms/index.js",
+ "./coders": "./dist/src/apache_beam/coders/index.js",
Review Comment:
Have you found these to be explicitly needed?
##########
sdks/typescript/build.sh:
##########
@@ -26,7 +26,7 @@ set -e
echo "export const version = \"$npm_package_version\";" >
src/apache_beam/version.ts
# Using npx to execute ttsc from the local node_modules environment.
-npx ttsc -p .
+npm run tsc
Review Comment:
Can you put a comment in the PR description about what the difference
between the two of these are?
##########
sdks/typescript/package.json:
##########
@@ -35,30 +39,33 @@
"lint": "eslint . --ext .ts"
},
"dependencies": {
- "@google-cloud/pubsub": "^2.19.4",
- "@grpc/grpc-js": "~1.4.6",
- "@protobuf-ts/grpc-transport": "^2.1.0",
- "@protobuf-ts/plugin": "^2.1.0",
- "bson": "^4.6.0",
- "capture-console": "^1.0.1",
+ "@google-cloud/pubsub": "^4.1.0",
+ "@grpc/grpc-js": "~1.9.13",
+ "@protobuf-ts/grpc-transport": "^2.9.3",
+ "@protobuf-ts/plugin": "^2.9.3",
+ "@types/node": "^20.10.6",
+ "bson": "^6.2.0",
+ "capture-console": "^1.0.2",
"chai": "^4.3.4",
- "date-fns": "^2.28.0",
+ "date-fns": "^3.0.6",
"fast-deep-equal": "^3.1.3",
"find-git-root": "^1.0.4",
- "long": "^4.0.0",
- "protobufjs": "~6.11.3",
+ "long": "^5.2.3",
+ "protobufjs": "~7.2.5",
"queue-typescript": "^1.0.1",
- "serialize-closures": "^0.2.7",
- "ts-closure-transform": "^0.1.7",
- "ttypescript": "^1.5.15",
- "uuid": "^8.3.2"
+ "serialize-closures": "^0.3.0",
+ "ts-closure-transform": "^0.2.0",
+ "typescript": "5.3",
+ "uuid": "^9.0.1"
},
"main": "./dist/src/apache_beam/index.js",
"exports": {
".": "./dist/src/apache_beam/index.js",
"./io": "./dist/src/apache_beam/io/index.js",
"./runners": "./dist/src/apache_beam/index.js",
"./transforms": "./dist/src/apache_beam/transforms/index.js",
+ "./coders": "./dist/src/apache_beam/coders/index.js",
+ "./internal": "./dist/src/apache_beam/internal/index.js",
Review Comment:
Not sure we want to export internal?
##########
sdks/typescript/src/apache_beam/utils/service.ts:
##########
@@ -414,7 +414,7 @@ export class PythonService extends SubprocessService {
const result = childProcess.spawnSync(
PythonService.whichPython(),
[bootstrapScript],
- { encoding: "latin1" },
+ { encoding: "utf-8" },
Review Comment:
Is this safe?
##########
sdks/typescript/src/apache_beam/transforms/pardo.ts:
##########
@@ -85,11 +85,7 @@ export interface DoFn<InputT, OutputT, ContextT = undefined>
{
/**
* Creates a PTransform that applies a `DoFn` to a PCollection.
*/
-export function parDo<
- InputT,
- OutputT,
- ContextT extends Object | undefined = undefined,
->(
+export function parDo<InputT, OutputT, ContextT = undefined>(
Review Comment:
Is this a prettier change too?
##########
sdks/typescript/src/apache_beam/utils/service.ts:
##########
@@ -260,7 +260,7 @@ export class JavaJarService extends SubprocessService {
const tmp = dest + ".tmp" + Math.random();
return new Promise((resolve, reject) => {
const fout = fs.createWriteStream(tmp);
- console.warn("Downloading", urlOrPath);
+ console.info("Downloading", urlOrPath);
Review Comment:
This can take a while (and look like it's hanging) but should only happen
the first time, are info logs shown by default?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]