Skip to content

fix(varlock): do not prependHttps when a protocol is already set - #8

Closed
WalksWithASwagger wants to merge 1 commit into
mainfrom
cursor/fix-url-prepend-https-21b2
Closed

fix(varlock): do not prependHttps when a protocol is already set#8
WalksWithASwagger wants to merge 1 commit into
mainfrom
cursor/fix-url-prepend-https-21b2

Conversation

@WalksWithASwagger

Copy link
Copy Markdown
Owner

Summary

url(prependHttps=true) previously only skipped when the value already started with https://, so http://example.com became https://http://example.com.

Changes

  • Skip prepending when any URI scheme (scheme://) is already present
  • Add a regression test for http://

Test plan

  • bunx vitest run src/env-graph/test/data-types.test.ts -t prependHttps

To open against upstream: https://github.com/dmno-dev/varlock/compare/main...WalksWithASwagger:varlock:cursor/fix-url-prepend-https-21b2?expand=1

Open in Web Open in Cursor 

url(prependHttps=true) only checked for https://, so http://example.com
became https://http://example.com. Skip prepending when any scheme://
is present, matching the docs.
@github-actions

Copy link
Copy Markdown

bumpy-frog

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

patch Patch releases

  • varlock 1.14.1 → 1.14.2

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@github-actions

Copy link
Copy Markdown

📦 Bundle size

⚠️ grows the bundle by 0.3 KB (+0.0%)

Metric main This PR Δ
Total dist 4922.2 KB 4922.4 KB +0.3 KB (+0.0%)
JS 1692.0 KB 1692.0 KB +0.0 KB (+0.0%)
Sourcemaps 3154.2 KB 3154.4 KB +0.2 KB (+0.0%)
Type defs 76.0 KB 76.0 KB

dist/ only; native binaries are versioned separately and not counted here.

@WalksWithASwagger

Copy link
Copy Markdown
Owner Author

Closing as superseded. url(prependHttps=true) already skips any existing scheme: on current dmno-dev/varlock main (regex check), so this fork PR is obsolete. Combined remaining work is in #17 (merged).

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.

1 participant