Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/deploy.yml

This file was deleted.

140 changes: 126 additions & 14 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
// Single source of truth for the displayed version: read from package.json at
// build time so the site can never drift from the published npm version.
import pkg from "../../package.json";

const version = pkg.version;
let version = "1.0.0";
try {
const res = await fetch("https://registry.npmjs.org/flaglint/latest");
const data = await res.json();
version = data.version ?? "1.0.0";
Comment on lines +2 to +6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the fetched version everywhere it’s displayed.

You now source version dynamically, but the hero terminal still hardcodes flaglint v1.0.0 on Line 981. As soon as npm publishes a newer release, the page will show two different versions at once.

Also applies to: 1020-1022

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/index.astro` around lines 2 - 6, The page now fetches a dynamic
version in the `version` variable, but other displayed copy still hardcodes
`v1.0.0`. Update the hero terminal and any other version text in
`src/pages/index.astro` to use the fetched `version` value consistently
everywhere it is rendered, so the page shows one source of truth instead of
mixed versions.

} catch {
// fallback to hardcoded
}
Comment on lines +2 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a timeout to the npm registry lookup.

The try/catch only handles failures that eventually reject. If the registry stalls, the build can sit on Line 4 indefinitely even though you already have a fallback version. Bound this fetch so deploys don’t depend on npm responsiveness.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/index.astro` around lines 2 - 9, The npm registry lookup in the
index page version fetch can hang indefinitely because the current try/catch
only handles rejected requests. Update the fetch logic around the version
initialization in the Astro page to use a bounded request with a timeout so the
fallback version is reached if the registry is slow or stalls. Use the existing
fetch/version retrieval block as the place to add the timeout handling and keep
the hardcoded fallback path intact.


const jsonLd = {
"@context": "https://schema.org",
"@type": "SoftwareApplication",
name: "FlagLint",
description:
"Free, open-source CLI that finds every direct LaunchDarkly Node.js SDK call, ranks them by migration risk, and generates safe OpenFeature rewrites.",
"Free, open-source CLI that finds every direct LaunchDarkly SDK call, ranks them by migration risk, and generates safe OpenFeature rewrites.",
Comment on lines 15 to +16

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Refresh the HTML/OG descriptions to match the new hub messaging.

The JSON-LD and hero now position FlagLint as a multi-language platform, but the HTML description and og:description on Lines 34-36 still describe a Node.js-only CLI. Search/snippet previews will keep advertising the old positioning.

Also applies to: 947-951

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/index.astro` around lines 15 - 16, The page metadata is still using
the old Node.js-only CLI wording, so update the description fields in the index
page metadata and OG tags to match the new FlagLint hub messaging. Fix the
relevant values in the index page’s frontmatter/metadata and the
`og:description` entry so search snippets and social previews reflect the
multi-language platform positioning used by the JSON-LD and hero content.

url: "https://flaglint.dev",
downloadUrl: "https://www.npmjs.com/package/flaglint",
softwareVersion: version,
Expand All @@ -19,7 +22,7 @@ const jsonLd = {
offers: { "@type": "Offer", price: "0", priceCurrency: "USD" },
author: { "@type": "Person", name: "Krishan Sharma", url: "https://github.com/flaglint" },
license: "https://opensource.org/licenses/MIT",
codeRepository: "https://github.com/flaglint/flaglint",
codeRepository: "https://github.com/flaglint/flaglint-js",
};
---
<!DOCTYPE html>
Expand Down Expand Up @@ -804,13 +807,82 @@ const jsonLd = {
}
.footer-links a:hover { color: var(--text); }

/* ── Section: Language SDKs ─────────────────────────────────────── */
.section-sdks {
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
background: var(--surface);
}
[data-theme="light"] .section-sdks { background: #f4f8f6; }
.sdk-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24px;
margin-top: 40px;
}
.sdk-card {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 12px;
padding: 28px;
}
[data-theme="light"] .sdk-card { background: var(--surface); }
.sdk-card-soon { opacity: 0.65; }
.sdk-card-header { margin-bottom: 14px; }
.sdk-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 800;
letter-spacing: 0.05em;
}
.sdk-badge-stable {
background: rgba(0,217,126,0.15);
color: var(--accent);
border: 1px solid rgba(0,217,126,0.3);
}
[data-theme="light"] .sdk-badge-stable {
background: #d4f5e6;
color: #005c33;
border-color: #9de5c3;
}
.sdk-badge-soon {
background: var(--surface-raised);
color: var(--subtle);
border: 1px solid var(--border);
}
.sdk-title {
font-size: 20px;
font-weight: 700;
letter-spacing: -0.01em;
margin-bottom: 10px;
}
.sdk-desc {
color: var(--muted);
font-size: 14px;
line-height: 1.6;
margin-bottom: 16px;
}
.cmd-muted { color: var(--subtle) !important; }
.sdk-links {
display: flex;
gap: 20px;
margin-top: 16px;
font-size: 13px;
font-weight: 700;
}
.sdk-links a { color: var(--accent); }
.sdk-card-soon .sdk-links a { color: var(--subtle); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 980px) {
.hero-grid { grid-template-columns: 1fr; gap: 40px; }
.diff-grid { grid-template-columns: 1fr; }
.diff-arrow-col { display: none; }
.workflow-strip { grid-template-columns: 1fr; }
.proof-trust-grid { grid-template-columns: 1fr; }
.sdk-grid { grid-template-columns: 1fr; }
.wf-divider { display: none; }
.wf-step { border-bottom: 1px solid var(--border); }
.wf-step:last-of-type { border-bottom: none; }
Expand Down Expand Up @@ -857,7 +929,7 @@ const jsonLd = {
</button>
<button class="theme-btn" data-theme-value="auto" title="Auto (system)" aria-label="Auto theme">Auto</button>
</div>
<a class="github-btn" href="https://github.com/flaglint/flaglint" target="_blank" rel="noopener noreferrer">GitHub</a>
<a class="github-btn" href="https://github.com/flaglint/flaglint-js" target="_blank" rel="noopener noreferrer">GitHub</a>
</div>
</div>
</nav>
Expand All @@ -872,11 +944,11 @@ const jsonLd = {

<!-- Left: copy -->
<div>
<div class="section-kicker">LaunchDarkly Node.js SDK → OpenFeature</div>
<div class="section-kicker">JavaScript · Go (coming soon)</div>
<h1>Feature flags accumulate debt.<br>FlagLint makes it visible.</h1>
<p class="hero-body">
<span>Makes LaunchDarkly usage visible, measurable, and safer to</span>
<span>migrate to OpenFeature. Free CLI. No API key. Runs locally.</span>
<span>Find every direct LaunchDarkly SDK call, rank by migration risk,</span>
<span>and generate safe OpenFeature rewrites. Free, open-source. No API key. Runs locally.</span>
</p>
<p class="hero-differentiator">FlagLint knows when not to rewrite.</p>
<div class="hero-cta-row">
Expand Down Expand Up @@ -934,6 +1006,46 @@ const jsonLd = {
</div>
</section>

<!-- ════════════════════════════════════════════════════════════════
SECTION 1b — LANGUAGE SDKS
═════════════════════════════════════════════════════════════════ -->
<section class="section-sdks">
<div class="section-inner">
<div class="section-kicker">Language SDKs</div>
<h2 class="section-heading">Available for your stack</h2>
<div class="sdk-grid">

<!-- JS / TypeScript -->
<div class="sdk-card">
<div class="sdk-card-header">
<span class="sdk-badge sdk-badge-stable">Stable · v{version}</span>
</div>
<h3 class="sdk-title">JavaScript / TypeScript</h3>
<p class="sdk-desc">LaunchDarkly Node.js server SDK → OpenFeature. Audits, migrates, and enforces the boundary in CI.</p>
<code class="cmd">npm install -g flaglint</code>
<div class="sdk-links">
<a href="/docs/">Docs →</a>
<a href="https://github.com/flaglint/flaglint-js" target="_blank" rel="noopener noreferrer">GitHub →</a>
</div>
</div>

<!-- Go -->
<div class="sdk-card sdk-card-soon">
<div class="sdk-card-header">
<span class="sdk-badge sdk-badge-soon">Coming soon</span>
</div>
<h3 class="sdk-title">Go</h3>
<p class="sdk-desc">Flag debt analysis for LaunchDarkly Go SDK usage. OpenFeature migration planning.</p>
<code class="cmd cmd-muted">go install github.com/flaglint/flaglint-go@latest</code>
<div class="sdk-links">
<a href="https://github.com/flaglint/flaglint-go" target="_blank" rel="noopener noreferrer">GitHub →</a>
</div>
</div>

</div>
</div>
</section>

<!-- ════════════════════════════════════════════════════════════════
SECTION 2 — THE PROOF (argument-order problem)
═════════════════════════════════════════════════════════════════ -->
Expand Down Expand Up @@ -1169,7 +1281,7 @@ const enabled = await <span class="arch-hi-green">client.getBooleanValue</span>(
<span>·</span>
<a href="/docs/reference/supported-scope">Supported scope</a>
<span>·</span>
<a href="https://github.com/flaglint/flaglint" target="_blank" rel="noopener noreferrer">GitHub</a>
<a href="https://github.com/flaglint/flaglint-js" target="_blank" rel="noopener noreferrer">GitHub</a>
</div>
</div>
</section>
Expand All @@ -1183,12 +1295,12 @@ const enabled = await <span class="arch-hi-green">client.getBooleanValue</span>(
<div class="footer-links">
<a href="/docs/quickstart">Docs</a>
<a href="/blog/">Blog</a>
<a href="https://github.com/flaglint/flaglint" target="_blank" rel="noopener noreferrer">GitHub</a>
<a href="https://github.com/flaglint/flaglint-js" target="_blank" rel="noopener noreferrer">GitHub</a>
<a href="https://www.npmjs.com/package/flaglint" target="_blank" rel="noopener noreferrer">npm</a>
<a href="/trust">Trust</a>
<a href="/docs/reference/security">Security</a>
<a href="/privacy">Privacy</a>
<a href="https://github.com/flaglint/flaglint/issues" target="_blank" rel="noopener noreferrer">Issues</a>
<a href="https://github.com/flaglint/flaglint-js/issues" target="_blank" rel="noopener noreferrer">Issues</a>
</div>
</div>
</footer>
Expand Down
Loading