[PR #5744] feat(common): import global variables from postman #5335

Open
opened 2026-03-17 02:47:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5744
Author: @AaronFortG
Created: 1/4/2026
Status: 🔄 Open

Base: mainHead: feat/import-global-variables-from-postman


📝 Commits (9)

  • 3169f42 fix: removed the default query value from the in parameter of the auth.apikey as it was empty
  • 4dce9ea Merge pull request #1 from AaronFortG/fix/auth-method-import
  • 3a397d2 Merge branch 'hoppscotch:main' into main
  • e3ce5cb feat(globals): add support for import global variables from Postman
  • e220f48 feat(globals): hide import/export from/to Gist when using Global Variables, which does not exist
  • fba27b1 fix(import): parse json file for insomnia v5 format
  • a154c79 fix(import): allow distinguish between global and normal environments when importing files
  • 03cf834 fix(import): store globals and other environments separately
  • b08facb feat(import): allow updating current value when importing global variables

📊 Changes

10 files changed (+362 additions, -88 deletions)

View changed files

📝 packages/hoppscotch-common/locales/en.json (+3 -1)
📝 packages/hoppscotch-common/src/components/environments/ImportExport.vue (+169 -25)
📝 packages/hoppscotch-common/src/components/environments/index.vue (+13 -0)
📝 packages/hoppscotch-common/src/components/environments/my/Details.vue (+31 -2)
📝 packages/hoppscotch-common/src/components/environments/my/index.vue (+1 -0)
📝 packages/hoppscotch-common/src/components/environments/teams/index.vue (+1 -0)
📝 packages/hoppscotch-common/src/helpers/actions.ts (+10 -9)
📝 packages/hoppscotch-common/src/helpers/import-export/import/hoppEnv.ts (+8 -1)
📝 packages/hoppscotch-common/src/helpers/import-export/import/insomnia/insomniaEnv.ts (+100 -35)
📝 packages/hoppscotch-common/src/helpers/import-export/import/postmanEnv.ts (+26 -15)

📄 Description

Closes #5668

What's changed

Notes to reviewers


Summary by cubic

Add import/export for Global variables, including importing Postman globals and exporting Global as JSON. Updates all importers to separate globals from environments and merges imported globals safely into existing ones.

  • New Features

    • Added a “globals” mode in Import/Export with a dedicated modal and dynamic title.
    • Import Postman globals (and base globals from Hoppscotch/Insomnia) into Global variables, merging by key and updating current values for non-secret vars.
    • Export Global variables as JSON; hide Gist options in globals mode.
    • New toasts and messages (success on import, “no globals to export”).
  • Bug Fixes

    • Insomnia import: support v5 nested format, stringify non-string values, and treat the root as base/global.
    • Preserve currentValue when importing Hoppscotch environments.

Written for commit b08facb392. Summary will update on new commits.


🔄 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/5744 **Author:** [@AaronFortG](https://github.com/AaronFortG) **Created:** 1/4/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/import-global-variables-from-postman` --- ### 📝 Commits (9) - [`3169f42`](https://github.com/hoppscotch/hoppscotch/commit/3169f42990b20f47ac0663d8da0cc62f7afacbcd) fix: removed the default query value from the in parameter of the auth.apikey as it was empty - [`4dce9ea`](https://github.com/hoppscotch/hoppscotch/commit/4dce9ea3d896cdb7c658336c1b5b553455f88488) Merge pull request #1 from AaronFortG/fix/auth-method-import - [`3a397d2`](https://github.com/hoppscotch/hoppscotch/commit/3a397d24da073e144e77fd6af803935aec4283fc) Merge branch 'hoppscotch:main' into main - [`e3ce5cb`](https://github.com/hoppscotch/hoppscotch/commit/e3ce5cb94e6830d8d40786f96a40d6610a885c09) feat(globals): add support for import global variables from Postman - [`e220f48`](https://github.com/hoppscotch/hoppscotch/commit/e220f48ce42ecd607be966d2fefda14eb4071762) feat(globals): hide import/export from/to Gist when using Global Variables, which does not exist - [`fba27b1`](https://github.com/hoppscotch/hoppscotch/commit/fba27b1d2b6a61ecde33a541fd50490ea3b006cc) fix(import): parse json file for insomnia v5 format - [`a154c79`](https://github.com/hoppscotch/hoppscotch/commit/a154c79f72f1b8f1e630c46259b0bace12fbcfa9) fix(import): allow distinguish between global and normal environments when importing files - [`03cf834`](https://github.com/hoppscotch/hoppscotch/commit/03cf834e6dfdcae46637f240d505a3a77bf21479) fix(import): store globals and other environments separately - [`b08facb`](https://github.com/hoppscotch/hoppscotch/commit/b08facb392cfc240c1dbacbd0bdf7609e3a3dbda) feat(import): allow updating current value when importing global variables ### 📊 Changes **10 files changed** (+362 additions, -88 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/en.json` (+3 -1) 📝 `packages/hoppscotch-common/src/components/environments/ImportExport.vue` (+169 -25) 📝 `packages/hoppscotch-common/src/components/environments/index.vue` (+13 -0) 📝 `packages/hoppscotch-common/src/components/environments/my/Details.vue` (+31 -2) 📝 `packages/hoppscotch-common/src/components/environments/my/index.vue` (+1 -0) 📝 `packages/hoppscotch-common/src/components/environments/teams/index.vue` (+1 -0) 📝 `packages/hoppscotch-common/src/helpers/actions.ts` (+10 -9) 📝 `packages/hoppscotch-common/src/helpers/import-export/import/hoppEnv.ts` (+8 -1) 📝 `packages/hoppscotch-common/src/helpers/import-export/import/insomnia/insomniaEnv.ts` (+100 -35) 📝 `packages/hoppscotch-common/src/helpers/import-export/import/postmanEnv.ts` (+26 -15) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #5668 <!-- Issue # here --> <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add import/export for Global variables, including importing Postman globals and exporting Global as JSON. Updates all importers to separate globals from environments and merges imported globals safely into existing ones. - New Features - Added a “globals” mode in Import/Export with a dedicated modal and dynamic title. - Import Postman globals (and base globals from Hoppscotch/Insomnia) into Global variables, merging by key and updating current values for non-secret vars. - Export Global variables as JSON; hide Gist options in globals mode. - New toasts and messages (success on import, “no globals to export”). - Bug Fixes - Insomnia import: support v5 nested format, stringify non-string values, and treat the root as base/global. - Preserve currentValue when importing Hoppscotch environments. <sup>Written for commit b08facb392cfc240c1dbacbd0bdf7609e3a3dbda. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5335
No description provided.