Skip to content

Commit 8eb64b0

Browse files
authored
chore: npm audit (#42)
Updated dependencies, and ran `npm audit` to fix vulnerabilities. One of our development dependencies (`webfont`, used to build our custom VS Code icons) is affected, so we had to disable temporarily our `build/icon-font.mjs` script.
1 parent a5e543e commit 8eb64b0

File tree

3 files changed

+196
-1251
lines changed

3 files changed

+196
-1251
lines changed

build/icon-font.mjs

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
import fs from "node:fs/promises";
2-
import path from "node:path";
1+
// DANGER: This file is ignored because it requires the "webfont" package, which has
2+
// been compromised to some extent through https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised.
3+
// Ideally, we will replace this with a safer alternative in the future, or restore when the package is fixed.
34

4-
import { webfont } from "webfont";
5+
// import fs from "node:fs/promises";
6+
// import path from "node:path";
57

6-
const svgsDir = path.resolve(`${import.meta.dirname}/../resources/icons`);
7-
const svgs = await fs
8-
.readdir(svgsDir)
9-
.then((files) => files.filter((file) => file.endsWith(".svg")))
10-
.then((files) => files.map((file) => `${svgsDir}/${file}`));
8+
// import { webfont } from "webfont";
119

12-
const dest = `${import.meta.dirname}/../resources/fonts/localstack.woff`;
10+
// const svgsDir = path.resolve(`${import.meta.dirname}/../resources/icons`);
11+
// const svgs = await fs
12+
// .readdir(svgsDir)
13+
// .then((files) => files.filter((file) => file.endsWith(".svg")))
14+
// .then((files) => files.map((file) => `${svgsDir}/${file}`));
1315

14-
async function generateFont() {
15-
try {
16-
const result = await webfont({
17-
files: svgs,
18-
formats: ["woff"],
19-
startUnicode: 0xe000,
20-
normalize: true,
21-
sort: false,
22-
});
23-
await fs.mkdir(path.dirname(dest), { recursive: true });
24-
await fs.writeFile(dest, result.woff, "binary");
25-
console.log(`Font created at ${path.relative(process.cwd(), dest)}`);
26-
} catch (error) {
27-
console.error("Font creation failed.", error);
28-
}
29-
}
16+
// const dest = `${import.meta.dirname}/../resources/fonts/localstack.woff`;
3017

31-
await generateFont();
18+
// async function generateFont() {
19+
// try {
20+
// const result = await webfont({
21+
// files: svgs,
22+
// formats: ["woff"],
23+
// startUnicode: 0xe000,
24+
// normalize: true,
25+
// sort: false,
26+
// });
27+
// await fs.mkdir(path.dirname(dest), { recursive: true });
28+
// await fs.writeFile(dest, result.woff, "binary");
29+
// console.log(`Font created at ${path.relative(process.cwd(), dest)}`);
30+
// } catch (error) {
31+
// console.error("Font creation failed.", error);
32+
// }
33+
// }
34+
35+
// await generateFont();

0 commit comments

Comments
 (0)