Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ Thank you for submitting a pull request!

Please verify that:
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `grunt test` locally
* [ ] You've successfully run `yarn test` locally
* [ ] If applicable, there are new or updated unit tests validating the change
* [ ] If applicable, there are new or updated @types
* [ ] If applicable, documentation has been updated
* [ ] You've declared a version bump with `yarn version-check` and committed the generated `.yarn/versions/*.yml` file (or the change needs no release)
-->

## Description
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ jobs:
id: install-dependencies
run: yarn install --immutable

# Ensure every PR declares version bumps for the packages it changes
# (deferred versioning: entries live in .yarn/versions/*.yml)
- name: Check version bumps
id: version-check
if: ${{ github.event_name == 'pull_request' }}
run: yarn version check

# Build the joint project
- name: Prepare joint
id: prepare-joint
Expand Down
69 changes: 69 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
compressionLevel: mixed

# Deferred versioning (`yarn version check` / `yarn version apply`).
# `changesetBaseRefs` is the git ref the change detection diffs against;
# `changesetIgnorePatterns` are paths that never require a version bump.
changesetBaseRefs:
- master
- origin/master
- upstream/master

changesetIgnorePatterns:
# A change to a publishable package requires a version bump ONLY when it
# touches distributed source, types, an entry file, or its package.json.
# = For reference, the following paths that ARE allowed to trigger a bump:
#- "**/src/**" # source (all packages)
#- "**/types/**" # @joint/core public type tree
#- "**/*.d.ts" # hand-written type decls (svg.d.ts, DirectedGraph.d.ts)
#- "**/package.json" # dependencies / exports / manifest
#- "**/wrappers/**" # @joint/core build-time bundle wrappers
#- "**/mocks/**" # @joint/vitest-plugin-mock-svg shipped mocks
#- "**/index.js" # @joint/core entry
#- "**/index.mjs" # @joint/eslint-config entry
#- "**/joint.mjs" # @joint/core ESM entry
#- "**/DirectedGraph.mjs" # @joint/layout-directed-graph entry
#- "**/eslint.config.*.mjs" # @joint/eslint-config product configs
# = Everything below is IGNORED (never triggers a bump)

# Tests, mocks, benchmarks, demos, stories (not shipped)
- "**/*.test.{js,ts,mjs}"
- "**/test/**"
- "**/__mocks__/**"
- "**/bench/**"
- "**/demo/**"
- "**/stories/**"
- "**/.storybook/**"

# Generated build output & caches (produced from src/, git-ignored anyway)
- "**/dist/**"
- "**/build/**"
- "**/coverage/**"
- "**/coverage.json"
- "**/.tscache/**"

# Build & tooling scripts / config (do not change the published API)
- "**/scripts/**"
- "**/grunt/**"
- "**/Gruntfile.js"
- "**/Makefile"
- "**/rollup.config.*"
- "**/rollup.resources.mjs"
- "**/vite.config.*"
- "**/vitest.workspace.*"
- "**/jest.config.js"
- "**/jest.react18.config.mjs"
- "**/karma.conf.js"
- "**/tsconfig*.json"
- "**/dts-generator.config.js"
- "**/api-extractor.json"
- "**/knip.json"
- "**/typedoc.*"
- "**/.prettierrc*"
- "**/.gitignore"

# Per-package lint config only. @joint/eslint-config ships
# `eslint.config.<name>.mjs` files, which this exact pattern does NOT match.
- "**/eslint.config.mjs"

# Documentation & metadata
- "**/*.md"
- "**/LICENSE"

enableGlobalCache: false

logFilters:
Expand Down
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,29 @@ Before submitting a PR, please verify:
- [ ] If applicable, there are new or updated unit tests validating the change
- [ ] If applicable, there are new or updated @types
- [ ] If applicable, documentation has been updated
- [ ] You've declared a version bump with `yarn version-check` and committed the generated `.yarn/versions/*.yml` file (or the change needs no release — e.g. tests/docs only)

### Versioning Your Change

