(newVersion)
| 376 | * version that is about to be published |
| 377 | */ |
| 378 | export function updateFKCoreVersionExport(newVersion) { |
| 379 | const fileNames = ['index.cjs', 'index.d.cts', 'index.mjs'] |
| 380 | const coreBuiltFiles = {} |
| 381 | fileNames.forEach((fileName) => { |
| 382 | coreBuiltFiles[fileName] = fs.readFileSync( |
| 383 | `${packagesDir}/core/dist/${fileName}`, |
| 384 | 'utf8' |
| 385 | ) |
| 386 | }) |
| 387 | Object.keys(coreBuiltFiles).forEach((fileName) => { |
| 388 | coreBuiltFiles[fileName] = coreBuiltFiles[fileName].replace( |
| 389 | '__FKV__', |
| 390 | newVersion |
| 391 | ) |
| 392 | fs.writeFileSync( |
| 393 | `${packagesDir}/core/dist/${fileName}`, |
| 394 | coreBuiltFiles[fileName], |
| 395 | { encoding: 'utf8' } |
| 396 | ) |
| 397 | }) |
| 398 | } |
| 399 | |
| 400 | /** |
| 401 | * Get all the inputs declared in the inputs/index.ts file. |
no outgoing calls
no test coverage detected