Vigia

Nâng cấp @babel/core từ 7.x lên 8.x

So sánh API công khai của @babel/core 7.29.7 và 8.0.6, được tính tự động từ kiểu TypeScript. Chữ ký thay đổi là thay đổi có thể không tương thích, không phải điều chắc chắn.

Tóm tắt

Đường dẫn import bị xóa0
Export bị xóa22
Chữ ký thay đổi26
Thành viên lớp hoặc interface bị xóa0
Thành viên lớp hoặc interface thay đổi9
Mới bị ngừng hỗ trợ0
Thay đổi yêu cầu (engines, phụ thuộc peer)1
Export mới21

Export bị xóa

importexportkindTrước
@babel/coreNodetypet.Node
@babel/coreBabelFileinterfaceinterface
@babel/corePluginObjinterfaceinterface
@babel/coreEnvFunctioninterfaceinterface
@babel/coreParseResulttypeany
@babel/coreMatchPatterntypestring | RegExp | ((filename: string | undefined, context: MatchPatternContext) => boolean)
@babel/coreParserOptionsvariableany
@babel/corePluginOptionstypefalse | object | undefined
@babel/coreConfigFunctiontype(api: ConfigAPI) => TransformOptions
@babel/coreSimpleCacheKeytypestring | number | boolean | null | undefined
@babel/coreBabelFileResultinterfaceinterface
@babel/coreTransformCallerinterfaceinterface
@babel/coreGeneratorOptionsvariableany
@babel/coreTransformOptionsinterfaceinterface
@babel/coreBabelFileMetadatainterfaceinterface
@babel/coreFileParseCallbacktype(err: Error | null, result: any) => any
@babel/coreFileResultCallbacktype(err: Error | null, result: BabelFileResult | null) => any
@babel/coreMatchPatternContextinterfaceinterface
@babel/coreSimpleCacheCallbacktype() => T
@babel/coreCreateConfigItemOptionsinterfaceinterface
@babel/coreSimpleCacheConfiguratorinterfaceinterface
@babel/coreBabelFileModulesMetadatainterfaceinterface

Chữ ký thay đổi

