Skip to content

Replace every dash when resolving a binary host mirror - #1005

Open
SashaMIT wants to merge 1 commit into
mapbox:masterfrom
SashaMIT:codered-mirror-dashes
Open

SashaMIT wants to merge 1 commit into
mapbox:masterfrom
SashaMIT:codered-mirror-dashes

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Sep 27, 2026 •

Copy link
Copy Markdown

Summary

  • evaluate turns a module name into the npm config key {name}_binary_host_mirror by replacing - with _.
  • String.replace stops at the first dash. confluent-kafka-javascript looked up npm_config_confluent_kafka-javascript_binary_host_mirror, missed npm_config_confluent_kafka_javascript_binary_host_mirror, and returned the package host.
  • A name with one dash, such as canvas-prebuilt, still uses the mirror.

Fixes #896.

Test plan

  • npm test 1015 passed

String.replace stopped at the first dash, so a name like confluent-kafka-javascript ignored the mirror and used the package host.
@SashaMIT
SashaMIT requested a review from a team as a code owner September 27, 2026 11:36
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.

binary host mirror override does not work for module_names with multiple dashes

1 participant