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

Refactor js-yaml import usage #131

Merged
merged 3 commits into from
Mar 6, 2024
Merged

Refactor js-yaml import usage #131

merged 3 commits into from
Mar 6, 2024

Conversation

Sefirost
Copy link
Contributor

@Sefirost Sefirost commented Mar 6, 2024

Hi! I've open this simple PR to adjust the import usage of js-yaml that provides the yaml schema. It consist of three changes:

  1. In order to maintain project consistency, use import instead of require. It also prevents this issue when the code is loaded as ESM.
    image

  2. Add the types for js-yaml as dev dependency.

  3. Since js-yaml is now imported, it needs to be marked as external dependency for rollup to avoid this warning:
    image

Copy link

github-actions bot commented Mar 6, 2024

🧪 A prerelease is available for testing 🧪

You can install this latest build in your project with:

npm install --save https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/8174772066/npm-package-itty-router-openapi-131

Or you can immediately run this with npx:

npx https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/8174772066/npm-package-itty-router-openapi-131

@G4brym G4brym merged commit 0748192 into cloudflare:main Mar 6, 2024
4 checks passed
@G4brym
Copy link
Member

G4brym commented Mar 6, 2024

Thanks for this fix @Sefirost

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.

2 participants