exportTrướcSau
@babel/core · parse(code: string, callback: FileParseCallback): void | (code: string, options: TransformOptions | undefined, callback: FileParseCallback): void | (code: string, options?: TransformOptions | undefined): any(code: string, callback: FileParseCallback): void | (code: string, opts: InputOptions | null | undefined, callback: FileParseCallback): void
@babel/core · Visitorany_babel_traverse.Visitor<S>
@babel/core · ConfigAPIinterface{ version: string; cache: SimpleCacheConfigurator; env: EnvFunction; async: () => boolean; assertVersion: (range: string | number) => void; caller: CallerFactory; }
@babel/core · parseSync(code: string, options?: TransformOptions | undefined): any(...args: any): any
@babel/core · transform(code: string, callback: FileResultCallback): void | (code: string, opts: TransformOptions | undefined, callback: FileResultCallback): void | (code: string, opts?: TransformOptions | undefined): BabelFileResult | null(code: string, callback: FileResultCallback): void | (code: string, opts: InputOptions | null | undefined, callback: FileResultCallback): void
@babel/core · ConfigIteminterfaceclass
@babel/core · PluginItemPluginTarget | ConfigItem | PluginObj<any> | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]ConfigItem<PluginAPI> | PluginTarget<Option> | [PluginTarget<Option>, Option] | [PluginTarget<Option>, Option, string]
@babel/core · PluginPassinterfaceclass
@babel/core · parseAsync(code: string, options?: TransformOptions | undefined): Promise<any>(...args: any): Promise<any>
@babel/core · loadOptions(options?: TransformOptions | undefined): object | null(opts: InputOptions | null | undefined, callback?: ((err: Error, val: ResolvedOptions | null) => void) | undefined): void
@babel/core · PluginTargetstring | object | ((...args: any[]) => any)string | MaybeDefaultProperty<(api: PluginAPI, options: Option, dirname: string) => PluginObject<PluginPass<object>>>
@babel/core · PartialConfiginterfaceclass
@babel/core · resolvePlugin(name: string, dirname: string): string | null(name: string, dirname: string): string
@babel/core · resolvePreset(name: string, dirname: string): string | null(name: string, dirname: string): string
@babel/core · transformFile(filename: string, callback: FileResultCallback): void | (filename: string, opts: TransformOptions | undefined, callback: FileResultCallback): void(filename: string, callback: FileResultCallback): void | (filename: string, opts: InputOptions | null | undefined, callback: FileResultCallback): void
@babel/core · transformSync(code: string, opts?: TransformOptions | undefined): BabelFileResult | null(...args: any): FileResult | null
@babel/core · transformAsync(code: string, opts?: TransformOptions | undefined): Promise<BabelFileResult | null>(...args: any): Promise<FileResult | null>
@babel/core · createConfigItem(value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined], options?: CreateConfigItemOptions | undefined): ConfigItem(target: PluginTarget<object>, options: { dirname?: string | undefined; type?: "preset" | "plugin" | undefined; } | undefined, callback?: ((err: Error, val: ConfigItem<PluginAPI> | null) => void) | undefined): void
@babel/core · transformFromAst(ast: t.Node, code: string | undefined, callback: FileResultCallback): void | (ast: t.Node, code: string | undefined, opts: TransformOptions | undefined, callback: FileResultCallback): void(ast: any, code: string, callback: FileResultCallback): void | (ast: any, code: string, opts: InputOptions | null | undefined, callback: FileResultCallback): void
@babel/core · loadPartialConfig(options?: TransformOptions | undefined): Readonly<PartialConfig> | null(opts: InputOptions | undefined, callback?: ((err: Error, val: PartialConfig | null) => void) | undefined): void
@babel/core · transformFileSync(filename: string, opts?: TransformOptions | undefined): BabelFileResult | null(...args: any): FileResult | null
@babel/core · DEFAULT_EXTENSIONS[".js", ".jsx", ".es6", ".es", ".mjs"]readonly [".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]
@babel/core · transformFileAsync(filename: string, opts?: TransformOptions | undefined): Promise<BabelFileResult | null>(...args: any): Promise<FileResult | null>
@babel/core · transformFromAstSync(ast: t.Node, code?: string | undefined, opts?: TransformOptions | undefined): BabelFileResult | null(...args: any): FileResult | null
@babel/core · transformFromAstAsync(ast: t.Node, code?: string | undefined, opts?: TransformOptions | undefined): Promise<BabelFileResult | null>(...args: any): Promise<FileResult | null>
@babel/core · loadPartialConfigAsync(options?: TransformOptions | undefined): Promise<Readonly<PartialConfig> | null>(...args: any): Promise<PartialConfig | null>

Thành viên lớp hoặc interface bị xóa

Không phát hiện.

Thành viên lớp hoặc interface thay đổi

memberTrướcSau
ConfigItem.file{ request: string; resolved: string; } | null | undefinedvoid | { request: string; resolved: string; }
ConfigItem.namestring | undefinedstring | void
ConfigItem.valueobject | ((...args: any[]) => any)object | Function
ConfigItem.optionsfalse | object | undefinedfalse | void | object
PluginPass.keystringstring | null | undefined
PluginPass.set(key: unknown, value: unknown): void(key: unknown, val: unknown): void
PluginPass.fileBabelFileFile
PluginPass.optsobjectPartial<Options>
PartialConfig.optionsTransformOptionsNormalizedOptions

Mới bị ngừng hỗ trợ

Không phát hiện.

Thay đổi yêu cầu (engines, phụ thuộc peer)

TrướcSau
engines.node>=6.9.0^22.18.0 || >=24.11.0
Export mới (21)
importexportkind
@babel/coreFileclass
@babel/coreScopevariable
@babel/coregetEnvfunction
@babel/coretokTypesvariable
@babel/corePluginAPItype
@babel/corePresetAPItype
@babel/coreFileResulttype
@babel/corePresetItemtype
@babel/coreVisitorBasetype
@babel/coreInputOptionstype
@babel/corePluginObjecttype
@babel/corePresetObjecttype
@babel/corePresetTargettype
@babel/coreCallerMetadatatype
@babel/coreloadOptionsSyncfunction
@babel/coreloadOptionsAsyncfunction
@babel/coreNormalizedOptionstype
@babel/corebuildExternalHelpersfunction
@babel/corecreateConfigItemSyncfunction
@babel/corecreateConfigItemAsyncfunction
@babel/coreloadPartialConfigSyncfunction

Câu hỏi thường gặp

Nâng cấp @babel/core từ 7 lên 8 có những thay đổi không tương thích nào?

Giữa @babel/core 7.29.7 và 8.0.6, Vigia tìm thấy 22 export bị xóa, 26 chữ ký thay đổi và 9 thành viên lớp hoặc interface bị xóa hay thay đổi.

Những gì bị ngừng hỗ trợ trong @babel/core 8?

0 export hoặc thành viên mới bị đánh dấu ngừng hỗ trợ trong @babel/core 8.0.6.

Dành cho tác tử

GET https://vigia.coredls.cloud/v1/packages/npm/@babel/core/upgrade?from=7.29.7&to=8.0.6