Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e011f15
feat: contractual pivot - schema lifecycle orchestrator (#14)
omermorad Mar 12, 2026
91ed06b
feat: commands major refactor (#16)
omermorad Mar 14, 2026
541f2c6
fix: remove provenance from packages before publishing to Verdaccio
omermorad Mar 14, 2026
2d44ffb
fix(e2e): use scoped package name for npx commands
omermorad Mar 14, 2026
8c6e6cd
fix(cli): update diff JSON output format to use contracts object
omermorad Mar 14, 2026
a18dcec
chore(*): version packages [skip ci]
omermorad Mar 27, 2026
4963cb0
fix(governance): use correct openapi-diff version
omermorad Apr 2, 2026
f829878
test(e2e): fix diff command tests to match new JSON format
omermorad Apr 2, 2026
cb3d62c
chore(*): version packages [skip ci]
omermorad Apr 2, 2026
e6f3883
feat: add openapi 3.1 support and extract shared differ core
omermorad Apr 3, 2026
9370397
chore(*): version packages [skip ci]
omermorad Apr 3, 2026
57184c3
fix(differs.openapi): handle circular $ref schemas without stack over…
omermorad Apr 3, 2026
99ad70f
chore(*): version packages [skip ci]
omermorad Apr 3, 2026
6a8c464
chore(*): align all packages to 0.1.0-dev.3 [skip ci]
omermorad Apr 3, 2026
57ffe1f
chore(*): version packages [skip ci]
omermorad Apr 5, 2026
807d5aa
fix(differs.openapi): optional param non-breaking, detect description…
omermorad Apr 7, 2026
c3562d2
fix(differs.core): format OpenAPI structural changes, decode JSON Poi…
omermorad Apr 13, 2026
f66c15c
chore(*): version packages [skip ci]
omermorad Apr 13, 2026
9a0bfe3
fix(differs.core): add message formatters for composition change types
omermorad Apr 14, 2026
de318c0
chore(*): version packages [skip ci]
omermorad Apr 14, 2026
6299962
Revert "chore(*): version packages [skip ci]"
omermorad Apr 14, 2026
8e6b939
chore(*): version packages [skip ci]
omermorad Apr 14, 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
10 changes: 8 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false,
"packageDir": "./"
"peerDependencies": false
}
],
"@typescript-eslint/consistent-type-imports": [
Expand All @@ -72,6 +71,13 @@
"prefer": "type-imports",
"disallowTypeAnnotations": false
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
]
},
"env": {
Expand Down
94 changes: 55 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,79 @@
name: Continuous Integration
on: [pull_request]
on: pull_request

permissions:
id-token: write
contents: read
actions: read
checks: write
pull-requests: write

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x, 24.x]
steps:
- name: Checkout
uses: actions/checkout@v4


- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4
- uses: actions/cache@v2

- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: PNPM
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build
run: pnpm build

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4
- uses: actions/cache@v2

- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: PNPM
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm run lint

- name: Validate Packages
run: pnpm manypkg check
run: pnpm lint

test:
name: Test
name: Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
project: ['doubles.jest', 'doubles.sinon', 'core.unit', 'doubles.vitest', 'di.nestjs', 'di.inversify', 'unit']
project: ['cli', 'governance', 'changesets', 'json-schema-differ', 'types']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -80,47 +82,61 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: PNPM
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Create Coverage Directory
run: mkdir -p ${{ github.workspace }}/coverage

- name: Test
run: pnpm --filter @contractual/${{ matrix.project }} run test
run: pnpm lerna run test --scope @contractual/${{ matrix.project }} --stream
continue-on-error: true
env:
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.project }}.xml
JEST_JUNIT_OUTPUT_DIR: ${{ github.workspace }}/test-reports
JUNIT_OUTPUT_NAME: ${{ matrix.project }}
JUNIT_OUTPUT_DIR: ${{ github.workspace }}/test-reports
COVERAGE_DIR: ${{ github.workspace }}/coverage
COVERAGE_FILE: coverage-${{ matrix.project }}.xml

