Skip to content

Support array of paths in varlock.loadPath package.json config#571

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/support-multiple-loadpaths
Draft

Support array of paths in varlock.loadPath package.json config#571
Copilot wants to merge 3 commits intomainfrom
copilot/support-multiple-loadpaths

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

varlock.loadPath only accepted a single string, making monorepo setups require a root .env file with @import directives just to combine env vars from multiple packages.

Changes

  • VarlockPackageJsonConfig: loadPath type widened to string | string[]
  • MultiplePathsContainerDataSource (new class in data-source.ts): Virtual root container that wraps multiple DirectoryDataSource/DotEnvFileDataSource instances, preserving the single-root invariant in EnvGraph
  • isExplicitRoot flag on EnvGraphDataSource: Prevents explicitly-specified top-level paths from being classified as env-specific (the applyForEnv && parent check in isEnvSpecific) even when they have the virtual container as a parent
  • loadEnvGraph: New entryFilePaths?: string[] option; routes to MultiplePathsContainerDataSource when >1 paths provided
  • loadVarlockEnvGraph: Normalizes array/string loadPath, validates all paths exist, dispatches to single or multi-path loader accordingly

Later entries in the array take higher precedence (consistent with @import ordering).

{
  "varlock": {
    "loadPath": ["./apps/my-package/envs/", "./apps/other-package/envs/"]
  }
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.iconify.design
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/varlock/varlock/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/varlock/varlock/node_modules/vitest/dist/workers/forks.js (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/varlock/varlock/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/varlock/varlock/node_modules/vitest/dist/workers/forks.js --global bin/node node bin/�� b/load-graph.ts src/env-graph/test/multi-path-loading.test.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: 3629437

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

This PR includes changesets to release 18 packages
Name Type
varlock Minor
@varlock/astro-integration Major
@varlock/cloudflare-integration Major
@varlock/expo-integration Major
@varlock/nextjs-integration Major
@varlock/vite-integration Major
@varlock/1password-plugin Major
@varlock/aws-secrets-plugin Major
@varlock/azure-key-vault-plugin Major
@varlock/bitwarden-plugin Major
@varlock/dashlane-plugin Major
@varlock/google-secret-manager-plugin Major
@varlock/hashicorp-vault-plugin Major
@varlock/infisical-plugin Major
@varlock/keepass-plugin Major
@varlock/pass-plugin Major
@varlock/passbolt-plugin Major
@varlock/proton-pass-plugin Major

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
varlock-website 3984b1f Commit Preview URL

Branch Preview URL
Apr 08 2026, 11:50 PM

…e, rename variable

Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/b16894a5-e719-42be-98cf-15755b943858

Co-authored-by: theoephraim <1158956+theoephraim@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for multiple loadPaths in package.json Support array of paths in varlock.loadPath package.json config Apr 8, 2026
Copilot AI requested a review from theoephraim April 8, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support multiple loadPaths in package.json

2 participants