Skip to content

feat: add TypeScript build infrastructure#10

Open
GoogilyBoogily wants to merge 1 commit into
feat/npm-cachingfrom
feat/ts-infra
Open

feat: add TypeScript build infrastructure#10
GoogilyBoogily wants to merge 1 commit into
feat/npm-cachingfrom
feat/ts-infra

Conversation

@GoogilyBoogily
Copy link
Copy Markdown
Contributor

@GoogilyBoogily GoogilyBoogily commented May 29, 2026

Summary

Sets up TypeScript compilation for GitHub Action scripts. Complex bash logic in later PRs will be extracted into typed, testable .ts files compiled to dist/.

  • package.json with @actions/core, @actions/exec, @actions/github deps
  • tsconfig.json targeting CommonJS/ES2022, strict: true
  • .nvmrc pinned to Node 24
  • src/utils.ts: shared getRequiredEnv() helper used by all scripts
  • dist/ committed to repo (required — consumers checkout and run node dist/script.js directly)
  • .github/workflows/validate-scripts.yml: self-CI that builds and enforces dist/ stays in sync via git diff --exit-code dist/

Test plan

  • npm ci && npm run build passes locally
  • git diff --exit-code dist/ is clean after build
  • validate-scripts workflow passes on this PR

Copilot AI review requested due to automatic review settings May 29, 2026 15:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces TypeScript build infrastructure for the shared GitHub Actions repository so future action scripts can move from bash into typed source files compiled into committed dist/ output.

Changes:

  • Adds npm/TypeScript project configuration and Node version pinning.
  • Adds a shared getRequiredEnv() helper with compiled output in dist/.
  • Adds CI validation to build TypeScript and verify dist/ is up to date.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/validate-scripts.yml Adds self-CI to install dependencies, build scripts, and verify committed dist/.
.gitignore Ignores local node_modules/.
.nvmrc Pins the repo’s Node version to 24.
dist/utils.js Adds compiled CommonJS output for the utility helper.
package-lock.json Locks the newly added npm dependency tree.
package.json Defines scripts and action-related TypeScript dependencies.
src/utils.ts Adds a shared required-environment-variable helper.
tsconfig.json Configures strict TypeScript compilation to dist/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
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.

2 participants