We use [Yarn's deferred versioning](https://yarnpkg.com/features/release-workflow). Instead of
editing `"version"` in `package.json`, you declare *what kind* of release your change is and let
Yarn apply the actual bumps at release time.

Before opening a PR, run from the repo root:

```bash
yarn version-check # opens an interactive prompt (yarn version check --interactive)
```

Pick a bump for each changed package and commit the file Yarn writes under `.yarn/versions/`:

- **patch** — a bug fix (`4.3.0` → `4.3.1`)
- **minor** — a new backwards-compatible feature (`4.3.0` → `4.4.0`)
- **major** — a breaking change (`4.3.0` → `5.0.0`)

Your conventional-commit type is a good hint: `fix` → patch, `feat` → minor, a breaking change → major. When you bump a package, the prompt lists its dependents and asks you to decide, for each, whether they should be bumped too. Even though Yarn flags them all, you should `decline` them when the new version of the modified package matches the published range. For example, patch bump in `@joint/core` needs no dependent bumps, while a minor bump in `@joint/core` needs none from `@joint/react` but does from the rest. Note that this is a one-way consideration — dependent packages (e.g. `@joint/react`) may be bumped independently of packages they depend on.

Changes to ignored paths (tests, docs, `examples/`) need no bump. CI runs `yarn version check` on every PR and will fail if a changed package is missing its version entry.

### Commit Message Format

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-absolute-port-layout-dynamic-port-sizes-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/activity-diagram-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-activity-diagram-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/anchors-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-anchors-ts",
"version": "4.3.1",
"main": "src/index.ts",
"homepage": "https://jointjs.com",
"author": {
Expand Down
1 change: 0 additions & 1 deletion examples/angular-element-view-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-angular-element-view-ts",
"version": "4.3.1",
"private": true,
"scripts": {
"ng": "ng",
Expand Down
1 change: 0 additions & 1 deletion examples/animated-process-flow-diagram-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-animated-process-flow-diagram-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/bezier-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-bezier-js",
"version": "4.3.1",
"main": "src/index.js",
"homepage": "https://jointjs.com",
"author": {
Expand Down
1 change: 0 additions & 1 deletion examples/callouts-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-callouts-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/chatgpt-timeline-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-chatgpt-timeline-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/circular-layout-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-circular-layout-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/connection-points-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-connection-points-ts",
"version": "4.3.1",
"main": "src/index.ts",
"homepage": "https://jointjs.com",
"author": {
Expand Down
1 change: 0 additions & 1 deletion examples/connector-arrows-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-connector-arrows-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/container/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-container",
"version": "4.3.1",
"main": "dist/bundle.js",
"author": {
"name": "client IO",
Expand Down
1 change: 0 additions & 1 deletion examples/content-driven-shapes-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-content-driven-shapes-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/control-tool-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-control-tool-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/counters-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-counters-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/curve-connector-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-curve-connector-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/decorators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-decorators",
"version": "4.3.1",
"main": "src/index.ts",
"homepage": "https://jointjs.com",
"author": {
Expand Down
1 change: 0 additions & 1 deletion examples/different-views-of-the-same-graph-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-different-views-of-the-same-graph-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/drop-image-as-shape-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-drop-image-as-shape-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/dwdm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-dwdm",
"version": "4.3.1",
"main": "src/index.ts",
"homepage": "https://jointjs.com",
"author": {
Expand Down
1 change: 0 additions & 1 deletion examples/dynamic-font-size-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-dynamic-font-size-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/dynamic-status-icons-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-dynamic-status-icons-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/electric-generator-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-electric-generator-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/element-connect-tool-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-element-connect-tool-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-element-port-and-link-label-markup-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/element-tags-and-badges-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-element-tags-and-badges-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/external-svg-images-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-external-svg-images-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/fault-tree-analysis-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-fault-tree-analysis-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/fills-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-fills-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/find-all-cells-between-2-elements-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-find-all-cells-between-2-elements-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/foreign-object-magnet-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-foreign-object-magnet-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/fta-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@joint/demo-fta-js",
"version": "4.3.1",
"main": "src/index.js",
"homepage": "https://jointjs.com",
"author": {
Expand Down
1 change: 0 additions & 1 deletion examples/genogram-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-genogram-directed-graph-ts",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
1 change: 0 additions & 1 deletion examples/hexagonal-grid-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@joint/demo-hexagonal-grid-js",
"private": true,
"version": "4.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
Loading
Loading