Skip to content

ci: add packaging & monorepo consistency validation (publint + attw + sherif) #34

Description

@martyy-code

Description

Add lightweight CI jobs that validate the published packaging and version consistency of the monorepo:

  • publint — validates package.json / exports / files / main / types of the published lib.
  • @arethetypeswrong/cli (attw) — resolves types against node16 / nodenext / bundler and surfaces real consumer-facing defects (types-only exports vanishing in CJS, missing defaults, bad module syntax).
  • sherif — zero-dep check for version consistency across workspace packages (misplaced @types/*, desync between next and eslint-config-next, alphabetical dep order, etc.).

Why

  • attw would have caught the existing bug at packages/type-testing/src/types/special.ts:5 (import missing .js extension) when targeting nodenext.
  • These three tools cover distinct layers (packaging shape, type resolution, version drift) with negligible cost — fit easily as required checks on PRs.
  • We currently rely on humans noticing these issues at review time.

Acceptance criteria

  • New CI jobs (or scripts wired into turbo run lint) for publint, attw, and sherif.
  • All three pass against the current repo after fixing the special.ts import issue.
  • Wired as required checks on PRs to main.
  • Documented in CONTRIBUTING.md under the "Code quality" section.

Notes

  • tsdown can integrate publint and attw natively as lint: { publint: true, attw: true }; defer that switch to a separate issue if/when we move off tsc -b.
  • sherif is preferred over syncpack while the latter's Rust rewrite is in progress.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildPackaging, exports map, tsconfigarea:ciWorkflows, dependabot, toolingenhancementNew feature or requeststatus:in-progressSomeone is working on it

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions