You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 651ce29
Browse filesBrowse the repository at this point in the historyBrowse files
docs: replace npx advice and hardcoded versions with verified guidance
Two defects made the READMEs untrustworthy.
The root package table carried a version column that goes stale at the next
release, and the engine package warned that it was pre-1.0 at 4.0.0 while it
ships 7.0.0. Both claims are removed rather than re-pinned.
The quick starts recommended `npx` and `pnpm dlx`, which execute whatever the
registry serves at that moment. A tool that audits what your package resolves
should not itself float, so installs are now lockfile-pinned dev dependencies
invoked through the package manager. A note records why.
The engine snippets were also wrong about the API: `checkPackage` returns a
lazy Effect, so `await` on it was a no-op, and the untyped result carries no
`problems` array to iterate. Both are corrected against the published types.
The CLI output sample in the root README was invented; it is now a captured
run of the documented command
Copy file name to clipboardExpand all lines: README.md
+49-38Lines changed: 49 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,52 @@
1
1
# are-the-types-wrong
2
2
3
-
> Predictable TypeScript type definitions for npm packages: check entry points, module kinds, and export bindings across Node and bundler resolution modes before publishing.
3
+
> Predictable TypeScript types for npm packages: check entry points, module kinds, and export bindings under every resolution mode Node and bundlers use, before you publish.
4
4
5
-
An Effect-powered workspace and monorepo housing the core analysis engine and CLI for checking TypeScript types and packaging conventions in npm distributions.
5
+
A workspace housing the analysis engine and the `attw` CLI behind [arethetypeswrong.github.io](https://arethetypeswrong.github.io).
|[`@systemfsoftware/arethetypeswrong-cli`](packages/arethetypeswrong-cli)|`4.0.0`| Official CLI tool (`attw`) to check local tarballs, directories, or npm packages|
|[`@systemfsoftware/arethetypeswrong-recipes`](packages/arethetypeswrong-recipes)|`0.1.0`| Problem-class recipes and fixture generation for attw tests |
|[`@systemfsoftware/arethetypeswrong-cli`](packages/arethetypeswrong-cli)|The `attw` command — checks a tarball, a directory, or a published package |
12
+
|[`@systemfsoftware/arethetypeswrong`](packages/arethetypeswrong)|The analysis engine, as a library for your own tooling |
13
+
|[`@systemfsoftware/arethetypeswrong-recipes`](packages/arethetypeswrong-recipes)|Synthetic packages, one per problem kind, that test the engine (not published)|
14
14
15
-
## Quick Start
15
+
## Install
16
16
17
-
Check a package tarball or local directory without global installation:
17
+
Add the CLI to the project you want to check, so your lockfile pins the version:
> Prefer a lockfile-pinned install over `npx`. A tool whose job is auditing what your package resolves should not itself be resolved fresh from the registry on every run.
25
+
26
+
## Quick Start
27
+
28
+
Run the check from the package you want to audit. `--pack` runs `npm pack`, analyzes the resulting tarball, and deletes it:
A healthy package prints a row per entry point and a column per resolution mode:
35
+
36
+
```text
37
+
No problems found.
38
+
Entrypoint . ./package.json
39
+
node10 ✔ ✔
40
+
node16-cjs ✔ ✔
41
+
node16-esm ✔ ✔
42
+
bundler ✔ ✔
27
43
```
28
44
29
-
To use the programmatic engine in a TypeScript or JavaScript project:
45
+
Problems replace the `✔` with `✘` and are named above the table, so the exit code can gate CI. Use a [profile](packages/arethetypeswrong-cli/README.md#profiles) when your package deliberately supports only some resolution modes.
46
+
47
+
## Using the Engine
48
+
49
+
The engine is a library whose `checkPackage` returns a lazy Effect:
Copy file name to clipboardExpand all lines: packages/arethetypeswrong-cli/README.md
+23-12Lines changed: 23 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# arethetypeswrong/cli
1
+
# @systemfsoftware/arethetypeswrong-cli
2
2
3
3
A CLI for [arethetypeswrong.github.io](https://arethetypeswrong.github.io/).
4
4
@@ -19,15 +19,26 @@ This project attempts to analyze npm package contents for issues with their Type
19
19
20
20
## Installation
21
21
22
+
Add it to the project you want to check, so your lockfile pins the version:
23
+
22
24
```shell
23
-
npm i -g @systemfsoftware/arethetypeswrong-cli
25
+
pnpm add -D @systemfsoftware/arethetypeswrong-cli
26
+
```
27
+
28
+
Then run it through your package manager:
29
+
30
+
```shell
31
+
pnpm exec attw --pack .
24
32
```
25
33
26
-
<!-- Or, using `npx`: -->
27
-
<!---->
28
-
<!-- ```shell -->
29
-
<!-- npx attw -->
30
-
<!-- ``` -->
34
+
> [!NOTE]
35
+
> Prefer a lockfile-pinned install over `npx`. A tool that audits what your package resolves should not itself be resolved fresh from the registry on each run.
36
+
37
+
To use `attw` outside any project, install it globally:
Copy file name to clipboardExpand all lines: packages/arethetypeswrong/README.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,6 @@
4
4
5
5
Analyzes a package tarball the way Node and TypeScript will actually resolve it: entry-point discovery from `package.json` (`main`, `exports`, `bin`), per-entry `commonjs` / `ESM` resolution, and export-shape checks. Use it to catch publish-time mistakes locally instead of after `npm publish`.
6
6
7
-
> [!WARNING]
8
-
> This package is pre-1.0 (`4.0.0` under `v0` semver). Patch and minor releases may change the public API. Pin the version in production.
9
-
10
7
## What it does
11
8
12
9
A single `checkPackage` call returns a structured analysis or a set of diagnostics. Each entry point is checked under every relevant resolution kind:
0 commit comments