chore(infra): enable TS6 tsgo and pin workflows - #26
Conversation
There was a problem hiding this comment.
💡 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".
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR hardens TypeScript type safety by changing public interfaces in 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
.github/workflows/release.yml.github/workflows/test-ubuntu.yml.github/workflows/test-windows.ymlAGENTS.mdpackage.jsonrslib.config.tsrslint.config.tsrstest.config.tssrc/applyMatcherReplacement.tssrc/createSnapshotSerializer.tssrc/normalize.tssrc/types.tstsconfig.json
💤 Files with no reviewable changes (1)
- rstest.config.ts
There was a problem hiding this comment.
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
anywithunknownin public-facing interfaces/callbacks. - Pin GitHub Actions to commit SHAs and add
AGENTS.mdwith 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.
This PR applies the current Rstack infrastructure baseline to
path-serializerwhile preserving the existing dual package runtime shape.Summary
ts.configs.recommendedand fix the legacy rule violations it exposedAGENTS.mdand remove unused dev dependencies found by KnipValidation
pnpm lintpnpm run buildpnpm testnpm pack --dry-runnpx -y knip --no-exit-codegit diff --checkNotes: 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 addengines.node.Related Links:
rstackjs/agent-skills#78