Update some readFileSync to await readFile with top level await (#20525)
* Update some readFileSync to await readFile with top level await * More updates * Update all-products.js * Use 'lib/readfile-async.js' in runtime files for better performance * Remove unnecessary use of 'for await...of' loops * Revert to importing 'fs/promises' Co-authored-by: James M. Greene <jamesmgreene@github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import fs from 'fs'
|
||||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
import { getOctokit } from '@actions/github'
|
||||
import enterpriseDates from '../../lib/enterprise-dates.js'
|
||||
@@ -74,7 +74,7 @@ async function run() {
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
const milestoneSteps = fs.readFileSync(
|
||||
const milestoneSteps = await fs.readFile(
|
||||
path.join(
|
||||
process.cwd(),
|
||||
`.github/actions-scripts/enterprise-server-issue-templates/${milestone}-issue.md`
|
||||
|
||||
Reference in New Issue
Block a user