Skip to content

refactor: convert stac_logger to a pure Dart package #461

Merged
divyanshub024 merged 3 commits intodevfrom
dv/cli
Mar 1, 2026
Merged

refactor: convert stac_logger to a pure Dart package #461
divyanshub024 merged 3 commits intodevfrom
dv/cli

Conversation

@divyanshub024
Copy link
Member

@divyanshub024 divyanshub024 commented Mar 1, 2026

Description

Related Issues

Closes #

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

Summary by CodeRabbit

Release Notes

  • Refactor
    • Removed Flutter SDK and framework dependencies from the logging package, enabling broader platform compatibility.
    • Improved package efficiency through enhanced instance management.
    • Replaced Flutter-specific utilities with standard platform alternatives.
    • Updated development tooling dependencies for improved code quality.

@divyanshub024 divyanshub024 merged commit 0764435 into dev Mar 1, 2026
4 of 6 checks passed
@divyanshub024 divyanshub024 deleted the dv/cli branch March 1, 2026 19:16
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c476f4 and dda3e49.

⛔ Files ignored due to path filters (1)
  • packages/stac_cli/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • packages/stac_logger/lib/src/log_web.dart
  • packages/stac_logger/pubspec.yaml

📝 Walkthrough

Walkthrough

This PR removes Flutter-specific dependencies from the stac_logger package, converting it to a pure Dart library. The code replaces Flutter imports with a custom debug mode constant and updates pubspec.yaml to remove Flutter SDK constraints and add generic test dependencies.

Changes

Cohort / File(s) Summary
Web Logger Refactoring
packages/stac_logger/lib/src/log_web.dart
Removed Flutter foundation import; introduced _kDebugMode private constant to replace kDebugMode checks; replaced debugPrint with standard print; added singleton pattern via static final _instance field and instance getter.
Package Metadata
packages/stac_logger/pubspec.yaml
Removed Flutter SDK environment constraint; eliminated Flutter and Flutter-specific dev dependencies; added generic test and lints dev dependencies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Potatomonsta

Poem

🐰 Flutter's gone, now pure Dart stays,
A singleton hops through debug ways,
No foundation, just clean and bright,
This logger's now lightweight!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dv/cli

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 and usage tips.

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