- name: Tests Results
uses: dorny/test-reporter@v1
if: always()
e2e:
name: E2E Tests
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
reporter: 'jest-junit'
name: Tests Results (${{ matrix.project }})
path: ${{ github.workspace }}/test-reports/${{ matrix.project }}.xml
fail-on-error: false

# - name: Upload Report to Codecov
# uses: codecov/codecov-action@v3
# with:
# name: codecov-umbrella
# flags: ${{ matrix.project }}
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true
# files: ${{ github.workspace }}/coverage/coverage-${{ matrix.project }}.xml
# verbose: true
node-version: '22.x'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Run E2E Tests
run: pnpm test:e2e
158 changes: 158 additions & 0 deletions .github/workflows/e2e-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: E2E Release Simulation
env:
CI: true

on:
workflow_call:
inputs:
target_branch:
description: 'Branch to test release from'
required: true
type: string
workflow_dispatch:
inputs:
target_branch:
description: 'Branch to test release from'
required: true
type: string
default: 'next'

permissions:
contents: write
id-token: write

jobs:
e2e:
name: E2E (${{ matrix.e2e-project }}, Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
e2e-project: ['cli-basic', 'cli-lifecycle', 'packages-import']
node-version: [20.x, 22.x, 24.x]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.target_branch }}
fetch-depth: 0

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Start Verdaccio
run: docker compose -f local-e2e.docker-compose.yaml up -d verdaccio

- name: Wait for Verdaccio
run: |
for i in {1..30}; do
if curl -s http://localhost:4873 > /dev/null; then
echo "Verdaccio is ready"
break
fi
echo "Waiting for Verdaccio..."
sleep 1
done

- name: Build
run: pnpm build

- name: Setup Registry
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: http://localhost:4873
scope: '@contractual'
always-auth: false

- name: Install jq
run: sudo apt-get install -y jq

- name: Config Git
run: |
git config --global user.email "e2e@contractual.dev"
git config --global user.name "Contractual e2e"

- name: Remove provenance from package.json files
run: |
find packages -name 'package.json' | while read filename; do
jq 'del(.publishConfig.provenance)' "$filename" > temp.json && mv temp.json "$filename"
done

- name: Commit Provenance Removal
run: |
git add .
git commit -am "chore: remove provenance for e2e"

- name: Version Packages
run: |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
npx lerna version --yes \
--conventional-commits \
--conventional-prerelease \
--preid e2e \
--no-changelog \
--allow-branch "$BRANCH_NAME" \
--no-git-tag-version \
--no-push \
--force-publish \
--no-commit-hooks

- name: Commit Packages Versions
run: |
git add .
git commit -am "bump versions"

- name: Capture Versions for Report
run: |
echo "## E2E Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Project:** \`${{ matrix.e2e-project }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Node:** \`${{ matrix.node-version }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Versions:" >> $GITHUB_STEP_SUMMARY
lerna ls --json | jq -r '.[] | "- **\(.name)** -> `v\(.version)`"' >> $GITHUB_STEP_SUMMARY

- name: Publish Packages to Verdaccio
run: |
npx lerna publish from-package --yes \
--no-git-tag-version \
--no-push \
--no-git-reset \
--exact \
--dist-tag e2e

- name: Clean Source (simulate fresh install)
run: |
rm -rf packages
rm -rf node_modules
rm pnpm-lock.yaml
rm package.json
rm -f .npmrc

- name: Install E2E Dependencies from Verdaccio
run: |
cd "${{ github.workspace }}/e2e/${{ matrix.e2e-project }}"
npm install --registry http://localhost:4873 --no-package-lock

- name: Execute Tests
run: |
cd "${{ github.workspace }}/e2e/${{ matrix.e2e-project }}"
npm test

- name: Test Success Summary
if: success()
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Test Passed" >> $GITHUB_STEP_SUMMARY
echo "Packages work correctly when published" >> $GITHUB_STEP_SUMMARY
Loading
Loading