Skip to content
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

New runtime.kita.ts and ESM support #442

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open

Conversation

arthurfiorette
Copy link
Member

@arthurfiorette arthurfiorette commented May 4, 2024

  • Parser tests
  • Generator tests
  • Fixed kita create templates
  • Moved Kita plugin to runtime
  • ESM tests
  • Circular import tests
  • Migration guide

Copy link

changeset-bot bot commented May 4, 2024

🦋 Changeset detected

Latest commit: 2479af8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@kitajs/generator Patch
@kitajs/runtime Patch
@kitajs/common Patch
@kitajs/parser Patch
@kitajs/cli Patch
create-kita Patch
@kitajs/ts-plugin Patch
@kitajs/template Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@arthurfiorette arthurfiorette marked this pull request as draft May 4, 2024 05:14
@arthurfiorette arthurfiorette self-assigned this May 4, 2024
@arthurfiorette arthurfiorette changed the title Migrated to new runtime New runtime.kita.ts and ESM support May 4, 2024
@arthurfiorette
Copy link
Member Author

well we're fucked. ts-json-schema-generator package is now ESM-only, (released in a non breaking version btw XD). I converted the entire kitajs codebase to ESM to keep it working but everything falls apart when the ts-plugin needs to be CJS because the tsserver is written in CJS and as cjs cannot import esm (for now), the @kitajs/ts-plugin cannot import any other kita esm package.

@arthurfiorette arthurfiorette marked this pull request as ready for review May 26, 2024 00:30
Copy link

codecov bot commented May 26, 2024

Codecov Report

Attention: Patch coverage is 87.62376% with 75 lines in your changes are missing coverage. Please review.

Project coverage is 82.29%. Comparing base (589b116) to head (2479af8).
Report is 31 commits behind head on main.

Files Patch % Lines
packages/runtime/lib/swagger-plugin.js 28.57% 35 Missing ⚠️
packages/runtime/lib/json-schema.js 11.11% 16 Missing ⚠️
packages/runtime/lib/plugin.js 88.88% 7 Missing ⚠️
packages/generator/src/formatter.ts 92.10% 3 Missing ⚠️
packages/generator/src/util/path.ts 83.33% 3 Missing ⚠️
packages/parser/src/parser.ts 71.42% 2 Missing ⚠️
packages/runtime/lib/defaults.js 92.59% 2 Missing ⚠️
packages/runtime/lib/swagger.js 94.44% 2 Missing ⚠️
packages/cli/src/commands/config.ts 93.33% 1 Missing ⚠️
packages/cli/src/util/config.ts 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #442      +/-   ##
==========================================
- Coverage   82.98%   82.29%   -0.69%     
==========================================
  Files          46       50       +4     
  Lines        3637     3592      -45     
  Branches      379      360      -19     
==========================================
- Hits         3018     2956      -62     
- Misses        606      619      +13     
- Partials       13       17       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant