-
Notifications
You must be signed in to change notification settings - Fork 3
Update all dependencies and split into packages #10
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
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a9f9f5c
Bump all libraries
luqasn c18a939
Support new invocation style for new openapi-typescript
luqasn 654d91f
Fix renamed property in validation library
luqasn 37e0fcf
Fix compile error with unknown error type
luqasn 9e6f494
Fix renamed property in validation library
luqasn f25f6fe
Fix type error with response being never
luqasn 8d42490
Fix compile warning
luqasn baa9809
Fix test assertion for message that now contains property path
luqasn 9b2eafe
Fix picking of properties of type never
luqasn d60c948
Support OpenAPI v3.1
luqasn a9092aa
Split up code into separate packages
luqasn d50d89d
Modernize config to node 22 presets
alabs-tomscholz aafbb17
chore: remove unused properties from package.json
alabs-tomscholz 1d01b4b
fix: load formats into openapi-backend ajv instance to prevent unkown…
alabs-tomscholz 5c368e1
Add back name override for custom error
luqasn fdc5f27
Update README with new package name
luqasn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,21 @@ | ||
| { | ||
| "name": "@openapi-ts/backend", | ||
| "version": "2.0.5", | ||
| "description": "", | ||
| "bin": { | ||
| "openapi-ts-backend": "dist/tools/cli.js" | ||
| }, | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "name": "openapi-ts-backend", | ||
| "private": true, | ||
| "homepage": "https://github.com/henhal/openapi-ts-backend#readme", | ||
| "bugs": { | ||
| "url": "https://github.com/henhal/openapi-ts-backend/issues" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/henhal/openapi-ts-backend" | ||
| "url": "git+https://github.com/henhal/openapi-ts-backend.git" | ||
| }, | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo", | ||
| "lint": "eslint src --ext js,ts --max-warnings 0", | ||
| "postbuild": "chmod u+x dist/tools/cli.js", | ||
| "prepublish": "yarn clean && yarn build && yarn test", | ||
| "prebuild": "rm -rf src/test/gen", | ||
| "pretest": "MODULE_PATH=../.. ts-node src/tools/cli.ts generate-types src/test/api.yml src/test/gen", | ||
| "test": "NODE_PATH=src LOG_LEVEL=${LOG_LEVEL:=error} jest --config src/test/jest.config.js" | ||
| "lint": "eslint src --ext js,ts --max-warnings 0" | ||
| }, | ||
| "author": "[email protected]", | ||
| "files": [ | ||
| "dist/" | ||
| "dist/", | ||
| "README.md" | ||
| ], | ||
| "keywords": [ | ||
| "openapi", | ||
|
|
@@ -46,31 +34,14 @@ | |
| "lambda" | ||
| ], | ||
| "dependencies": { | ||
| "@openapi-ts/request-types": "^1.0.5", | ||
| "ajv": "^7.1.1", | ||
| "ajv-formats": "^2.0.1", | ||
| "js-yaml": "^4.0.0", | ||
| "loglevel": "^1.7.1", | ||
| "openapi-backend": "^3.9.0", | ||
| "openapi-types": "^7.2.3", | ||
| "openapi-typescript": "^3.0.1" | ||
| "typescript": "^5.9.3" | ||
| }, | ||
| "workspaces": [ | ||
| "packages/lib", | ||
| "packages/cli", | ||
| "packages/test" | ||
| ], | ||
| "devDependencies": { | ||
| "@types/jest": "^26.0.20", | ||
| "@types/js-yaml": "^4.0.0", | ||
| "@types/node": "^14.14.31", | ||
| "@typescript-eslint/eslint-plugin": "^4.17.0", | ||
| "@typescript-eslint/parser": "^4.17.0", | ||
| "eslint": "^7.21.0", | ||
| "jest": "^26.6.3", | ||
| "ts-jest": "^26.5.3", | ||
| "ts-node": "^9.1.1", | ||
| "typescript": ">=3" | ||
| }, | ||
| "peerDependencies": { | ||
| "typescript": ">=3" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| "@tsconfig/node22": "^22.0.2" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "@openapi-ts/cli", | ||
| "main": "src/cli.ts", | ||
| "version": "3.0.1", | ||
| "bin": { | ||
| "openapi-ts-backend": "dist/cli.js" | ||
| }, | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "postbuild": "chmod u+x dist/cli.js" | ||
| }, | ||
| "dependencies": { | ||
| "openapi-typescript": "^7.9.1" | ||
| }, | ||
| "peerDependencies": { | ||
| "typescript": "^5.9.3" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "rootDir": "./src", | ||
| "outDir": "dist", | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| { | ||
| "name": "@openapi-ts/backend", | ||
| "version": "3.0.1", | ||
| "scripts": { | ||
| "build": "tsc" | ||
| }, | ||
| "main": "dist/index.js", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "types": "dist/index.d.ts", | ||
| "dependencies": { | ||
| "ajv": "^8.17.1", | ||
| "ajv-formats": "^3.0.1", | ||
| "js-yaml": "^4.0.0", | ||
| "json-schema-to-ts": "^3.1.1", | ||
| "loglevel": "^1.7.1", | ||
| "openapi-backend": "^5.15.0", | ||
| "openapi-types": "^12.1.3", | ||
| "openapi-typescript": "^7.9.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@openapi-ts/request-types": "^1.0.5", | ||
| "@types/js-yaml": "^4.0.0", | ||
| "@types/node": "^24.7.0", | ||
| "@typescript-eslint/eslint-plugin": "^8.45.0", | ||
| "@typescript-eslint/parser": "^8.45.0", | ||
| "eslint": "^9.37.0", | ||
| "ts-node": "^10.9.2" | ||
| }, | ||
| "peerDependencies": { | ||
| "typescript": "^5.9.3" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this line removed? It's simply so that sub-classes of this error are named properly, causing logs to show e.g.
BadRequestError: some messageinstead ofError: some messageUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was my understanding that newer javascript targets (ES6 and up) no longer need this.
And we rely on a newer feature anyways here (the
causefor wrapping exceptions), so I think there is no gain in having this backwards compatible.But open to change any of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked my expectations... and they were wrong. Logging the error name indeed spelled
Error. So I put the line back in. I guess we can still only get rid of half of the hacks (the prototype chain) even in modern JavaScript, which baffles me.