Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d21af81
Monorepo and project setup
handreyrc Mar 11, 2026
4a46493
Add missing license headers
handreyrc Mar 12, 2026
6bca620
Fix copilot complaints
handreyrc Mar 12, 2026
8860a9c
Fix jest and dependencies clean up
handreyrc Mar 13, 2026
5d88dc7
Fix async test
handreyrc Mar 13, 2026
d9ef232
Fix README
handreyrc Mar 13, 2026
4589f95
Jest support for ECMAScript Modules (ESM) is expeimental, overriding …
handreyrc Mar 13, 2026
a5c38e2
Fix dependencies and unit test
handreyrc Mar 13, 2026
d42a34c
Fix missing dependency
handreyrc Mar 13, 2026
cf51139
Fix README
handreyrc Mar 13, 2026
73bee7e
Patternfly away
fantonangeli Mar 13, 2026
9181cd9
Change from jest to vitest
fantonangeli Mar 13, 2026
d54e9aa
Fixed linting issue
fantonangeli Mar 13, 2026
f2421af
Fixes comment: https://github.com/handreyrc/serverless--workflow-edit…
fantonangeli Mar 13, 2026
8735617
Fixes comment: https://github.com/handreyrc/serverless--workflow-edit…
fantonangeli Mar 13, 2026
03cbc02
Merge pull request #4 from fantonangeli/monorepo-setup-remove-pattern…
handreyrc Mar 13, 2026
a1375fe
Replace webpack-storybook by vite-storybook and fix vitest settings
handreyrc Mar 14, 2026
9ea42a6
OXC setup
fantonangeli Mar 16, 2026
a5565ac
Removed test file
fantonangeli Mar 16, 2026
782c8bb
Fix suggestions
fantonangeli Mar 16, 2026
0b5dd15
Merge pull request #5 from fantonangeli/handrey/monorepo-setup-oxlint
handreyrc Mar 16, 2026
a9d7e6d
Fix oxlint missing dependency and copilot complaints
handreyrc Mar 16, 2026
a4221c2
Fixed dependencies mismatch and removed oxlint from root package
fantonangeli Mar 17, 2026
7bba5d6
Remove babel and webdriveio dependency
handreyrc Mar 17, 2026
0643e7d
Fixes comment: https://github.com/serverlessworkflow/editor/pull/36#d…
fantonangeli Mar 17, 2026
ccc3cf1
Fixes comment: https://github.com/serverlessworkflow/editor/pull/36#d…
fantonangeli Mar 17, 2026
2b38798
Fixed error calling oxlint binary
fantonangeli Mar 17, 2026
0a12fa8
Fixes comment: https://github.com/serverlessworkflow/editor/pull/36#d…
fantonangeli Mar 17, 2026
2ec6bef
Fixes comment: https://github.com/serverlessworkflow/editor/pull/36#d…
fantonangeli Mar 17, 2026
e8a95e7
Fix package version and name
handreyrc Mar 17, 2026
02148fe
Merge remote-tracking branch 'handrey/monorepo-setup' into monorepo-s…
fantonangeli Mar 17, 2026
f5b7cab
Merge remote-tracking branch 'handrey/monorepo-setup' into monorepo-s…
fantonangeli Mar 17, 2026
f129df8
Merge pull request #6 from fantonangeli/monorepo-setup-fix-linter-pr-…
handreyrc Mar 17, 2026
d9e470d
Remove redundant imports
handreyrc Mar 17, 2026
43fb7ab
Add exports to package.json
handreyrc Mar 17, 2026
b72507c
Fixes comment: https://github.com/serverlessworkflow/editor/pull/36#d…
fantonangeli Mar 17, 2026
426b324
Fixes comment: https://github.com/serverlessworkflow/editor/pull/36#d…
fantonangeli Mar 17, 2026
b05fa44
Add exports to package.json
handreyrc Mar 17, 2026
6b9fd9a
Merge pull request #7 from fantonangeli/monorepo-setup-fix-linter-pr-…
handreyrc Mar 17, 2026
d402601
Move emit tsconfig settings to package level
handreyrc Mar 17, 2026
66f76e1
Fix peer dependencies
handreyrc Mar 17, 2026
72bd389
Fix exports
handreyrc Mar 17, 2026
75816f6
Refactored linter and formatter
fantonangeli Mar 18, 2026
1799972
Fixed lint-staged cmd
fantonangeli Mar 18, 2026
540ff17
Merge pull request #8 from fantonangeli/monorepo-setup-fix-formatter-…
handreyrc Mar 18, 2026
f292588
fix package settings
handreyrc Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,24 @@ dist
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

## ci
!/.ci

## node
**/node_modules/
**/dist/
**/dist-storybook/

# Eclipse, Netbeans and IntelliJ files
**/nbproject
**/.classpath
**/.project
**/.settings
**/jitexecutor

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
**/.idea/

