Skip to content

Conversation

@sanjaikumar-bruno
Copy link
Contributor

@sanjaikumar-bruno sanjaikumar-bruno commented Oct 6, 2025

JIRA
Fixes: #1764
Fixes: #472
Closes: #4903

Summary

  • Add Insomnia environments import (v4 and v5).
  • Generate Bruno environments from:
    • v4: workspace base env + sub envs (nearest-base shallow merge).
    • v5: base env + subEnvironments (base flattened + shallow override).
  • Flatten nested env data into JSON-path-like keys (e.g., nested.user.name, items[0].id).
  • Extract env logic into insomnia/env-utils.js.
  • Add tests for v4/v5 merging and key flattening.

…o migration

fix tests

fix: test

feat: updated `toBrunoEnv` and merging functions to flatten environment data using dot-notation keys. added tests for `buildV5Environments` and `buildV4Environments` to verify flattened key behavior and shallow overrides.

chore: update package-lock.json

refactor: replace `flat` library with custom `flattenObject` utility for improved environment data flattening

chore: remove package-lock.json updates

feat: update `toBrunoEnv` to convert environment values to strings and adjust tests for flattened key behavior in Insomnia environment imports

refactor: update flattening logic to use JavaScript-style square bracket notation for arrays and adjust related tests

feat: enhance insomnia-to-bruno conversion by normalizing variables in requests, and add tests for v4 and v5 environment imports

refactor: improve variable naming and streamline environment building logic in `buildV5Environments` and `buildV4Environments` functions

test: add cleanup step to environment import tests and update expected version for new feature
@sanjaikumar-bruno sanjaikumar-bruno force-pushed the feat/import-insomnia-envs branch from 95b9c90 to 98ac9d4 Compare October 22, 2025 14:57
@bijin-bruno bijin-bruno merged commit e68b2ae into usebruno:main Oct 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Insomnia Environment Import [Migrating to Bruno] Missing / not imported environments when importing collection from Insomnia

3 participants