@ckeditor/ckeditor5-dev-utils

  • Version 55.5.0
  • Published
  • 47.9 kB
  • 18 dependencies
  • GPL-2.0-or-later license

Install

npm i @ckeditor/ckeditor5-dev-utils
yarn add @ckeditor/ckeditor5-dev-utils
pnpm add @ckeditor/ckeditor5-dev-utils

Overview

Utils for CKEditor 5 development tools packages.

Index

Functions

function logger

logger: (moduleVerbosity?: Verbosity) => Logger;
  • Logger module which allows configuring the verbosity level.

    There are three levels of verbosity: 1. info - all messages will be logged, 2. warning - warning and errors will be logged, 3. error - only errors will be logged.

    Usage:

    import { logger } from '@ckeditor/ckeditor5-dev-utils';

    const infoLog = logger( 'info' ); infoLog.info( 'Message.' ); // This message will be always displayed. infoLog.warning( 'Message.' ); // This message will be always displayed. infoLog.error( 'Message.' ); // This message will be always displayed.

    const warningLog = logger( 'warning' ); warningLog.info( 'Message.' ); // This message won't be displayed. warningLog.warning( 'Message.' ); // This message will be always displayed. warningLog.error( 'Message.' ); // This message will be always displayed.

    const errorLog = logger( 'error' ); errorLog.info( 'Message.' ); // This message won't be displayed. errorLog.warning( 'Message.' ); // This message won't be displayed. errorLog.error( 'Message.' ); // This message will be always displayed.

    Additionally, the logger#error() method prints the error instance if provided as the second argument.

Namespaces

namespace loaders

module 'dist/loaders/index.d.ts' {}
  • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

function getCoverageLoader

