Download README.md from ayushjoshi2012/enterprise-api-migrations-codemod-diffs: direct link, hf CLI and curl.
- Browser
- Download file 10.1 kB
-
https://huggingface.co/datasets/ayushjoshi2012/enterprise-api-migrations-codemod-diffs/resolve/main/README.md
- Command line
-
hf download hf://datasets/ayushjoshi2012/enterprise-api-migrations-codemod-diffs/README.md
-
curl -L -o README.md https://huggingface.co/datasets/ayushjoshi2012/enterprise-api-migrations-codemod-diffs/resolve/main/README.md
license: cc-by-nc-4.0
task_categories:
- text-generation
- question-answering
language:
- en
tags:
- code-generation
- codemods
- api-migration
- breaking-changes
- refactoring
- ast-transformations
- agents
pretty_name: Enterprise API Breaking Changes & SDK Migration Diffs
size_categories:
- n>1K
configs:
- config_name: default
data_files: data/train.parquet
Enterprise API Breaking Changes & SDK Migration Diffs (Community Edition)
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:
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
- Instant Automated Delivery: Immediate access to
enterprise_api_migrations_v1.parquetand.jsonl. - Perpetual Commercial Grant: Complete indemnity for model training, weights redistribution, and commercial SaaS deployment.
Dataset Schema
Each entry contains 9 structured fields:
{
"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/apiroutes with standardexport async function POST(req: Request)route handlers. - Migrating
getStaticPathstogenerateStaticParams. - Replacing
getServerSidePropsandgetStaticPropswith React async Server Components and directfetch(). - Replacing
next/headwith the unifiedexport const metadataAPI. - Adding the mandatory
'use client'directive to components consuming interactive hooks (useState,useEffect).
- Replacing
React (
18.x->19.x)- Simplifying Context usage from
<Context.Provider value={x}>to direct<Context value={x}>. - Deprecating
React.forwardRefin favor of standard componentrefprops. - Replacing
useFormState(fromreact-dom) anduseOptimisticwith the unifieduseActionStatehook. - Eliminating legacy component lifecycle methods (
UNSAFE_componentWillMount) and string refs in favor ofconstructor/componentDidMountandcreateRef.
- Simplifying Context usage from
Python Pydantic (
1.10.x->2.x)- Migrating legacy
@root_validatorand@validatordecorators to@model_validator(mode='before'|'after')and@field_validator. - Refactoring inner
class Configconfigurations tomodel_config = ConfigDict(...). - Replacing deprecated serialization methods
.dict()and.json()with.model_dump()and.model_dump_json(). - Moving from
GenericModelto directBaseModelgeneric parameterization.
- Migrating legacy
SQLAlchemy (
1.4.x->2.0.x)- Replacing legacy
Column()definitions with typedMapped[T]andmapped_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 withsession.commit(). - Enforcing explicit
text('SELECT ...')constructs instead of passing raw string queries to.execute(). - Migrating model base classes from
declarative_base()factory calls to subclassingDeclarativeBasedirectly.
- Replacing legacy
Go Standard Library & Generics (
Go 1.17->Go 1.18+)- Replacing custom interface type switches and
interface{}sorting withconstraints.Orderedtype parameters. - Replacing reflection-based map key loops with the generic
maps.Keys(m)function. - Using the
golang.org/x/exp/slices/slicespackage for generic containment and sorting operations. - Migrating generic storage containers from
interface{}casting to parametric types (Container[T any]).
- Replacing custom interface type switches and
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 orc.AbortWithStatus(...)termination in middleware. - Requiring
engine.SetTrustedProxies(...)to mitigate IP spoofing when callingc.ClientIP(). - Updating struct tags to comply with strict
binding.Validatorv10 structural JSON validation rules.
- Requiring
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@importpaths in favor of direct module imports or configured path aliases. - Changing
worker.formatdefaults 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.
- Updating Rollup 4 plugin hooks (
AWS SDK for Go (
v1.x->v2.x)- Enforcing mandatory
context.Contextparameters as the first argument in all client SDK calls (svc.ListBuckets(ctx, ...)instead ofsvc.ListBuckets(nil)). - Moving primitive pointer helpers (
aws.String,aws.Int64) to theaws-sdk-go-v2/awsmodule path. - Migrating client instantiation to
config.LoadDefaultConfig(ctx)ands3.NewFromConfig(cfg).
- Enforcing mandatory
Quickstart
from datasets import load_dataset
#Load Community Evaluation Split
dataset = 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']}")