diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a5635..29e9a88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 @@ -43,6 +45,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Set up Python uses: actions/setup-python@v6 @@ -61,4 +65,3 @@ jobs: - name: Run schemaforge check on fixtures run: | schemaforge check --dir /tmp --canonical sql || true - diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index ffc3b66..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Publish to npm - -on: - release: - types: [published] - workflow_dispatch: - -jobs: - publish: - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v6 - - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: "22" - registry-url: "https://registry.npmjs.org" - - - name: Publish to npm - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - npm publish --access public - diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d2d8ccb..4259af1 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -18,7 +18,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Setup Pages uses: actions/configure-pages@v5 - name: Build with Jekyll diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bfd3f3d..2bf6ad6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,6 +13,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Set up Python uses: actions/setup-python@v6 @@ -37,4 +39,3 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | twine upload dist/* - diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df2342..72cd4dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,140 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.1.0] - 2025-05-17 +## [1.7.0] - 2026-05-15 + +### Added +- VS Code extension with live preview, diff, and quick convert +- Right-click conversion from file explorer +- Custom editor for `.schemaforge` files +- Auto-refresh preview on file save + +## [1.6.0] - 2026-05-15 + +### Added +- Scala case class support (Doobie/Quill/Slick) as 11th format + +## [1.5.0] - 2026-05-15 + +### Added +- Entity Framework Core (C#) support as 10th format +- Data annotations generation for EF Core entities + +## [1.4.0] - 2026-05-15 + +### Added +- MCP (Model Context Protocol) server for AI agent integration +- `schemaforge mcp` command (stdio and SSE modes) +- `schemaforge check` command — schema consistency across directories +- `schemaforge formats` command — list supported formats +- `schemaforge detect_format` command — identify format from filename +- CI/CD workflow for automated testing and publishing + +### Changed +- Consolidated test workflow configuration + +## [1.3.0] - 2026-05-15 + +### Added +- GraphQL SDL format support as 9th schema format +- Bidirectional conversion between GraphQL and all other formats +- Enum, directive, and custom scalar support in GraphQL + +## [1.2.0] - 2026-05-15 + +### Added +- JSON Schema support (draft 2020-12) as 8th format +- JSON Schema import/export with type mapping +- URI-friendly enum value generation + +## [1.1.0] - 2026-05-15 + +### Added +- Custom type mapping configuration via YAML/JSON override files +- Template variables in type overrides: `{length}`, `{precision}`, `{scale}`, `{values}` +- `--type-map` CLI option for all convert commands + +## [1.0.0] - 2026-05-15 + +### Added +- Stable release with comprehensive docs and CLI polish +- Licensing gating via `revenueholdings-license` +- Star badge and call-to-action in README + +### Fixed +- Version bump from 1.0.0 to 1.7.0 alignment (internal consistency) + +## [0.9.0] - 2026-05-15 + +### Changed +- Shared generator base module (`_base.py`) for reduced code duplication +- Refactored `fn:` default handling for cross-format function defaults + +## [0.8.0] - 2026-05-15 + +### Added +- Alembic migration generation as 7th format (generator-only) +- `--output` support for migration script generation +- Alembic `op.create_table`, `op.add_column`, `op.create_index` output + +## [0.7.0] - 2026-05-15 + +### Added +- MySQL table options: `ENGINE=InnoDB`, `AUTO_INCREMENT`, `DEFAULT CHARSET`, `COMMENT` +- Inline ENUM column type: `ENUM('small', 'medium', 'large')` parsing and roundtripping + +## [0.6.0] - 2026-05-15 + +### Added +- SQL parser edge cases: `TEMPORARY TABLE`, backtick quoting, quoted identifiers +- `fn:` default prefix preservation across roundtrips + +### Fixed +- Roundtrip fidelity for function-based default values + +## [0.5.0] - 2026-05-15 + +### Added +- SQLAlchemy declarative model support as 5th format +- `schemaforge diff` command for line-level schema comparison +- Batch directory mode (`schemaforge check --dir`) +- Demo fixtures with blog schema in all formats +- 17 new roundtrip and edge-case tests + +### Fixed +- PRAGMA KEY implies NOT NULL in SQL parser +- Generator index handling for SQLAlchemy + +## [0.4.0] - 2026-05-15 + +### Added +- Django models support as 4th format +- TypeORM entities support as 3rd format +- Parser/generator registration system in convert registry + +### Fixed +- `convert_schema` and `register_format` functions restored after merge conflict + +## [0.3.0] - 2026-05-15 + +### Added +- TypeORM entities support as 3rd format +- Decorator-based entity parsing and generation + +## [0.2.0] - 2026-05-15 + +### Added +- Drizzle ORM schema support as 2nd format +- Drizzle parser/generator registered in convert registry + +## [0.1.0] - 2026-05-14 ### Added - Initial beta release -- Core functionality -- CLI interface -- Test suite -- CI/CD workflows with ruff lint and pytest -- CONTRIBUTING.md \ No newline at end of file +- Core bidirectional conversion engine +- SQL DDL ↔ Prisma schema conversion +- Internal Representation (IR) architecture +- CLI interface with `convert` command +- Test suite with 270+ passing tests +- CI workflow with ruff lint and pytest +- CONTRIBUTING.md for contributor guidance diff --git a/README.md b/README.md index d5e4214..08d57a3 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Requires Python 3.10+. ### `schemaforge convert` -Convert a schema from one format to another. All 9 formats support conversion to and from every other format (72 direction pairs). +Convert a schema from one format to another. All 11 formats support conversion to and from every other format (110 direction pairs). ```bash # Format-specific examples @@ -210,7 +210,7 @@ SchemaForge maps types intelligently between ORM systems. The core `ColumnType` ## Demo Fixtures -Try SchemaForge immediately with our example blog schema. The `fixtures/` directory contains an equivalent schema (users, posts, categories with enums and various data types) in all 9 formats: +Try SchemaForge immediately with our example blog schema. The `fixtures/` directory contains an equivalent schema (users, posts, categories with enums and various data types) in all 11 formats: ```bash # List all fixtures @@ -404,7 +404,7 @@ SchemaForge is one of eight tools in the DevForge suite. One license covers all | Feature | Free | Individual | Suite | Team | Enterprise | |---------|:----:|:----------:|:-----:|:----:|:----------:| | CLI: convert, diff | ✓ | ✓ | ✓ | ✓ | ✓ | -| All 9 format directions | — | ✓ | ✓ | ✓ | ✓ | +| All 11 format directions | — | ✓ | ✓ | ✓ | ✓ | | Alembic migration generation | — | ✓ | ✓ | ✓ | ✓ | | JSON Schema import/export | — | ✓ | ✓ | ✓ | ✓ | | GraphQL SDL import/export | — | ✓ | ✓ | ✓ | ✓ |