MCPcopy Index your code
hub / github.com/freshframework/fresh / updateVersions

Function updateVersions

tools/release.ts:123–147  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

121]);
122
123function updateVersions(content: string): string {
124 const replaced = content
125 .replace(
126 /FRESH_VERSION\s=\s["']([^'"]+)['"]/g,
127 `FRESH_VERSION = "${nextVersion}"`,
128 )
129 .replace(
130 /FRESH_TAILWIND_VERSION\s=\s["']([^'"]+)['"]/g,
131 `FRESH_TAILWIND_VERSION = "${denoTailwindJson.version!}"`,
132 )
133 .replace(
134 /PREACT_VERSION\s=\s["']([^'"]+)['"]/g,
135 `PREACT_VERSION = "${preactVersion!}"`,
136 )
137 .replace(
138 /PREACT_SIGNALS_VERSION\s=\s["']([^'"]+)['"]/g,
139 `PREACT_SIGNALS_VERSION = "${preactSignalsVersion!}"`,
140 );
141
142 if (content === replaced) {
143 exitError(`Did not find FRESH_VERSION string`);
144 }
145
146 return replaced;
147}
148
149function replaceDepVersion(
150 registry: "jsr" | "npm",

Callers

nothing calls this directly

Calls 1

exitErrorFunction · 0.85

Tested by

no test coverage detected