Skip to content

chore(metadata): migrate to unbuild #2115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/honest-horses-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"openapi-metadata": minor
---

[#2097](https://github.com/openapi-ts/openapi-typescript/pull/2097): Migrate to unbuild and provide CJS support
38 changes: 17 additions & 21 deletions packages/openapi-metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@
"email": "[email protected]"
},
"type": "module",
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./decorators": {
"types": "./dist/decorators/index.d.ts",
"import": "./dist/decorators/index.js"
"import": "./dist/decorators/index.mjs",
"require": "./dist/decorators/index.cjs"
},
"./metadata": {
"types": "./dist/metadata/index.d.ts",
"import": "./dist/metadata/index.js"
"import": "./dist/metadata/index.mjs",
"require": "./dist/metadata/index.cjs"
},
"./errors": {
"types": "./dist/errors/index.d.ts",
"import": "./dist/errors/index.js"
"import": "./dist/errors/index.mjs",
"require": "./dist/errors/index.cjs"
},
"./ui": {
"types": "./dist/ui/index.d.ts",
"import": "./dist/ui/index.js"
"import": "./dist/ui/index.mjs",
"require": "./dist/ui/index.cjs"
}
},
"homepage": "https://openapi-ts.dev",
Expand All @@ -48,10 +50,8 @@
"typescript"
],
"scripts": {
"build": "pnpm run build:clean && pnpm run build:esm",
"build:clean": "del-cli dist",
"build:esm": "tsc -p tsconfig.build.json",
"dev": "tsc -p tsconfig.build.json --watch",
"build": "unbuild",
"prepack": "unbuild",
"format": "biome format . --write",
"lint": "biome check .",
"test": "vitest run",
Expand All @@ -60,22 +60,18 @@
},
"dependencies": {
"deepmerge": "^4.3.1",
"openapi-types": "^12.1.3"
"openapi-types": "^12.1.3",
"type-fest": "^4.31.0"
},
"peerDependencies": {
"reflect-metadata": "^0.2.2"
},
"devDependencies": {
"@types/lodash": "^4.17.14",
"@types/node": "^22.10.5",
"@vitest/coverage-v8": "^2.1.8",
"del-cli": "^5.1.0",
"esbuild": "^0.24.2",
"execa": "^8.0.1",
"reflect-metadata": "^0.2.2",
"tsup": "^8.3.5",
"type-fest": "^4.31.0",
"typescript": "^5.7.2",
"unbuild": "^3.3.1",
"unplugin-swc": "^1.5.1"
}
}
4 changes: 4 additions & 0 deletions packages/openapi-metadata/src/errors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { InvalidConfigurationError } from "./invalid-configuration.js";
export { NoExplicitTypeError } from "./no-explicit-type.js";
export { ReflectMetadataMissingError } from "./reflect-metadata-missing.js";
export { SymbolKeysNotSupportedError } from "./symbol-keys-not-supported.js";
8 changes: 0 additions & 8 deletions packages/openapi-metadata/tsup.config.ts

This file was deleted.

Loading
Loading