Skip to content

[TypeScript] Fix descriptor utility packaging and quick start - #555

Merged
teodordelibasic-db merged 1 commit into
mainfrom
typescript/issue-389-usage-fix
Aug 7, 2026
Merged

teodordelibasic-db merged 1 commit into
mainfrom
typescript/issue-389-usage-fix

Conversation

@teodordelibasic-db

@teodordelibasic-db teodordelibasic-db commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

Fixes #389 by making loadDescriptorProto() usable directly from the installed npm package:

  • publishes utils/descriptor.js and utils/descriptor.d.ts
  • installs protobufjs as a runtime dependency of the package
  • documents the .js subpath for CommonJS and native Node.js ESM and maps NodeNext resolution to the published declaration file
  • requires a path boundary when matching proto filenames, preventing similarly suffixed files from being selected
  • rewrites the README quick start around the published npm package and consumer-owned protobuf schemas and code-generation commands
  • separates package-consumer instructions from source-development and repository-example workflows
  • updates the leading ingestion examples to queue records and call flush() once

Previously, the npm package shipped only the TypeScript descriptor source, so Node.js could not import the documented utility. The protobuf walkthrough also mixed package-consumer steps with scripts and files that only exist in the source repository.

How is this tested?

Added three unit tests in typescript/test/unit.test.ts:

  • verifies that the CommonJS helper loads and returns the requested DescriptorProto
  • verifies that requesting air_quality.proto does not match a similarly suffixed file such as not_air_quality.proto
  • packs the SDK, installs it in a clean temporary npm project, and verifies CommonJS loading, native ESM import, runtime dependency installation, tarball contents, and NodeNext type resolution

@teodordelibasic-db
teodordelibasic-db requested review from a team and elenagaljak-db July 21, 2026 11:41
@teodordelibasic-db teodordelibasic-db self-assigned this Jul 21, 2026
@teodordelibasic-db
teodordelibasic-db force-pushed the typescript/issue-389-usage-fix branch from a7a540a to 53f6921 Compare August 6, 2026 08:50
@teodordelibasic-db teodordelibasic-db changed the title [TypeScript] Ship descriptor utils as published JS/types and simplify README quick start [TypeScript] Fix descriptor utility packaging and quick start Aug 6, 2026
@teodordelibasic-db
teodordelibasic-db force-pushed the typescript/issue-389-usage-fix branch from 53f6921 to 5742f13 Compare August 6, 2026 09:23
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
@teodordelibasic-db
teodordelibasic-db force-pushed the typescript/issue-389-usage-fix branch from 5742f13 to fc71797 Compare August 6, 2026 09:34
@teodordelibasic-db
teodordelibasic-db added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit ef2ca4f Aug 7, 2026
22 checks passed
@teodordelibasic-db
teodordelibasic-db deleted the typescript/issue-389-usage-fix branch August 7, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify usage of TypeScript sdk

2 participants