Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove defaults and defaults-esm presets #2994

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Feb 28, 2025

Test plan

Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl requested a review from Copilot February 28, 2025 09:36

Choose a reason for hiding this comment

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

PR Overview

This PR refactors the presets functionality by removing the deprecated defaults and defaults-esm presets, which are no longer recommended for use.

  • Removed legacy preset tests and exports in the test files and source code.
  • Updated documentation by removing the legacy presets section and examples.
  • Cleaned up module exports to only include the createCjsPreset and createEsmPreset functions.

Reviewed Changes

File Description
src/presets/index.spec.ts Updated imports and removed tests referencing legacy presets.
website/docs/getting-started/presets.md Removed deprecated legacy presets section and examples from documentation.
presets/index.js Removed getters for deprecated presets, retaining only the new exports.
src/presets/index.ts Removed re-exports of legacy presets.
presets/defaults/jest-preset.js Removed reference to legacy default preset.
presets/defaults-esm/jest-preset.js Removed reference to legacy default esm preset.

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

BREAKING CHANGE

- Use `createCjsPreset` as a replacement for `defaults` preset
- Use `createEsmPreset` as a replacement for `defaults` preset
@ahnpnl ahnpnl force-pushed the refactor/remove-legacy-presets branch from de481f2 to 75732d6 Compare February 28, 2025 09:48
@ahnpnl ahnpnl marked this pull request as ready for review February 28, 2025 10:04
@ahnpnl ahnpnl merged commit 94dd3b1 into next Feb 28, 2025
12 checks passed
@ahnpnl ahnpnl deleted the refactor/remove-legacy-presets branch February 28, 2025 10:04
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