Skip to content

feat: #2 improve pubdev scores#16

Merged
TheRealAgentK merged 4 commits intomainfrom
feature/2-pubdevscore
Jan 27, 2025
Merged

feat: #2 improve pubdev scores#16
TheRealAgentK merged 4 commits intomainfrom
feature/2-pubdevscore

Conversation

@TheRealAgentK
Copy link
Contributor

@TheRealAgentK TheRealAgentK commented Jan 27, 2025

feat: #2 - Improve pubdev score

Description 📝

  • Purpose: Get to the max pubdev score that we can
  • Approach: Changes suggested by pubdev tooling

Type of change

  • New feature (non-breaking change which adds functionality)

Updates

👉 Package dependency changes for better up/downgrades
👉 Structural changes to adhere to format pubdev requires

Author to check 👓

  • Project and all contained modules builds successfully
  • Self-/dev-tested
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

Reviewer to check ✔️

  • Project and all contained modules builds successfully
  • Change has been dev-/reviewer-tested, where possible
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

@TheRealAgentK TheRealAgentK changed the title [DRAFT] Feature/2 pubdevscore feat: [DRAFT] Feature/2 pubdevscore Jan 27, 2025
@miquelbeltran
Copy link
Contributor

I run the tool they use to calculate the score locally https://pub.dev/packages/pana and currently gives a 140/160. Providing docs give 0/20, I will improve that and push to this branch directly.

TheRealAgentK and others added 4 commits January 27, 2025 13:43
- Moved package source to `src`
- Exposed "public API" with `lib/raygun_cli.dart`
- Created empty example
- Updated `bin/raygun_cli.dart` to use the exposed public API
@miquelbeltran
Copy link
Contributor

miquelbeltran commented Jan 27, 2025

I've done some package structure changes.

  • Moved package source to lib/src
  • Exposed "public API" with lib/raygun_cli.dart, to be used by the bin/raygun_cli.dart entry point
  • Created empty example
  • Updated bin/raygun_cli.dart to use the exposed public API

The result from "pana" reads now 160/160. Details below.


✓ Follow Dart file conventions (30 / 30)

[*] 10/10 points: Provide a valid pubspec.yaml

[*] 5/5 points: Provide a valid README.md

[*] 5/5 points: Provide a valid CHANGELOG.md

[*] 10/10 points: Use an OSI-approved license

Detected license: MIT.

✓ Provide documentation (20 / 20)

[*] 10/10 points: 20% or more of the public API has dartdoc comments

6 out of 13 API elements (46.2 %) have documentation comments.

Some symbols that are missing documentation: raygun_cli, raygun_cli.buildParserProguard, raygun_cli.kDeploymentsCommand, raygun_cli.kProguardCommand, raygun_cli.kSourcemapCommand.

[*] 10/10 points: Package has an example

✓ Platform support (20 / 20)

[*] 20/20 points: Supports 5 of 6 possible platforms (iOS, Android, Web, Windows, macOS, Linux)

  • ✓ Android

  • ✓ iOS

  • ✓ Windows

  • ✓ Linux

  • ✓ macOS

These platforms are not supported:

Package not compatible with platform Web

Because:

  • package:raygun_cli/raygun_cli.dart that imports:
  • package:raygun_cli/src/symbols/flutter_symbols.dart that imports:
  • package:raygun_cli/src/symbols/flutter_symbols_api.dart that imports:
  • dart:io

[x] 0/0 points: WASM compatibility

Package not compatible with runtime wasm

Because:

  • package:raygun_cli/raygun_cli.dart that imports:
  • package:raygun_cli/src/symbols/flutter_symbols.dart that imports:
  • package:raygun_cli/src/symbols/flutter_symbols_api.dart that imports:
  • dart:io

This package is not compatible with runtime wasm, and will not be rewarded full points in a future version of the scoring model.

See https://dart.dev/web/wasm for details.

✓ Pass static analysis (50 / 50)

[*] 50/50 points: code has no errors, warnings, lints, or formatting issues

✓ Support up-to-date dependencies (40 / 40)

[*] 10/10 points: All of the package dependencies are supported in the latest version

Package Constraint Compatible Latest
args ^2.6.0 2.6.0 2.6.0
http ^1.3.0 1.3.0 1.3.0
Transitive dependencies
Package Constraint Compatible Latest
async - 2.12.0 2.12.0
collection - 1.19.1 1.19.1
http_parser - 4.1.2 4.1.2
meta - 1.16.0 1.16.0
path - 1.9.1 1.9.1
source_span - 1.10.1 1.10.1
string_scanner - 1.4.1 1.4.1
term_glyph - 1.2.2 1.2.2
typed_data - 1.4.0 1.4.0
web - 1.1.0 1.1.0

To reproduce run dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

[*] 10/10 points: Package supports latest stable Dart and Flutter SDKs

[*] 20/20 points: Compatible with dependency constraint lower bounds

pub downgrade does not expose any static analysis error.

Points: 160/160.

@miquelbeltran miquelbeltran marked this pull request as ready for review January 27, 2025 12:47
@TheRealAgentK
Copy link
Contributor Author

Woohoo, game completed :)

@TheRealAgentK TheRealAgentK changed the title feat: [DRAFT] Feature/2 pubdevscore feat: #2 improve pubdev scores Jan 27, 2025
@TheRealAgentK TheRealAgentK merged commit 0f49a33 into main Jan 27, 2025
7 checks passed
@sumitramanga sumitramanga deleted the feature/2-pubdevscore branch May 2, 2025 01:12
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