Skip to content

build(ts): add Phase 1 TypeScript build pipeline - #55

Merged
graphanov merged 2 commits into
mainfrom
forge/issue-28-ts-build-pipeline-phase1
Jun 28, 2026
Merged

build(ts): add Phase 1 TypeScript build pipeline#55
graphanov merged 2 commits into
mainfrom
forge/issue-28-ts-build-pipeline-phase1

Conversation

@graphanov

Copy link
Copy Markdown
Owner

Summary

  • Adds Phase 1 TypeScript build pipeline: tsconfig emits ESM to dist/, package.json ships dist/ and adds build+pretest scripts, bin shim imports compiled dist/cli.js.

Scope

  • tsconfig.json (outDir, include src/**/*.js), package.json (files: dist, build+pretest scripts), bin/lazyglm.js (import dist/cli.js), README.md + docs/typescript-migration.md (build-step docs). No .js->.ts conversion, no bundler, no version/publish change, no runtime behavior change.

Out of scope

  • merge/publish/release; .js->.ts module conversion; .github/workflows/ci.yml explicit build step (follow-up, blocked on workflow token scope — see notes)

Verification

  • npm run build -> exit 0; npm run typecheck -> exit 0; npm test -> 418 pass / 0 fail; pretest lifecycle builds dist/ before test so CI smoke + pack steps pass without an explicit workflow build step.

Risk

  • low

Linked issue

Refs #28

Notes

  • A companion change to .github/workflows/ci.yml (adding an explicit npm run build step before typecheck) is prepared locally but could not be pushed in this PR: the configured deployment token lacks the workflow scope, so GitHub rejects pushes that touch workflow files. The pretest lifecycle covers CI correctness in the meantime (it builds dist/ before npm test, so the smoke and npm pack --dry-run steps see the compiled output). The ci.yml update is a recommended follow-up for clarity; it requires either a token with workflow scope or an owner push.

Authority boundary

john-lomein did not merge, publish, release, dispatch workflows, change settings, force-push, rewrite history, or touch secrets.

Introduce the compiled-package pipeline without converting runtime modules:
- tsconfig.json emits ESM to dist/ (allowJs on, checkJs off)
- package.json ships dist/ and adds build + pretest scripts
- bin/lazyglm.js imports dist/cli.js (compiled) instead of src/cli.js
- README + docs/typescript-migration.md document the build step

pretest lifecycle runs build before npm test, so dist/ exists for the
CLI smoke and npm pack steps in CI without an explicit build step.

Scope: build pipeline only. No .js->.ts conversion, no bundler, no
version/publish flow change, no runtime behavior change.

Refs #28
@graphanov

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bb6cab986

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
@graphanov

Copy link
Copy Markdown
Owner Author

Status: draft verified clean on latest head; marked ready for review.

Evidence:

  • CI ci → SUCCESS on 9bb6cab; npm run typecheck → 0 errors; npm run build → clean; node --test test/*.test.mjs → 418 pass, 0 fail; 0 unresolved review threads; no forbidden path changes

Next: awaiting independent Codex review for current head (trigger already pending from graphanov)

@graphanov
graphanov marked this pull request as ready for review June 28, 2026 18:24
…re pack/install

Resolves Codex P2 review thread on package.json:15. dist/ is gitignored
build output but bin/lazyglm.js imports dist/cli.js, so a fresh npm pack
or npm install without a prior npm test produced a broken tarball missing
dist/. prepack (npm pack) and prepare (npm install) now run npm run build
deterministically, same as the existing pretest hook.

Scope: package.json scripts only. No version/publish/runtime change.

Refs #28
@graphanov

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: b737152ead

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@graphanov
graphanov merged commit 87a5d7b into main Jun 28, 2026
1 check passed
@graphanov
graphanov deleted the forge/issue-28-ts-build-pipeline-phase1 branch June 28, 2026 20:19
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