Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Closes #

- [ ] I have tested this change manually
- [ ] I have added or updated tests as appropriate
- [ ] All checks pass (`npm test`, `npm run lint`, `npm run format:check`)
- [ ] All checks pass (`npm test`, `npm run lint`, `npm run format:check`, `npm run typecheck --workspaces`)
- [ ] I have updated documentation as needed
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 30

steps:
- uses: actions/checkout@v6
Expand All @@ -24,10 +24,10 @@ jobs:
- name: Check for uncommitted generated files
run: git diff --exit-code

# The end-to-end suite builds the Spring Boot image and boots Operaton
# through testcontainers; the runner ships Docker.
- run: npm test
if: success() || failure()
env:
SKIP_DOCKER_TESTS: 'true'

lint:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Thumbs.db

# VS Code extension packaging
*.vsix
packages/extension/LICENSE
packages/extension/CHANGELOG.md

# Environment
.env
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Changelog

This file follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
This file follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Nothing has been released yet.
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Examples of unacceptable behavior:

## Enforcement

Instances of unacceptable behavior may be reported to the project maintainer at dev@marlonkranz.com. All complaints will be reviewed.
Instances of unacceptable behavior may be reported to the project maintainer at dev@marlonkranz.com.
All complaints will be reviewed.

## Attribution

Expand Down
54 changes: 37 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

> This project is being developed as part of a bachelor's thesis.
> External contributions are not accepted until after thesis submission.
> Bug reports are welcome now.
> Pull requests are welcome after submission.
> The guidelines below will apply once the project opens up.

## Development setup

### Prerequisites

- [Node.js](https://nodejs.org/) >= 22 (the project uses Node 24 via `.nvmrc`; [nvm](https://github.com/nvm-sh/nvm) picks this up automatically)
- [Node.js](https://nodejs.org/) >= 22 (the project uses Node 24 via `.nvmrc`; [nvm](https://github.com/nvm-sh/nvm)'s `nvm use` reads it)
- [VS Code](https://code.visualstudio.com/) with the recommended extensions (VS Code will prompt you on first open)
- [Docker](https://www.docker.com/) for end-to-end tests (alternatives: [Podman](https://podman.io/), [Rancher Desktop](https://rancherdesktop.io/))

Expand All @@ -22,19 +24,27 @@ npm run build
npm test
```

`npm run build` runs the Langium code generator and compiles TypeScript across all packages. `npm test` runs the full test suite including Docker-based end-to-end tests. To skip those (no Docker installed, or just iterating on unit tests):
`npm run build` runs the Langium code generator and compiles TypeScript across all packages.
`npm test` runs the full test suite including Docker-based end-to-end tests.
To skip those (no Docker installed, or just iterating on unit tests):

```sh
SKIP_DOCKER_TESTS=true npm test
```

### Trying it out in VS Code

After building, press <kbd>F5</kbd> in VS Code. This opens a second VS Code window with the BPMNscript extension loaded. In that window you can create or open `.bpmnscript` files and get syntax highlighting, inline diagnostics, and autocompletion. To compile or decompile a file, use the command palette (`BPMNscript: Compile to BPMN` / `BPMNscript: Decompile to BPMNscript`) or the "Convert" panel in the BPMNscript activity-bar sidebar. The CLI alternative (`npx bpmns build <file>`) still works if you prefer the terminal.
After building, press <kbd>F5</kbd> in VS Code.
This opens a second VS Code window with the BPMNscript extension loaded.
In that window you can create or open `.bpmnscript` files and get syntax highlighting, inline diagnostics, autocompletion, hover, and rename.
To compile or decompile a file, use the command palette (`BPMNscript: Compile to BPMN` / `BPMNscript: Decompile to BPMNscript`) or the "Convert" panel in the BPMNscript activity-bar sidebar.
The CLI alternative (`npx bpmns build <file>`) still works if you prefer the terminal.
For a normal install instead of the development host, see [packages/extension/README.md](packages/extension/README.md#installing).

### Editing the grammar

The Langium grammar lives at `packages/language/src/bpmn-script.langium`. After editing it, regenerate the AST types before TypeScript can see the changes:
The Langium grammar lives at `packages/language/src/bpmn-script.langium`.
After editing it, regenerate the AST types before TypeScript can see the changes:

```sh
npm run langium:generate
Expand All @@ -48,29 +58,38 @@ npm run langium:watch

Both commands run from the repo root.

The generated AST types land under `src/generated/`, which is git-ignored, so there is nothing to commit after regenerating.
CI's build job still runs `git diff --exit-code` right after `npm run build`; that step fails if the build leaves any tracked file changed, not because of the generated output.

### Running tests

```sh
npm test # Full suite (all packages + e2e)
npm test --workspace packages/language # Language package only
npm test --workspace packages/transform # Transform package only
npm test --workspace packages/cli # CLI package only
npm test --workspace packages/extension # Extension package only
npm test # Full suite (all packages + e2e)
npm test --workspace packages/language # Language package only
npm test --workspace packages/transform # Transform package only
npm test --workspace packages/cli # CLI package only
npm test --workspace packages/extension # Extension package only
FUZZ_N=2000 FUZZ_OUT=/tmp/fuzz npm test --workspace tests -- fuzz.test.ts # Round-trip fuzz over 2000 generated programs
```

The extension tests require `@bpmn-script/language` and `@bpmn-script/transform` to be built first (they are consumed as compiled `out/` directories). Run `npm run build` from the repo root before running the extension suite in isolation.
`npm test` runs the round-trip fuzz over the first 200 generated programs as part of the tests workspace.
The extension tests require `@bpmn-script/language` and `@bpmn-script/transform` to be built first (they are consumed as compiled `out/` directories).
Run `npm run build` from the repo root before running the extension suite in isolation.

### Code style

The project uses [Prettier](https://prettier.io/) for formatting and [ESLint](https://eslint.org/) (via `eslint-plugin-bpmn-io`) for linting. Both run from the repo root:
The project uses [Prettier](https://prettier.io/) for formatting and [ESLint](https://eslint.org/) (via `eslint-plugin-bpmn-io`) for linting.
Both run from the repo root:

```sh
npm run format # Auto-format all source files
npm run format:check # Check formatting without writing (used in CI)
npm run lint # Run ESLint
npm run format # Auto-format all source files
npm run format:check # Check formatting without writing (used in CI)
npm run lint # Run ESLint
npm run typecheck --workspaces # Typecheck test sources; vitest does not (used in CI)
```

Formatting happens on save if you use VS Code with the recommended Prettier extension. The `.editorconfig` handles basics (indentation, line endings) for other editors.
Formatting happens on save if you use VS Code with the recommended Prettier extension.
The `.editorconfig` handles basics (indentation, line endings) for other editors.

## Guidelines (post-thesis)

Expand All @@ -86,9 +105,10 @@ Use the [feature request template](https://github.com/BPMNscript/bpmnscript/issu

- Reference the related issue with `Closes #...`
- Include a brief description of what changed and why
- Make sure `npm test`, `npm run lint`, and `npm run format:check` all pass
- Make sure `npm test`, `npm run lint`, `npm run format:check`, and `npm run typecheck --workspaces` all pass
- Update `CHANGELOG.md` if the change is user-facing

### Architectural decisions

Non-trivial technical decisions are documented as [Markdown ADRs](docs/decisions/) using [MADR 4.0.0](https://adr.github.io/madr/). If your change involves an architectural decision, include a new ADR.
Non-trivial technical decisions are documented as [Markdown ADRs](docs/decisions/) using [MADR 4.0.0](https://adr.github.io/madr/).
If your change involves an architectural decision, include a new ADR.
Loading
Loading