Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jym77 committed Sep 6, 2023
1 parent 325bdc3 commit d76b359
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .changeset/odd-chefs-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@siteimprove/alfa-toolchain": minor
---

**Added:** More validations functions are added.

- Checking that API extractor config is defined on each workspace.
- Checking that package.json match the expected structure.
- Checking that package.json's dependencies match tsconfig.json's references.
14 changes: 12 additions & 2 deletions packages/alfa-toolchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@ This package contains the toolchain for developing Alfa and its [companion proje
Alfa is using [changesets](../../docs/guides/changeset.md). We keep one changelog per package, plus one global changelog (because we keep all packages in sync at the same version number). The per package changelogs are handled directly by changeset, using a custom generation function defined here. The global changelog is built with utilities here.

Individual changesets are expected to have the following shape (after the frontmatter):

```markdown
**[kind]:** [title]

[details]
```

where `[title]` is a one line summary for the changes (the full text is called `summary` in changesets lingo, so we call that summary `title` instead), `[details]` is an arbitrary long detailed explanation, and `[kind]` is one of: `Breaking`, `Removed`, `Added`, `Fixed`.
where `[title]` is a one line summary for the changes (the full text is called `summary` in changesets lingo, so we call that summary `title` instead), `[details]` is an arbitrary long detailed explanation, and `[kind]` is one of: `Breaking`, `Removed`, `Added`, `ChangeDd`, Fixed`.

`Breaking` and `Removed` kinds may only be used on major bumps (or minor bumps pre-1.0.0); `Added` kind may only be used on minor or major bumps (and should only be used on minor bumps); `Fixed` kinds can be used on any bump but should only be used on patch bumps.
`Breaking` and `Removed` kinds may only be used on major bumps (or minor bumps pre-1.0.0); `Added` kind may only be used on minor or major bumps (and should only be used on minor bumps); `Changed` and `Fixed` kinds can be used on any bump but should only be used on patch bumps.

The individual changelog contains the full changeset. The global changelog contains only the title, with link to the individual changelog.

## Validation

The package provides a bunch of low-level validation structure of the project. These checks can be toggled via [`./config/validate-structure.json`](config/validate-structure.json).

- Check that each changeset matches the structure described above.
- Check that each workspace has an API extractor config.
- Check that each workspace's `package.json` matches the expected structure.
- Check that each (internal) `dependencies` has its path referenced in the corresponding `tsconfig.json`.

0 comments on commit d76b359

Please sign in to comment.