chore: update to TypeScript 7 - #72
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the TypeScript devDependency to ^7.0.2 in the root and all workspace packages, ensuring the monorepo compiles under TS 7 while documenting the current eslint/typescript-eslint incompatibility with the new TypeScript 7 JS API. Sequence diagram for lint pipeline failure under TypeScript 7sequenceDiagram
actor Developer
participant Bun as bun
participant Turbo as turbo
participant Eslint as eslint
participant TsEslint as typescript_eslint
participant TS7 as typescript_7_js_api
Developer->>Bun: bun run lint
Bun->>Turbo: turbo run lint
Turbo->>Eslint: run_lint
Eslint->>TsEslint: load_typescript_estree
TsEslint->>TS7: access_ts_Extension
TS7-->>TsEslint: ts.Extension = undefined
TsEslint-->>Eslint: TypeError reading Cjs
Eslint-->>Developer: lint step fails
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughThe root workspace now defines a shared dependency catalog. Seven temporal package manifests use ChangesWorkspace dependency catalog
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 30: Align the TypeScript version in package.json with the peer range
required by the typescript-eslint version supplied through
`@macalinao/eslint-config`. Either retain a TypeScript release below 6.1.0 or
upgrade the ESLint stack to a release supporting TypeScript 7, ensuring the
resulting dependency set is compatible.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 0850108e-7bf0-4478-9fd5-6a3069842e7b
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
package.jsonpackages/format-temporal/package.jsonpackages/interval-temporal/package.jsonpackages/parse-temporal/package.jsonpackages/superjson-temporal/package.jsonpackages/temporal-quarter-fns/package.jsonpackages/temporal-zod/package.json
typescript-eslint (via @macalinao/eslint-config) peer-caps at typescript <6.1.0 and has no TS7-compatible release yet, crashing `eslint` under TypeScript 7 (ts.Extension.Cjs undefined). Biome already handles linting, so drop eslint + @macalinao/eslint-config and the per-package eslint.config.js / lint scripts and the turbo lint task. Also introduce a Bun workspace catalog for the deps shared across packages (typescript, @macalinao/tsconfig, @types/bun, temporal-polyfill, temporal-spec, tslib) so versions are pinned in one place. Addresses CodeRabbit review on #72.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
12-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin
@types/buninstead oflatest.A mutable catalog entry allows future installs to resolve a different type package without an intentional dependency change. Use a compatible pinned range and update it deliberately.
🤖 Prompt for 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. In `@package.json` at line 12, Replace the mutable "latest" version for `@types/bun` in the dependency configuration with a compatible pinned version or explicitly bounded range, and ensure future updates require an intentional dependency change.
🤖 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.
Nitpick comments:
In `@package.json`:
- Line 12: Replace the mutable "latest" version for `@types/bun` in the dependency
configuration with a compatible pinned version or explicitly bounded range, and
ensure future updates require an intentional dependency change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 510aad26-4cd6-4fb2-a19c-6a78c9893265
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
biome.jsoncpackage.jsonpackages/format-temporal/eslint.config.jspackages/format-temporal/package.jsonpackages/interval-temporal/eslint.config.jspackages/interval-temporal/package.jsonpackages/parse-temporal/eslint.config.jspackages/parse-temporal/package.jsonpackages/superjson-temporal/eslint.config.jspackages/superjson-temporal/package.jsonpackages/temporal-quarter-fns/eslint.config.jspackages/temporal-quarter-fns/package.jsonpackages/temporal-zod/eslint.config.jspackages/temporal-zod/package.jsonturbo.json
💤 Files with no reviewable changes (7)
- packages/interval-temporal/eslint.config.js
- packages/temporal-quarter-fns/eslint.config.js
- packages/superjson-temporal/eslint.config.js
- packages/temporal-zod/eslint.config.js
- packages/format-temporal/eslint.config.js
- packages/parse-temporal/eslint.config.js
- turbo.json
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/interval-temporal/package.json
- packages/temporal-quarter-fns/package.json
# Conflicts: # biome.jsonc # bun.lock # package.json # packages/format-temporal/package.json # packages/interval-temporal/package.json # packages/parse-temporal/package.json # packages/superjson-temporal/package.json # packages/temporal-quarter-fns/package.json # packages/temporal-zod/package.json
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
package.json (2)
9-21:⚠️ Potential issue | 🟠 MajorKeep the cataloged TypeScript version compatible with the ESLint stack.
The new catalog propagates
typescript@^7.0.2to the workspace packages, but the current typescript-eslint support range is>=4.8.4 <6.1.0; TypeScript 7 is outside that range. (typescript-eslint.io) This is the same unresolved incompatibility raised in the previous review: upgrade the ESLint stack or keep the catalog on a supported TypeScript range.#!/usr/bin/env bash set -euo pipefail jq '.workspaces, .devDependencies.typescript' package.json rg -n '"typescript-eslint"|`@typescript-eslint`' package.json bun.lock npm view typescript-eslint@8.64.0 peerDependencies --jsonAlso applies to: 42-42
🤖 Prompt for 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. In `@package.json` around lines 9 - 21, Update the workspaces.catalog TypeScript entry to a version range supported by the repository’s current typescript-eslint/ESLint stack, or upgrade that stack and its related package references to support TypeScript 7. Keep the catalog and lockfile dependency versions consistent, and preserve the existing workspace dependency setup.Source: MCP tools
9-21: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winRaise the Bun engine floor
catalog:support landed in Bun 1.2.14, soengines.bun >=1.0.0advertises versions that can’t install this workspace layout. Bump it to>=1.2.14or align it withbun@1.3.1.🤖 Prompt for 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. In `@package.json` around lines 9 - 21, Update the package.json engines.bun requirement to a minimum of >=1.2.14, or align it with the project’s bun@1.3.1 version, so the declared engine supports workspaces.catalog.Source: MCP tools
🤖 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.
Outside diff comments:
In `@package.json`:
- Around line 9-21: Update the workspaces.catalog TypeScript entry to a version
range supported by the repository’s current typescript-eslint/ESLint stack, or
upgrade that stack and its related package references to support TypeScript 7.
Keep the catalog and lockfile dependency versions consistent, and preserve the
existing workspace dependency setup.
- Around line 9-21: Update the package.json engines.bun requirement to a minimum
of >=1.2.14, or align it with the project’s bun@1.3.1 version, so the declared
engine supports workspaces.catalog.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8f2ba983-eb43-4fe9-a086-99ecfa52a230
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
package.jsonpackages/format-temporal/package.jsonpackages/interval-temporal/package.jsonpackages/parse-temporal/package.jsonpackages/superjson-temporal/package.jsonpackages/temporal-quarter-fns/package.jsonpackages/temporal-zod/package.json
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/temporal-zod/package.json
- packages/parse-temporal/package.json
typedoc 0.28 supports typescript up to 6.0.x and crashes on the TS 7 native compiler's JS API. Packages still build with typescript 7 via the catalog; the root devDependency (which typedoc resolves) stays on 6.0.x.
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 42: Resolve the TypeScript version conflict by updating the root
package.json dependency to use the workspace catalog version, matching the
"typescript": "catalog:" declarations in packages/*, or remove the root
TypeScript dependency if it is unused. Preserve the workspace’s existing
catalog-managed versions.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0b89be89-772c-4a3d-9f09-588293c63783
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
package.jsonpackages/format-temporal/package.jsonpackages/interval-temporal/package.jsonpackages/parse-temporal/package.jsonpackages/ponyfill-temporal/package.jsonpackages/superjson-temporal/package.jsonpackages/temporal-quarter-fns/package.jsonpackages/temporal-zod/package.json
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/temporal-quarter-fns/package.json
- packages/interval-temporal/package.json
- packages/parse-temporal/package.json
- packages/superjson-temporal/package.json
| "turbo": "^2.10.7", | ||
| "typedoc": "^0.28.20", | ||
| "typescript": "^5.9.3" | ||
| "typescript": "~6.0.3" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== root versions =="
jq '{catalog_typescript: .workspaces.catalog.typescript,
root_typescript: .devDependencies.typescript}' package.json
echo "== workspace TypeScript versions =="
fd --type f --glob 'package.json' packages | sort | while IFS= read -r file; do
jq -r --arg file "$file" \
'[$file, (.devDependencies.typescript // "<unset>")] | `@tsv`' "$file"
done
echo "== lockfiles =="
fd --hidden --type f --glob 'bun.lock*' .
echo "== TypeScript declarations =="
rg -n '"typescript"[[:space:]]*:' package.json packages --glob 'package.json'Repository: macalinao/temporal-utils
Length of output: 1267
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== root package.json relevant sections =="
cat -n package.json | sed -n '1,80p'
echo "== root scripts =="
jq -r '.scripts // {} | to_entries[] | "\(.key)=\(.value)"' package.json
echo "== package.json TypeScript/package-manager consistency =="
python3 - <<'PY'
import json
from pathlib import Path
root = json.loads(Path("package.json").read_text())
catalog_ts = root.get("workspaces", {}).get("catalog", {}).get("typescript", "<unset>")
root_ts = root.get("devDependencies", {}).get("typescript", "<unset>")
print({"catalog": catalog_ts, "root": root_ts, "packageManager": root.get("packageManager")})
packages = sorted(Path(".").glob("packages/*/package.json"))
print("workspace_catalog_count", sum(
json.loads(p.read_text()).get("devDependencies", {}).get("typescript") == "catalog:"
for p in packages
), "of", len(packages))
PY
echo "== lint/build package references =="
rg -n '"eslint|typescript-eslint|`@typescript-eslint`|tsc|tsserver|node_modules/.*typescript|esbuild|tsup|tsconfig' package.json packages --glob 'package.json' --glob 'tsconfig.json' --glob 'eslint.*' --glob '*.mjs' --glob '*.js' --glob '*.cjs' --glob '*.ts' | sed -n '1,200p'Repository: macalinao/temporal-utils
Length of output: 5230
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== lockfile TypeScript entries =="
if [ -f bun.lock ]; then
rg -n 'typescript|bun-types|tsconfig|oxlint-tsgolint|oxlint|oxfmt' bun.lock | sed -n '1,220p'
fi
echo "== lock package-manager versions =="
python3 - <<'PY'
from pathlib import Path
text = Path("bun.lock").read_text()
for term in ["`@macalinao/tsconfig`", "typescript", "oxlint-tsgolint", "oxlint", "oxfmt", "typedoc"]:
print(term)
for i, line in enumerate(text.splitlines(), 1):
if term in line:
print(f"{i}: {line}")
PY
echo "== lockfile node resolution hints =="
rg -n 'node:\s*|\.bin|dependencies|devDependencies' bun.lock | sed -n '1,120p'Repository: macalinao/temporal-utils
Length of output: 50380
Resolve the root TypeScript version conflict.
packages/* use "typescript": "catalog:", and bun.lock installs TypeScript 6.3.3 directly plus workspace TypeScript 7.0.2 packages. Keep package.json:42 on the catalog version or remove the root dependency if it is not used.
🤖 Prompt for 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.
In `@package.json` at line 42, Resolve the TypeScript version conflict by updating
the root package.json dependency to use the workspace catalog version, matching
the "typescript": "catalog:" declarations in packages/*, or remove the root
TypeScript dependency if it is unused. Preserve the workspace’s existing
catalog-managed versions.
Summary
Updates the monorepo to TypeScript 7 and centralizes shared dev dependency versions in a bun workspace catalog.
catalogto the rootpackage.json(@macalinao/tsconfig,@types/bun,temporal-polyfill^1.0.1,temporal-spec^1.0.0,tslib,typescript^7.0.2) and converts all seven workspace packages (including the newponyfill-temporal) tocatalog:references.latestdist-tag).typescriptdevDependency is pinned to ~6.0.3 instead of the catalog version: typedoc 0.28 supports TypeScript up to 6.0.x and crashes on the TS 7 native compiler's JS API (ts.SyntaxKindis undefined). Bun nests the conflicting versions, so typedoc resolves TS 6.0.3 at the root while each package'stscstill runs 7.0.2.No changeset added — this is a dev-tooling bump with no public API change, matching how the repo handles other tooling/chore bumps.
Note: an earlier revision of this PR flagged an eslint incompatibility with TS 7; that is moot now that the repo migrated to oxlint/oxfmt (#68) and eslint is gone.
Verification
bun run build(turbo →tsc): PASS — all 7 packages compile cleanly under TS 7.0.2.bun run typedoc: PASS — docs generate for all packages (includingponyfill-temporal) using TS 6.0.3, 0 errors.bun test: 282 pass, 0 fail.bun run lint(oxlint + oxfmt): PASS.Summary by CodeRabbit