flaglint 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +25 -1
- package/dist/bin/flaglint.js +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.5] - 2026-05-21
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Corrected the README CI badge URL.
|
|
13
|
+
|
|
8
14
|
## [0.1.0] - 2026-05-18
|
|
9
15
|
|
|
10
16
|
### Added
|
package/README.md
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/logo.png" alt="FlagLint" width="400" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Find stale feature flags. Detect flag debt. Plan your OpenFeature migration.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/flaglint/flaglint/actions/workflows/ci.yml">
|
|
11
|
+
<img src="https://github.com/flaglint/flaglint/actions/workflows/ci.yml/badge.svg" alt="CI" />
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/flaglint">
|
|
14
|
+
<img src="https://img.shields.io/npm/v/flaglint.svg" alt="npm version" />
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/flaglint">
|
|
17
|
+
<img src="https://img.shields.io/npm/dm/flaglint.svg" alt="downloads" />
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://opensource.org/licenses/MIT">
|
|
20
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License" />
|
|
21
|
+
</a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
|
|
1
25
|
# FlagLint
|
|
2
26
|
|
|
3
27
|
**Find stale feature flags. Detect flag debt. Plan your OpenFeature migration.**
|
|
4
28
|
|
|
5
|
-
[](https://github.com/flaglint/flaglint/actions/workflows/ci.yml)
|
|
6
30
|
[](https://www.npmjs.com/package/flaglint)
|
|
7
31
|
[](https://opensource.org/licenses/MIT)
|
|
8
32
|
|
package/dist/bin/flaglint.js
CHANGED
|
@@ -322,7 +322,7 @@ function formatJSON(result) {
|
|
|
322
322
|
}
|
|
323
323
|
function formatHTML(result, options) {
|
|
324
324
|
const { scannedFiles, totalUsages, uniqueFlags, usages, scanDurationMs } = result;
|
|
325
|
-
const staleCount = usages.filter((u) => u.isStale).
|
|
325
|
+
const staleCount = new Set(usages.filter((u) => u.isStale).map((u) => u.flagKey)).size;
|
|
326
326
|
const dynamicCount = usages.filter((u) => u.isDynamic).length;
|
|
327
327
|
const date = (/* @__PURE__ */ new Date()).toLocaleString();
|
|
328
328
|
const flagMap = buildFlagMap(usages);
|
|
@@ -334,7 +334,7 @@ function formatHTML(result, options) {
|
|
|
334
334
|
return `<tr class="${cls}"><td><code>${esc(key)}</code></td><td>${data.usages.length}</td><td>${fileList}</td><td>${[...data.callTypes].map(esc).join(", ")}</td><td>${status}</td></tr>`;
|
|
335
335
|
}).join("\n ");
|
|
336
336
|
const title = options.title ? esc(options.title) : "FlagLint Scan Report";
|
|
337
|
-
const version = true ? "0.1.
|
|
337
|
+
const version = true ? "0.1.5" : "0.1.0";
|
|
338
338
|
return `<!DOCTYPE html>
|
|
339
339
|
<html lang="en">
|
|
340
340
|
<head>
|
|
@@ -744,7 +744,7 @@ function analyze(result) {
|
|
|
744
744
|
function formatMigrationReport(analysis) {
|
|
745
745
|
const { readinessScore, requiredPackages, items, manualReviewCount, autoMigrateCount } = analysis;
|
|
746
746
|
const date = (/* @__PURE__ */ new Date()).toLocaleDateString();
|
|
747
|
-
const version = true ? "0.1.
|
|
747
|
+
const version = true ? "0.1.5" : "0.1.0";
|
|
748
748
|
let scoreLabel;
|
|
749
749
|
if (readinessScore >= 80) scoreLabel = "\u2713 Your codebase is ready for migration";
|
|
750
750
|
else if (readinessScore >= 50) scoreLabel = "\u26A0 Some manual work required before migration";
|
|
@@ -942,7 +942,7 @@ Examples:
|
|
|
942
942
|
// src/cli.ts
|
|
943
943
|
function createCLI() {
|
|
944
944
|
const program2 = new Command();
|
|
945
|
-
program2.name("flaglint").description("Find stale feature flags. Detect flag debt. Plan your OpenFeature migration.").version("0.1.
|
|
945
|
+
program2.name("flaglint").description("Find stale feature flags. Detect flag debt. Plan your OpenFeature migration.").version("0.1.5", "-v, --version", "output the current version").addHelpText(
|
|
946
946
|
"after",
|
|
947
947
|
`
|
|
948
948
|
Examples:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flaglint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Find stale feature flags. Detect flag debt. Plan your OpenFeature migration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/flaglint/
|
|
30
|
+
"url": "https://github.com/flaglint/flaglint.git"
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://flaglint.dev",
|
|
33
33
|
"bugs": {
|
|
34
|
-
"url": "https://github.com/flaglint/
|
|
34
|
+
"url": "https://github.com/flaglint/flaglint/issues"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsup",
|