@babel/core
Advanced tools
@@ -18,3 +18,3 @@ import path from "node:path"; | ||
| presets: dedupDescriptors(chain.presets), | ||
| options: chain.options.map(o => normalizeOptions(o)), | ||
| options: chain.options.map(o => createConfigChainOptions(o)), | ||
| files: new Set() | ||
@@ -109,3 +109,3 @@ }; | ||
| presets: isIgnored ? [] : dedupDescriptors(chain.presets), | ||
| options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)), | ||
| options: isIgnored ? [] : chain.options.map(o => createConfigChainOptions(o)), | ||
| fileHandling: isIgnored ? "ignored" : "transpile", | ||
@@ -339,3 +339,3 @@ ignore: ignoreFile || undefined, | ||
| } | ||
| function normalizeOptions(opts) { | ||
| function createConfigChainOptions(opts) { | ||
| const options = Object.assign({}, opts); | ||
@@ -342,0 +342,0 @@ delete options.extends; |
+108
-62
@@ -11,5 +11,5 @@ import * as _babel_traverse from '@babel/traverse'; | ||
| export { tokTypes } from '@babel/parser'; | ||
| import babelGenerator, { GeneratorOptions, GeneratorResult } from '@babel/generator'; | ||
| import template from '@babel/template'; | ||
| export { default as template } from '@babel/template'; | ||
| import babelGenerator, { GeneratorOptions, GeneratorResult } from '@babel/generator'; | ||
@@ -30,2 +30,3 @@ type ___CallerMetadata = CallerMetadata; | ||
| type ___PluginAPI = PluginAPI; | ||
| type ___PluginItem = PluginItem; | ||
| type ___PluginObject<S extends PluginPass = PluginPass> = PluginObject<S>; | ||
@@ -35,2 +36,3 @@ type ___PluginPass<Options = object> = PluginPass<Options>; | ||
| type ___PresetAPI = PresetAPI; | ||
| type ___PresetObject = PresetObject; | ||
| declare const ___Scope: typeof Scope; | ||
@@ -66,3 +68,3 @@ type ___Visitor<S = unknown> = Visitor<S>; | ||
| declare namespace __ { | ||
| export { type ___CallerMetadata as CallerMetadata, type ___ConfigAPI as ConfigAPI, ___ConfigItem as ConfigItem, ___DEFAULT_EXTENSIONS as DEFAULT_EXTENSIONS, ___File as File, type ___FileResult as FileResult, type ___InputOptions as InputOptions, ___NodePath as NodePath, type ___NormalizedOptions as NormalizedOptions, ___PartialConfig as PartialConfig, type ___PluginAPI as PluginAPI, type ___PluginObject as PluginObject, ___PluginPass as PluginPass, type ___PresetAPI as PresetAPI, type ValidatedOptions as PresetObject, ___Scope as Scope, type ___Visitor as Visitor, export_default as buildExternalHelpers, ___createConfigItem as createConfigItem, ___createConfigItemAsync as createConfigItemAsync, ___createConfigItemSync as createConfigItemSync, ___getEnv as getEnv, ___loadOptions as loadOptions, ___loadOptionsAsync as loadOptionsAsync, ___loadOptionsSync as loadOptionsSync, ___loadPartialConfig as loadPartialConfig, ___loadPartialConfigAsync as loadPartialConfigAsync, ___loadPartialConfigSync as loadPartialConfigSync, ___parse as parse, ___parseAsync as parseAsync, ___parseSync as parseSync, ___resolvePlugin as resolvePlugin, ___resolvePreset as resolvePreset, ___template as template, ___tokTypes as tokTypes, ___transform as transform, ___transformAsync as transformAsync, ___transformFile as transformFile, ___transformFileAsync as transformFileAsync, ___transformFileSync as transformFileSync, ___transformFromAst as transformFromAst, ___transformFromAstAsync as transformFromAstAsync, ___transformFromAstSync as transformFromAstSync, ___transformSync as transformSync, _babel_traverse__default as traverse, t as types, ___version as version }; | ||
| export { type ___CallerMetadata as CallerMetadata, type ___ConfigAPI as ConfigAPI, ___ConfigItem as ConfigItem, ___DEFAULT_EXTENSIONS as DEFAULT_EXTENSIONS, ___File as File, type ___FileResult as FileResult, type ___InputOptions as InputOptions, ___NodePath as NodePath, type ___NormalizedOptions as NormalizedOptions, ___PartialConfig as PartialConfig, type ___PluginAPI as PluginAPI, type ___PluginItem as PluginItem, type ___PluginObject as PluginObject, ___PluginPass as PluginPass, type ___PresetAPI as PresetAPI, type ___PresetObject as PresetObject, ___Scope as Scope, type ___Visitor as Visitor, export_default as buildExternalHelpers, ___createConfigItem as createConfigItem, ___createConfigItemAsync as createConfigItemAsync, ___createConfigItemSync as createConfigItemSync, ___getEnv as getEnv, ___loadOptions as loadOptions, ___loadOptionsAsync as loadOptionsAsync, ___loadOptionsSync as loadOptionsSync, ___loadPartialConfig as loadPartialConfig, ___loadPartialConfigAsync as loadPartialConfigAsync, ___loadPartialConfigSync as loadPartialConfigSync, ___parse as parse, ___parseAsync as parseAsync, ___parseSync as parseSync, ___resolvePlugin as resolvePlugin, ___resolvePreset as resolvePreset, ___template as template, ___tokTypes as tokTypes, ___transform as transform, ___transformAsync as transformAsync, ___transformFile as transformFile, ___transformFileAsync as transformFileAsync, ___transformFileSync as transformFileSync, ___transformFromAst as transformFromAst, ___transformFromAstAsync as transformFromAstAsync, ___transformFromAstSync as transformFromAstSync, ___transformSync as transformSync, _babel_traverse__default as traverse, t as types, ___version as version }; | ||
| } | ||
@@ -117,3 +119,3 @@ | ||
| interface UnloadedDescriptor<API, Options = object | undefined | false> { | ||
| interface UnloadedDescriptor<API, Options = object | undefined> { | ||
| name: string | undefined; | ||
@@ -137,3 +139,3 @@ value: object | ((api: API, options: Options, dirname: string) => unknown); | ||
| */ | ||
| declare function createConfigItem$1<API>(value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | void], { dirname, type, }?: { | ||
| declare function createConfigItem$1<API>(value: PluginItem | PresetItem, { dirname, type, }?: { | ||
| dirname?: string; | ||
@@ -192,3 +194,3 @@ type?: "preset" | "plugin"; | ||
| name?: string; | ||
| manipulateOptions?: (options: NormalizedOptions, parserOpts: ParserOptions) => void; | ||
| manipulateOptions?: (options: ResolvedOptions, parserOpts: ParserOptions) => void; | ||
| pre?: (this: S, file: File) => void | Promise<void>; | ||
@@ -215,4 +217,29 @@ post?: (this: S, file: File) => void | Promise<void>; | ||
| type InputOptions = ValidatedOptions; | ||
| type ValidatedOptions = { | ||
| type Assumptions = { | ||
| arrayLikeIsIterable?: boolean; | ||
| constantReexports?: boolean; | ||
| constantSuper?: boolean; | ||
| enumerableModuleMeta?: boolean; | ||
| ignoreFunctionLength?: boolean; | ||
| ignoreToPrimitiveHint?: boolean; | ||
| iterableIsArray?: boolean; | ||
| mutableTemplateObject?: boolean; | ||
| noClassCalls?: boolean; | ||
| noDocumentAll?: boolean; | ||
| noIncompleteNsImportDetection?: boolean; | ||
| noNewArrows?: boolean; | ||
| noUninitializedPrivateFieldAccess?: boolean; | ||
| objectRestNoSymbols?: boolean; | ||
| privateFieldsAsProperties?: boolean; | ||
| privateFieldsAsSymbols?: boolean; | ||
| pureGetters?: boolean; | ||
| setClassMethods?: boolean; | ||
| setComputedProperties?: boolean; | ||
| setPublicClassFields?: boolean; | ||
| setSpreadProperties?: boolean; | ||
| skipForOfIteratorClosing?: boolean; | ||
| superIsCallableConstructor?: boolean; | ||
| }; | ||
| type AssumptionName = keyof Assumptions; | ||
| type InputOptions = { | ||
| cwd?: string; | ||
@@ -233,6 +260,6 @@ filename?: string; | ||
| extends?: string; | ||
| env?: EnvSet<ValidatedOptions>; | ||
| ignore?: IgnoreList; | ||
| only?: IgnoreList; | ||
| overrides?: OverridesList; | ||
| env?: EnvSet<InputOptions>; | ||
| ignore?: MatchItem[]; | ||
| only?: MatchItem[]; | ||
| overrides?: InputOptions[]; | ||
| showIgnoredFiles?: boolean; | ||
@@ -242,8 +269,6 @@ test?: ConfigApplicableTest; | ||
| exclude?: ConfigApplicableTest; | ||
| presets?: PluginList; | ||
| plugins?: PluginList; | ||
| presets?: PresetItem[]; | ||
| plugins?: PluginItem[]; | ||
| passPerPreset?: boolean; | ||
| assumptions?: { | ||
| [name: string]: boolean; | ||
| }; | ||
| assumptions?: Assumptions; | ||
| targets?: TargetsListOrObject; | ||
@@ -269,5 +294,25 @@ browserslistConfigFile?: ConfigFileSearch; | ||
| }; | ||
| type NormalizedOptions = { | ||
| readonly targets: Targets; | ||
| } & Omit<ValidatedOptions, "targets">; | ||
| type NormalizedOptions = Omit<InputOptions, "presets" | "plugins"> & { | ||
| assumptions: Assumptions; | ||
| targets: Targets; | ||
| cloneInputAst: boolean; | ||
| babelrc: false; | ||
| configFile: false; | ||
| browserslistConfigFile: false; | ||
| passPerPreset: false; | ||
| envName: string; | ||
| cwd: string; | ||
| root: string; | ||
| rootMode: "root"; | ||
| filename: string | undefined; | ||
| presets: ConfigItem<PresetAPI>[]; | ||
| plugins: ConfigItem<PluginAPI$1>[]; | ||
| }; | ||
| type ResolvedOptions = Omit<NormalizedOptions, "presets" | "plugins" | "passPerPreset"> & { | ||
| presets: { | ||
| plugins: Plugin[]; | ||
| }[]; | ||
| plugins: Plugin[]; | ||
| passPerPreset: boolean; | ||
| }; | ||
| type CallerMetadata = { | ||
@@ -283,3 +328,3 @@ name: string; | ||
| }; | ||
| type IgnoreItem = string | RegExp | ((path: string | undefined, context: { | ||
| type MatchItem = string | RegExp | ((path: string | undefined, context: { | ||
| dirname: string; | ||
@@ -289,11 +334,12 @@ caller: CallerMetadata; | ||
| }) => unknown); | ||
| type IgnoreList = ReadonlyArray<IgnoreItem>; | ||
| type PluginOptions = object | false; | ||
| type PluginTarget = string | object | Function; | ||
| type PluginItem = ConfigItem<PluginAPI$1> | Plugin | PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | void]; | ||
| type PluginList = ReadonlyArray<PluginItem>; | ||
| type OverridesList = Array<ValidatedOptions>; | ||
| type ConfigApplicableTest = IgnoreItem | Array<IgnoreItem>; | ||
| type MaybeDefaultProperty<T> = T | { | ||
| default: T; | ||
| }; | ||
| type PluginTarget = string | MaybeDefaultProperty<(api: PluginAPI$1, options?: object, dirname?: string) => PluginObject>; | ||
| type PluginItem = ConfigItem<PluginAPI$1> | PluginTarget | [PluginTarget, object] | [PluginTarget, object, string]; | ||
| type PresetTarget = string | MaybeDefaultProperty<(api: PresetAPI, options?: object, dirname?: string) => PresetObject>; | ||
| type PresetItem = ConfigItem<PresetAPI> | PresetTarget | [PresetTarget, object] | [PresetTarget, object, string]; | ||
| type ConfigApplicableTest = MatchItem | Array<MatchItem>; | ||
| type ConfigFileSearch = string | boolean; | ||
| type BabelrcSearch = boolean | IgnoreItem | IgnoreList; | ||
| type BabelrcSearch = boolean | MatchItem | MatchItem[]; | ||
| type SourceMapsOption = boolean | "inline" | "both"; | ||
@@ -313,4 +359,2 @@ type SourceTypeOption = "module" | "commonjs" | "script" | "unambiguous"; | ||
| type TargetsListOrObject = Targets | InputTargets | InputTargets["browsers"]; | ||
| declare const knownAssumptions: readonly ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "noUninitializedPrivateFieldAccess", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]; | ||
| type AssumptionName = (typeof knownAssumptions)[number]; | ||
@@ -325,8 +369,8 @@ declare function loadPartialConfig$1(opts?: InputOptions): Handler<PartialConfig | null>; | ||
| options: NormalizedOptions; | ||
| babelrc: string | void; | ||
| babelignore: string | void; | ||
| config: string | void; | ||
| babelrc: string | undefined; | ||
| babelignore: string | undefined; | ||
| config: string | undefined; | ||
| fileHandling: FileHandling; | ||
| files: Set<string>; | ||
| constructor(options: NormalizedOptions, babelrc: string | void, ignore: string | void, config: string | void, fileHandling: FileHandling, files: Set<string>); | ||
| constructor(options: NormalizedOptions, babelrc: string | undefined, ignore: string | undefined, config: string | undefined, fileHandling: FileHandling, files: Set<string>); | ||
| /** | ||
@@ -341,12 +385,16 @@ * Returns true if there is a config file in the filesystem for this config. | ||
| declare const loadPartialConfigRunner: gensync.Gensync<[opts?: ValidatedOptions], PartialConfig, unknown>; | ||
| declare const loadPartialConfigRunner: gensync.Gensync<[opts?: InputOptions], PartialConfig, unknown>; | ||
| declare function loadPartialConfigAsync(...args: Parameters<typeof loadPartialConfigRunner.async>): Promise<PartialConfig>; | ||
| declare function loadPartialConfigSync(...args: Parameters<typeof loadPartialConfigRunner.sync>): PartialConfig; | ||
| declare function loadPartialConfig(opts: Parameters<typeof loadPartialConfig$1>[0], callback?: (err: Error, val: PartialConfig | null) => void): PartialConfig; | ||
| declare function loadOptionsImpl(opts: InputOptions): Handler<NormalizedOptions | null>; | ||
| declare const loadOptionsRunner: gensync.Gensync<[opts: ValidatedOptions], NormalizedOptions, unknown>; | ||
| declare function loadOptionsAsync(...args: Parameters<typeof loadOptionsRunner.async>): Promise<NormalizedOptions>; | ||
| declare function loadOptionsSync(...args: Parameters<typeof loadOptionsRunner.sync>): NormalizedOptions; | ||
| declare function loadOptions(opts: Parameters<typeof loadOptionsImpl>[0], callback?: (err: Error, val: NormalizedOptions | null) => void): NormalizedOptions; | ||
| declare const createConfigItemRunner: gensync.Gensync<[value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | void], { | ||
| declare function loadOptionsImpl(opts: InputOptions): Handler<ResolvedOptions | null>; | ||
| declare const loadOptionsRunner: gensync.Gensync<[opts: InputOptions], ResolvedOptions, unknown>; | ||
| declare function loadOptionsAsync(...args: Parameters<typeof loadOptionsRunner.async>): Promise<ResolvedOptions>; | ||
| declare function loadOptionsSync(...args: Parameters<typeof loadOptionsRunner.sync>): ResolvedOptions; | ||
| declare function loadOptions(opts: Parameters<typeof loadOptionsImpl>[0], callback?: (err: Error, val: ResolvedOptions | null) => void): ResolvedOptions; | ||
| declare const createConfigItemRunner: gensync.Gensync<[value: string | ConfigItem<PresetAPI> | ((api: PresetAPI, options?: object, dirname?: string) => PresetObject) | { | ||
| default: (api: PresetAPI, options?: object, dirname?: string) => PresetObject; | ||
| } | [PresetTarget, object] | [PresetTarget, object, string] | ConfigItem<PluginAPI$1> | ((api: PluginAPI$1, options?: object, dirname?: string) => PluginObject) | { | ||
| default: (api: PluginAPI$1, options?: object, dirname?: string) => PluginObject; | ||
| } | [PluginTarget, object] | [PluginTarget, object, string], { | ||
| dirname?: string; | ||
@@ -367,18 +415,14 @@ type?: "preset" | "plugin"; | ||
| _map: Map<unknown, unknown>; | ||
| opts: NormalizedOptions; | ||
| declarations: { | ||
| [key: string]: t.Identifier; | ||
| }; | ||
| opts: ResolvedOptions; | ||
| declarations: Record<string, t.Identifier>; | ||
| path: NodePath<t.Program>; | ||
| ast: t.File; | ||
| scope: Scope; | ||
| metadata: { | ||
| [key: string]: any; | ||
| }; | ||
| metadata: Record<string, any>; | ||
| code: string; | ||
| inputMap: any; | ||
| inputMap: SourceMapConverter; | ||
| hub: HubInterface & { | ||
| file: File; | ||
| }; | ||
| constructor(options: any, { code, ast, inputMap }: NormalizedFile); | ||
| constructor(options: ResolvedOptions, { code, ast, inputMap }: NormalizedFile); | ||
| /** | ||
@@ -440,12 +484,8 @@ * Provide backward-compatible access to the interpreter directive handling | ||
| type FileResult = { | ||
| metadata: { | ||
| [key: string]: any; | ||
| }; | ||
| options: { | ||
| [key: string]: any; | ||
| }; | ||
| metadata: Record<string, any>; | ||
| options: Record<string, any>; | ||
| ast: t.File | null; | ||
| code: string | null; | ||
| map: GeneratorResult["map"]; | ||
| sourceType: "script" | "module"; | ||
| sourceType: Exclude<SourceTypeOption, "unambiguous">; | ||
| externalDependencies: Set<string>; | ||
@@ -459,3 +499,3 @@ }; | ||
| }; | ||
| declare const transformRunner: gensync.Gensync<[code: string, opts?: ValidatedOptions], FileResult, unknown>; | ||
| declare const transformRunner: gensync.Gensync<[code: string, opts?: InputOptions], FileResult, unknown>; | ||
| declare const transform: Transform; | ||
@@ -465,3 +505,3 @@ declare function transformSync(...args: Parameters<typeof transformRunner.sync>): FileResult; | ||
| declare const transformFileRunner: gensync.Gensync<[filename: string, opts?: ValidatedOptions], FileResult, unknown>; | ||
| declare const transformFileRunner: gensync.Gensync<[filename: string, opts?: InputOptions], FileResult, unknown>; | ||
| declare function transformFile(filename: string, callback: FileResultCallback): void; | ||
@@ -478,3 +518,3 @@ declare function transformFile(filename: string, opts: InputOptions | undefined | null, callback: FileResultCallback): void; | ||
| }; | ||
| declare const transformFromAstRunner: gensync.Gensync<[ast: AstRoot, code: string, opts: ValidatedOptions], FileResult, unknown>; | ||
| declare const transformFromAstRunner: gensync.Gensync<[ast: AstRoot, code: string, opts: InputOptions], FileResult, unknown>; | ||
| declare const transformFromAst: TransformFromAst; | ||
@@ -493,3 +533,3 @@ declare function transformFromAstSync(...args: Parameters<typeof transformFromAstRunner.sync>): FileResult; | ||
| }; | ||
| declare const parseRunner: gensync.Gensync<[code: string, opts: ValidatedOptions], ParseResult, unknown>; | ||
| declare const parseRunner: gensync.Gensync<[code: string, opts: InputOptions], ParseResult, unknown>; | ||
| declare const parse: Parse; | ||
@@ -506,2 +546,8 @@ declare function parseSync(...args: Parameters<typeof parseRunner.sync>): ParseResult; | ||
| type PresetObject = { | ||
| overrides?: PresetObject[]; | ||
| test?: ConfigApplicableTest; | ||
| plugins?: PluginItem[]; | ||
| }; | ||
| /** | ||
@@ -513,2 +559,2 @@ * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as | ||
| export { type CallerMetadata, type ConfigAPI, ConfigItem, DEFAULT_EXTENSIONS, File, type FileResult, type InputOptions, type NormalizedOptions, PartialConfig, type PluginAPI, type PluginObject, PluginPass, type PresetAPI, type ValidatedOptions as PresetObject, type Visitor, export_default as buildExternalHelpers, createConfigItem, createConfigItemAsync, createConfigItemSync, getEnv, loadOptions, loadOptionsAsync, loadOptionsSync, loadPartialConfig, loadPartialConfigAsync, loadPartialConfigSync, parse, parseAsync, parseSync, resolvePlugin, resolvePreset, transform, transformAsync, transformFile, transformFileAsync, transformFileSync, transformFromAst, transformFromAstAsync, transformFromAstSync, transformSync, version }; | ||
| export { type CallerMetadata, type ConfigAPI, ConfigItem, DEFAULT_EXTENSIONS, File, type FileResult, type InputOptions, type NormalizedOptions, PartialConfig, type PluginAPI, type PluginItem, type PluginObject, PluginPass, type PresetAPI, type PresetObject, type Visitor, export_default as buildExternalHelpers, createConfigItem, createConfigItemAsync, createConfigItemSync, getEnv, loadOptions, loadOptionsAsync, loadOptionsSync, loadPartialConfig, loadPartialConfigAsync, loadPartialConfigSync, parse, parseAsync, parseSync, resolvePlugin, resolvePreset, transform, transformAsync, transformFile, transformFileAsync, transformFileSync, transformFromAst, transformFromAstAsync, transformFromAstSync, transformSync, version }; |
+1
-1
| ; | ||
| export const version = "8.0.0-beta.2"; | ||
| export const version = "8.0.0-beta.3"; | ||
| export { default as File } from "./transformation/file/file.js"; | ||
@@ -4,0 +4,0 @@ export { default as buildExternalHelpers } from "./tools/build-external-helpers.js"; |
| import * as helpers from "@babel/helpers"; | ||
| import { NodePath } from "@babel/traverse"; | ||
| import { codeFrameColumns } from "@babel/code-frame"; | ||
| import traverse from "@babel/traverse"; | ||
| import * as _t from "@babel/types"; | ||
| const { | ||
| cloneNode, | ||
| interpreterDirective | ||
| interpreterDirective, | ||
| traverseFast | ||
| } = _t; | ||
| import semver from "semver"; | ||
| const errorVisitor = { | ||
| enter(path, state) { | ||
| const loc = path.node.loc; | ||
| if (loc) { | ||
| state.loc = loc; | ||
| path.stop(); | ||
| } | ||
| } | ||
| }; | ||
| export default class File { | ||
@@ -134,7 +125,8 @@ _map = new Map(); | ||
| if (!loc && node) { | ||
| const state = { | ||
| loc: null | ||
| }; | ||
| traverse(node, errorVisitor, this.scope, state); | ||
| loc = state.loc; | ||
| traverseFast(node, function (node) { | ||
| if (node.loc) { | ||
| loc = node.loc; | ||
| return traverseFast.stop; | ||
| } | ||
| }); | ||
| let txt = "This is an error on an internal node. Probably an internal error."; | ||
@@ -141,0 +133,0 @@ if (loc) txt += " Location has been estimated."; |
+15
-15
| { | ||
| "name": "@babel/core", | ||
| "version": "8.0.0-beta.2", | ||
| "version": "8.0.0-beta.3", | ||
| "description": "Babel compiler core.", | ||
@@ -49,10 +49,10 @@ "main": "./lib/index.js", | ||
| "dependencies": { | ||
| "@babel/code-frame": "^8.0.0-beta.2", | ||
| "@babel/generator": "^8.0.0-beta.2", | ||
| "@babel/helper-compilation-targets": "^8.0.0-beta.2", | ||
| "@babel/helpers": "^8.0.0-beta.2", | ||
| "@babel/parser": "^8.0.0-beta.2", | ||
| "@babel/template": "^8.0.0-beta.2", | ||
| "@babel/traverse": "^8.0.0-beta.2", | ||
| "@babel/types": "^8.0.0-beta.2", | ||
| "@babel/code-frame": "^8.0.0-beta.3", | ||
| "@babel/generator": "^8.0.0-beta.3", | ||
| "@babel/helper-compilation-targets": "^8.0.0-beta.3", | ||
| "@babel/helpers": "^8.0.0-beta.3", | ||
| "@babel/parser": "^8.0.0-beta.3", | ||
| "@babel/template": "^8.0.0-beta.3", | ||
| "@babel/traverse": "^8.0.0-beta.3", | ||
| "@babel/types": "^8.0.0-beta.3", | ||
| "@jridgewell/remapping": "^2.3.5", | ||
@@ -67,8 +67,8 @@ "@types/gensync": "^1.0.0", | ||
| "devDependencies": { | ||
| "@babel/helper-transform-fixture-test-runner": "^8.0.0-beta.2", | ||
| "@babel/plugin-syntax-flow": "^8.0.0-beta.2", | ||
| "@babel/plugin-transform-flow-strip-types": "^8.0.0-beta.2", | ||
| "@babel/plugin-transform-modules-commonjs": "^8.0.0-beta.2", | ||
| "@babel/preset-env": "^8.0.0-beta.2", | ||
| "@babel/preset-typescript": "^8.0.0-beta.2", | ||
| "@babel/helper-transform-fixture-test-runner": "^8.0.0-beta.3", | ||
| "@babel/plugin-syntax-flow": "^8.0.0-beta.3", | ||
| "@babel/plugin-transform-flow-strip-types": "^8.0.0-beta.3", | ||
| "@babel/plugin-transform-modules-commonjs": "^8.0.0-beta.3", | ||
| "@babel/preset-env": "^8.0.0-beta.3", | ||
| "@babel/preset-typescript": "^8.0.0-beta.3", | ||
| "@jridgewell/trace-mapping": "^0.3.28", | ||
@@ -75,0 +75,0 @@ "@types/convert-source-map": "^2.0.0", |
| /* c8 ignore start */ | ||
| import type { ValidatedOptions } from "./validation/options.ts"; | ||
| import type { InputOptions } from "./validation/options.ts"; | ||
| import getTargets, { | ||
@@ -20,3 +20,3 @@ type InputTargets, | ||
| export function resolveTargets( | ||
| options: ValidatedOptions, | ||
| options: InputOptions, | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
@@ -23,0 +23,0 @@ root: string, |
@@ -8,3 +8,3 @@ type browserType = typeof import("./resolve-targets-browser"); | ||
| import type { ValidatedOptions } from "./validation/options.ts"; | ||
| import type { InputOptions } from "./validation/options.ts"; | ||
| import path from "node:path"; | ||
@@ -24,6 +24,3 @@ import getTargets, { | ||
| export function resolveTargets( | ||
| options: ValidatedOptions, | ||
| root: string, | ||
| ): Targets { | ||
| export function resolveTargets(options: InputOptions, root: string): Targets { | ||
| const optTargets = options.targets; | ||
@@ -30,0 +27,0 @@ let targets: InputTargets; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
763279
0.32%6043
0.55%14
16.67%Updated
Updated
Updated