scalar / openapi-parser

Modern OpenAPI parser written in TypeScript
MIT License
26 stars 7 forks source link

fix: ajv import broken #123

Closed hanspagel closed 1 month ago

hanspagel commented 1 month ago

I’ve received this error in a CommonJS environment:

[ERROR] Client bundle compiled with errors therefore further build is impossible.

Module not found: Error: Can't resolve 'ajv/dist/2020' in '/Users/hanspagel/Documents/Projects/scalar/node_modules/.pnpm/@scalar+openapi-parser@0.6.0/node_modules/@scalar/openapi-parser/dist/src/lib/Validator'

Did you mean '2020.js'?

BREAKING CHANGE: The request 'ajv/dist/2020' failed to resolve only because it was resolved as fully specified

This PR imports from *.js, this should fix the error.

changeset-bot[bot] commented 1 month ago

πŸ¦‹ Changeset detected

Latest commit: d108590ae4c1841876c8aa365d77001731d1dbf8

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

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | @scalar/openapi-parser | 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

relativeci[bot] commented 1 month ago

#81 Bundle Size β€” 114.71KiB (~+0.01%).

d108590(current) vs 84e91c7 main#79(baseline)

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#81
     Baseline
#79
Regression  Initial JS 114.71KiB(~+0.01%) 114.71KiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 2.7% 0%
No change  Chunks 45 45
No change  Assets 45 45
No change  Modules 45 45
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 0 0
No change  Duplicate Packages 0 0

Bundle size by type  Change 1 change Regression 1 regression
|            |       Current
[#81](https://app.relative-ci.com/projects/hXQ54UQKluDUZAKvpt9b/jobs/81-W1Ldm8VqakGrMzRScJEf?utm_source=github&utm_medium=pr-report "View bundle analysis report") |      Baseline
[#79](https://app.relative-ci.com/projects/hXQ54UQKluDUZAKvpt9b/jobs/79-5g5RQ8v1R6rWsS0PS4lB?utm_source=github&utm_medium=pr-report "View baseline bundle analysis report") | |:--|--:|--:| | Regression  [JS](https://app.relative-ci.com/projects/hXQ54UQKluDUZAKvpt9b/jobs/81-W1Ldm8VqakGrMzRScJEf/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-1_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View JS assets") | `114.71KiB` (`~+0.01%`) | `114.71KiB` |

Bundle analysis report Branch fix/ajv-import Project dashboard