# Apache RAT
.rat-reports
18 changes: 18 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
#
# Copyright 2026 The Serverless Workflow Specification Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

pnpm exec lint-staged
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace-root-check=true
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.gitattributes
.npmrc
.prettierignore
.prettierrc
.rat-excludes
.rat-reports
pnpm-lock.yaml
pnpm-workspace.yaml
repo/graph.dot
repo/repo.iml

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

# Code of Conduct

We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) in order to report violations of the Code of Conduct.
We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) in order to report violations of the Code of Conduct.
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This project is the official, vendor-neutral visual editor for the [Serverless W

To build and run the editor locally, you will need:
- **Node.js** (current LTS version; see https://nodejs.org/)
- **npm** or **pnpm**
- **pnpm**

## Building the Project

Expand All @@ -38,10 +38,13 @@ git clone https://github.com/serverlessworkflow/editor.git
cd editor

# Install dependencies
npm install
pnpm install

# Build all packages in the monorepo
npm run build
# Build all packages in the monorepo (development)
pnpm run build:dev

# Or build all packages in the monorepo (production)
pnpm run build:prod
```

## Development Environment
Expand Down Expand Up @@ -73,7 +76,7 @@ For new features or architectural changes:
* **Linting & Formatting**: Follow the existing code style and formatting conventions used in the files you are editing. If the package you are changing defines linting or formatting scripts, run those before submitting code.
* **Testing**: Ensure that logic changes are covered by tests, and run the relevant test commands for the packages you modify (see their documentation or `package.json`).
* **Component Design**: Follow functional component patterns and ensure that UI state is managed predictably within the monorepo structure.
* **New package creation**: If a new package needs to be created, please follow the standards used by the existing packages, including the standard commands `build`, `build-prod`, `test`, `e2e-test`, `lint`
* **New package creation**: If a new package needs to be created, please follow the standards used by the existing packages, including the standard commands `build:dev`, `build:prod`, `test`, `e2e-test`, `lint`

## Pull Request Process

Expand All @@ -87,4 +90,4 @@ For new features or architectural changes:
---

### Community and Communication
Join the conversation on the [CNCF Slack](https://slack.cncf.io/) in the `#serverless-workflow` channel.
Join the conversation on the [CNCF Slack](https://slack.cncf.io/) in the `#serverless-workflow` channel.
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Please refer to the primary governance document for details on contributor roles
---

## Community & Support
If you have questions regarding the governance or how to get involved, please join us on the [CNCF Slack](https://slack.cncf.io/) in the `#serverless-workflow` channel.
If you have questions regarding the governance or how to get involved, please join us on the [CNCF Slack](https://slack.cncf.io/) in the `#serverless-workflow` channel.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,28 @@

# editor
CNCF Serverless Workflow Specification Visual Editor

## Prerequisites

To build and run the editor locally, you will need:
- **Node.js 22** (current LTS version; see https://nodejs.org/)
- **pnpm 10.31.0**

## Building the Project

The project is structured as a monorepo to support multiple distribution targets (Web, VS Code, etc.) as defined in our architectural decisions.

```bash
# Clone the repository
git clone https://github.com/serverlessworkflow/editor.git
cd editor

# Install dependencies
pnpm install

# Build all packages in the monorepo (development)
pnpm run build:dev

# Or build all packages in the monorepo (production)
pnpm run build:prod
```
35 changes: 0 additions & 35 deletions package-lock.json

This file was deleted.

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,38 @@
"version": "0.0.0",
"private": true,
"description": "CNCF Serverless Workflow Specification Visual Editor",
"homepage": "https://github.com/serverlessworkflow/editor",
"bugs": {
"url": "https://github.com/serverlessworkflow/editor/issues"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/serverlessworkflow/editor.git"
},
"type": "module",
"scripts": {
"format": "formatter",
"format:check": "formatter --check",
"build:prod": "pnpm -r --stream --if-present build:prod",
"build:dev": "pnpm -r --stream --if-present build:dev",
"prepare": "husky"
},
"devDependencies": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing root test/lint/(start) scripts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JBBianchi , ok for test and lint, but because this monorepo will probably host multiple packages, I think start should be delegated to the specific package.
Do you agree?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, we could also have a root start that builds the packages and starts an example. So for a newcomer, they can be ready in 3 commands, git clone, pnpm install, & start. It's not mandatory and can be added later on as the said example doesn't exist yet.

"husky": "^9.1.7"
"@serverlessworkflow-toolings/linter": "workspace:*",
"husky": "catalog:",
"lint-staged": "catalog:",
"oxfmt": "catalog:",
"typescript": "catalog:"
},
"lint-staged": {
"*.{ts,tsx,js,jsx,json,md,yml,yaml}": [
"pnpm format"
]
},
"engines": {
"node": ">=20"
}
"node": ">=22",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root doesn't declare @types/node. The linter package uses ^22.10.2, diagram-editor uses ^25.3.3. These should be consistent.

Consider pnpm catalogs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created an issue to develop a dependency consistency check CI, to have this check in our PRs:
#32

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of pnpm catalogs is awesome. Thanks @JBBianchi for the tip

"pnpm": "10.31.0"
},
"packageManager": "pnpm@10.31.0"
}
4 changes: 4 additions & 0 deletions packages/linter/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": []
}
10 changes: 10 additions & 0 deletions packages/linter/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://oxc.rs/schema/oxlintrc.json",
"plugins": ["react", "typescript", "import", "jsx-a11y"],
"rules": {
"react/react-in-jsx-scope": "off",
"typescript/no-unused-vars": "warn",
"typescript/no-explicit-any": "warn"
},
"ignorePatterns": ["**/dist/", "**/dist-storybook/", "**/node_modules/"]
}
49 changes: 49 additions & 0 deletions packages/linter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
Copyright 2021-Present The Serverless Workflow Specification Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# @serverlessworkflow-toolings/linter

Shared linting and formatting configuration for the Serverless Workflow Editor monorepo.

## Overview

This package provides centralized configuration for Oxlint and Oxfmt

## Usage

### In Consumer Packages

```json
{
"name": "your-package-name",
"scripts": {
"lint": "linter src/ stories/"
},
"devDependencies": {
"@serverlessworkflow-toolings/linter": "workspace:*"
}
}
```

## Extending Configuration

To extend the configuration in a specific package, create a local `oxlintrc.json`:

```json
{
"extends": ["node_modules/@serverlessworkflow-toolings/linter/oxlintrc.json"]
}
```
46 changes: 46 additions & 0 deletions packages/linter/formatter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2021-Present The Serverless Workflow Specification Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { spawn } from "child_process";
import { existsSync } from "fs";
import { fileURLToPath } from "url";
import { dirname, join } from "path";

const configFilename = ".oxfmtrc.json";
const __dirname = dirname(fileURLToPath(import.meta.url));
const oxfmtBin = process.platform === "win32" ? "oxfmt.cmd" : "oxfmt";
const oxfmtPath = join(__dirname, "node_modules", ".bin", oxfmtBin);

// Use local configuration if exists, otherwise fallback to linter's config
const localConfigPath = join(process.cwd(), configFilename);
const configPath = join(__dirname, configFilename);
const selectedConfig = existsSync(localConfigPath) ? localConfigPath : configPath;

const args = ["--config", selectedConfig, ...process.argv.slice(2)];

const oxfmt = spawn(oxfmtPath, args, {
cwd: process.cwd(),
stdio: "inherit",
});

oxfmt.on("error", (err) => {
console.error("Failed to start oxfmt:", err.message);
process.exit(1);
});

oxfmt.on("exit", (code) => {
process.exit(code ?? 0);
});
46 changes: 46 additions & 0 deletions packages/linter/linter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2021-Present The Serverless Workflow Specification Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { spawn } from "child_process";
import { existsSync } from "fs";
import { fileURLToPath } from "url";
import { dirname, join } from "path";

const configFilename = ".oxlintrc.json";
const __dirname = dirname(fileURLToPath(import.meta.url));
const oxlintBin = process.platform === "win32" ? "oxlint.cmd" : "oxlint";
const oxlintPath = join(__dirname, "node_modules", ".bin", oxlintBin);

// Use local configuration if exists, otherwise fallback to linter's config
const localConfigPath = join(process.cwd(), configFilename);
const configPath = join(__dirname, configFilename);
const selectedConfig = existsSync(localConfigPath) ? localConfigPath : configPath;

const args = ["--config", selectedConfig, ...process.argv.slice(2)];

const oxlint = spawn(oxlintPath, args, {
cwd: process.cwd(),
stdio: "inherit",
});

oxlint.on("error", (err) => {
console.error("Failed to start oxlint:", err.message);
process.exit(1);
});

oxlint.on("exit", (code) => {
process.exit(code ?? 0);
});
Comment on lines +1 to +46
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand the necessity of this project rather than using npm scripts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created this layer to have a centralised, but extensible, linter and formatter configuration.
With this script in particular, we can move to other linters (biome, eslint, ...) just by changing this wrapper and without touching all the scripts.

But I can remove this script and keep only packages/linter/oxlintrc.json and packages/linter/.oxfmtrc.json for the base configuration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Centralizing lint/format config in the monorepo makes sense. If this is just base configuration, I’d actually keep it at the repo root (or under a simple config/ folder) rather than under packages/, since it’s not really a consumable workspace package. I’m less convinced by the wrapper script though: switching linters is rarely just a command swap, since config/rules/CLI behavior also change. If the wrapper only forwards to oxlint, it may be unnecessary indirection; if it also handles repo-specific orchestration, then it’s easier to justify.

Loading