Skip to content

chore: update to TypeScript 7 - #72

Merged
macalinao merged 6 commits into
masterfrom
update-typescript-7
Aug 1, 2026
Merged

chore: update to TypeScript 7#72
macalinao merged 6 commits into
masterfrom
update-typescript-7

Conversation

@macalinao

@macalinao macalinao commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Updates the monorepo to TypeScript 7 and centralizes shared dev dependency versions in a bun workspace catalog.

  • Adds a catalog to the root package.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 new ponyfill-temporal) to catalog: references.
  • All packages compile with typescript 7.0.2 (the stable native/Go compiler, current latest dist-tag).
  • The root typescript devDependency 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.SyntaxKind is undefined). Bun nests the conflicting versions, so typedoc resolves TS 6.0.3 at the root while each package's tsc still 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 (including ponyfill-temporal) using TS 6.0.3, 0 errors.
  • bun test: 282 pass, 0 fail.
  • bun run lint (oxlint + oxfmt): PASS.

Summary by CodeRabbit

  • Chores
    • Standardized shared package and development-tool version management across the workspace.
    • Centralized TypeScript and supporting tooling versions for more consistent builds.
    • Aligned package configuration with shared catalog settings, improving maintenance and reducing version drift.
    • Preserved existing package functionality while simplifying future updates across supported packages.

@sourcery-ai

sourcery-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates 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 7

sequenceDiagram
  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
Loading

File-Level Changes

Change Details Files
Bump TypeScript devDependency to ^7.0.2 across the monorepo.
  • Update root package.json devDependency typescript from ^5.9.3 to ^7.0.2.
  • Update workspace package devDependencies (format-temporal, interval-temporal, parse-temporal, superjson-temporal, temporal-quarter-fns, temporal-zod) from various 5.8.x/5.9.x ranges to ^7.0.2.
  • Regenerate bun.lock to capture the new TypeScript version and any resolved dependency graph changes.
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
bun.lock
Validate build and test pipeline under TypeScript 7 and document known lint failure due to ecosystem incompatibility.
  • Run bun run build to confirm all packages compile successfully with TypeScript 7.
  • Run biome check to ensure static analysis passes independently of eslint.
  • Run bun test and confirm all tests pass except a known, pre-existing ICU/Intl locale-ordering difference.
  • Investigate and document eslint crash caused by @typescript-eslint/typescript-estree reading ts.Extension.Cjs, noting that TypeScript 7’s JS API no longer exports ts.Extension and that the issue must be fixed upstream before lint can pass with TS 7.
package.json
packages/*
bun.lock
(no-code docs; described in PR description)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The root workspace now defines a shared dependency catalog. Seven temporal package manifests use catalog: references for selected dependency versions.

Changes

Workspace dependency catalog

Layer / File(s) Summary
Catalog workspace configuration
package.json
The workspace configuration uses object form and defines shared catalog versions. The root TypeScript dependency uses ~6.0.3 explicitly.
Package manifest migration
packages/*/package.json
Seven temporal package manifests replace selected dependency versions with catalog: references. Package-specific dependencies remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: updating the repository to TypeScript 7.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-typescript-7

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 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

📥 Commits

Reviewing files that changed from the base of the PR and between 05bcf22 and 828f4bf.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • 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

Comment thread package.json Outdated

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

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

🧹 Nitpick comments (1)
package.json (1)

12-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin @types/bun instead of latest.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 828f4bf and b80a450.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (15)
  • biome.jsonc
  • package.json
  • packages/format-temporal/eslint.config.js
  • packages/format-temporal/package.json
  • packages/interval-temporal/eslint.config.js
  • packages/interval-temporal/package.json
  • packages/parse-temporal/eslint.config.js
  • packages/parse-temporal/package.json
  • packages/superjson-temporal/eslint.config.js
  • packages/superjson-temporal/package.json
  • packages/temporal-quarter-fns/eslint.config.js
  • packages/temporal-quarter-fns/package.json
  • packages/temporal-zod/eslint.config.js
  • packages/temporal-zod/package.json
  • turbo.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

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

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 | 🟠 Major

Keep the cataloged TypeScript version compatible with the ESLint stack.

The new catalog propagates typescript@^7.0.2 to 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 --json

Also 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 win

Raise the Bun engine floor
catalog: support landed in Bun 1.2.14, so engines.bun >=1.0.0 advertises versions that can’t install this workspace layout. Bump it to >=1.2.14 or align it with bun@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

📥 Commits

Reviewing files that changed from the base of the PR and between b80a450 and a6ecdef.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • 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
🚧 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a6ecdef and 92cc6f7.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • package.json
  • packages/format-temporal/package.json
  • packages/interval-temporal/package.json
  • packages/parse-temporal/package.json
  • packages/ponyfill-temporal/package.json
  • packages/superjson-temporal/package.json
  • packages/temporal-quarter-fns/package.json
  • packages/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

Comment thread package.json
"turbo": "^2.10.7",
"typedoc": "^0.28.20",
"typescript": "^5.9.3"
"typescript": "~6.0.3"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ 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.

@macalinao
macalinao merged commit da538e6 into master Aug 1, 2026
12 checks passed
@macalinao
macalinao deleted the update-typescript-7 branch August 1, 2026 18:43
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