Skip to content

Commit

Permalink
upgrade libraries + fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdelaziz GACEMI committed Jun 11, 2024
1 parent ca848ae commit cc3c9d4
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 83 deletions.
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# See https://www.dartlang.org/guides/libraries/private-files

# IDE
.idea/
.vscode/
# Files and directories created by pub
.dart_tool/
.packages
build/


# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
Expand All @@ -16,12 +18,12 @@ output

# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map

.flutter-plugins
.flutter-plugins-dependencies
.flutter-plugins-dependencies
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 0.0.5 (2024-06-11)

### Features

- Upgrade libraries
- Fix typos

## 0.0.4 (2023-09-20)

### Features
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
A Dart script to score libraries referenced in a given pubspec.lock. it generates an html file with some information about the lib. The rating is highlighted by colors (green, orange, red, black). Scoring is based on the following scale:
A Dart script to score libraries referenced in a given pubspec.lock. it generates an html file with some information
about the lib. The rating is highlighted by colors (green, orange, red, black). Scoring is based on the following scale:

| Scoring | high (green) | moderate (orange) | low (red) | minimal (dark red) |
| ----------------------------- | :----------: | :---------------: | :-------: | :----------------: |
|-------------------------------|:------------:|:-----------------:|:---------:|:------------------:|
| Number of Contributors | >=5 | <5 | <2 | 0 |
| Number of Active contributors | >=5 | <5 | <2 | 0 |
| Number of Major version Ahead | 0 | 1 | 2 | >=3 |
Expand All @@ -13,11 +14,9 @@ A Dart script to score libraries referenced in a given pubspec.lock. it generate
| Popularity | >=90% | <90% | <70% | - |
| Number of Pub points | >=120 | <120 | <90 | - |


This is an example of what looks like the generated html.


![score_pubspec screeshot](screenshot/score_pubspec.png)
![score_pubspec screenshot](screenshot/score_pubspec.png)

## Quick Start 🚀

Expand All @@ -29,17 +28,17 @@ dart pub global activate score_pubspec

### Commands ✨

The command requires to define env variable GITHUB_TOKEN thats represents token to make request on gitlab api.
### `score_pubspec`
The command requires to define env variable GITHUB_TOKEN thats represents token to make request on gitlab api.

### `score_pubspec`

#### Usage

```sh
# score pubspec.lock in the current directory
score_pubspec

# score the given file with path argment
# score the given file with path argument
score_pubspec --path 'path-to-pubspec.lock'


Expand Down
6 changes: 3 additions & 3 deletions lib/score_pubspec.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import 'dart:io';

import 'package:github/github.dart';
import 'package:pub_api_client/pub_api_client.dart';
import 'package:pub_api_client/pub_api_client.dart' as pub_api;
import 'package:pubspec_lock_parse/pubspec_lock_parse.dart';

import 'model.dart';

class PubspecAnalyzer {
final PubClient pubClient;
final pub_api.PubClient pubClient;
final GitHub githubClient;

PubspecAnalyzer({
Expand Down Expand Up @@ -44,7 +44,7 @@ class PubspecAnalyzer {
int? contributorsNumber;
int? activeContributorsNumber;
final String url;
final PackageScore? packageScore;
final pub_api.PackageScore? packageScore;
final String? latestVersion;
final int? numberOfVersionsAhead;
final int? numberOfMajorVersionsAhead;
Expand Down
Loading

0 comments on commit cc3c9d4

Please sign in to comment.