mirror of
https://github.com/reconurge/flowsint.git
synced 2026-07-24 08:45:39 -05:00
Merge pull request #20 from reconurge/feat/conventional-commits
feat: conventional commits
This commit is contained in:
@@ -3,6 +3,7 @@ __pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
/node_modules/
|
||||
# C extensions
|
||||
*.so
|
||||
*transform_logs
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx --no -- commitlint --edit ${1}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"header": "# Changelog\n\nAll notable changes to Flowsint will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n",
|
||||
"types": [
|
||||
{
|
||||
"type": "feat",
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"type": "fix",
|
||||
"section": "Bug Fixes"
|
||||
},
|
||||
{
|
||||
"type": "perf",
|
||||
"section": "Performance Improvements"
|
||||
},
|
||||
{
|
||||
"type": "refactor",
|
||||
"section": "Code Refactoring",
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "docs",
|
||||
"section": "Documentation",
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "style",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"type": "chore",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"section": "Build System",
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "ci",
|
||||
"hidden": true
|
||||
}
|
||||
],
|
||||
"packageFiles": [
|
||||
{
|
||||
"filename": "flowsint-app/package.json",
|
||||
"type": "json"
|
||||
}
|
||||
],
|
||||
"bumpFiles": [
|
||||
{
|
||||
"filename": "flowsint-app/package.json",
|
||||
"type": "json"
|
||||
},
|
||||
{
|
||||
"filename": "pyproject.toml",
|
||||
"updater": "scripts/pyproject-updater.js"
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"postbump": "node scripts/sync-versions.js $(node -p \"require('./flowsint-app/package.json').version\")"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to Flowsint will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
@@ -0,0 +1,24 @@
|
||||
export default {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
'feat', // New feature
|
||||
'fix', // Bug fix
|
||||
'docs', // Documentation only changes
|
||||
'style', // Code style changes (formatting, etc)
|
||||
'refactor', // Code refactoring
|
||||
'perf', // Performance improvements
|
||||
'test', // Adding or updating tests
|
||||
'build', // Build system or dependencies
|
||||
'ci', // CI/CD changes
|
||||
'chore', // Other changes that don't modify src
|
||||
'revert', // Revert previous commit
|
||||
],
|
||||
],
|
||||
'scope-case': [2, 'always', 'kebab-case'],
|
||||
'subject-case': [0], // Allow any case for subject
|
||||
},
|
||||
};
|
||||
@@ -3,7 +3,7 @@
|
||||
"productName": "Flowsint",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"description": "AI-powered graph analysis and intelligence platform to help you discover hidden relationships and insights.",
|
||||
"description": "Graph analysis and intelligence platform to help you discover hidden relationships and insights.",
|
||||
"author": "DexterMorgan",
|
||||
"homepage": "https://www.flowsint.io/",
|
||||
"scripts": {
|
||||
@@ -126,6 +126,7 @@
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-react": "^7.34.3",
|
||||
"framer-motion": "^12.0.6",
|
||||
"husky": "^9.1.7",
|
||||
"immer": "^10.1.1",
|
||||
"lodash": "^4.17.21",
|
||||
"postcss": "^8.4.35",
|
||||
@@ -133,6 +134,7 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-icons": "^5.4.0",
|
||||
"standard-version": "^9.5.0",
|
||||
"tailwind-merge": "^3.3.0",
|
||||
"typescript": "^5.5.2",
|
||||
"vite": "^5.3.1",
|
||||
|
||||
@@ -9,6 +9,7 @@ import { GraphNode } from '@/types'
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { useLayoutStore } from '@/stores/layout-store'
|
||||
import { useNodesDisplaySettings } from '@/stores/node-display-settings'
|
||||
import type { ItemType } from '@/stores/node-display-settings'
|
||||
import { Badge } from '../ui/badge'
|
||||
import LaunchFlow from './launch-transform'
|
||||
import { TypeBadge } from '../type-badge'
|
||||
@@ -55,7 +56,7 @@ export const SelectedList = () => {
|
||||
return (
|
||||
<div className="flex flex-col gap-1.5 p-1">
|
||||
{displayItems.map((item: GraphNode, index: number) => {
|
||||
const color = colors[item.data.type]
|
||||
const color = colors[item.data.type as ItemType] ?? '#999999'
|
||||
return <SelectedNodeItem key={index} node={item} color={color} />
|
||||
})}
|
||||
{remainingCount > 0 && (
|
||||
|
||||
+1842
-23
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "flowsint",
|
||||
"version": "0.1.0",
|
||||
"description": "Graph analysis and intelligence platform",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prepare": "husky",
|
||||
"commit": "cz",
|
||||
"release": "standard-version",
|
||||
"release:minor": "standard-version --release-as minor",
|
||||
"release:major": "standard-version --release-as major",
|
||||
"release:patch": "standard-version --release-as patch",
|
||||
"release:first": "standard-version --first-release",
|
||||
"sync-version": "node scripts/sync-versions.js"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^9.1.7",
|
||||
"@commitlint/cli": "^20.1.0",
|
||||
"@commitlint/config-conventional": "^20.0.0",
|
||||
"commitizen": "^4.3.1",
|
||||
"cz-conventional-changelog": "^3.3.0"
|
||||
},
|
||||
"workspaces": [
|
||||
"flowsint-app"
|
||||
]
|
||||
}
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Custom updater for pyproject.toml
|
||||
* Used by standard-version to bump version in pyproject.toml
|
||||
*/
|
||||
|
||||
const stringifyPackage = require('stringify-package');
|
||||
const detectIndent = require('detect-indent');
|
||||
const detectNewline = require('detect-newline');
|
||||
|
||||
module.exports.readVersion = function (contents) {
|
||||
const match = contents.match(/^version = "(.*)"$/m);
|
||||
return match ? match[1] : null;
|
||||
};
|
||||
|
||||
module.exports.writeVersion = function (contents, version) {
|
||||
return contents.replace(
|
||||
/^version = ".*"$/m,
|
||||
`version = "${version}"`
|
||||
);
|
||||
};
|
||||
Executable
+74
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Version Synchronization Script
|
||||
*
|
||||
* Keeps versions synchronized across:
|
||||
* - pyproject.toml (root)
|
||||
* - flowsint-app/package.json
|
||||
*
|
||||
* Usage: node scripts/sync-versions.js <new-version>
|
||||
*/
|
||||
|
||||
import { readFileSync, writeFileSync } from 'fs';
|
||||
import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const ROOT_DIR = join(__dirname, '..');
|
||||
|
||||
function updatePyprojectVersion(version) {
|
||||
const pyprojectPath = join(ROOT_DIR, 'pyproject.toml');
|
||||
let content = readFileSync(pyprojectPath, 'utf8');
|
||||
|
||||
// Update version in [tool.poetry] section
|
||||
content = content.replace(
|
||||
/^version = ".*"$/m,
|
||||
`version = "${version}"`
|
||||
);
|
||||
|
||||
writeFileSync(pyprojectPath, content, 'utf8');
|
||||
console.log(`✓ Updated pyproject.toml to ${version}`);
|
||||
}
|
||||
|
||||
function updatePackageJsonVersion(version) {
|
||||
const packagePath = join(ROOT_DIR, 'flowsint-app', 'package.json');
|
||||
const pkg = JSON.parse(readFileSync(packagePath, 'utf8'));
|
||||
|
||||
pkg.version = version;
|
||||
|
||||
writeFileSync(packagePath, JSON.stringify(pkg, null, 2) + '\n', 'utf8');
|
||||
console.log(`✓ Updated flowsint-app/package.json to ${version}`);
|
||||
}
|
||||
|
||||
function getCurrentVersion() {
|
||||
const packagePath = join(ROOT_DIR, 'flowsint-app', 'package.json');
|
||||
const pkg = JSON.parse(readFileSync(packagePath, 'utf8'));
|
||||
return pkg.version;
|
||||
}
|
||||
|
||||
// Main execution
|
||||
const newVersion = process.argv[2];
|
||||
|
||||
if (!newVersion) {
|
||||
console.log(`Current version: ${getCurrentVersion()}`);
|
||||
console.log('\nUsage: node scripts/sync-versions.js <version>');
|
||||
console.log('Example: node scripts/sync-versions.js 1.2.3');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Validate semantic version format
|
||||
if (!/^\d+\.\d+\.\d+(-[\w.]+)?$/.test(newVersion)) {
|
||||
console.error('Error: Invalid version format. Expected: X.Y.Z or X.Y.Z-suffix');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
updatePyprojectVersion(newVersion);
|
||||
updatePackageJsonVersion(newVersion);
|
||||
console.log(`\n✓ All versions synchronized to ${newVersion}`);
|
||||
} catch (error) {
|
||||
console.error('Error syncing versions:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user