@cosyte/prettier-config 0.0.4 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +31 -3
  2. package/README.md +96 -6
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  All notable changes to `@cosyte/prettier-config` are documented here, following
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions are managed with Changesets;
5
- this file is hand-maintained (Changesets' own changelog generation is disabled). The package stays on
6
- the **`0.0.x`-until-first-alpha** ladder.
5
+ this file is hand-maintained (Changesets' own changelog generation is disabled). The package is on the
6
+ **`0.1.x`** line: its surface is settled, and bump types follow ordinary semver rather than a
7
+ pre-alpha rule. See
8
+ [ADR 0002](../../documentation/decisions/0002-the-0-1-0-version-line.md).
7
9
 
8
10
  > Because the generator is disabled, **`[Unreleased]` is promoted to a version heading BY HAND**, in
9
11
  > the pull request that adds the changeset. Nothing does it automatically. Until 2026-08-04 nothing
@@ -11,6 +13,32 @@ the **`0.0.x`-until-first-alpha** ladder.
11
13
 
12
14
  ## [Unreleased]
13
15
 
16
+ ## [0.1.1] - Unreleased
17
+
18
+ ### Changed
19
+
20
+ - **Published through npm trusted publishing, with provenance.** The code and configuration are
21
+ unchanged from 0.1.0. Only the README differs: it writes Cosyte with a capital C.
22
+
23
+ ## [0.1.0] - Unreleased
24
+
25
+ ### Changed
26
+
27
+ - **The package leaves the pre-alpha version ladder for the `0.1.x` line.** No setting change: the
28
+ shared Prettier settings and their overrides are byte-identical to `0.0.4`. What moves is the
29
+ version policy this package states about itself, and the reasoning is in
30
+ [ADR 0002](../../documentation/decisions/0002-the-0-1-0-version-line.md). A consumer pinned at
31
+ `^0.0.4` does not resolve this release and has to widen its range once.
32
+ - The `README.md` in the tarball now opens its `## Status` section on the settled-line sentence
33
+ instead of the pre-alpha ladder one, so the policy text a consumer reads agrees with the version
34
+ printed beside it. `scripts/readme-check.mjs` grades that sentence against the release line the
35
+ pending changesets resolve to.
36
+ - The `0.0.4` section below was relabelled: its content had shipped and was still sitting under
37
+ `[Unreleased]`, which is the same defect the note above describes, recurring one release after it
38
+ was written down. That relabelling changes only the `CHANGELOG.md` inside the published tarball.
39
+
40
+ ## [0.0.4] - 2026-08-04
41
+
14
42
  ### Changed
15
43
 
16
44
  - The sections below were relabelled: content that had already shipped was still sitting under
@@ -22,7 +50,7 @@ the **`0.0.x`-until-first-alpha** ladder.
22
50
 
23
51
  ### Changed
24
52
 
25
- - Documentation no longer uses em dashes, in line with the cosyte brand voice. No setting
53
+ - Documentation no longer uses em dashes, in line with the Cosyte brand voice. No setting
26
54
  change.
27
55
 
28
56
  ## [0.0.2] - 2026-06-25
package/README.md CHANGED
@@ -1,8 +1,38 @@
1
+ <a href="https://cosyte.com">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://cosyte.com/tile/cosyte-lockup-tile-on-dark-1200x300.png">
4
+ <img alt="The Cosyte logo on its own white ground: the icon beside the word Cosyte." src="https://cosyte.com/tile/cosyte-lockup-tile-on-light-1200x300.png">
5
+ </picture>
6
+ </a>
7
+
1
8
  # @cosyte/prettier-config
2
9
 
3
- Shared Prettier configuration for the `@cosyte/*` packages: `printWidth` 100, double quotes,
4
- semicolons, trailing commas, `arrowParens: always`, and LF line endings, with the standard
5
- `*.md` / JSON / YAML overrides.
10
+ > One formatter setting sheet for every Cosyte repository, adopted in a single line.
11
+
12
+ [![npm version](https://img.shields.io/npm/v/@cosyte/prettier-config.svg)](https://www.npmjs.com/package/@cosyte/prettier-config)
13
+ [![CI](https://img.shields.io/github/actions/workflow/status/cosyte/config/ci.yml?branch=main&label=CI)](https://github.com/cosyte/config/actions/workflows/ci.yml)
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/cosyte/config/blob/main/LICENSE)
15
+ [![Node](https://img.shields.io/badge/node-%3E%3D22.14-brightgreen.svg)](https://nodejs.org)
16
+
17
+ Shared Prettier configuration for @cosyte/\* packages.
18
+
19
+ ## Why this exists
20
+
21
+ Formatting is the one thing a code review should never be about, and a per-repo `.prettierrc` makes
22
+ it about that anyway: two repositories disagree by one setting, a contributor moves between them,
23
+ and every diff carries reformatting noise that hides the change.
24
+
25
+ The nearest alternative is committing the same `.prettierrc` everywhere. That is the drift this
26
+ removes: adopting the settings is one `package.json` field, and changing them is a version bump
27
+ rather than ten pull requests.
28
+
29
+ ## Status
30
+
31
+ `@cosyte/prettier-config` is on the Cosyte 0.1.x line: the public API is settled and bump types follow ordinary semver.
32
+
33
+ Still moving: the `printWidth` and the per-filetype overrides. Both are the kind of setting that
34
+ reformats an entire repository when it changes, so a consumer that cares should pin an exact version
35
+ and take the reformat deliberately.
6
36
 
7
37
  ## Install
8
38
 
@@ -10,7 +40,9 @@ semicolons, trailing commas, `arrowParens: always`, and LF line endings, with th
10
40
  pnpm add -D @cosyte/prettier-config prettier
11
41
  ```
12
42
 
13
- ## Use
43
+ `prettier` is a peer dependency. Node `>=22.14`. The package ships one JSON file and no code.
44
+
45
+ ## Usage
14
46
 
15
47
  In `package.json`:
16
48
 
@@ -18,5 +50,63 @@ In `package.json`:
18
50
  { "prettier": "@cosyte/prettier-config" }
19
51
  ```
20
52
 
21
- Part of [cosyte/config](https://github.com/cosyte/config), one enforced toolchain for the `@cosyte/*`
22
- suite.
53
+ Then format and check as usual:
54
+
55
+ ```sh
56
+ pnpm exec prettier --write "**/*.{js,mjs,ts,json,md,yml,yaml}"
57
+ pnpm exec prettier --check "**/*.{js,mjs,ts,json,md,yml,yaml}"
58
+ ```
59
+
60
+ Keep the two globs identical. A `--write` that covers a file `--check` does not is a formatting
61
+ violation that can never fail CI, which is how a repository ends up with a green check over files
62
+ nobody reads.
63
+
64
+ ## Entry points
65
+
66
+ | entry point | what it is |
67
+ | ------------------------- | ----------------------------------------------------------------------------- |
68
+ | `@cosyte/prettier-config` | the config object itself (`index.json`), ready for the `prettier` field above |
69
+
70
+ There is no JavaScript entry point, because the package is one JSON file a tool reads rather than a
71
+ module a consumer calls. That is also why no example here is executed by this repository's test run:
72
+ there is nothing to call.
73
+
74
+ ## Overrides
75
+
76
+ Every key is overridable: Prettier has no enforcement of its own, so a divergence costs nothing but
77
+ the divergence. Point the `prettier` field at your own module and spread this one, which is the
78
+ shape Prettier supports for extending a shared config:
79
+
80
+ ```js
81
+ // prettier.config.js
82
+ import cosyte from "@cosyte/prettier-config" with { type: "json" };
83
+
84
+ export default { ...cosyte, printWidth: 80 };
85
+ ```
86
+
87
+ Prefer changing it here and taking a version bump. A per-repo override is a formatting dialect, and
88
+ the point of a shared config is that there is one.
89
+
90
+ ## PHI and safety
91
+
92
+ This package is formatter configuration. It contains no code, reads no input, and never sees patient
93
+ data: it is one JSON file Prettier reads. Nothing here logs, retains or transmits anything.
94
+
95
+ ## Compatibility
96
+
97
+ `printWidth` 100, double quotes, semicolons, trailing commas, `arrowParens: always`, and LF line
98
+ endings, with the standard `*.md`, JSON and YAML overrides. `proseWrap` is `preserve`, so Prettier
99
+ reflows no prose: a markdown line stays where its author put it.
100
+
101
+ ## Contributing
102
+
103
+ Questions, bug reports and proposals go to
104
+ [the issue tracker](https://github.com/cosyte/config/issues). Pull requests are welcome, in
105
+ [cosyte/config](https://github.com/cosyte/config), where this package lives.
106
+
107
+ A change has to clear the required `verify` job, and a change to a setting here needs a changeset
108
+ saying what moved: every consumer reformats on the version bump.
109
+
110
+ ## License
111
+
112
+ MIT, copyright Cosyte. See [LICENSE](https://github.com/cosyte/config/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosyte/prettier-config",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "description": "Shared Prettier configuration for @cosyte/* packages.",
5
5
  "keywords": [
6
6
  "prettier",