Skip to content

Development

This document holds instructions on developing Vintner.

GitHub Flow

Our branching workflow follows GitHub Flow.

Branch Naming Convention

Branches should be names as follows.

  • feature-short-title for features.
  • fix-short-title for bug fixes.
  • refactor-short-title for refactoring.
  • chore-short-title for chores.
  • docs-short-title for documentations.
  • project-short-title for project, such as thesis, EnPro, StuPro ...

Squash and Merge

Squash your commits into a single commit with a short but meaningful message. The commit message should not have a link to the merge request. The branch is automatically deleted once merged.

Tags

A tag must be created for each publication, thesis, etc. For example, the following commands create and push the tag for the publication "Modeling Different Deployment Variants of a Composite Application in a Single Declarative Deployment Model" published by Stötzner et al. in 2022.

git tag -s publication-stoetzner-2022-vdmm -m "Modeling Different Deployment Variants of a Composite Application in a Single Declarative Deployment Model"
git push origin publication-stoetzner-2022-vdmm

Command Line Interface

Info

./task cli uses src/cli/index.ts while ./task vintner uses build/cli/index.js. Therefore, run ./task cli to execute the current code without building it first.

We use commander.js to implement the CLI. The entry point is src/cli/index.ts. Execute a CLI command during development as follows.

./task cli -- [command] [options]

Server

We use express to implement the server. The entry point is src/server/index.ts. Run a development server on http://localhost:3000 with live-reload as follows.

./task server:serve

Tests

We use mocha, chai, and nyc for testing. Respective tests are inside the tests directory. Run the tests as follows.

./task test

On pushes to the main branch or on pull requests, the tests workflow is triggered. This workflow runs the tests.

Lint

We use ESLint for code linting. Lint typescript as follows.

./task lint:check

Fix lint problems as follows.

./task lint:fix

Code Style

We use Prettier for code formatting. Check the code style as follows.

./task style:check

Fix code style problems as follows.

./task style:fix

Benchmark

Run the following command, to run to benchmark the variability resolving.

./task benchmark

Dependencies

We use license-checker to handle licenses of (transitive) dependencies. Check that (transitive) dependencies are licensed as expected as follows. This check is also executed inside workflows.

./task licenses:check

Patch Packages

We use patch-package to fix dependencies. For example, adding logic-solver.d.ts to logic-solver. Therefore, proceed as follows.

First, make changes to the package inside node_modules. Then, create the patch.

./task patch-package --exclude 'nothing' ${package-name}

Last update: April 28, 2024