-
Notifications
You must be signed in to change notification settings - Fork 5
feat!: introduce a new common runtime #401
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
Conversation
| "test": "jest" | ||
| }, | ||
| "dependencies": { | ||
| "@nahkies/typescript-common-runtime": "workspace:^", |
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.
note: I know that lerna won't update these correctly in peerDependencies (lerna/lerna#3671) - but I think it should be ok for dependencies
to be tested as part of an alpha version publish.
| "import": "./dist/joi.js", | ||
| "types": "./dist/joi.d.ts" | ||
| }, | ||
| "./zod": { |
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.
Drop deprecated export
| return result.value | ||
| return value | ||
| } catch (err) { | ||
| throw ExpressRuntimeError.ResponseError(err) |
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.
Breaking change: previously joi response validation errors weren't wrapped correctly
| "bugs": { | ||
| "url": "https://github.com/mnahkies/openapi-code-generator/issues" | ||
| }, | ||
| "exports": { |
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.
Doing a single barrel export didn't work, as for ESM consumers I ran into:
error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
I don't fully understand why the same code works fine when exporting individual files like this, but it works 🤷♂️
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.
these moved files were identical to the ones deleted form the other runtime
ca511a9 to
40f2cf9
Compare
| @@ -0,0 +1,84 @@ | |||
| { | |||
| "name": "@nahkies/typescript-common-runtime", | |||
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.
Annoyingly, it looks like I'll have to generate an API token and manually publish the package for the first time, in order to then configure trusted publishing settings properly.
introduces a new
typescript-common-runtimepackage, and refactors the existing runtime packages to move common functionality into it.this will give us a better place to put code such as the form data request body parsing, and upcoming query string parsing (#381)
there are a couple of minor breaking changes:
joiBREAKING CHANGE: deprecated exports removed, regenerate using the latest cli to avoid issues