summaryrefslogtreecommitdiff
path: root/scripts/notify
diff options
context:
space:
mode:
authorGravatar FredKSchott <FredKSchott@users.noreply.github.com> 2022-03-19 17:34:21 +0000
committerGravatar GitHub Actions <actions@github.com> 2022-03-19 17:34:21 +0000
commit2a8580c25161a4d0f9e295403937ca3126f112c8 (patch)
tree33c0a4a07383b44d5b14d88a606857db23fc75d6 /scripts/notify
parent9219d5e1c088f4835c974804fec65ecd9c659496 (diff)
downloadastro-2a8580c25161a4d0f9e295403937ca3126f112c8.tar.gz
astro-2a8580c25161a4d0f9e295403937ca3126f112c8.tar.zst
astro-2a8580c25161a4d0f9e295403937ca3126f112c8.zip
[ci] format
Diffstat (limited to 'scripts/notify')
-rwxr-xr-xscripts/notify/index.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/notify/index.js b/scripts/notify/index.js
index c8e8a242b..a0505c9ae 100755
--- a/scripts/notify/index.js
+++ b/scripts/notify/index.js
@@ -1,6 +1,6 @@
import { globby as glob } from 'globby';
import { fileURLToPath } from 'node:url';
-import { readFile } from 'node:fs/promises'
+import { readFile } from 'node:fs/promises';
const baseUrl = new URL('https://github.com/withastro/astro/blob/main/');
@@ -57,12 +57,14 @@ function singularlize(text) {
const packageMap = new Map();
async function generatePackageMap() {
const packageRoot = new URL('../../packages/', import.meta.url);
- const packages = await glob(['*/package.json', '*/*/package.json'], { cwd: fileURLToPath(packageRoot) })
- await Promise.all(packages.map(async (pkg) => {
- const pkgFile = fileURLToPath(new URL(pkg, packageRoot));
- const content = await readFile(pkgFile).then(res => JSON.parse(res.toString()))
- packageMap.set(content.name, `./packages/${pkg.replace('/package.json', '')}`);
- }))
+ const packages = await glob(['*/package.json', '*/*/package.json'], { cwd: fileURLToPath(packageRoot) });
+ await Promise.all(
+ packages.map(async (pkg) => {
+ const pkgFile = fileURLToPath(new URL(pkg, packageRoot));
+ const content = await readFile(pkgFile).then((res) => JSON.parse(res.toString()));
+ packageMap.set(content.name, `./packages/${pkg.replace('/package.json', '')}`);
+ })
+ );
}
async function run() {