[PR #3457] [MERGED] refactor: versioning and migration mechanism for public data structures #4390

Closed
opened 2026-03-17 01:55:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3457
Author: @AndrewBastin
Created: 10/16/2023
Status: Merged
Merged: 11/2/2023
Merged by: @AndrewBastin

Base: release/2023.8.3Head: refactor/hopp-data-migrations


📝 Commits (10+)

  • a2a15fd chore: add verzod and zod as deps and bump typescript
  • 6db2e2a refactor: update rest to use verzod
  • 2bfcd26 refactor: update graphql to use verzod
  • 1f6bdf4 refactor: update environment to use verzod
  • d1c5502 fix: contentType discriminated union failing
  • 80177f2 chore: address CR comments
  • 3350118 test: fix failing tests
  • 39ab9bc refactor: move sentry to platform (#3451)
  • 9c873b8 refactor: use zod for getVersion checks
  • 28847ff fix: broken lockfile

📊 Changes

16 files changed (+757 additions, -489 deletions)

View changed files

📝 packages/hoppscotch-data/package.json (+7 -3)
📝 packages/hoppscotch-data/src/environment/index.ts (+17 -9)
packages/hoppscotch-data/src/environment/v/0.ts (+18 -0)
packages/hoppscotch-data/src/graphql/HoppGQLAuth.ts (+0 -43)
📝 packages/hoppscotch-data/src/graphql/index.ts (+59 -35)
packages/hoppscotch-data/src/graphql/v/1.ts (+24 -0)
packages/hoppscotch-data/src/graphql/v/2.ts (+91 -0)
packages/hoppscotch-data/src/rest/HoppRESTAuth.ts (+0 -43)
📝 packages/hoppscotch-data/src/rest/content-types.ts (+2 -0)
📝 packages/hoppscotch-data/src/rest/index.ts (+123 -164)
packages/hoppscotch-data/src/rest/v/0.ts (+39 -0)
packages/hoppscotch-data/src/rest/v/1.ts (+209 -0)
📝 packages/hoppscotch-data/tsconfig.decl.json (+1 -1)
📝 packages/hoppscotch-data/tsconfig.json (+2 -2)
📝 packages/hoppscotch-js-sandbox/jest.config.js (+1 -1)
📝 pnpm-lock.yaml (+164 -188)

📄 Description

Closes HFE-276

This PR intends to introduce Zod schemas and Verzod into @hoppscotch/data to power updated migrations.

Description

  • chore add verzod and zod as dependencies
  • bump typescript version
  • update REST Request, GraphQL Request and Environment systems to use Verzod schemas
  • add ValidContentTypesList to contentTypes module in @hoppscotch/data
  • deprecated couple of functions in @hoppscotch/data.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3457 **Author:** [@AndrewBastin](https://github.com/AndrewBastin) **Created:** 10/16/2023 **Status:** ✅ Merged **Merged:** 11/2/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2023.8.3` ← **Head:** `refactor/hopp-data-migrations` --- ### 📝 Commits (10+) - [`a2a15fd`](https://github.com/hoppscotch/hoppscotch/commit/a2a15fdb6767fcba30f29b9ad1adb29899dd3536) chore: add verzod and zod as deps and bump typescript - [`6db2e2a`](https://github.com/hoppscotch/hoppscotch/commit/6db2e2a756e74aab5ec0c38b861dcc3e2ad8c663) refactor: update rest to use verzod - [`2bfcd26`](https://github.com/hoppscotch/hoppscotch/commit/2bfcd2617e0a1f4b64b831e61cdf79c7a82e7f0d) refactor: update graphql to use verzod - [`1f6bdf4`](https://github.com/hoppscotch/hoppscotch/commit/1f6bdf4af022c50ea70cba9fa13bd37929820490) refactor: update environment to use verzod - [`d1c5502`](https://github.com/hoppscotch/hoppscotch/commit/d1c5502fc19b64972e3c3d3c2765d9f173b75b71) fix: contentType discriminated union failing - [`80177f2`](https://github.com/hoppscotch/hoppscotch/commit/80177f2ccbe0df6f6ee53c6664d2cebe8356ce46) chore: address CR comments - [`3350118`](https://github.com/hoppscotch/hoppscotch/commit/3350118b7b3aad01b9ce46a2d20ee18834fceded) test: fix failing tests - [`39ab9bc`](https://github.com/hoppscotch/hoppscotch/commit/39ab9bccb325667983363ff5acb18a8fa7eea70d) refactor: move sentry to platform (#3451) - [`9c873b8`](https://github.com/hoppscotch/hoppscotch/commit/9c873b815f84a33196b6e1e24cfc7da1cf109e68) refactor: use zod for getVersion checks - [`28847ff`](https://github.com/hoppscotch/hoppscotch/commit/28847fffe4d51be23cc4ced2bf0dfbfbe47878f5) fix: broken lockfile ### 📊 Changes **16 files changed** (+757 additions, -489 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-data/package.json` (+7 -3) 📝 `packages/hoppscotch-data/src/environment/index.ts` (+17 -9) ➕ `packages/hoppscotch-data/src/environment/v/0.ts` (+18 -0) ➖ `packages/hoppscotch-data/src/graphql/HoppGQLAuth.ts` (+0 -43) 📝 `packages/hoppscotch-data/src/graphql/index.ts` (+59 -35) ➕ `packages/hoppscotch-data/src/graphql/v/1.ts` (+24 -0) ➕ `packages/hoppscotch-data/src/graphql/v/2.ts` (+91 -0) ➖ `packages/hoppscotch-data/src/rest/HoppRESTAuth.ts` (+0 -43) 📝 `packages/hoppscotch-data/src/rest/content-types.ts` (+2 -0) 📝 `packages/hoppscotch-data/src/rest/index.ts` (+123 -164) ➕ `packages/hoppscotch-data/src/rest/v/0.ts` (+39 -0) ➕ `packages/hoppscotch-data/src/rest/v/1.ts` (+209 -0) 📝 `packages/hoppscotch-data/tsconfig.decl.json` (+1 -1) 📝 `packages/hoppscotch-data/tsconfig.json` (+2 -2) 📝 `packages/hoppscotch-js-sandbox/jest.config.js` (+1 -1) 📝 `pnpm-lock.yaml` (+164 -188) </details> ### 📄 Description Closes HFE-276 This PR intends to introduce Zod schemas and [Verzod](https://github.com/AndrewBastin/verzod) into `@hoppscotch/data` to power updated migrations. ### Description - chore add `verzod` and `zod` as dependencies - bump typescript version - update REST Request, GraphQL Request and Environment systems to use Verzod schemas - add `ValidContentTypesList` to `contentTypes` module in `@hoppscotch/data` - deprecated couple of functions in `@hoppscotch/data`. ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:55:44 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4390
No description provided.