Skip to content

Conversation

@sorccu
Copy link
Member

@sorccu sorccu commented Apr 14, 2025

This PR changes our dep versions from exact (same version only) to caret (minor version can differ), which is more user friendly in various ways.

Dependencies that could reasonable be updated have been updated. Notably, for whatever reason updating typescript does not work - it immediately triggers type check errors in seemingly unrelated dependencies.

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

Resolves #[issue-number]

New Dependency Submission

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 14, 2025

Walkthrough

The pull request updates version specifications in multiple package.json files across the repository. The changes alter dependency and devDependency versions from fixed or exact numbers to caret (^) versioning. This adjustment is applied to the root project as well as CLI-related packages, allowing automatic inclusion of compatible minor updates and patches. Additionally, an import path in the help-extension.ts file has been modified. The ESLint configuration has been restructured with the introduction of a new configuration file and the removal of an old one. Minor control flow changes were made in several TypeScript files, but no modifications were made to exported or public entities.

Changes

File(s) Change Summary
package.json Updated dev dependency versions (e.g., @checkly/eslint-config, @commitlint/cli, etc.) from fixed versions to caret (^) syntax.
packages/cli/package.json
packages/create-cli/package.json
Changed both dependency and devDependency version specifications from exact versions to caret (^) format for various packages (e.g., @oclif/plugin-plugins, axios, etc.).
packages/cli/src/help/help-extension.ts Updated import path for Topic type from @oclif/core/lib/interfaces to @oclif/core/interfaces.
packages/cli/src/services/check-parser/__tests__/check-parser-fixtures/tsconfig-paths-sample-project/package.json Updated @playwright/test version from ^1.49.1 to ^1.51.1.
.eslintrc.js Removed ESLint configuration file.
eslint.config.mjs Added new ESLint configuration file with updated rules and settings.
packages/cli/src/commands/login.ts Modified control flow in _checkExistingCredentials method for clarity.
packages/cli/src/constructs/check-group.ts Changed control flow syntax in __addChecks method from ternary to if-else statement.
packages/cli/src/services/check-parser/package-files/tsconfig-json-file.ts Added comments to disable ESLint rules for specific lines in collectLookupPaths method.
packages/cli/src/services/check-parser/parser.ts Removed comments that disabled ESLint rules.
packages/cli/src/services/util.ts
packages/create-cli/src/utils/fileloader.ts
Added comment to disable ESLint rule regarding require imports.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

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

17-24: Updated DevDependency Version Ranges to Caret

The dependency versions in the "devDependencies" section have been successfully updated from pinned versions to caret (^) versioning. This update enables the installation of non-breaking minor and patch updates automatically while still constraining upgrades to compatible versions.

packages/cli/package.json (2)

72-100: Dependencies Now Use Caret Versioning

The dependencies listed in this section have been updated to use caret (^) versioning. This ensures that minor and patch updates will be installed automatically under semantic versioning rules, which aligns with the project’s new dependency management approach.


103-119: DevDependencies Now Use Caret Versioning

The devDependencies are updated to caret (^) versions. Please ensure that any potential changes from minor updates are thoroughly tested to prevent unexpected build or runtime issues.

packages/create-cli/package.json (2)

56-70: Dependencies Updated to Caret Versioning

In this file, the dependencies have been updated to caret (^) versioning. This change improves flexibility by allowing compatible minor and patch updates automatically, which is consistent with the new dependency management strategy.


73-86: DevDependencies Updated to Caret Versioning

The devDependencies have been similarly updated, ensuring that future non-breaking updates are managed automatically. It would be good to keep an eye on any changes from these dependencies, especially if they introduce unexpected behavior in tests or during development.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5a93dc and 994b40c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/create-cli/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test - windows-latest
  • GitHub Check: test - ubuntu-latest

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 14, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/cli/src/services/check-parser/__tests__/check-parser-fixtures/tsconfig-paths-sample-project/package.json (1)

7-9: Ensure Dependency Version Update is Consistent with Caret Versioning

