Skip to content

Commit 81f1ba9

Browse files
committed
Grouped const inits
1 parent 5d15bd9 commit 81f1ba9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

utils/bump/chatbots.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const gitCmd = process.platform == 'win32' ? 'git' : '/usr/bin/git' // same as
3232
// Import bump.mjs
3333
fs.mkdirSync(path.dirname(cachePaths.bumpmjs), { recursive: true })
3434
fs.writeFileSync(cachePaths.bumpmjs, (await (await fetch(script.urls.bumpmjs)).text()))
35-
const bump = await import(`file://${cachePaths.bumpmjs}`)
35+
const bump = await import(`file://${cachePaths.bumpmjs}`),
36+
{ bumpVersion, colors: { ansi }, findFileBySuffix, initKudoSyncBot, log } = bump
3637
fs.unlinkSync(cachePaths.bumpmjs)
37-
const { bumpVersion, colors: { ansi }, findFileBySuffix, initKudoSyncBot, log } = bump
3838

3939
log.working(`\n${script.config.cache ? 'Collecting' : 'Searching for'} chatbot userscripts...\n`)
4040
let chatbotFiles = []

utils/bump/userscript-requires.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ cache.paths.userscripts = path.join(process.cwd(), `${cache.paths.root}/userscri
3838
// Import bump.mjs
3939
fs.mkdirSync(path.dirname(cache.paths.bumpmjs), { recursive: true })
4040
fs.writeFileSync(cache.paths.bumpmjs, (await (await fetch(script.urls.bumpmjs)).text()))
41-
const bump = await import(`file://${cache.paths.bumpmjs}`)
41+
const bump = await import(`file://${cache.paths.bumpmjs}`),
42+
{ bumpVersion, findFileBySuffix, generateSRIhash, getLatestCommitHash, isValidResource, log } = bump
4243
fs.unlinkSync(cache.paths.bumpmjs)
43-
const { bumpVersion, findFileBySuffix, generateSRIhash, getLatestCommitHash, isValidResource, log } = bump
4444

4545
log.working(`\n${ script.modes.cache ? 'Collecting' : 'Searching for' } userscripts...\n`)
4646
let userscripts

0 commit comments

Comments
 (0)