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

chore(deps): upgrade prettier #5466

Merged
merged 2 commits into from
Sep 9, 2024
Merged

chore(deps): upgrade prettier #5466

merged 2 commits into from
Sep 9, 2024

Conversation

thisislawatts
Copy link
Member

@thisislawatts thisislawatts commented Sep 4, 2024

Pull Request Submission

Please check the boxes once done.

The pull request must:

Reviewer Documentation

  • follow [CONTRIBUTING](https://github.com/snyk/cli/blob/main/CONTRIBUTING.md) rules
  • be accompanied by a detailed description of the changes (see "What does this PR do?" section below)
  • contain a risk assessment of the change (Medium) with regards to breaking existing functionality. Prettier 3.x introduces breaking changes, so existing formatting rules might need adjustments.
  • highlight breaking API if applicable (see "What does this PR do?" section below)
  • contain a link to the automatic tests that cover the updated functionality (work in progress)
  • contain testing instructions in case that the reviewer wants to manually verify as well, to add to the manual testing done by the author. (instructions will be added after completing test updates)
  • link to the link to the PR for the User-facing documentation (Not applicable, this PR only upgrades a dependency)

User facing Documentation

  • Not applicable, this PR only upgrades a dependency

Testing

  • Changes, removals and additions to functionality must be covered by acceptance / integration tests or smoke tests - either already existing ones, or new ones, created by the author of the PR (work in progress). Existing tests might need

Pull Request Approval

Once a pull request has been reviewed and all necessary revisions have been made, it is approved for merging into 
the main codebase. The merging of the code PR is performed by the code owners, the merging of the documentation PR 
by our content writers.

What does this PR do?

Upgrading from Prettier 1.x (~2019) to 3.x (~2023)  offers several key benefits:

  • Enhanced Performance: The latest version provides faster processing times, improving efficiency in large codebases.
  • Improved Formatting: Prettier 3.x introduces more consistent formatting with better handling of modern JavaScript/TypeScript syntax, reducing manual overrides.
  • Updated Defaults: New defaults align better with current coding standards, reducing the need for additional configuration.

Breaking changes to be aware of:

  • Prettier 3.x introduces breaking changes to its API. Existing formatting code that relies on the internal API might need to be adjusted.

Full changelog: https://github.com/prettier/prettier/blob/main/CHANGELOG.md#333

This upgrade ensures the project stays current with best practices and leverages the latest improvements from prettier. However, due to breaking changes, manual testing and potential adjustments to existing formatting code are required.

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Warnings
⚠️

Since the CLI is unifying on a standard and improved tooling, we're starting to migrate old-style imports and exports to ES6 ones.
A file you've modified is using either module.exports or require(). If you can, please update them to ES6 import syntax and export syntax.
Files found:

  • packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts
  • packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts
  • src/cli/args.ts
  • src/cli/commands/monitor/index.ts
  • src/cli/commands/test/index.ts
  • src/cli/main.ts
  • src/lib/iac/test/v2/output.ts
  • src/lib/plugins/nodejs-plugin/npm-workspaces-parser.ts
  • src/lib/spinner.ts
  • test/jest/acceptance/snyk-code/snyk-code.spec.ts
  • test/jest/unit/iac/directory-loader.spec.ts
  • test/jest/unit/policy-display.spec.ts
  • test/jest/unit/snyk-code/snyk-code-test.spec.ts
  • test/tap/cli-monitor.acceptance.test.ts
  • test/tap/cli-test/cli-test.docker.spec.ts
  • test/tap/cli-test/cli-test.ruby.spec.ts
  • test/tap/cli-test/cli-test.sbt.spec.ts
  • test/tap/run-test.test.ts
  • ts-binary-wrapper/src/common.ts
⚠️ There are multiple commits on your branch, please squash them locally before merging!

Generated by 🚫 dangerJS against 3df0248

@thisislawatts thisislawatts force-pushed the chore/upgrade-prettier branch 3 times, most recently from efc6bee to fb8cbcc Compare September 6, 2024 14:22
@thisislawatts thisislawatts marked this pull request as ready for review September 9, 2024 07:57
@thisislawatts thisislawatts requested a review from a team as a code owner September 9, 2024 07:57
Copy link
Contributor

@sandor-trombitas sandor-trombitas left a comment

Choose a reason for hiding this comment

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

:shipit:

@thisislawatts thisislawatts merged commit 2f4e234 into main Sep 9, 2024
12 checks passed
@thisislawatts thisislawatts deleted the chore/upgrade-prettier branch September 9, 2024 09:27
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.

2 participants