From b4a932f3e165fe923f3acbad15e4505cf0b3646d Mon Sep 17 00:00:00 2001 From: Dinh Le Date: Sun, 6 Sep 2026 10:32:00 +0700 Subject: [PATCH] chore: rename packages from @oasty/* to @openapi-spec/* Rename the npm scope across the monorepo so the packages match the middleapi/openapi-spec repository. Updates package names, the workspace dependency and lockfile entry, homepage and repository URLs, keywords, imports, READMEs, and the sponsor sync script so the old name is not reintroduced by the scheduled sponsors sync. --- README.md | 2 +- package.json | 2 +- packages/downgrader/README.md | 4 ++-- packages/downgrader/package.json | 10 +++++----- packages/downgrader/src/v3.1-to-v3.0.test.ts | 2 +- packages/downgrader/src/v3.1-to-v3.0.ts | 2 +- packages/downgrader/src/v3.2-to-v3.1.test.ts | 2 +- packages/downgrader/src/v3.2-to-v3.1.ts | 2 +- packages/downgrader/tests/corpus.test.ts | 2 +- packages/downgrader/tests/e2e.test.ts | 2 +- packages/types/README.md | 18 +++++++++++------- packages/types/package.json | 8 ++++---- pnpm-lock.yaml | 2 +- scripts/sync-sponsors.ts | 2 +- 14 files changed, 32 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 865357c..1dc73d7 100644 --- a/README.md +++ b/README.md @@ -77,4 +77,4 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he -With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get Oasty here. +With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get openapi-spec here. diff --git a/package.json b/package.json index eca6811..5bb1ab5 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@oasty/repo", + "name": "@openapi-spec/repo", "version": "0.0.0", "license": "MIT", "type": "module", diff --git a/packages/downgrader/README.md b/packages/downgrader/README.md index 6542055..77824ed 100644 --- a/packages/downgrader/README.md +++ b/packages/downgrader/README.md @@ -1,4 +1,4 @@ -# @oasty/downgrader +# @openapi-spec/downgrader Downgrade [OpenAPI Specification](https://spec.openapis.org/) documents one minor version at a time: 3.2 → 3.1 and 3.1 → 3.0. Each converter works on an entire document or on a single Schema Object. @@ -14,7 +14,7 @@ import { downgradeSchemaV32ToV31, downgradeSpecV31ToV30, downgradeSpecV32ToV31, -} from "@oasty/downgrader"; +} from "@openapi-spec/downgrader"; const v31 = downgradeSpecV32ToV31(v32Document); const v30 = downgradeSpecV31ToV30(v31Document); diff --git a/packages/downgrader/package.json b/packages/downgrader/package.json index cf8fc94..5ee1a6d 100644 --- a/packages/downgrader/package.json +++ b/packages/downgrader/package.json @@ -1,25 +1,25 @@ { - "name": "@oasty/downgrader", + "name": "@openapi-spec/downgrader", "version": "0.0.0", "description": "Downgrade OpenAPI specifications one minor version at a time: 3.2 to 3.1 and 3.1 to 3.0, for whole documents or individual schemas", "keywords": [ "converter", "downgrade", "oas", - "oasty", "openapi", "openapi-3.0", "openapi-3.1", "openapi-3.2", + "openapi-spec", "specification", "swagger", "typescript" ], - "homepage": "https://github.com/middleapi/oasty", + "homepage": "https://github.com/middleapi/openapi-spec", "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/middleapi/oasty.git", + "url": "git+https://github.com/middleapi/openapi-spec.git", "directory": "packages/downgrader" }, "funding": [ @@ -63,6 +63,6 @@ "type:check": "tsc -b" }, "dependencies": { - "@oasty/types": "workspace:^" + "@openapi-spec/types": "workspace:^" } } diff --git a/packages/downgrader/src/v3.1-to-v3.0.test.ts b/packages/downgrader/src/v3.1-to-v3.0.test.ts index 73efa05..47f95bc 100644 --- a/packages/downgrader/src/v3.1-to-v3.0.test.ts +++ b/packages/downgrader/src/v3.1-to-v3.0.test.ts @@ -1,6 +1,6 @@ /* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-unknown-returns -- the helpers deliberately accept and return `unknown` so tests can feed malformed input to the graceful-degradation branches and inspect loosely-shaped output */ -import type { OpenAPIV3_1 } from "@oasty/types"; +import type { OpenAPIV3_1 } from "@openapi-spec/types"; import type { UnknownRecord } from "./shared"; import { downgradeSchemaV31ToV30, downgradeSpecV31ToV30 } from "./v3.1-to-v3.0"; diff --git a/packages/downgrader/src/v3.1-to-v3.0.ts b/packages/downgrader/src/v3.1-to-v3.0.ts index c718edd..83b8539 100644 --- a/packages/downgrader/src/v3.1-to-v3.0.ts +++ b/packages/downgrader/src/v3.1-to-v3.0.ts @@ -32,7 +32,7 @@ * @see {@link https://spec.openapis.org/oas/v3.0.4.html} */ -import type { OpenAPIV3_0, OpenAPIV3_1 } from "@oasty/types"; +import type { OpenAPIV3_0, OpenAPIV3_1 } from "@openapi-spec/types"; import type { FieldConverter, FieldTable, UnknownRecord } from "./shared"; import { diff --git a/packages/downgrader/src/v3.2-to-v3.1.test.ts b/packages/downgrader/src/v3.2-to-v3.1.test.ts index a34745e..da026a2 100644 --- a/packages/downgrader/src/v3.2-to-v3.1.test.ts +++ b/packages/downgrader/src/v3.2-to-v3.1.test.ts @@ -1,6 +1,6 @@ /* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-unknown-returns -- the helpers deliberately accept and return `unknown` so tests can feed malformed input to the graceful-degradation branches and inspect loosely-shaped output */ -import type { OpenAPIV3_2 } from "@oasty/types"; +import type { OpenAPIV3_2 } from "@openapi-spec/types"; import type { UnknownRecord } from "./shared"; import { downgradeSchemaV32ToV31, downgradeSpecV32ToV31 } from "./v3.2-to-v3.1"; diff --git a/packages/downgrader/src/v3.2-to-v3.1.ts b/packages/downgrader/src/v3.2-to-v3.1.ts index ba73b5b..04128f9 100644 --- a/packages/downgrader/src/v3.2-to-v3.1.ts +++ b/packages/downgrader/src/v3.2-to-v3.1.ts @@ -44,7 +44,7 @@ * @see {@link https://spec.openapis.org/oas/v3.1.2.html} */ -import type { OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types"; +import type { OpenAPIV3_1, OpenAPIV3_2 } from "@openapi-spec/types"; import type { FieldConverter, UnknownRecord } from "./shared"; import { diff --git a/packages/downgrader/tests/corpus.test.ts b/packages/downgrader/tests/corpus.test.ts index 6711e8b..10dcc7b 100644 --- a/packages/downgrader/tests/corpus.test.ts +++ b/packages/downgrader/tests/corpus.test.ts @@ -1,4 +1,4 @@ -import type { OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types"; +import type { OpenAPIV3_1, OpenAPIV3_2 } from "@openapi-spec/types"; /* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-object-parameters, anti-slop/no-unsafe-dictionary-type -- these corpus tests bulk-feed whole OpenAPI documents into the converters and a generic JSON-schema validator, so version-agnostic document shapes are the domain contract */ import { Validator } from "@seriousme/openapi-schema-validator"; diff --git a/packages/downgrader/tests/e2e.test.ts b/packages/downgrader/tests/e2e.test.ts index 4009e0c..bfba671 100644 --- a/packages/downgrader/tests/e2e.test.ts +++ b/packages/downgrader/tests/e2e.test.ts @@ -1,4 +1,4 @@ -import type { OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types"; +import type { OpenAPIV3_1, OpenAPIV3_2 } from "@openapi-spec/types"; /* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-object-parameters, anti-slop/no-unsafe-dictionary-type -- these e2e tests shuttle whole OpenAPI documents across three spec versions into the converters and a generic JSON-schema validator, so version-agnostic document shapes are the domain contract */ import { Validator } from "@seriousme/openapi-schema-validator"; diff --git a/packages/types/README.md b/packages/types/README.md index 386d738..2842cb7 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,20 +1,24 @@ -# @oasty/types +# @openapi-spec/types TypeScript types for the [OpenAPI Specification](https://spec.openapis.org/), covering versions 3.0, 3.1, and 3.2 with complete inline documentation. Each version module is authored against the latest patch release of its minor line: -- `@oasty/types/v3.0` — OpenAPI [3.0.4](https://spec.openapis.org/oas/v3.0.4.html) -- `@oasty/types/v3.1` — OpenAPI [3.1.2](https://spec.openapis.org/oas/v3.1.2.html), reusing 3.0 types where unchanged -- `@oasty/types/v3.2` — OpenAPI [3.2.0](https://spec.openapis.org/oas/v3.2.0.html), reusing 3.1 types where unchanged +- `@openapi-spec/types/v3.0` — OpenAPI [3.0.4](https://spec.openapis.org/oas/v3.0.4.html) +- `@openapi-spec/types/v3.1` — OpenAPI [3.1.2](https://spec.openapis.org/oas/v3.1.2.html), reusing 3.0 types where unchanged +- `@openapi-spec/types/v3.2` — OpenAPI [3.2.0](https://spec.openapis.org/oas/v3.2.0.html), reusing 3.1 types where unchanged ## Usage ```ts -import type { OpenAPIObject, SchemaObject } from "@oasty/types/v3.1"; +import type { OpenAPIObject, SchemaObject } from "@openapi-spec/types/v3.1"; // or via namespaces from the root export -import type { OpenAPIV3_0, OpenAPIV3_1, OpenAPIV3_2 } from "@oasty/types"; +import type { + OpenAPIV3_0, + OpenAPIV3_1, + OpenAPIV3_2, +} from "@openapi-spec/types"; // SchemaObject accepts an optional data type for its data-carrying fields // (`enum`, `default`, `example`, and in 3.1+ `const` and `examples`). @@ -104,4 +108,4 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he -With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get Oasty here. +With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get openapi-spec here. diff --git a/packages/types/package.json b/packages/types/package.json index 6678c42..6bc20db 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,25 +1,25 @@ { - "name": "@oasty/types", + "name": "@openapi-spec/types", "version": "0.0.0", "description": "TypeScript types for the OpenAPI Specification, covering versions 3.0, 3.1, and 3.2 with complete inline documentation", "keywords": [ "oas", - "oasty", "openapi", "openapi-3.0", "openapi-3.1", "openapi-3.2", + "openapi-spec", "openapi-types", "specification", "swagger", "types", "typescript" ], - "homepage": "https://github.com/middleapi/oasty", + "homepage": "https://github.com/middleapi/openapi-spec", "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/middleapi/oasty.git", + "url": "git+https://github.com/middleapi/openapi-spec.git", "directory": "packages/types" }, "funding": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b25ec45..de35647 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -148,7 +148,7 @@ importers: packages/downgrader: dependencies: - '@oasty/types': + '@openapi-spec/types': specifier: workspace:^ version: link:../types diff --git a/scripts/sync-sponsors.ts b/scripts/sync-sponsors.ts index adf32cf..9f75f34 100644 --- a/scripts/sync-sponsors.ts +++ b/scripts/sync-sponsors.ts @@ -197,7 +197,7 @@ const buildSponsorsSection = (sponsors: Sponsor[]): string => { const noun = pastSponsors.length === 1 ? "past sponsor" : "past sponsors"; lines.push( - `With thanks to [${pastSponsors.length} ${noun}](${PAST_SPONSORS_URL}) who helped get Oasty here.`, + `With thanks to [${pastSponsors.length} ${noun}](${PAST_SPONSORS_URL}) who helped get openapi-spec here.`, "" ); }