Add Typescript helloworld project sample#349
Draft
THardy98 wants to merge 1 commit into
Draft
Conversation
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 ./...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
This change adds adds a
helloworldsample project to Typescript.There were a few changes in doing so, largely TS build fixes/improvements:
projects/tests/helloworldinworkers/typescript, this is the actualhelloworldsamplelanguageoption for the project scenario (these are the changes inscenarios/project, along with a small change to injectclientReadyTimeoutthat tests use)project-nameflag on the project build path now)test-omesin CI and project image CIin that order.
This change in tandem with removing the harness
preparescript, avoids a race where the project harness tries to build before the root workspace is finished generating protos.renamed
src/omes.tstomain.ts, so project builds use the samemain.tsentrypoint convention for buildsAdd
ignore node_modulestogo.modso Go package discvoery does not recurse into npm dependency trees duringgo test ./...intest-omesthe
protogen.jschange makes sure that bothjson-module.jsandroot.d.tsexist before skipping proto generationignore
node_modulesingo.mod, allows for usinggo test ./...in CI, which fails when go walks the tree for ./...Why?
Show how to write a project scenario in Typescript
Added testing in CI for small project build integration tests and project dockerfile testing