JSPM

  • Created
  • Published
  • Downloads 61895
  • Score
    100M100P100Q195239F
  • License MIT

Knapsack Pro Core library splits tests across CI nodes and makes sure that tests will run in optimal time on each CI node. This library gives core features like communication with KnapsackPro.com API. This library is a dependency for other projects specific for particular test runner.

Package Exports

  • @knapsack-pro/core
  • @knapsack-pro/core/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@knapsack-pro/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@knapsack-pro/core

CircleCI

@knapsack-pro/core is JS npm package with core features for Knapsack Pro API. Learn how to run your tests faster with optimal test suite parallelisation using Knapsack Pro.

This package is the dependency of Knapsack Pro clients in JavaScript.

Table of Contents

FAQ

FAQ for Knapsack Pro JavaScript clients can be found here.

Development

Requirements

You can use NVM to manage Node version in development.

  • >= Node 18.13.0 LTS

Setup

Follow below steps or use bin/setup_development script to take care of steps 1-3.

  1. Install dependencies:

    $ npm install
  2. Compile TypeScript code to lib directory by running:

    $ npm start
  3. Register @knapsack-pro/core package globally in your local system. This way we will be able to develop other npm packages dependent on it:

    $ npm link
  4. Set up your IDE:

    From now on, every change in code base will be automatically formatted by Prettier. ESLint shows errors and warnings in VSCode.

  5. Write some code.

Publishing

  1. Sign in to npm registry with command:

    $ npm adduser
  2. Before releasing a new version of package please update CHANGELOG.md with github_changelog_generator:

    $ gem install github_changelog_generator
    
    # generate CHANGELOG.md
    $ github_changelog_generator --user KnapsackPro --project knapsack-pro-core-js
    $ git commit -am "Update CHANGELOG.md"
    $ git push origin master
  3. If you have added new files to the repository and they should be part of the released npm package then please ensure they are included in files array in package.json.

  4. If you have changed any headers in README.md please refresh table of contents with:

    $ npm run doctoc
  5. Compile project:

    $ npm run build
  6. In order to bump version of the package run below command. It will also create a version commit and tag for the release:

    # bump patch version 0.0.x
    $ npm version patch
    
    # bump minor version 0.x.0
    $ npm version minor
  7. Push to git repository created commit and tag:

    $ git push origin master --tags
  8. Now when git tag is on Github you can update CHANGELOG.md again.

    $ github_changelog_generator --user KnapsackPro --project knapsack-pro-core-js
    $ git commit -am "Update CHANGELOG.md"
    $ git push origin master
  9. Now you can publish package to npm registry:

    $ npm publish