Repository: parcel-bundler/parcel
File: packages/core/types-internal/src/index.js (JavaScript)

Code before:
  targets?: {[string]: PackageTargetDescriptor, ...},
  dependencies?: PackageDependencies,
  devDependencies?: PackageDependencies,
  peerDependencies?: PackageDependencies,
  sideEffects?: boolean | FilePath | Array<FilePath>,
  bin?: string | {|[string]: FilePath|},
  ...
};

export type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'verbose';
export type BuildMode = 'development' | 'production' | string;
export type DetailedReportOptions = {|
  assetsPerBundle?: number,
|};

declare type GlobPattern = string;

export type InitialParcelOptionsInternal<WorkerFarm> = {|
  +entries?: FilePath | Array<FilePath>,
  +config?: DependencySpecifier,
  +defaultConfig?: DependencySpecifier,
  +env?: EnvMap,
  +targets?: ?(Array<string> | {+[string]: TargetDescriptor, ...}),

  +shouldDisableCache?: boolean,
  +cacheDir?: FilePath,
  +watchDir?: FilePath,
  +watchBackend?: BackendType,
  +watchIgnore?: Array<FilePath | GlobPattern>,
  +mode?: BuildMode,
  +hmrOptions?: ?HMROptions,
  +shouldContentHash?: boolean,
  +serveOptions?: InitialServerOptions | false,
  +shouldAutoInstall?: boolean,
  +logLevel?: LogLevel,
  +shouldProfile?: boolean,
  +shouldTrace?: boolean,
  +shouldPatchConsole?: boolean,
  +shouldBuildLazily?: boolean,
  +lazyIncludes?: string[],
  +lazyExcludes?: string[],
  +shouldBundleIncrementally?: boolean,
  +unstableFileInvalidations?: Array<Event>,

  +inputFS?: FileSystem,
  +outputFS?: FileSystem,
  +cache?: Cache,
  +workerFarm?: WorkerFarm,
  +packageManager?: PackageManager,
  +detailedReport?: ?DetailedReportOptions,


Review comment (suggestion):
~This is a breaking change for this package. Is there a way we can retain the old type?~

Ignore me, I can see this is the new package

Code after:
    [PackageName | FilePath | Glob]:
      | PackageName
      | FilePath
      | {|global: string|},
    ...
  },
  browserslist?: Array<string> | {[string]: Array<string>},
  engines?: Engines,
  targets?: {[string]: PackageTargetDescriptor, ...},
  dependencies?: PackageDependencies,
  devDependencies?: PackageDependencies,
  peerDependencies?: PackageDependencies,
  sideEffects?: boolean | FilePath | Array<FilePath>,
  bin?: string | {|[string]: FilePath|},
  ...
};

export type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'verbose';
export type BuildMode = 'development' | 'production' | string;
export type DetailedReportOptions = {|
  assetsPerBundle?: number,
|};

declare type GlobPattern = string;

export type InitialParcelOptionsInternal<WorkerFarm> = {|
  +entries?: FilePath | Array<FilePath>,
  +config?: DependencySpecifier,
  +defaultConfig?: DependencySpecifier,
  +env?: EnvMap,
  +targets?: ?(Array<string> | {+[string]: TargetDescriptor, ...}),

  +shouldDisableCache?: boolean,
  +cacheDir?: FilePath,
  +watchDir?: FilePath,
  +watchBackend?: BackendType,
  +watchIgnore?: Array<FilePath | GlobPattern>,
  +mode?: BuildMode,
  +hmrOptions?: ?HMROptions,
  +shouldContentHash?: boolean,
  +serveOptions?: InitialServerOptions | false,
  +shouldAutoInstall?: boolean,
  +logLevel?: LogLevel,
  +shouldProfile?: boolean,
  +shouldTrace?: boolean,
  +shouldPatchConsole?: boolean,
  +shouldBuildLazily?: boolean,
  +lazyIncludes?: string[],
  +lazyExcludes?: string[],
  +shouldBundleIncrementally?: boolean,
  +unstableFileInvalidations?: Array<Event>,