mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #4033] [MERGED] fix: code generate modal erroring out #4639
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4639
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4033
Author: @AndrewBastin
Created: 5/3/2024
Status: ✅ Merged
Merged: 5/6/2024
Merged by: @AndrewBastin
Base:
release/2024.3.3← Head:fix/codegen-break📝 Commits (2)
8d482defix: wrong ajv version being loaded32dfb72chore: change to patch ajv as a dependency instead of a peer📊 Changes
2 files changed (+106 additions, -83 deletions)
View changed files
📝
package.json(+1 -1)📝
pnpm-lock.yaml(+105 -82)📄 Description
Closes #4008
This PR fixes the issue where the Generate Code Modal errors out when opened.
What's Changed
The issue is mostly caused by
ajva dependency ofhttpsnippet(the library we use to power the Generate Code feature) not being kept properly up-to-date by the source package and needs to be pinned to an older version. We had this going in an earlier fix, but our fix was not solid, we just declared thathttpsnippethas a peer dependency that is set to a specific version that works. But since its a peer dependency we are expected to have it installed as well. For some reason inpnpmv8,pnpmresolved it properly to load the version asked in peer dependencies, but this behaviour changed in v9. The fix here just addsajvof the requested version added as a dependency to the users ofhttpsnippetso thatpnpmresolves it correctly.Checks
Notes to reviewer
It is best to clear the node_modules and then running
pnpm installbefore you spin up a dev server or a deploy instance as vite sometimes misses the changes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
i18nstring entry #4889