@parcel/types
Advanced tools
Comparing version 2.0.0-alpha.3.1 to 2.0.0-nightly.65
180
index.js
@@ -15,2 +15,3 @@ // @flow strict-local | ||
export type ConfigResult = _ConfigResult; | ||
export type EnvMap = typeof process.env; | ||
@@ -47,3 +48,3 @@ export type JSONValue = | ||
reporters?: Array<PackageName>, | ||
validators?: {[Glob]: Array<PackageName>, ...} | ||
validators?: {[Glob]: Array<PackageName>, ...}, | ||
|}; | ||
@@ -54,3 +55,3 @@ | ||
filePath: FilePath, | ||
resolveFrom?: FilePath | ||
resolveFrom?: FilePath, | ||
|}; | ||
@@ -69,3 +70,3 @@ | ||
inline?: boolean, | ||
inlineSources?: boolean | ||
inlineSources?: boolean, | ||
|}; | ||
@@ -80,2 +81,3 @@ | ||
+publicUrl: ?string; | ||
+loc: ?SourceLocation; | ||
} | ||
@@ -100,3 +102,3 @@ | ||
sourceMap?: TargetSourceMapOptions, | ||
isLibrary?: boolean | ||
isLibrary?: boolean, | ||
|}; | ||
@@ -106,3 +108,3 @@ | ||
...PackageTargetDescriptor, | ||
distDir: FilePath | ||
distDir: FilePath, | ||
|}; | ||
@@ -115,3 +117,3 @@ | ||
outputFormat?: OutputFormat, | ||
isLibrary?: boolean | ||
isLibrary?: boolean, | ||
|}; | ||
@@ -121,3 +123,3 @@ | ||
[string]: string, | ||
... | ||
..., | ||
}; | ||
@@ -141,3 +143,3 @@ | ||
type PackageDependencies = {| | ||
[PackageName]: Semver | ||
[PackageName]: Semver, | ||
|}; | ||
@@ -172,3 +174,3 @@ | ||
defaultConfig?: ResolvedParcelConfigFile, | ||
env?: {[string]: string, ...}, | ||
env?: EnvMap, | ||
targets?: ?(Array<string> | {+[string]: TargetDescriptor, ...}), | ||
@@ -183,3 +185,3 @@ | ||
sourceMaps?: boolean, | ||
hot?: ServerOptions | false, | ||
hot?: boolean, | ||
serve?: ServerOptions | false, | ||
@@ -195,3 +197,3 @@ autoinstall?: boolean, | ||
packageManager?: PackageManager, | ||
defaultEngines?: Engines | ||
defaultEngines?: Engines, | ||
@@ -209,4 +211,4 @@ // contentHash | ||
+sourceMaps: boolean; | ||
+env: {+[string]: string, ...}; | ||
+hot: ServerOptions | false; | ||
+env: EnvMap; | ||
+hot: boolean; | ||
+serve: ServerOptions | false; | ||
@@ -227,3 +229,3 @@ +autoinstall: boolean; | ||
https?: HTTPSOptions | boolean, | ||
publicUrl?: string | ||
publicUrl?: string, | ||
|}; | ||
@@ -233,5 +235,6 @@ | ||
cert: FilePath, | ||
key: FilePath | ||
key: FilePath, | ||
|}; | ||
// Source locations are 1-based, meaning lines and columns start at 1 | ||
export type SourceLocation = {| | ||
@@ -241,8 +244,8 @@ filePath: string, | ||
line: number, | ||
column: number | ||
column: number, | ||
|}, | ||
end: {| | ||
line: number, | ||
column: number | ||
|} | ||
column: number, | ||
|}, | ||
|}; | ||
@@ -269,3 +272,3 @@ | ||
target?: Target, | ||
symbols?: Map<Symbol, Symbol> | ||
symbols?: Map<Symbol, Symbol>, | ||
|}; | ||
@@ -293,3 +296,3 @@ | ||
filePath: FilePath, | ||
hash?: string | ||
hash?: string, | ||
|}; | ||
@@ -322,4 +325,4 @@ | ||
packageKey?: string, | ||
parse?: boolean | ||
|} | ||
parse?: boolean, | ||
|}, | ||
): Promise<ConfigResult | null>; | ||
@@ -369,4 +372,4 @@ getPackage(): Promise<PackageJSON | null>; | ||
parse?: boolean, | ||
exclude?: boolean | ||
|} | ||
exclude?: boolean, | ||
|}, | ||
): Promise<ConfigResult | null>; | ||
@@ -378,4 +381,4 @@ getConfig( | ||
parse?: boolean, | ||
exclude?: boolean | ||
|} | ||
exclude?: boolean, | ||
|}, | ||
): Promise<ConfigResult | null>; | ||
@@ -390,3 +393,3 @@ getPackage(): Promise<PackageJSON | null>; | ||
time: number, | ||
size: number | ||
size: number, | ||
|}; | ||
@@ -396,3 +399,3 @@ | ||
code: string, | ||
map?: ?SourceMap | ||
map?: ?SourceMap, | ||
|}; | ||
@@ -426,3 +429,3 @@ | ||
type ResolveConfigFn = ( | ||
configNames: Array<FilePath> | ||
configNames: Array<FilePath>, | ||
) => Promise<FilePath | null>; | ||
@@ -432,3 +435,3 @@ | ||
warnings: Array<Diagnostic>, | ||
errors: Array<Diagnostic> | ||
errors: Array<Diagnostic>, | ||
|}; | ||
@@ -441,3 +444,3 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}): Async<ValidateResult | void>, | ||
@@ -448,4 +451,4 @@ getConfig?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}) => Async<ConfigResult | void> | ||
logger: PluginLogger, | ||
|}) => Async<ConfigResult | void>, | ||
|}; | ||
@@ -459,3 +462,3 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}) => Async<ConfigResult | void>, | ||
@@ -465,7 +468,7 @@ loadConfig?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}) => Async<void>, | ||
preSerializeConfig?: ({| | ||
config: Config, | ||
options: PluginOptions | ||
options: PluginOptions, | ||
|}) => Async<void>, | ||
@@ -475,3 +478,3 @@ postDeserializeConfig?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}) => Async<void>, | ||
@@ -481,3 +484,3 @@ canReuseAST?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}) => boolean, | ||
@@ -489,3 +492,3 @@ parse?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}) => Async<?AST>, | ||
@@ -497,3 +500,3 @@ transform({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}): Async<Array<TransformerResult | MutableAsset>>, | ||
@@ -505,3 +508,3 @@ generate?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}) => Async<GenerateOutput>, | ||
@@ -513,4 +516,4 @@ postProcess?: ({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}) => Async<Array<TransformerResult>> | ||
logger: PluginLogger, | ||
|}) => Async<Array<TransformerResult>>, | ||
|}; | ||
@@ -527,3 +530,3 @@ | ||
enter?: GraphTraversalCallback<TNode, TContext>, | ||
exit?: GraphTraversalCallback<TNode, TContext> | ||
exit?: GraphTraversalCallback<TNode, TContext>, | ||
|}; | ||
@@ -533,3 +536,3 @@ export type GraphTraversalCallback<TNode, TContext> = ( | ||
context: ?TContext, | ||
actions: TraversalActions | ||
actions: TraversalActions, | ||
) => ?TContext; | ||
@@ -555,3 +558,3 @@ | ||
type?: ?string, | ||
env?: ?Environment | ||
env?: ?Environment, | ||
|} | ||
@@ -567,3 +570,3 @@ // If an entryAsset is not provided, a bundle id, type, and environment must | ||
type: string, | ||
env: Environment | ||
env: Environment, | ||
|}; | ||
@@ -574,3 +577,3 @@ | ||
exportSymbol: Symbol | string, | ||
symbol: void | Symbol | ||
symbol: void | Symbol, | ||
|}; | ||
@@ -594,3 +597,3 @@ | ||
traverse<TContext>( | ||
visit: GraphVisitor<BundleTraversable, TContext> | ||
visit: GraphVisitor<BundleTraversable, TContext>, | ||
): ?TContext; | ||
@@ -606,3 +609,3 @@ } | ||
target: Target, | ||
entryAssetId: string | ||
entryAssetId: string, | ||
|}; | ||
@@ -625,7 +628,7 @@ | ||
traverse<TContext>( | ||
GraphVisitor<BundlerBundleGraphTraversable, TContext> | ||
GraphVisitor<BundlerBundleGraphTraversable, TContext>, | ||
): ?TContext; | ||
traverseBundles<TContext>(GraphVisitor<Bundle, TContext>): ?TContext; | ||
traverseContents<TContext>( | ||
GraphVisitor<BundlerBundleGraphTraversable, TContext> | ||
GraphVisitor<BundlerBundleGraphTraversable, TContext>, | ||
): ?TContext; | ||
@@ -638,6 +641,6 @@ } | ||
getBundleGroupsReferencedByBundle( | ||
bundle: Bundle | ||
bundle: Bundle, | ||
): Array<{| | ||
bundleGroup: BundleGroup, | ||
dependency: Dependency | ||
dependency: Dependency, | ||
|}>; | ||
@@ -657,3 +660,3 @@ getBundlesInBundleGroup(bundleGroup: BundleGroup): Array<Bundle>; | ||
traverseBundles<TContext>( | ||
visit: GraphTraversalCallback<Bundle, TContext> | ||
visit: GraphTraversalCallback<Bundle, TContext>, | ||
): ?TContext; | ||
@@ -666,3 +669,3 @@ findBundlesWithAsset(Asset): Array<Bundle>; | ||
ast?: AST, | ||
map?: ?SourceMap | ||
map?: ?SourceMap, | ||
|}; | ||
@@ -674,3 +677,3 @@ | ||
sideEffects?: boolean, | ||
code?: string | ||
code?: string, | ||
|}; | ||
@@ -682,3 +685,3 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
logger: PluginLogger, | ||
|}): Async<void>, | ||
@@ -688,4 +691,4 @@ optimize({| | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}): Async<void> | ||
logger: PluginLogger, | ||
|}): Async<void>, | ||
|}; | ||
@@ -698,4 +701,4 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}): Async<?FilePath> | ||
logger: PluginLogger, | ||
|}): Async<?FilePath>, | ||
|}; | ||
@@ -707,3 +710,3 @@ | ||
dependency?: Dependency, | ||
isEntry?: boolean | ||
isEntry?: boolean, | ||
|}; | ||
@@ -716,4 +719,4 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}): Async<void | RuntimeAsset | Array<RuntimeAsset>> | ||
logger: PluginLogger, | ||
|}): Async<void | RuntimeAsset | Array<RuntimeAsset>>, | ||
|}; | ||
@@ -730,5 +733,5 @@ | ||
Bundle, | ||
BundleGraph | ||
) => Async<{|contents: Blob, map: ?(Readable | string)|}> | ||
|}): Async<BundleResult> | ||
BundleGraph, | ||
) => Async<{|contents: Blob, map: ?(Readable | string)|}>, | ||
|}): Async<BundleResult>, | ||
|}; | ||
@@ -742,4 +745,4 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}): Async<BundleResult> | ||
logger: PluginLogger, | ||
|}): Async<BundleResult>, | ||
|}; | ||
@@ -752,4 +755,4 @@ | ||
logger: PluginLogger, | ||
filePath: FilePath | ||
|}): Async<?ResolveResult> | ||
filePath: FilePath, | ||
|}): Async<?ResolveResult>, | ||
|}; | ||
@@ -760,3 +763,4 @@ | ||
+level: 'progress', | ||
+message: string | ||
+phase?: string, | ||
+message: string, | ||
|}; | ||
@@ -767,3 +771,3 @@ | ||
+level: 'error' | 'warn' | 'info' | 'verbose', | ||
+diagnostics: Array<Diagnostic> | ||
+diagnostics: Array<Diagnostic>, | ||
|}; | ||
@@ -774,3 +778,3 @@ | ||
+level: 'success', | ||
+message: string | ||
+message: string, | ||
|}; | ||
@@ -781,11 +785,11 @@ | ||
export type BuildStartEvent = {| | ||
type: 'buildStart' | ||
type: 'buildStart', | ||
|}; | ||
type WatchStartEvent = {| | ||
type: 'watchStart' | ||
type: 'watchStart', | ||
|}; | ||
type WatchEndEvent = {| | ||
type: 'watchEnd' | ||
type: 'watchEnd', | ||
|}; | ||
@@ -796,3 +800,3 @@ | ||
phase: 'resolving', | ||
dependency: Dependency | ||
dependency: Dependency, | ||
|}; | ||
@@ -803,3 +807,3 @@ | ||
phase: 'transforming', | ||
filePath: FilePath | ||
filePath: FilePath, | ||
|}; | ||
@@ -809,3 +813,3 @@ | ||
type: 'buildProgress', | ||
phase: 'bundling' | ||
phase: 'bundling', | ||
|}; | ||
@@ -816,3 +820,3 @@ | ||
phase: 'packaging', | ||
bundle: NamedBundle | ||
bundle: NamedBundle, | ||
|}; | ||
@@ -823,3 +827,3 @@ | ||
phase: 'optimizing', | ||
bundle: NamedBundle | ||
bundle: NamedBundle, | ||
|}; | ||
@@ -838,3 +842,3 @@ | ||
buildTime: number, | ||
changedAssets: Map<string, Asset> | ||
changedAssets: Map<string, Asset>, | ||
|}; | ||
@@ -844,3 +848,3 @@ | ||
type: 'buildFailure', | ||
diagnostics: Array<Diagnostic> | ||
diagnostics: Array<Diagnostic>, | ||
|}; | ||
@@ -852,3 +856,3 @@ | ||
type: 'validation', | ||
filePath: FilePath | ||
filePath: FilePath, | ||
|}; | ||
@@ -870,4 +874,4 @@ | ||
options: PluginOptions, | ||
logger: PluginLogger | ||
|}): Async<void> | ||
logger: PluginLogger, | ||
|}): Async<void>, | ||
|}; | ||
@@ -874,0 +878,0 @@ |
{ | ||
"name": "@parcel/types", | ||
"version": "2.0.0-alpha.3.1", | ||
"version": "2.0.0-nightly.65+53632227", | ||
"license": "MIT", | ||
@@ -13,3 +13,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "291f3e6815a1a857a6165fafb1691ceeb878b8f6" | ||
"gitHead": "53632227bab3382066ed9c40456f54af9fa5614c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21041
734
1
1