MCPcopy Create free account
hub / github.com/electric-sql/electric / replaceVersionPlaceholders

Function replaceVersionPlaceholders

scripts/patch_api_spec_version.js:23–38  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

21}
22
23function replaceVersionPlaceholders(content) {
24 let updatedContent = content
25
26 for (const [packageName, placeholder] of Object.entries(
27 packageVersionPlaceholders
28 )) {
29 const version = getPackageVersion(packageName)
30
31 updatedContent = updatedContent.replace(
32 new RegExp(placeholder, `g`),
33 version
34 )
35 }
36
37 return updatedContent
38}
39
40function main() {
41 // Get the file path from command line arguments

Callers 1

mainFunction · 0.85

Calls 2

getPackageVersionFunction · 0.85
entriesMethod · 0.45

Tested by

no test coverage detected