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
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<!--- Provide a general summary of the issue in the Title above -->
## Context (Environment)

<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Expected Behavior

<!--- Tell us what should happen -->

## Current Behavior

<!--- Tell us what happens instead of the expected behavior -->

## Steps to Reproduce or Reproduction Link

<!--- Provide a link to a live example, or an unambiguous set of steps to reproduce this bug.-->
<!--- Include code to reproduce, if relevant -->

Expand All @@ -21,6 +25,7 @@
## Video, Screenshot or other visual aids

## Possible Solution

<!--- Not obligatory, but suggest a fix/reason for the bug, -->

## Acceptance criteria
Expand All @@ -33,4 +38,4 @@

**Then** the outcome of the action in “When”

**And** used to continue any of three previous statements
**And** used to continue any of three previous statements
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/user_story.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Some recommendations regarding project and implementation details
2. - [ ] Team understands acceptance criteria
3. - [ ] Team has defined solution / steps to satisfy acceptance criteria
4. - [ ] Acceptance criteria is verifiable / testable
5. - [ ] External / 3rd Party dependencies identified
5. - [ ] External / 3rd Party dependencies identified
2 changes: 1 addition & 1 deletion .github/actions/node-setup-and-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ".nvmrc"
cache: 'pnpm' # Caches pnpm store globally — shared across all jobs
cache: "pnpm" # Caches pnpm store globally — shared across all jobs

# Cache node_modules keyed on OS + lockfile — the only cache needed.
# No restore-keys: a partially wrong node_modules is worse than a miss.
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Based on: [example implementation](gistUrl)
- [ ] New feature (a non-breaking change that adds functionality)
- [ ] Performance (a non-breaking change that reduces time or space complexity of a flow)
- [ ] Refactor (a non-breaking change that restructures existing code)
- [ ] Test (added or updated existing tests without implementation changes)
- [ ] Test (added or updated existing tests without implementation changes)
2 changes: 1 addition & 1 deletion .github/workflows/commit-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Conventional Commit (PR title)

on:
pull_request:
types: [opened, synchronize, reopened, edited]
types: [ opened, synchronize, reopened, edited ]

concurrency:
group: commit-lint-${{ github.event.pull_request.number }}
Expand Down
34 changes: 17 additions & 17 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Personal open-source monorepo for publishable npm packages under the `@tutods` s

## Stack

| Piece | Version / tool | Notes |
|-------|---------------|-------|
| Workspace | Nx 23 + pnpm 11 (`pnpm-workspace.yaml`: `packages/*`, `configs/*`) | Nx runs/caches builds; pnpm is the only package manager |
| Bundler | Rslib (`@rslib/core`) per package | ESM only, `dts: true` — no CJS output |
| Language | TypeScript 7.x (native TS compiler — bleeding edge) | |
| UI | React 19 as **peerDependency** (`>=19.2.7`) | Never move React to `dependencies` |
| Lint/format | Biome (config from `@tutods/biome-config`, workspace package) | Tabs, double quotes — Biome enforces, don't hand-format |
| Hooks | lefthook (`.lefthook.yml`): pre-commit Biome on staged, commit-msg commitlint | |
| Releases | `nx release` — independent versioning, conventional commits drive bumps | |
| Piece | Version / tool | Notes |
| ----------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------- |
| Workspace | Nx 23 + pnpm 11 (`pnpm-workspace.yaml`: `packages/*`, `configs/*`) | Nx runs/caches builds; pnpm is the only package manager |
| Bundler | Rslib (`@rslib/core`) per package | ESM only, `dts: true` — no CJS output |
| Language | TypeScript 7.x (native TS compiler — bleeding edge) | |
| UI | React 19 as **peerDependency** (`>=19.2.7`) | Never move React to `dependencies` |
| Lint/format | Biome (config from `@tutods/biome-config`, workspace package) | 2 spaces, single quotes — Biome enforces, don't hand-format |
| Hooks | lefthook (`.lefthook.yml`): pre-commit Biome on staged, commit-msg commitlint | |
| Releases | `nx release` — independent versioning, conventional commits drive bumps | |

Layout:

Expand All @@ -27,14 +27,14 @@ configs/ @tutods/{biome,typescript,renovate}-config — published

Run from repo root with pnpm (never npm/yarn — `packageManager` pins pnpm):

| Command | What |
|---------|------|
| `pnpm build` | `nx run-many -t build` — builds all packages |
| `pnpm lint` | `biome check .` |
| `pnpm lint:fix` | Biome with `--write` |
| `pnpm lint:ci` | CI variant |
| `pnpm --filter @tutods/components dev` | Rslib watch mode for the components package |
| `pnpm release` | `nx release` — only when explicitly asked; it creates a version commit (no tag/push) |
| Command | What |
| -------------------------------------- | ------------------------------------------------------------------------------------ |
| `pnpm build` | `nx run-many -t build` — builds all packages |
| `pnpm lint` | `biome check .` |
| `pnpm lint:fix` | Biome with `--write` |
| `pnpm lint:ci` | CI variant |
| `pnpm --filter @tutods/components dev` | Rslib watch mode for the components package |
| `pnpm release` | `nx release` — only when explicitly asked; it creates a version commit (no tag/push) |

