fix: mitigate npm dependency advisories

This commit is contained in:
hectorzhao
2026-07-26 00:29:49 +08:00
parent 54617c927e
commit b461532075
11 changed files with 190 additions and 56 deletions
+6
View File
@@ -0,0 +1,6 @@
# brace-expansion compatibility adapter
Older `minimatch` releases call `require('brace-expansion')` as a function,
while the security-fixed 5.x package exposes a named `expand` function.
This adapter preserves the legacy callable CommonJS API and delegates all
expansion work to the bounded `brace-expansion@5.0.8` implementation.
+11
View File
@@ -0,0 +1,11 @@
'use strict';
const boundedBraceExpansion = require('brace-expansion-safe');
function expand(pattern, options) {
return boundedBraceExpansion.expand(pattern, options);
}
Object.assign(expand, boundedBraceExpansion);
module.exports = expand;
+11
View File
@@ -0,0 +1,11 @@
{
"name": "brace-expansion",
"version": "5.0.8-compat.1",
"private": true,
"description": "CommonJS compatibility adapter for the bounded brace-expansion 5.0.8 implementation",
"main": "index.cjs",
"license": "MIT",
"dependencies": {
"brace-expansion-safe": "npm:brace-expansion@5.0.8"
}
}