Skip to content

Add Typescript helloworld project sample#349

Draft
THardy98 wants to merge 1 commit into
mainfrom
feat/ts-hello-world
Draft

Add Typescript helloworld project sample#349
THardy98 wants to merge 1 commit into
mainfrom
feat/ts-hello-world

Conversation

@THardy98
Copy link
Copy Markdown
Contributor

@THardy98 THardy98 commented May 11, 2026

What was changed

This change adds adds a helloworld sample project to Typescript.

There were a few changes in doing so, largely TS build fixes/improvements:

  • added projects/tests/helloworld in workers/typescript, this is the actual helloworld sample
  • add typescript as a language option for the project scenario (these are the changes in scenarios/project, along with a small change to inject clientReadyTimeout that tests use)
  • simplify Dockerfile/entrypoint code for Python & TS for the project build path (just adds a project-name flag on the project build path now)
  • added Typescript project coverage to test-omes in CI and project image CI
  • updated TS workspace builds so the root workspace explicitly runs:
    1. root proto gen
    2. builds the project harness
    3. builds the root package

in that order.

This change in tandem with removing the harness prepare script, avoids a race where the project harness tries to build before the root workspace is finished generating protos.

  • renamed src/omes.ts to main.ts, so project builds use the same main.ts entrypoint convention for builds

  • Add ignore node_modules to go.mod so Go package discvoery does not recurse into npm dependency trees during go test ./... in test-omes

  • the protogen.js change makes sure that both json-module.js and root.d.ts exist before skipping proto generation

  • ignore node_modules in go.mod, allows for using go test ./... in CI, which fails when go walks the tree for ./...

Why?

Show how to write a project scenario in Typescript

  1. How was this tested:
    Added testing in CI for small project build integration tests and project dockerfile testing

This change adds adds a helloworld sample project to Typescript. There were a few changes in doing so, largely TS build fixes/improvements:

- added `projects/tests/helloworld` in `workers/typescript`, this is the actual `helloworld` sample
- add typescript as a `language` option for the project scenario (these are the changes in `scenarios/project`, along with a small change to inject `clientReadyTimeout` that tests use)
- simplify Dockerfile/entrypoint code for Python & TS for the project build path (just adds a `project-name` flag on the project build path now)
- added Typescript project coverage to `test-omes` in CI and project image CI
- updated TS workspace builds so the root workspace explicitly runs 1. root proto gen 2. builds the project harness 3. builds the root package. This change in tandem with removing the harness `prepare` script, avoids a race where the project harness tries to build before the root workspace is finished generating protos
- renamed `src/omes.ts` to `main.ts`, so project builds use the same `main.ts` entrypoint convention for builds
- Add `ignore node_modules` to `go.mod` so Go package discvoery does not recurse into npm dependency trees during `go test ./...` in `test-omes`

- the `protogen.js` change makes sure that both `json-module.js` and `root.d.ts` exist before skipping

ignore node_modules in go.mod, allows for using go test ./... in CI, which fails when go walks the tree for ./...
@THardy98 THardy98 requested review from a team as code owners May 11, 2026 20:31
@THardy98 THardy98 marked this pull request as draft May 12, 2026 17:28
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.

1 participant