@devilsdev/rag-pipeline-utils 2.1.3 โ†’ 2.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.
@@ -0,0 +1,90 @@
1
+ # โœ… Manual Test Checklist for RAG Pipeline Utils
2
+
3
+ This document outlines manual test points for validating roadmap automation, documentation builds, CI/CD, blog sync, and changelog generation.
4
+
5
+ ---
6
+
7
+ ## 1. ๐Ÿ”„ Roadmap Sync + Label Automation
8
+
9
+ | โœ… Task | Command or Trigger | Notes |
10
+ |--------|--------------------|-------|
11
+ | Sync `PROJECT_ROADMAP.md` to GitHub Issues | `git push` or `workflow_dispatch` for `sync-roadmap.yml` | Issues, assignees, labels should match |
12
+ | Auto-create missing roadmap labels | `sync-roadmap.yml` step: `ensure-roadmap-labels.js` | Should not error even if labels exist |
13
+ | Label updates reflect correct color & description | Rerun roadmap sync | Existing labels should be updated |
14
+ | Roadmap issue closed on โœ… Done status | Modify `PROJECT_ROADMAP.md` status and sync | Corresponding issue should be auto-closed |
15
+
16
+ ---
17
+
18
+ ## 2. ๐Ÿงญ CLI + Manual Utilities
19
+
20
+ | โœ… Task | Command | Notes |
21
+ |--------|---------|-------|
22
+ | Create roadmap issues manually | `node scripts/create-roadmap-issues.js` | Creates GitHub Issues |
23
+ | Ensure labels via CLI | `node scripts/ensure-roadmap-labels.js` | Must succeed with idempotency |
24
+ | Generate changelog and preview | `npm run release:tag` | Prompt for tag + generate CHANGELOG |
25
+ | Preview auto-generated blog post | Preview `.md` file in `/docs-site/blog` before push |
26
+
27
+ ---
28
+
29
+ ## 3. ๐Ÿ“š Docs + Deployment
30
+
31
+ | โœ… Task | Command | Notes |
32
+ |--------|---------|-------|
33
+ | Build Docusaurus | `npm run docs:build` | No broken links, light/dark theme OK |
34
+ | Deploy to GitHub Pages | `npm run docs:deploy` | Check rendered site at `/rag-pipeline-utils` |
35
+ | Verify CHANGELOG link works | Test `/blog` page post link to `CHANGELOG.md` |
36
+
37
+ ---
38
+
39
+ ## 4. ๐Ÿงช CI/CD Validation
40
+
41
+ | โœ… Task | Check | Notes |
42
+ |--------|-------|-------|
43
+ | CI Lint + Test runs | โœ… `ci.yml` | Lint passes, all Jest tests green |
44
+ | Docs CI runs correctly | โœ… `docs-ci.yml` | No script missing error, build valid |
45
+ | Docs auto-deploys on push | โœ… `docs-deploy.yml` | Publishes to GitHub Pages |
46
+
47
+ ---
48
+
49
+ ## 5. ๐Ÿท GitHub Releases
50
+
51
+ | โœ… Task | Trigger | Notes |
52
+ |--------|---------|-------|
53
+ | Generate blog post on release | Publish GitHub tag | `publish-release-blog.yml` should commit new `.md` |
54
+ | Auto-fill blog content | From `CHANGELOG.md` and compare link | Author + commit stats populated |
55
+
56
+ ---
57
+
58
+ ## 6. ๐Ÿ›ก Release Gatekeeping & Metadata
59
+
60
+ | โœ… Task | Outcome | Notes |
61
+ |--------|---------|-------|
62
+ | Badge renders in README | `![Release Review Passed]` | Should point to last workflow run |
63
+ | Protected branch config for PRs | Status check on `release:review` | Prevents push without passing review |
64
+
65
+ ---
66
+
67
+ ## 7. ๐Ÿงพ Filesystem and Cleanup
68
+
69
+ | โœ… Task | Notes |
70
+ |--------|-------|
71
+ | `src/stories/` removed | No Storybook assets in GH Pages |
72
+ | `postcss.config.cjs` & `tailwind.config.js` removed | Confirm no broken styling or build errors |
73
+
74
+ ---
75
+
76
+ ## ๐Ÿ” Optional Manual Commands
77
+
78
+ ```bash
79
+ # Sync roadmap manually
80
+ node scripts/create-roadmap-issues.js
81
+
82
+ # Ensure roadmap labels
83
+ node scripts/ensure-roadmap-labels.js
84
+
85
+ # Trigger changelog + blog post flow
86
+ npm run release:tag
87
+
88
+ # Build and deploy docs
89
+ npm run docs:build && npm run docs:deploy
90
+ ```
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Version: 1.1.0
3
+ * Description: Syncs GitHub labels based on roadmap-labels.yml; updates existing, creates missing.
4
+ * Author: Ali Kahwaji
5
+ */
6
+
7
+ import fs from 'fs';
8
+ import path from 'path';
9
+ import yaml from 'js-yaml';
10
+ import { Octokit } from '@octokit/rest';
11
+
12
+ const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
13
+ const REPO = process.env.GITHUB_REPOSITORY;
14
+
15
+ if (!GITHUB_TOKEN || !REPO) {
16
+ console.error('โŒ GITHUB_TOKEN or GITHUB_REPOSITORY not defined in environment.');
17
+ process.exit(1);
18
+ }
19
+
20
+ const [owner, repo] = REPO.split('/');
21
+ const octokit = new Octokit({ auth: GITHUB_TOKEN });
22
+
23
+ const LABELS_FILE = path.join('.github', 'roadmap-labels.yml');
24
+
25
+ function loadLabelsFromYAML(filePath) {
26
+ try {
27
+ const file = fs.readFileSync(filePath, 'utf8');
28
+ return yaml.load(file);
29
+ } catch (err) {
30
+ console.error('โŒ Failed to load roadmap-labels.yml:', err);
31
+ process.exit(1);
32
+ }
33
+ }
34
+
35
+ async function syncLabels() {
36
+ const labels = loadLabelsFromYAML(LABELS_FILE);
37
+ const existingLabels = await octokit.paginate(octokit.rest.issues.listLabelsForRepo, {
38
+ owner,
39
+ repo,
40
+ });
41
+
42
+ for (const label of labels) {
43
+ const existing = existingLabels.find(l => l.name === label.name);
44
+
45
+ try {
46
+ if (existing) {
47
+ console.log(`๐Ÿ” Updating label: ${label.name}`);
48
+ await octokit.rest.issues.updateLabel({
49
+ owner,
50
+ repo,
51
+ name: label.name,
52
+ color: label.color,
53
+ description: label.description,
54
+ });
55
+ } else {
56
+ console.log(`โž• Creating label: ${label.name}`);
57
+ await octokit.rest.issues.createLabel({
58
+ owner,
59
+ repo,
60
+ name: label.name,
61
+ color: label.color,
62
+ description: label.description,
63
+ });
64
+ }
65
+ } catch (err) {
66
+ console.error(`โŒ Failed to process label: ${label.name}`, err.message);
67
+ }
68
+ }
69
+ }
70
+
71
+ syncLabels();
@@ -0,0 +1,21 @@
1
+ // scripts/sync-roadmap-labels.js
2
+
3
+ /**
4
+ * Version: 1.1.0
5
+ * Description: Sync roadmap labels and issues
6
+ * Author: Ali Kahwaji
7
+ */
8
+
9
+ import { ensureRoadmapLabels } from './ensure-roadmap-labels.js';
10
+ import { createRoadmapIssues } from './create-roadmap-issues.js';
11
+
12
+ const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
13
+ const token = process.env.GITHUB_TOKEN;
14
+
15
+ if (!token) {
16
+ console.error('โŒ Missing GITHUB_TOKEN');
17
+ process.exit(1);
18
+ }
19
+
20
+ await ensureRoadmapLabels({ token, owner, repo });
21
+ await createRoadmapIssues({ token, owner, repo });
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Version: 2.0.0
3
+ * Description: Tags release, updates changelog, optionally opens blog preview
4
+ * Author: Ali Kahwaji
5
+ */
6
+
7
+ import fs from 'fs';
8
+ import path from 'path';
9
+ import { execSync } from 'child_process';
10
+ import readline from 'readline';
11
+
12
+ const VERSION = process.argv[2];
13
+ const PREVIEW = process.argv.includes('--preview');
14
+
15
+ if (!VERSION) {
16
+ console.error('โŒ Usage: node release-tag.js <version> [--preview]');
17
+ process.exit(1);
18
+ }
19
+
20
+ const tag = `v${VERSION}`;
21
+ const blogPath = path.join('docs-site', 'blog');
22
+
23
+ // Step 1: Run changelog injection
24
+ execSync(`node scripts/generate-release-note.js ${VERSION}`, { stdio: 'inherit' });
25
+
26
+ // Step 2: Find generated blog file
27
+ const date = new Date().toISOString().split('T')[0];
28
+ const file = path.join(blogPath, `${date}-release-${tag}.md`);
29
+
30
+ if (!fs.existsSync(file)) {
31
+ console.error(`โŒ Blog post not generated: ${file}`);
32
+ process.exit(1);
33
+ }
34
+
35
+ // Step 3: Preview if enabled
36
+ if (PREVIEW) {
37
+ const editor = process.env.EDITOR || 'code'; // fallback to VS Code
38
+ try {
39
+ execSync(`${editor} ${file}`, { stdio: 'inherit' });
40
+ } catch (err) {
41
+ console.warn('โš ๏ธ Failed to open in editor. Please review manually:', file);
42
+ }
43
+
44
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
45
+ rl.question(`โœ… Ready to commit and push ${tag}? (y/n): `, (answer) => {
46
+ rl.close();
47
+ if (answer.toLowerCase() !== 'y') {
48
+ console.log('โŒ Aborted. No tag pushed.');
49
+ process.exit(0);
50
+ }
51
+ finalizeRelease();
52
+ });
53
+ } else {
54
+ finalizeRelease();
55
+ }
56
+
57
+ // Final tagging + push
58
+ function finalizeRelease() {
59
+ execSync(`git add CHANGELOG.md ${file}`);
60
+ execSync(`git commit -m "release: v${VERSION}"`);
61
+ execSync(`git tag ${tag}`);
62
+ execSync('git push && git push --tags');
63
+ console.log(`๐ŸŽ‰ Release ${tag} published and blog post staged!`);
64
+ }