将 @babel/parser 从 7.x 升级到 8.x
根据 TypeScript 类型自动比较 @babel/parser 7.29.13 与 8.1.2 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 3 |
| 已修改的签名 | 4 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 1 |
| 新增弃用 | 0 |
| 要求变化(engines、peer 依赖) | 1 |
| 新增导出 | 5 |
已删除的导出
| import | export | kind | 之前 |
|---|---|---|---|
@babel/parser | DecoratorsPluginOptions | interface | interface |
@babel/parser | ParserPluginWithOptions | type | ["decorators", DecoratorsPluginOptions] | ["discardBinding", { syntaxType: "void"; }] | ["estree", { classFeatures?: boolean | undefined; }] | ["importAttributes", { deprecatedAssertSyntax: boolean; }] | ["moduleAttributes", { version: "may-2020"; }] | ["optionalChainingAssign", { version: "2023-07"; }] | ["pipelineOperator", PipelineOperatorPluginOptions] | ["recordAndTuple", RecordAndTuplePluginOptions] | ["flow", { all?: boolean | undefined; }] | ["typescript", TypeScriptPluginOptions] |
@babel/parser | RecordAndTuplePluginOptions | interface | interface |
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
@babel/parser · tokTypes | { [name: string]: any; } | Record<string, ExportedTokenType> |
@babel/parser · ParseError | SyntaxError & ParseErrorSpecification<object> | SyntaxError & ({ missingPlugin?: string | string[] | undefined; loc: Position; pos: number; } & ErrorInfo) |
@babel/parser · ParseResult | Result & { comments: File; errors: ParseError[] | null; tokens?: any; } | Result & { comments: File; errors: ParseError[]; tokens?: any; } |
@babel/parser · FlowPluginOptions | { all?: boolean | undefined; } | interface |
已删除的类或接口成员
未发现。
已修改的类或接口成员
| member | 之前 | 之后 |
|---|---|---|
PipelineOperatorPluginOptions.proposal | "minimal" | "fsharp" | "hack" | "smart" | "fsharp" | "hack" |
新增弃用
未发现。
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
engines.node | >=6.0.0 | — |
新增导出 (5)
| import | export | kind |
|---|---|---|
@babel/parser | File | variable |
@babel/parser | Token | class |
@babel/parser | getLine | function |
@babel/parser | getColumn | function |
@babel/parser | Expression | variable |
把这些数据交给你的 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" } } }常见问题
将 @babel/parser 从 7 升级到 8 有哪些不兼容变更?
在 @babel/parser 7.29.13 与 8.1.2 之间,Vigia 发现 3 个已删除的导出、4 个已修改的签名,以及 1 个已删除或修改的类或接口成员。
@babel/parser 8 中弃用了哪些内容?
@babel/parser 8.1.2 中有 0 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/@babel/parser/upgrade?from=7.29.13&to=8.1.2