Skip to content

Commit cef20d4

Browse files
DevRohit06claude
andcommitted
feat: release v1.0.0 — stable release with GitHub Packages and package fixes
- Bump version to 1.0.0 (production-ready, out of beta) - Add GitHub Packages publishing alongside npm (dual registry) - Add `files` field to package.json (31 MB → 39 KB package size) - Remove dead `main` entry pointing to non-existent src/index.js - Read CLI version dynamically from package.json (no more hardcoded drift) - Fix update checker stuck at v0.5.2 - Update changelog with comprehensive 1.0.0 entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e440785 commit cef20d4

5 files changed

Lines changed: 72 additions & 11 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
name: Publish to npm
1+
name: Publish Package
22

33
on:
44
release:
55
types: [created]
6-
push:
7-
branches:
8-
- main
96
workflow_dispatch:
107

118
jobs:
@@ -17,7 +14,6 @@ jobs:
1714
with:
1815
node-version: 20
1916
- run: npm ci
20-
# - run: npm test # No tests specified yet
2117

2218
publish-npm:
2319
needs: build
@@ -31,4 +27,29 @@ jobs:
3127
- run: npm ci
3228
- run: npm publish
3329
env:
34-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31+
32+
publish-gpr:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: read
37+
packages: write
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version: 20
43+
registry-url: https://npm.pkg.github.com/
44+
- run: npm ci
45+
- name: Patch scope for GitHub Packages
46+
run: node -e "
47+
const fs = require('fs');
48+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
49+
pkg.name = '@lito-docs/cli';
50+
pkg.publishConfig = { registry: 'https://npm.pkg.github.com' };
51+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
52+
"
53+
- run: npm publish
54+
env:
55+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.0] - 2026-02-10
9+
10+
First stable release. Lito is production-ready for generating documentation sites from Markdown.
11+
12+
### Added
13+
14+
- **GitHub Packages Publishing**: Dual publishing to npm (`@litodocs/cli`) and GitHub Packages (`@lito-docs/cli`)
15+
- **Privacy & Terms Pages**: Added default privacy policy and terms of service pages to sample docs
16+
- **MIT License for Template**: Added LICENSE file to the Astro template
17+
18+
### Changed
19+
20+
- **Stable Release**: Promoted from beta (v0.x) to v1.0.0
21+
- **Decluttered Navbar**: Moved version switcher and language switcher from the header to the sidebar top; moved Twitter/Discord social links to the sidebar bottom. Header now contains only: search, GitHub, theme toggle, and CTA
22+
- **Mobile Navigation**: Version and language switchers accessible in mobile drawer
23+
- **Dynamic Version Reading**: CLI version and update checker now read from `package.json` at runtime — no more hardcoded version strings getting out of sync
24+
- **Multi-Instance Components**: Version switcher and language switcher refactored to support multiple instances (sidebar + mobile nav) using data attributes instead of IDs
25+
26+
### Fixed
27+
28+
- **Version Mismatch**: CLI reported `0.5.2` in update checker and `0.6.0` in commander while `package.json` was at `0.7.0` — all now read from single source of truth
29+
- **Package Size**: Added `files` field to `package.json` — npm package reduced from 31 MB (743 files) to 39 KB (31 files)
30+
- **Dead Entry Point**: Removed invalid `main` field pointing to non-existent `src/index.js`
31+
- **Sidebar Scroll**: Fixed scroll position save/restore after sidebar layout changed to flex column
32+
833
## [0.7.0] - 2026-01-28
934

1035
### Added

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{
22
"name": "@litodocs/cli",
3-
"version": "0.7.0",
3+
"version": "1.0.0",
44
"description": "Beautiful documentation sites from Markdown. Fast, simple, and open-source.",
5-
"main": "src/index.js",
65
"type": "module",
76
"bin": {
87
"lito": "./bin/cli.js"
98
},
9+
"files": [
10+
"bin/",
11+
"src/",
12+
"README.md",
13+
"LICENSE"
14+
],
1015
"scripts": {
1116
"test": "echo \"Error: no test specified\" && exit 1"
1217
},

src/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
templateListCommand,
1313
templateCacheCommand,
1414
} from "./commands/template.js";
15-
import { checkForUpdates, upgradeCommand } from "./core/update-check.js";
15+
import { checkForUpdates, upgradeCommand, getCurrentVersion } from "./core/update-check.js";
1616

1717
export async function cli() {
1818
const program = new Command();
@@ -25,7 +25,7 @@ export async function cli() {
2525
.description(
2626
"Beautiful documentation sites from Markdown. Fast, simple, and open-source."
2727
)
28-
.version("0.6.0");
28+
.version(getCurrentVersion());
2929

3030
program
3131
.command("build")

src/core/update-check.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { exec } from 'child_process';
22
import { promisify } from 'util';
3+
import { readFileSync } from 'fs';
4+
import { fileURLToPath } from 'url';
5+
import { dirname, join } from 'path';
36
import pc from 'picocolors';
47
import { confirm } from '@clack/prompts';
58

@@ -11,7 +14,14 @@ const PACKAGE_NAME = '@litodocs/cli';
1114
* Get the current installed version from package.json
1215
*/
1316
export function getCurrentVersion() {
14-
return '0.5.2';
17+
try {
18+
const __dirname = dirname(fileURLToPath(import.meta.url));
19+
const pkgPath = join(__dirname, '..', '..', 'package.json');
20+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
21+
return pkg.version;
22+
} catch {
23+
return '1.0.0';
24+
}
1525
}
1626

1727
/**

0 commit comments

Comments
 (0)