Skip to content

feat: add env-compact format.#262

Merged
theoephraim merged 3 commits intodmno-dev:mainfrom
ya7010:add_env_compact_format
Feb 6, 2026
Merged

feat: add env-compact format.#262
theoephraim merged 3 commits intodmno-dev:mainfrom
ya7010:add_env_compact_format

Conversation

@ya7010
Copy link
Contributor

@ya7010 ya7010 commented Jan 16, 2026

Currently, the env format of the load command passes an empty string for undefined environment variables.
This can cause applications to recognize the environment variable as existing.

As a countermeasure, I have added env-compact format that does not output undefined environment variables.

I considered adding --skip-undefined option, but since it would only affect env, so I have added a new format instead.

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

🦋 Changeset detected

Latest commit: 610a14c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
varlock Patch
@varlock/astro-integration Patch
@varlock/nextjs-integration Patch
@varlock/vite-integration Patch
@varlock/1password-plugin Patch
@varlock/google-secret-manager-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ya7010
Copy link
Contributor Author

ya7010 commented Jan 23, 2026

@theoephraim

I'm torn between defining a new format or just adding more options — which do you think is better?

@theoephraim
Copy link
Member

@ya7010 - I think an option makes sense. The compact flag still kind of makes sense in other formats. For example in the pretty printed format, it could just skip empty items.

@ya7010
Copy link
Contributor Author

ya7010 commented Feb 6, 2026

@theoephraim

Added the --compact option and modified it to skip undefined environment variables when used with the env format.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 6, 2026

Open in StackBlitz

npm i https://pkg.pr.new/dmno-dev/varlock@262

commit: 610a14c

@theoephraim theoephraim merged commit e5c7d24 into dmno-dev:main Feb 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants