将 minimatch 从 10.x 升级到 11.x
根据 TypeScript 类型自动比较 minimatch 10.2.6 与 11.0.8 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 3 |
| 已修改的签名 | 3 |
| 已删除的类或接口成员 | 9 |
| 已修改的类或接口成员 | 2 |
| 新增弃用 | 0 |
| 要求变化(engines、peer 依赖) | 1 |
| 新增导出 | 5 |
已删除的导出
| import | export | kind | 之前 |
|---|---|---|---|
minimatch | AST | class | class |
minimatch | makeRe | variable | (pattern: string, options?: MinimatchOptions | undefined): false | MMRegExp |
minimatch | MMRegExp | type | RegExp & { _src?: string | undefined; _glob?: string | undefined; } |
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
minimatch · defaults | (def: MinimatchOptions): { (p: string, pattern: string, options?: MinimatchOptions | undefined): boolean; sep: Sep; GLOBSTAR: typeof GLOBSTAR; filter: (pattern: string, options?: MinimatchOptions | undefined) => (p: string) => boolean; defaults: (def: MinimatchOptions) => any; braceExpand: (pattern: string, options?: MinimatchOptions | undefined) => string[]; makeRe: (pattern: string, options?: MinimatchOptions | undefined) => false | MMRegExp; match: (list: string[], pattern: string, options?: MinimatchOptions | undefined) => string[]; AST: typeof AST; Minimatch: typeof Minimatch; escape: (s:… | (def: MinimatchOptions): { (p: string, pattern: string, options?: MinimatchOptions | undefined): boolean; sep: Sep; GLOBSTAR: typeof GLOBSTAR; filter: (pattern: string, options?: MinimatchOptions | undefined) => (p: string) => boolean; defaults: (def: MinimatchOptions) => any; braceExpand: (pattern: string, options?: MinimatchOptions | undefined) => string[]; match: (list: string[], pattern: string, options?: MinimatchOptions | undefined) => string[]; Minimatch: typeof Minimatch; escape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<MinimatchOptions, "windowsPathsNoEscape" | "mag… |
minimatch · ParseReturn | false | ParseReturnFiltered | any |
minimatch · ParseReturnFiltered | string | typeof GLOBSTAR | MMRegExp | any |
已删除的类或接口成员
| member | import | 之前 |
|---|---|---|
Minimatch.debug | minimatch | (..._: unknown[]): void |
Minimatch.makeRe | minimatch | (): false | MMRegExp |
Minimatch.regexp | minimatch | false | MMRegExp | null |
Minimatch.matchOne | minimatch | (file: string[], pattern: ParseReturn[], partial?: boolean | undefined): boolean |
Minimatch.partsMatch | minimatch | (a: string[], b: string[], emptyGSMatch?: boolean | undefined): false | string[] |
Minimatch.slashSplit | minimatch | (p: string): string[] |
Minimatch.levelTwoFileOptimize | minimatch | (parts: string | string[]): string[] |
MinimatchOptions.debug | minimatch | boolean | undefined |
MinimatchOptions.maxExtglobRecursion | minimatch | number | undefined |
已修改的类或接口成员
| member | 之前 | 之后 |
|---|---|---|
Minimatch.set | ParseReturnFiltered[][] | any[][] |
Minimatch.parse | (pattern: string): ParseReturn | (pattern: string): any |
新增弃用
未发现。
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
engines.node | 18 || 20 || >=22 | — |
新增导出 (5)
| import | export | kind |
|---|---|---|
minimatch | Form | variable |
minimatch | PathSeps | type |
minimatch | RowShape | type |
minimatch | SplitPath | type |
minimatch | GlobstarParts | type |
把这些数据交给你的 AI 智能体
Vigia 是免费的 MCP 服务器:你的编程智能体在写代码之前就能检查版本、不兼容变更和安全漏洞。无需注册,无需 API 密钥。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
添加到 Cursor添加到 VS Code★ 在 GitHub 上加星
任何其他 MCP 客户端
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }常见问题
将 minimatch 从 10 升级到 11 有哪些不兼容变更?
在 minimatch 10.2.6 与 11.0.8 之间,Vigia 发现 3 个已删除的导出、3 个已修改的签名,以及 11 个已删除或修改的类或接口成员。
minimatch 11 中弃用了哪些内容?
minimatch 11.0.8 中有 0 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/minimatch/upgrade?from=10.2.6&to=11.0.8