Skip to content

chore(infra): enable TS6 tsgo and pin workflows - #26

Merged
SoonIter merged 6 commits into
mainfrom
codex/path-serializer-infra-baseline
Jun 23, 2026
Merged

chore(infra): enable TS6 tsgo and pin workflows#26
SoonIter merged 6 commits into
mainfrom
codex/path-serializer-infra-baseline

Conversation

@SoonIter

Copy link
Copy Markdown
Member

This PR applies the current Rstack infrastructure baseline to path-serializer while preserving the existing dual package runtime shape.

Summary

  • upgrade Rslib, Rslint, Rstest, TypeScript, Prettier, publint, and API Extractor
  • enable Rslib declaration generation through tsgo and move TS output syntax to ES2023
  • keep Rslint on ts.configs.recommended and fix the legacy rule violations it exposed
  • pin GitHub Actions workflow actions to commit hashes
  • add a concise AGENTS.md and remove unused dev dependencies found by Knip

Validation

  • pnpm lint
  • pnpm run build
  • pnpm test
  • npm pack --dry-run
  • npx -y knip --no-exit-code
  • git diff --check

Notes: publint still reports the existing dual-package CJS types warning because Rslib emits bundled CJS declarations as dist/cjs/index.d.ts, not .d.cts. This PR does not add engines.node.

Related Links:
rstackjs/agent-skills#78

Copilot AI review requested due to automatic review settings June 23, 2026 09:21

@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: d983bdba2a

ℹ️ 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 src/types.ts
Comment thread package.json
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 031e26a4-570e-48cf-818e-5b43f6609876

📥 Commits

Reviewing files that changed from the base of the PR and between d983bdb and a5f4651.

📒 Files selected for processing (2)
  • rslint.config.ts
  • src/normalize.ts

📝 Walkthrough

Walkthrough

This PR hardens TypeScript type safety by changing public interfaces in types.ts and createSnapshotSerializer.ts from any to unknown parameters, makes applyPathMatcher internal to applyMatcherReplacement.ts with matching type tightening, and updates the rslint configuration rule override. The TypeScript build target is raised to ES2023 in tsconfig.json and both ESM and CJS configurations in rslib.config.ts now include syntax: 'es2023' and dts.tsgo: true. The package.json adds "sideEffects": false, updates and prunes dev dependencies, and an unused import is removed from rstest.config.ts. All GitHub Actions workflows pin action references to commit SHAs for reproducibility. A new AGENTS.md documents the repository's development stack, standard commands, project structure, and code style conventions. The Windows path detection regex in normalize.ts is refined.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main infrastructure updates: enabling TypeScript's tsgo for declaration generation and pinning workflow actions to specific commits.
Description check ✅ Passed The description comprehensively details the PR's objectives, including dependency upgrades, TypeScript configuration changes, workflow pinning, and validation steps performed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/path-serializer-infra-baseline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 31: Add an `engines` field to package.json at the root level (alongside
the existing "sideEffects" field) that specifies the minimum Node.js version
required for this project. Include `"node"` with a version constraint that
reflects the ES2023 target and ensures compatibility with the Node versions
tested in CI workflows. This will prevent installations on unsupported Node
versions that lack ES2023 runtime support.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b26e5288-4efe-447e-9050-2de0a4637dcc

📥 Commits

Reviewing files that changed from the base of the PR and between 80f2018 and d983bdb.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • .github/workflows/release.yml
  • .github/workflows/test-ubuntu.yml
  • .github/workflows/test-windows.yml
  • AGENTS.md
  • package.json
  • rslib.config.ts
  • rslint.config.ts
  • rstest.config.ts
  • src/applyMatcherReplacement.ts
  • src/createSnapshotSerializer.ts
  • src/normalize.ts
  • src/types.ts
  • tsconfig.json
💤 Files with no reviewable changes (1)
  • rstest.config.ts

Comment thread package.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates path-serializer to the current Rstack tooling baseline, enabling TS6/tsgo-based declaration generation and modernizing the build/lint/test infrastructure while keeping the existing dual ESM+CJS package output.

Changes:

  • Upgrade core infra/tooling (Rslib/Rslint/Rstest/TypeScript/Prettier/Publint/API Extractor) and update the lockfile accordingly.
  • Enable ES2023 output syntax and tsgo-backed bundled declarations in Rslib; tighten types by replacing any with unknown in public-facing interfaces/callbacks.
  • Pin GitHub Actions to commit SHAs and add AGENTS.md with repo commands/conventions.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.json Moves TS target/lib to ES2023 and sets rootDir: src to align with source layout.
src/types.ts Tightens types (notably unknown[] over any[]) for matcher callbacks.
src/normalize.ts Refactors ANSI escape handling into named regex constants; tweaks Windows-path regex character class.
src/createSnapshotSerializer.ts Tightens serializer interface input types from any to unknown.
src/applyMatcherReplacement.ts Tightens replacer callback arg types from any[] to unknown[] and scopes helper to module.
rstest.config.ts Removes an unused Node import.
rslint.config.ts Simplifies config to ts.configs.recommended only (no any override).
rslib.config.ts Enables syntax: es2023 and dts.tsgo: true for both ESM and CJS outputs.
package.json Adds sideEffects: false and updates devDependencies for the new infra baseline.
pnpm-lock.yaml Updates dependency graph/versions to match the upgraded toolchain.
AGENTS.md Documents stack, common commands, structure, and code-style conventions.
.github/workflows/test-windows.yml Pins actions/checkout and actions/setup-node to commit SHAs.
.github/workflows/test-ubuntu.yml Pins actions/checkout and actions/setup-node to commit SHAs.
.github/workflows/release.yml Pins actions (checkout, setup-node, npm-publish, release-action) to commit SHAs.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

@SoonIter
SoonIter merged commit ffdd4cc into main Jun 23, 2026
5 checks passed
@SoonIter
SoonIter deleted the codex/path-serializer-infra-baseline branch June 23, 2026 12:29
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