Skip to content

Open-source status page, incident response and uptime monitoring

ui: remove glob (#2371)

Thibault Le Ouay8f42fd60e7da
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 8f2daaf6f..3f1a00135 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -93,7 +93,6 @@
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
- "glob": "catalog:",
"shadcn": "catalog:",
"tailwindcss": "catalog:",
"typescript": "catalog:"
diff --git a/packages/ui/scripts/transform-imports.mjs b/packages/ui/scripts/transform-imports.mjs
index 0696bb654..1830f8f1f 100644
--- a/packages/ui/scripts/transform-imports.mjs
+++ b/packages/ui/scripts/transform-imports.mjs
@@ -3,6 +3,7 @@
import {
cpSync,
existsSync,
+ globSync,
mkdirSync,
readFileSync,
rmSync,
@@ -11,8 +12,6 @@ import {
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
-import { globSync } from "glob";
-
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const ROOT_DIR = join(__dirname, "..");
@@ -35,10 +34,10 @@ cpSync(SRC_DIR, join(DIST_DIR, "src"), { recursive: true });
// Transform imports in all TypeScript/TSX files
console.log("✨ Transforming imports from @openstatus/ui to @...");
-const files = globSync("**/*.{ts,tsx}", {
- cwd: join(DIST_DIR, "src"),
- absolute: true,
-});
+const srcDir = join(DIST_DIR, "src");
+const files = globSync(["**/*.ts", "**/*.tsx"], { cwd: srcDir }).map((file) =>
+ join(srcDir, file),
+);
let transformCount = 0;
for (const file of files) {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b8888894f..0edb38349 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -336,9 +336,6 @@ catalogs:
feed:
specifier: 4.2.2
version: 4.2.2
- glob:
- specifier: 11.0.0
- version: 11.0.0
gray-matter:
specifier: 4.0.3
version: 4.0.3
@@ -769,7 +766,7 @@ importers:
next-auth:
specifier: 'catalog:'
next-themes:
specifier: 'catalog:'
@@ -1216,7 +1213,7 @@ importers:
next-auth:
specifier: 'catalog:'
next-intl:
specifier: 'catalog:'
@@ -1484,7 +1481,7 @@ importers:
next-auth:
specifier: 'catalog:'
next-mdx-remote:
specifier: 'catalog:'
version: 6.0.0(@types/[email protected])([email protected])
@@ -1992,7 +1989,7 @@ importers:
version: 0.31.10
next-auth:
specifier: 'catalog:'
typescript:
specifier: 'catalog:'
version: 5.9.3
@@ -3023,9 +3020,6 @@ importers:
'@types/react-dom':
specifier: 'catalog:'
version: 19.2.3(@types/[email protected])
- glob:
- specifier: 'catalog:'
- version: 11.0.0
shadcn:
specifier: 'catalog:'
@@ -4488,10 +4482,6 @@ packages:
'@types/node':
optional: true
- '@isaacs/[email protected]':
- resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
- engines: {node: '>=12'}
-
'@jridgewell/[email protected]':
resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
@@ -7450,10 +7440,6 @@ packages:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==}
engines: {node: '>=14'}
@@ -8212,9 +8198,6 @@ packages:
resolution: {integrity: sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==}
- resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
-
resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==}
@@ -8237,9 +8220,6 @@ packages:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
- resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
-
resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==}
engines: {node: '>= 0.8'}
@@ -8540,10 +8520,6 @@ packages:
debug:
optional: true
- resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
- engines: {node: '>=14'}
-
resolution: {integrity: sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==}
engines: {node: '>= 0.12'}
@@ -8663,12 +8639,6 @@ packages:
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
- resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==}
- engines: {node: 20 || >=22}
- deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
- hasBin: true
-
resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}
engines: {node: 18 || 20 || >=22}
@@ -9081,10 +9051,6 @@ packages:
resolution: {integrity: sha512-64W8/lsfqgaDWfEkvrIVk8FdIk29Mya0Fp39excQEdlcLUPg1Cn7CtCYe6CtPbFW90JpEKTXG0QQtIUNENJ7sw==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24.0.0}
- resolution: {integrity: sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==}
- engines: {node: 20 || >=22}
-
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
@@ -9959,9 +9925,6 @@ packages:
resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==}
engines: {node: '>= 14'}
- resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
-
resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==}
@@ -10765,10 +10728,6 @@ packages:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==}
engines: {node: '>=18'}
@@ -11376,10 +11335,6 @@ packages:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
- engines: {node: '>=12'}
-
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
@@ -12891,15 +12846,6 @@ snapshots:
optionalDependencies:
'@types/node': 24.12.4
- '@isaacs/[email protected]':
- dependencies:
- string-width: 5.1.2
- string-width-cjs: [email protected]
- strip-ansi: 7.1.2
- strip-ansi-cjs: [email protected]
- wrap-ansi: 8.1.0
- wrap-ansi-cjs: [email protected]
-
'@jridgewell/[email protected]':
dependencies:
'@jridgewell/sourcemap-codec': 1.5.5
@@ -15803,8 +15749,6 @@ snapshots:
dependencies:
color-convert: 2.0.1
-
@@ -16449,8 +16393,6 @@ snapshots:
readable-stream: 3.6.2
stream-shift: 1.0.3
-
dependencies:
safe-buffer: 5.2.1
@@ -16475,8 +16417,6 @@ snapshots:
-
@@ -16888,11 +16828,6 @@ snapshots:
- dependencies:
- cross-spawn: 7.0.6
- signal-exit: 4.1.0
-
dependencies:
asynckit: 0.4.0
@@ -17025,15 +16960,6 @@ snapshots:
- dependencies:
- foreground-child: 3.3.1
- jackspeak: 4.1.1
- minimatch: 10.2.5
- minipass: 7.1.3
- package-json-from-dist: 1.0.1
- path-scurry: 2.0.2
-
dependencies:
minimatch: 10.2.5
@@ -17536,10 +17462,6 @@ snapshots:
- '@noble/hashes'
- canvas
- dependencies:
- '@isaacs/cliui': 8.0.2
-
dependencies:
'@types/node': 24.12.4
@@ -18352,7 +18274,7 @@ snapshots:
dependencies:
'@auth/core': 0.41.2
@@ -18705,8 +18627,6 @@ snapshots:
degenerator: 5.0.1
netmask: 2.0.2
-
@@ -19773,12 +19693,6 @@ snapshots:
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
- dependencies:
- eastasianwidth: 0.2.0
- emoji-regex: 9.2.2
- strip-ansi: 7.1.2
-
dependencies:
emoji-regex: 10.6.0
@@ -20432,12 +20346,6 @@ snapshots:
string-width: 4.2.3
strip-ansi: 6.0.1
- dependencies:
- ansi-styles: 6.2.3
- string-width: 5.1.2
- strip-ansi: 7.1.2
-
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 3f5864cf0..bb6cff7ee 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -138,7 +138,6 @@ catalog:
drizzle-zod: 0.8.3
effect: 3.21.2
feed: 4.2.2
- glob: 11.0.0
gray-matter: 4.0.3
hono: 4.12.21
hono-rate-limiter: 0.4.2