The update of the @playwright/test dependency to ^1.51.1 correctly implements the new dependency management strategy using caret (^) versioning. This change will allow minor and patch updates automatically, which aligns with the project's updated approach. Make sure that the updated version is well-tested against your existing test suite to catch any unforeseen issues.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 994b40c and 5bde8d8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • package.json (2 hunks)
  • packages/cli/package.json (2 hunks)
  • packages/cli/src/help/help-extension.ts (1 hunks)
  • packages/cli/src/services/check-parser/__tests__/check-parser-fixtures/tsconfig-paths-sample-project/package.json (1 hunks)
  • packages/create-cli/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/cli/src/help/help-extension.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • package.json
  • packages/cli/package.json
  • packages/create-cli/package.json

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 14, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
eslint.config.mjs (1)

27-39: Consider strengthening type safety rules

While the rules configuration is generally good, consider the type safety implications of disabling no-explicit-any and ban-ts-comment. These rules help maintain type safety in TypeScript projects.

-      '@typescript-eslint/no-explicit-any': 0,
-      '@typescript-eslint/ban-ts-comment': 0,
+      '@typescript-eslint/no-explicit-any': 1,
+      '@typescript-eslint/ban-ts-comment': 1,

Setting these to warning level (1) would encourage better practices while not breaking existing code.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bde8d8 and 689b421.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • .eslintrc.js (0 hunks)
  • eslint.config.mjs (1 hunks)
  • package.json (3 hunks)
  • packages/cli/src/commands/login.ts (1 hunks)
  • packages/cli/src/constructs/check-group.ts (1 hunks)
  • packages/cli/src/services/check-parser/package-files/tsconfig-json-file.ts (1 hunks)
  • packages/cli/src/services/check-parser/parser.ts (3 hunks)
  • packages/cli/src/services/util.ts (2 hunks)
  • packages/create-cli/src/utils/fileloader.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • .eslintrc.js
✅ Files skipped from review due to trivial changes (5)
  • packages/create-cli/src/utils/fileloader.ts
  • packages/cli/src/services/check-parser/parser.ts
  • packages/cli/src/commands/login.ts
  • packages/cli/src/services/util.ts
  • packages/cli/src/services/check-parser/package-files/tsconfig-json-file.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/cli/src/constructs/check-group.ts (2)
packages/cli/src/constructs/browser-check.ts (1)
  • BrowserCheck (40-156)
packages/cli/src/constructs/multi-step-check.ts (1)
  • MultiStepCheck (27-138)
🔇 Additional comments (6)
packages/cli/src/constructs/check-group.ts (1)

223-227: Improved code readability with if-else statement

The change from a ternary operator to an if-else statement enhances readability while maintaining the same functionality. This makes the conditional logic clearer and follows best practices for situations where you're instantiating different classes based on a condition.

eslint.config.mjs (5)

1-5: Modern ESLint configuration imports look good

The imports are appropriately structured for the modern flat configuration format introduced in ESLint v8.21.0. Good choice of utility functions and plugins.


6-13: Well-structured global ignores

The global ignores are comprehensive and follow best practices by excluding build artifacts, test files, examples, and fixtures from linting.


14-26: Good base configuration

The language options and extended configurations are well chosen - using latest ECMAScript, appropriate globals, and recommended rule sets from both ESLint and TypeScript-ESLint.


41-49: Appropriate exception for CLI-related files

Good choice to disable the no-console rule specifically for command and reporter files, as these likely need to output to the console as part of their core functionality.


1-50:

Details

✅ Verification successful

Verify this configuration works with your dependency updates

Since this PR is about updating dependencies to use caret versioning, ensure this modern ESLint configuration is compatible with the versions specified in your package.json.


🏁 Script executed:

#!/bin/bash
# Check ESLint and related package versions in package.json
grep -E '"eslint"|"@eslint"|"typescript-eslint"' package.json

Length of output: 122


Configuration Compatibility Verified

  • Dependency versions confirmed: ESLint is updated to ^9.24.0 and TypeScript ESLint remains at 8.30.0.
  • The ESLint configuration file (using defineConfig, globalIgnores, etc.) appears to be fully compatible with these dependency updates.
  • No adjustments or further changes are necessary based on the dependency versions.

@sorccu sorccu merged commit 79249e1 into main Apr 14, 2025
4 checks passed
@sorccu sorccu deleted the simokinnunen/sc-23934/cli-unpin-dependencies branch April 14, 2025 20:30
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