Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 27, 2025

Summary

Comprehensive upgrade of the development toolchain to modern versions.

#skip-changelog

Changes

Linting & Formatting

  • ESLint 7 → 9 with flat config (eslint.config.mjs)
  • typescript-eslint 5 → 8
  • Prettier 2 → 3.4.2

Testing

  • Jest + ts-jest → Vitest 3.x (faster, native ESM support)
  • Updated all ~30 test files to use Vitest APIs (vi.fn(), vi.mock(), etc.)

Schema Validation

  • AJV + json-schema-to-typescript → Zod 3.x
  • Schemas now defined directly in TypeScript with inferred types
  • Removed build-time schema generation step

Dependencies

  • TypeScript 5.1 → 5.7
  • @octokit/rest 18 → 21
  • @octokit/plugin-retry 3 → 7
  • @aws-sdk/client-lambda 3.2 → 3.723
  • @google-cloud/storage 5 → 7
  • Removed all legacy yarn resolutions

Breaking Changes

None for users. Internal tooling only.

Files Removed

  • .eslintrc.js
  • jest.config.js
  • scripts/config-json-schema-to-ts.js
  • src/schemas/projectConfig.schema.ts

Files Added

  • eslint.config.mjs
  • vitest.config.ts

@github-actions
Copy link
Contributor

github-actions bot commented Dec 27, 2025

Suggested Version Bump

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 27, 2025

PR Preview Action v1.7.1

🚀 View preview at
https://getsentry.github.io/craft/pr-preview/pr-675/

Built to branch gh-pages at 2025-12-27 15:44 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

BYK added 7 commits December 28, 2025 13:01
- Upgrade Prettier from 2.x to 3.4.2
- Upgrade TypeScript to 5.7.2
- Migrate ESLint 7 to ESLint 9 with flat config (eslint.config.mjs)
- Replace Jest with Vitest for faster, native ESM testing
- Replace AJV/json-schema-to-typescript with Zod for schema validation
- Update @octokit packages to latest major versions
- Update @aws-sdk and @google-cloud/storage
- Remove obsolete yarn resolutions
- Update AGENTS.md documentation
- Add trace method to logger mock
- Fix strings test to handle different stack trace formats
- Fix system tests to use more portable node commands
- Use vi.useFakeTimers/useRealTimers in calver.test.ts
- Properly export all fs methods in fs mock
- Replace jest.fn() with vi.fn() in multiple test files
- Fix inline snapshot in symbolCollector.test.ts
- Use require for actual fs import in mock to avoid circular issues
- Remove global fs mock in gcsAPI.test.ts, use vi.spyOn instead
- Add AWS Lambda client mock in awsLambdaLayerManager.test.ts
- Use vi.mock factory for fs module to mock existsSync
- Add default export for simple-git mock
@BYK BYK force-pushed the chore/modernize-dev-toolchain branch from 475e7ef to e5f1fce Compare December 28, 2025 10:01
@BYK BYK marked this pull request as ready for review December 28, 2025 10:04
@BYK BYK enabled auto-merge (squash) December 28, 2025 12:40
@BYK BYK merged commit 1a821ea into master Dec 28, 2025
14 checks passed
@BYK BYK deleted the chore/modernize-dev-toolchain branch December 28, 2025 17:57
BYK added a commit that referenced this pull request Dec 28, 2025
## Problem

When generating changelog preview for a PR, the "Suggested version bump"
was incorrectly showing the bump type from ALL commits since the last
tag instead of just the current PR.

For example, if the changelog history contained a `feat:` commit (minor)
but the current PR was `chore:` (patch), the preview would incorrectly
show "minor" instead of "patch".

This was observed in PRs like #675 where the bump type didn't match the
PR's change type.

## Solution

- Calculate the bump type for the specific PR using `getBumpTypeForPR()`
instead of using the aggregated stats from all commits
- This is now consistent with the behavior when a PR is skipped (which
was already correct)
- Updated workflow wording from "Suggested Version Bump" to "Semver
Impact of This PR" to clarify the meaning

## Changes

- `src/utils/changelog.ts`: Use PR-specific bump type in
`generateChangelogWithHighlight()`
- `.github/workflows/changelog-preview.yml`: Update section heading
wording
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.

3 participants