Update README.md
Browse files22 unmodified lines23242526272829303132333422 unmodified lines# Enterprise API Breaking Changes & SDK Migration Diffs (Community Edition)A curated dataset of enterprise breaking changes, compiler diagnostics, unified codemod patch diffs, and verification suites covering **Python, TypeScript/JavaScript, and Go**. Designed specifically for training autonomous code-refactoring agents, AST codemod generators, and developer migration copilots.### Dataset Distribution- **Preview / Community Edition (250 traces)**: Publicly accessible under CC BY-NC 4.0 for non-commercial research and evaluation.- **Enterprise Commercial Package (2,500 traces)**: Complete migration traces with full test suites and commercial training rights.### Commercial Licensing (Dodo Payments)To purchase the unrestricted commercial license:👉 [Purchase Enterprise Commercial License via Dodo Payments](https://buy.dodopayments.com/buy/pdt_codemod_enterprise)22 unmodified lines232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615722 unmodified lines# Enterprise API Breaking Changes & SDK Migration Diffs (Community Edition)<p align="center"><img src="./dataset_product_cover_1024.png" alt="Dataset Banner" width="700"></p>A curated dataset of breaking changes, compiler/runtime diagnostics, unified codemod patch diffs, and verification suites covering **Python, TypeScript/JavaScript, and Go**. Specifically engineered for training automated code repair models, AST codemod engines, DevSecOps agents, and software migration copilots.Each record represents an end-to-end migration lifecycle:$$\text{Deprecated Code} \longrightarrow \text{Compiler/Runtime Error} \longrightarrow \text{Architectural Reasoning} \longrightarrow \text{Unified Codemod Diff} \longrightarrow \text{Verification Test}$$---## Dataset Splits & Commercial Licensing| Split | Records | Format | Primary Use Case | License || :--- | :--- | :--- | :--- | :--- || **Community Evaluation** (This Repo) | 250 | Parquet | Benchmarking, zero-shot evaluation, academic research | **CC BY-NC 4.0** || **Enterprise Commercial Corpus** | 2,500 | Parquet + JSONL | Full fine-tuning (SFT/LoRA/DPO), proprietary copilot integration | **Commercial Enterprise License** |### Complete Enterprise Package (2,500 Records)For commercial model fine-tuning, automated pull-request bot deployment, or integrating AST refactoring tools without non-commercial restrictions:👉 **[Purchase Enterprise Commercial License via Dodo Payments](https://checkout.dodopayments.com/buy/pdt_YOUR_DODO_PRODUCT_ID)*** **Instant Automated Delivery:** Immediate access to `enterprise_api_migrations_2500.parquet` and `.jsonl`.* **Perpetual Commercial Grant:** Complete indemnity for model training, weights redistribution, and commercial SaaS deployment.---## Dataset SchemaEach entry contains 9 structured fields:```json{"migration_id": "MIG-2026-SQLALCHEMY-9112","ecosystem": "Python","package_name": "sqlalchemy","breaking_version_transition": "1.4.x -> 2.0.x","deprecated_code_snippet": "from sqlalchemy import Column, Integer, String\n\nclass User(Base):\n __tablename__ = 'users'\n id = Column(Integer, primary_key=True)\n name = Column(String)","runtime_error_or_warning": "DeprecationWarning: The Column class is deprecated and will be removed in a future version. Use mapped_column instead.","migration_reasoning": "The upstream API broke due to the deprecation of the Column class in favor of mapped_column. To migrate, replace all instances of Column with mapped_column and update type annotations to use Mapped.","codemod_patch_diff": "--- a/sqlalchemy_model.py\n+++ b/sqlalchemy_model.py\n@@ -1,7 +1,7 @@\n from sqlalchemy import mapped_column, Mapped, Integer, String\n-class User(Base):\n- __tablename__ = 'users'\n- id = Column(Integer, primary_key=True)\n- name = Column(String)\n+class User(Base):\n+ __tablename__ = 'users'\n+ id: Mapped[int] = mapped_column(Integer, primary_key=True)\n+ name: Mapped[str] = mapped_column(String)","verification_test": "import pytest\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy_model import Base, User\n\ndef test_migrated_model():\n engine = create_engine('sqlite:///:memory:')\n Base.metadata.create_all(engine)\n Session = sessionmaker(bind=engine)\n session = Session()\n user = User(name='John Doe')\n session.add(user)\n session.commit()\n assert session.query(User).first().name == 'John Doe'"}```### Field Definitions| Field | Type | Description || :--- | :--- | :--- || `migration_id` | `string` | Unique tracking identifier for the migration trace (e.g., `MIG-2026-NEXT-4174`). || `ecosystem` | `string` | Primary runtime ecosystem and programming language (`Python`, `TypeScript`, `Go`). || `package_name` | `string` | Specific upstream library, framework, or runtime undergoing migration (e.g., `next`, `react`, `sqlalchemy`, `pydantic`, `gin`, `vite`, `aws-sdk-go-v2`). || `breaking_version_transition` | `string` | Version boundary introducing breaking changes (e.g., `13.x (Pages) -> 14.x/15.x (App Router)`, `18.x -> 19.x`, `1.4.x -> 2.0.x`). || `deprecated_code_snippet` | `string` | Complete, executable source code snippet relying on legacy APIs, obsolete decorators, or deprecated patterns. || `runtime_error_or_warning` | `string` | The exact compiler error, TypeScript diagnostic, or runtime deprecation warning emitted under the modern version. || `migration_reasoning` | `string` | Structural root-cause analysis detailing why the upstream API broke and outlining the AST refactoring strategy. || `codemod_patch_diff` | `string` | Minimal, unified git patch diff (`--- a/`, `+++ b/`, `@@ ... @@`) transforming deprecated patterns into modern idioms. || `verification_test` | `string` | Executable unit test verifying that the migrated code runs cleanly on the modern runtime environment. |---### Core Migration Taxonomies Covered* **Next.js (`13.x Pages` -> `14.x/15.x App Router`)*** Replacing `pages/api` routes with standard `export async function POST(req: Request)` route handlers.* Migrating `getStaticPaths` to `generateStaticParams`.* Replacing `getServerSideProps` and `getStaticProps` with React async Server Components and direct `fetch()`.* Replacing `next/head` with the unified `export const metadata` API.* Adding the mandatory `'use client'` directive to components consuming interactive hooks (`useState`, `useEffect`).* **React (`18.x` -> `19.x`)*** Simplifying Context usage from `<Context.Provider value={x}>` to direct `<Context value={x}>`.* Deprecating `React.forwardRef` in favor of standard component `ref` props.* Replacing `useFormState` (from `react-dom`) and `useOptimistic` with the unified `useActionState` hook.* Eliminating legacy component lifecycle methods (`UNSAFE_componentWillMount`) and string refs in favor of `constructor` / `componentDidMount` and `createRef`.* **Python Pydantic (`1.10.x` -> `2.x`)*** Migrating legacy `@root_validator` and `@validator` decorators to `@model_validator(mode='before'|'after')` and `@field_validator`.* Refactoring inner `class Config` configurations to `model_config = ConfigDict(...)`.* Replacing deprecated serialization methods `.dict()` and `.json()` with `.model_dump()` and `.model_dump_json()`.* Moving from `GenericModel` to direct `BaseModel` generic parameterization.* **SQLAlchemy (`1.4.x` -> `2.0.x`)*** Replacing legacy `Column()` definitions with typed `Mapped[T]` and `mapped_column()` declarative mappings.* Replacing the legacy ORM query interface (`session.query(Model).filter(...)`) with 2.0 executable queries (`session.scalars(select(Model).where(...))`).* Removing `sessionmaker(autocommit=True)` to enforce explicit transaction management with `session.commit()`.* Enforcing explicit `text('SELECT ...')` constructs instead of passing raw string queries to `.execute()`.* Migrating model base classes from `declarative_base()` factory calls to subclassing `DeclarativeBase` directly.* **Go Standard Library & Generics (`Go 1.17` -> `Go 1.18+`)*** Replacing custom interface type switches and `interface{}` sorting with `constraints.Ordered` type parameters.* Replacing reflection-based map key loops with the generic `maps.Keys(m)` function.* Using the `golang.org/x/exp/slices` / `slices` package for generic containment and sorting operations.* Migrating generic storage containers from `interface{}` casting to parametric types (`Container[T any]`).* **Go Gin Engine (`v1.8.x` -> `v1.9.x+`)*** Requiring `ctx := c.Copy()` before spawning background goroutines to prevent memory corruption from recycled context pools.* Enforcing explicit `c.Next()` continuation or `c.AbortWithStatus(...)` termination in middleware.* Requiring `engine.SetTrustedProxies(...)` to mitigate IP spoofing when calling `c.ClientIP()`.* Updating struct tags to comply with strict `binding.Validator` v10 structural JSON validation rules.* **TypeScript Tooling & Bundlers (`Vite 4` -> `5`, `Rollup 4`, `Axios 0.27` -> `1.x`)*** Updating Rollup 4 plugin hooks (`resolveId`, `transform`) from synchronous return values to async promises returning `{ id }` or `{ code, map }` objects.* Removing the leading tilde prefix (`~`) in Sass/Less `@import` paths in favor of direct module imports or configured path aliases.* Changing `worker.format` defaults from `'iife'` to `'es'`.* Updating Axios imports from default imports to named/ESM-compatible exports (`import { Axios } from 'axios'`).* Migrating Axios proxy configurations from `{ host, port, auth }` objects to full URL strings.* **AWS SDK for Go (`v1.x` -> `v2.x`)*** Enforcing mandatory `context.Context` parameters as the first argument in all client SDK calls (`svc.ListBuckets(ctx, ...)` instead of `svc.ListBuckets(nil)`).* Moving primitive pointer helpers (`aws.String`, `aws.Int64`) to the `aws-sdk-go-v2/aws` module path.* Migrating client instantiation to `config.LoadDefaultConfig(ctx)` and `s3.NewFromConfig(cfg)`.---## Quickstart```pythonfrom datasets import load_dataset#Load Community Evaluation Splitdataset = load_dataset("ayushjoshi2012/enterprise-api-migrations-codemod-diffs", split="train")sample = dataset[0]print(f"Migration: {sample['migration_id']} | {sample['package_name']} ({sample['breaking_version_transition']})")print(f"\n--- Deprecated Code ---\n{sample['deprecated_code_snippet']}")print(f"\n--- Runtime Warning / Error ---\n{sample['runtime_error_or_warning']}")print(f"\n--- Unified Codemod Diff ---\n{sample['codemod_patch_diff']}")```
README.md+130-7