There is no `test` or `typecheck` script. Type errors surface via `pnpm build` (Rslib emits d.ts). If you need a standalone type check, run `pnpm exec tsc --noEmit -p packages/components/tsconfig.json`.

Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,24 @@ Include:

```markdown
## What

Brief description of what this PR does.

## Why

Reason for these changes.

## How

Technical approach (if needed).

## Related

- Closes #123
- Related to #456

## Checklist

- [ ] Code follows project standards
- [ ] Tests pass
- [ ] Documentation updated
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
> A collection of reusable packages, configurations, and components for web development projects.

---

<!-- omit from toc -->
## Table of Contents

- [📄 Goal](#-goal)
- [What you will find](#what-you-will-find)
- [📦 Packages](#-packages)
Expand Down
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://biomejs.dev/schemas/2.6.3/schema.json",
"root": true,
"extends": ["@tutods/biome-config"]
"extends": ["@tutods/biome-config"],
"files": { "includes": ["!.agents"] }
}
109 changes: 55 additions & 54 deletions configs/renovate-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
---

## Table of Contents

- [📄 Goal](#-goal)
- [💡 What you get](#-what-you-get)
- [✨ Features](#-features)
Expand All @@ -25,17 +26,17 @@ This is a **shared Renovate preset**: a single source of truth for dependency up

### 💡 What you get

| Area | Behavior |
|------|----------|
| **Minor & patch** | Auto-merged via PR |
| **Major** | Requires dashboard approval |
| **Security advisories** | Instantly processed, auto-merged (minor/patch), grouped with `fix(deps):` prefix |
| **GitHub Actions** | Digest-pinned, minor/patch auto-merged |
| **Docker images** | Digest-pinned, minor/patch auto-merged |
| **devDependencies** | Grouped by minor/patch and major |
| **TypeScript, Biome, Testing, Build tools** | Dedicated groups with appropriate commit prefixes |
| **pnpm** | Runs `pnpm dedupe` post-update |
| **Lockfile** | Monthly maintenance PR |
| Area | Behavior |
| ------------------------------------------- | -------------------------------------------------------------------------------- |
| **Minor & patch** | Auto-merged via PR |
| **Major** | Requires dashboard approval |
| **Security advisories** | Instantly processed, auto-merged (minor/patch), grouped with `fix(deps):` prefix |
| **GitHub Actions** | Digest-pinned, minor/patch auto-merged |
| **Docker images** | Digest-pinned, minor/patch auto-merged |
| **devDependencies** | Grouped by minor/patch and major |
| **TypeScript, Biome, Testing, Build tools** | Dedicated groups with appropriate commit prefixes |
| **pnpm** | Runs `pnpm dedupe` post-update |
| **Lockfile** | Monthly maintenance PR |

## ✨ Features

Expand Down Expand Up @@ -137,51 +138,51 @@ Any key you set in your local `renovate.json` overrides the inherited value. For

### Core settings

| Setting | Value | Why |
|---------|-------|-----|
| `schedule` | `before 3am every weekday` | Runs outside working hours |
| `timezone` | `Europe/Lisbon` | Consistent timezone reference |
| `prHourlyLimit` | `2` | Prevents PR floods |
| `prConcurrentLimit` | `10` | Keeps the PR list manageable |
| `branchConcurrentLimit` | `5` | Limits parallel branch noise |
| `minimumReleaseAge` | `3 days` | Avoids broken releases |
| `rebaseWhen` | `conflicted` | Only force-push when needed |
| `rangeStrategy` | `bump` | Bumps ranges to the new version |
| `separateMinorPatch` | `true` | Separate PRs for minor and patch |
| `separateMultipleMajor` | `true` | Separate PRs per major dependency |
| `dependencyDashboardApproval` | `true` | Major updates require explicit approval |
| `dependencyDashboardAutoclose` | `true` | Auto-closes dashboard when clean |
| `stopUpdatingLabel` | `renovate:stop` | Emergency brake for vulnerable deps |
| `osvVulnerabilityAlerts` | `true` | OSV/GHSA vulnerability scanning |
| `fetchChangeLogs` | `"pr"` | Embeds changelogs in PR body |
| `rollbackPrs` | `true` | Creates rollback PRs for pulled releases |
| `configMigration` | `true` | Auto-migrates config on breaking Renovate changes |
| `postUpdateOptions` | `["pnpmDedupe"]` | Dedupes pnpm lockfile after updates |
| `lockFileMaintenance` | Monthly, auto-merged | Keeps the lockfile healthy |
| Setting | Value | Why |
| ------------------------------ | -------------------------- | ------------------------------------------------- |
| `schedule` | `before 3am every weekday` | Runs outside working hours |
| `timezone` | `Europe/Lisbon` | Consistent timezone reference |
| `prHourlyLimit` | `2` | Prevents PR floods |
| `prConcurrentLimit` | `10` | Keeps the PR list manageable |
| `branchConcurrentLimit` | `5` | Limits parallel branch noise |
| `minimumReleaseAge` | `3 days` | Avoids broken releases |
| `rebaseWhen` | `conflicted` | Only force-push when needed |
| `rangeStrategy` | `bump` | Bumps ranges to the new version |
| `separateMinorPatch` | `true` | Separate PRs for minor and patch |
| `separateMultipleMajor` | `true` | Separate PRs per major dependency |
| `dependencyDashboardApproval` | `true` | Major updates require explicit approval |
| `dependencyDashboardAutoclose` | `true` | Auto-closes dashboard when clean |
| `stopUpdatingLabel` | `renovate:stop` | Emergency brake for vulnerable deps |
| `osvVulnerabilityAlerts` | `true` | OSV/GHSA vulnerability scanning |
| `fetchChangeLogs` | `"pr"` | Embeds changelogs in PR body |
| `rollbackPrs` | `true` | Creates rollback PRs for pulled releases |
| `configMigration` | `true` | Auto-migrates config on breaking Renovate changes |
| `postUpdateOptions` | `["pnpmDedupe"]` | Dedupes pnpm lockfile after updates |
| `lockFileMaintenance` | Monthly, auto-merged | Keeps the lockfile healthy |

### Package rules

| Rule | Scope | Automerge |
|------|-------|-----------|
| Major updates | All ecosystems | No (dashboard approval required) |
| Minor & patch updates | All ecosystems | Yes |
| Security advisories (minor/patch) | All ecosystems | Yes |
| Security advisories (major) | All ecosystems | No |
| devDep security (minor/patch) | devDependencies | Yes |
| devDep security (major) | devDependencies | No |
| devDep minor & patch | devDependencies | Yes (grouped) |
| devDep major | devDependencies | No (grouped) |
| GitHub Actions (minor/patch) | `github-tags` | Yes, digest-pinned |
| GitHub Actions (major) | `github-tags` | No, digest-pinned |
| Pin digest updates | All | Yes |
| Digest updates | All | Yes |
| Docker (minor/patch) | `docker` | Yes, digest-pinned |
| Docker (major) | `docker` | No, digest-pinned |
| TypeScript packages | TS ecosystem | Grouped |
| Biome packages | Biome ecosystem | Grouped |
| Testing packages | Jest, Vitest, Testing Library | Grouped |
| Build tools | Webpack, Vite, Rollup, esbuild | Grouped |
| Node engine | Node.js | Disabled (ignored) |
| Rule | Scope | Automerge |
| --------------------------------- | ------------------------------ | -------------------------------- |
| Major updates | All ecosystems | No (dashboard approval required) |
| Minor & patch updates | All ecosystems | Yes |
| Security advisories (minor/patch) | All ecosystems | Yes |
| Security advisories (major) | All ecosystems | No |
| devDep security (minor/patch) | devDependencies | Yes |
| devDep security (major) | devDependencies | No |
| devDep minor & patch | devDependencies | Yes (grouped) |
| devDep major | devDependencies | No (grouped) |
| GitHub Actions (minor/patch) | `github-tags` | Yes, digest-pinned |
| GitHub Actions (major) | `github-tags` | No, digest-pinned |
| Pin digest updates | All | Yes |
| Digest updates | All | Yes |
| Docker (minor/patch) | `docker` | Yes, digest-pinned |
| Docker (major) | `docker` | No, digest-pinned |
| TypeScript packages | TS ecosystem | Grouped |
| Biome packages | Biome ecosystem | Grouped |
| Testing packages | Jest, Vitest, Testing Library | Grouped |
| Build tools | Webpack, Vite, Rollup, esbuild | Grouped |
| Node engine | Node.js | Disabled (ignored) |

## 📋 Compatibility

Expand All @@ -192,4 +193,4 @@ Any key you set in your local `renovate.json` overrides the inherited value. For

---

*Last updated: Renovate v43+ — repository-hosted preset usage, digest pinning, config migration, rollback PRs*
_Last updated: Renovate v43+ — repository-hosted preset usage, digest pinning, config migration, rollback PRs_
13 changes: 7 additions & 6 deletions configs/typescript-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
---

## Table of Contents

- [📄 Goal](#-goal)
- [What you will find](#what-you-will-find)
- [✨ Features](#-features)
Expand Down Expand Up @@ -109,9 +110,9 @@ Create a `tsconfig.json` file in your project root and extend the configuration

## 📋 Available configurations

| Config | Use for |
|--------|---------|
| `@tutods/typescript-config/base.json` | Shared strict defaults for any TypeScript project |
| `@tutods/typescript-config/react.json` | React applications and libraries |
| `@tutods/typescript-config/node.json` | Node.js applications and packages |
| `@tutods/typescript-config/nestjs.json` | NestJS backend applications |
| Config | Use for |
| --------------------------------------- | ------------------------------------------------- |
| `@tutods/typescript-config/base.json` | Shared strict defaults for any TypeScript project |
| `@tutods/typescript-config/react.json` | React applications and libraries |
| `@tutods/typescript-config/node.json` | Node.js applications and packages |
| `@tutods/typescript-config/nestjs.json` | NestJS backend applications |
Loading
Loading