getCoverageLoader: ({
files,
}: {
files: Array<Array<string>>;
}) => CoverageLoaderConfig;

    function getDebugLoader

    getDebugLoader: (debugFlags: Array<string>) => DebugLoaderOptions;
    • Parameter debugFlags

      Returns

      {object}

    function getFormattedTextLoader

    getFormattedTextLoader: () => { test: RegExp; use: Array<string> };
    • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

    function getIconsLoader

    getIconsLoader: ({ matchExtensionOnly }?: { matchExtensionOnly?: boolean }) => {
    test: RegExp;
    use: Array<string>;
    };
    • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

    function getJavaScriptLoader

    getJavaScriptLoader: ({
    debugFlags,
    }: {
    debugFlags: Array<string>;
    }) => JavaScriptLoaderOptions;

      function getStylesLoader

      getStylesLoader: (options: GetStylesLoaderOptions) => StylesLoader;

        function getTypeScriptLoader

        getTypeScriptLoader: (options?: TypeScriptLoaderOptions) => TypeScriptLoader;

          namespace npm

          module 'dist/npm/index.d.ts' {}
          • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

          function checkVersionAvailability

          checkVersionAvailability: (
          version: string,
          packageName: string
          ) => Promise<boolean>;
          • Checks if a specific version of a package is available in the npm registry.

          function manifest

          manifest: (
          spec: string,
          opts?: pacote.Options | undefined
          ) => Promise<pacote.AbbreviatedManifest & pacote.ManifestResult>;

            function packument

            packument: (
            spec: string,
            opts?: pacote.Options | undefined
            ) => Promise<
            { versions: Record<string, pacote.AbbreviatedManifest> } & Pick<
            pacote.Packument,
            'name' | 'dist-tags'
            > &
            pacote.PackumentResult
            >;

              namespace stream

              module 'dist/stream/index.d.ts' {}
              • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

              function noop

              noop: (callback?: (chunk: unknown) => unknown | Promise<unknown>) => Transform;

                namespace tools

                module 'dist/tools/index.d.ts' {}
                • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

                function commit

                commit: ({
                cwd,
                message,
                files,
                dryRun,
                }: {
                cwd: string;
                message: string;
                files: Array<string>;
                dryRun?: boolean;
                }) => Promise<void>;
                • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

                function createSpinner

                createSpinner: (
                title: string,
                options?: CreateSpinnerOptions
                ) => CKEditor5Spinner;
                • A factory function that creates an instance of a CLI spinner. It supports both a spinner CLI and a spinner with a counter.

                  The spinner improves UX when processing a time-consuming task. A developer does not have to consider whether the process hanged on.

                  Parameter title

                  Description of the current processed task.

                  Parameter options

                function getDirectories

                getDirectories: (directoryPath: string) => Array<string>;
                • Returns array with all directories under the specified path.

                function shExec

                shExec: {
                (command: string, options: { async: true } & ShExecOptions): Promise<string>;
                (command: string, options?: { async?: false } & ShExecOptions): string;
                };

                  function updateJSONFile

                  updateJSONFile: (
                  filePath: string,
                  updateFunction: (json: object) => object
                  ) => void;
                  • Updates JSON file under a specified path.

                    Parameter filePath

                    Path to a file on disk.

                    Parameter updateFunction

                    Function that will be called with a parsed JSON object. It should return the modified JSON object to save.

                  namespace workspaces

                  module 'dist/workspaces/index.d.ts' {}
                  • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

                  function findPathsToPackages

                  findPathsToPackages: (
                  cwd: string,
                  packagesDirectory: string | null,
                  options?: Options
                  ) => Promise<Array<string>>;
                  • This function locates package.json files for all packages located in packagesDirectory in the repository structure.

                  function getPackageJson

                  getPackageJson: {
                  (cwd: string, options: { async: true }): Promise<PackageJson>;
                  (cwd: string, options?: { async?: false }): PackageJson;
                  };

                    function getRepositoryUrl

                    getRepositoryUrl: {
                    (cwd: string, options: { async: true }): Promise<string>;
                    (cwd: string, options?: { async?: false }): string;
                    };
                    • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

                    interface PackageJson

                    interface PackageJson {}
                    • Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.

                    property author

                    author?:
                    | string
                    | {
                    name: string;
                    email?: string;
                    url?: string;
                    };

                      property bin

                      bin?: {
                      [commandName: string]: string;
                      };

                        property bugs

                        bugs?:
                        | string
                        | {
                        url: string;
                        email?: string;
                        };

                          property dependencies

                          dependencies?: {
                          [packageName: string]: string;
                          };

                            property description

                            description?: string;

                              property devDependencies

                              devDependencies?: {
                              [packageName: string]: string;
                              };

                                property engines

                                engines?: {
                                [engineName: string]: string;
                                };

                                  property files

                                  files?: Array<string>;

                                    property homepage

                                    homepage?: string;

                                      property keywords

                                      keywords?: Array<string>;

                                        property license

                                        license?: string;

                                          property main

                                          main?: string;

                                            property name

                                            name: string;

                                              property optionalDependencies

                                              optionalDependencies?: {
                                              [packageName: string]: string;
                                              };

                                                property peerDependencies

                                                peerDependencies?: {
                                                [packageName: string]: string;
                                                };

                                                  property private

                                                  private?: boolean;

                                                    property repository

                                                    repository?:
                                                    | string
                                                    | {
                                                    type: string;
                                                    url: string;
                                                    directory?: string;
                                                    };

                                                      property scripts

                                                      scripts?: {
                                                      [key: string]: string;
                                                      };

                                                        property type

                                                        type?: 'commonjs' | 'module';

                                                          property types

                                                          types?: string;

                                                            property version

                                                            version: string;

                                                              index signature

                                                              [key: string]: any;

                                                                Package Files (25)

                                                                Dependencies (18)

                                                                Dev Dependencies (0)

                                                                No dev dependencies.

                                                                Peer Dependencies (0)

                                                                No peer dependencies.

                                                                Badge

                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ckeditor/ckeditor5-dev-utils.

                                                                • Markdown
                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ckeditor/ckeditor5-dev-utils)
                                                                • HTML
                                                                  <a href="https://www.jsdocs.io/package/@ckeditor/ckeditor5-dev-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>