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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .dependency-cruiser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
{
name: 'no-circular',
severity: 'error',
comment: 'Warns on circular dependencies.',
from: {},
to: { circular: true }
},
{
name: 'connectors-cannot-import-connectors',
severity: 'error',
comment: 'A connector can only import types, shared, and utils. It cannot import other connectors.',
from: { path: '^connectors/([^/]+)/' },
to: { path: '^connectors/([^/]+)/', pathNot: '^connectors/$1/' }
},
{
name: 'no-app-dependencies',
severity: 'error',
comment: 'No package or connector may import from apps.',
from: { pathNot: '^apps/' },
to: { path: '^apps/' }
},
{
name: 'primitives-no-imports',
severity: 'error',
comment: 'packages/types is Layer 0. It cannot import anything from within the monorepo.',
from: { path: '^packages/types/' },
to: { path: '^(packages|connectors|apps)/', pathNot: '^packages/types/' }
},
{
name: 'core-utilities-isolation',
severity: 'error',
comment: 'Layer 1 (shared, utils) can only import from Layer 0 (types).',
from: { path: '^packages/(shared|utils)/' },
to: { path: '^(packages|connectors|apps)/', pathNot: '^packages/(types|shared|utils)/' }
}
],
options: {
doNotFollow: {
path: 'node_modules'
},
tsConfig: {
fileName: 'tsconfig.base.json'
}
}
};
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
pull_request:
branches: [main]

jobs:
validate:
name: Validate, Lint, and Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

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

- name: Lint Commits
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}

- name: Enforce Architecture (Dependency Cruiser)
run: pnpm run depcruise

- name: Format Check
run: pnpm run format:check

- name: Lint
run: pnpm run lint

- name: Typecheck
run: pnpm run typecheck

- name: Test
run: pnpm run test

- name: Build
run: pnpm run build
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Version and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

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

- name: Build All Packages
run: pnpm run build

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run publish-packages
commit: 'chore(release): version packages'
title: 'chore(release): version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules/
dist/
lib/
.turbo/
coverage/
.env
.env.local
*.log
.DS_Store
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
"*.{md,json,yaml,yml}": ["prettier --write"]
}
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
lib/
.turbo/
coverage/
.claude/
pnpm-lock.yaml
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
Loading
Loading