• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ckeditor / ckeditor5-package-generator / 4c42dc7e-c078-4dd0-a5de-abdaf729fc09

09 Sep 2024 11:40AM UTC coverage: 100.0%. Remained the same
4c42dc7e-c078-4dd0-a5de-abdaf729fc09

push

circleci

web-flow
Merge pull request #187 from ckeditor/ci/3756

Other (generator): Replaced Karma with Vitest as the testing framework in the generated package.

Other (tools): Removed support for the `--coverage` (`-c`) and `--source-map` (`-s`) flags.

Other (tools): Removed `test` script from the tools, because unit tests in the generated package are executed now directly by Vitest.

MINOR BREAKING CHANGE (generator): The generated package no longer uses Karma as the test runner. Instead, Vitest is used.

MINOR BREAKING CHANGE (tools): The `test` script is removed, because unit tests in the generated package are executed directly by Vitest. Hence, the previous custom support for the `--coverage` (`-c`) and `--source-map` (`-s`) flags is no longer needed and has been also removed. The `yarn run test` (or `npm run test`) script is still available in the generated package, but it executes Vitest. See [CLI flags](https://vitest.dev/guide/cli.html) supported in Vitest.

120 of 120 branches covered (100.0%)

Branch coverage included in aggregate %.

393 of 393 relevant lines covered (100.0%)

9.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/packages/ckeditor5-package-generator/lib/utils/initialize-git-repository.js
1
/**
2
 * @license Copyright (c) 2020-2024, CKSource Holding sp. z o.o. All rights reserved.
3
 * For licensing, see LICENSE.md.
4
 */
5

6
'use strict';
7

8
const path = require( 'path' );
5✔
9
const fs = require( 'fs' );
5✔
10
const { execSync } = require( 'child_process' );
5✔
11

12
/**
13
 * @param {string} directoryPath
14
 * @param {Logger} logger
15
 */
16
module.exports = function initializeGitRepository( directoryPath, logger ) {
5✔
17
        logger.process( 'Initializing Git repository...' );
4✔
18

19
        const options = {
4✔
20
                stdio: 'ignore',
21
                cwd: directoryPath
22
        };
23

24
        execSync( 'git init', options );
4✔
25

26
        try {
4✔
27
                execSync( 'git add -A', options );
4✔
28
                execSync( 'git commit -m "Initialize the repository using CKEditor 5 Package Generator."', options );
4✔
29
        } catch ( error ) {
30
                // Remove the `.git` directory in case of an error. It may happen that the developer didn't configure Git yet.
31
                // We could have resolved the error ourselves.
32
                // See: https://github.com/ember-cli/ember-cli/blob/3192a441e13ec7e88c71d480778971d81bfa436c/lib/tasks/git-init.js#L49-L66.
33
                fs.removeSync( path.join( directoryPath, '.git' ) );
1✔
34
        }
35
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc