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
5 changes: 5 additions & 0 deletions .changeset/depend-on-npm-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@systemfsoftware/api-extractor": patch
---

Depends on published @systemfsoftware packages by caret range, so the package installs from npm.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ jobs:
extra_nix_config: |
extra-substituters = https://nix.systemfsoftware.com
extra-trusted-public-keys = nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=
# The dev shell copies the producer tarballs into .deps/ before pnpm runs.
- name: Install from the lockfile and the producer tarballs
- name: Install from the lockfile
run: nix develop --command pnpm install --frozen-lockfile
- name: Serialise a fixed-seed sample of models and verdicts
run: nix develop --command node --conditions=@systemfsoftware/source apps/api-extractor-e2e/host-digest.ts > host-output.bin
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/nix-cache-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ jobs:
while IFS= read -r attr; do
build "packages.$SYSTEM.$attr"
done <<< "$attrs"
# Not workspace members, but every CI job realises them: pnpm-store is the npm closure, producer-tarballs the
# producers' tarballs, and the dev shell carries the release tools and the dependency sandbox.
# Not workspace members, but every CI job realises them: pnpm-store is the npm closure, and the dev shell
# carries the release tools and the dependency sandbox.
build "packages.$SYSTEM.pnpm-store"
build "packages.$SYSTEM.producer-tarballs"
build "devShells.$SYSTEM.default"
- name: Push the closures and check the cache serves them
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The release flow is pnpm-release-management's reusable workflow. This caller
# supplies the trigger, the permissions its jobs ask for, and the CI workflow it
# dispatches on the release PR branch. Distribution is a git tag, a GitHub
# Release and this repository's flake outputs; there is no npm publish.
# Release and an npm publish through trusted publishing.
name: Release

on:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ node_modules/
dist/
coverage/
*.tsbuildinfo
# producer tarballs the lockfile installs from, copied in by the dev shell
.deps/
.cache/
.turbo/
.release/
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ verdict. Requirements and decisions: `docs/plans/2026-10-10-1146-feat-effect-api

## Commands

Run inside the dev shell (`nix develop --command …`), which copies the producer tarballs into `.deps/`:
Run inside the dev shell (`nix develop --command …`):

```sh
pnpm run bootstrap # sandboxed pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Development setup

`nix develop` provides the dev shell. nix.systemfsoftware.com is the package registry for `@systemfsoftware` packages: this repository takes them from its flake inputs, pinned to producer commits, and the dev shell copies them into `.deps/`.
`nix develop` provides the dev shell. `@systemfsoftware` packages come from npm like any other dependency; `pnpm-lock.yaml` holds the exact versions.

Run the checks through the dev shell:

Expand Down
42 changes: 3 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,47 +82,11 @@ The output is canonical JSON, here from a package whose `package.json` exports `

## Install

`@systemfsoftware/api-extractor` is not on npm. This repository ships it as a flake output, and a release is a git tag and a GitHub Release (the latest is [v0.1.0](https://github.com/systemfsoftware/api-extractor-effect/releases/tag/%40systemfsoftware%2Fapi-extractor%40v0.1.0)). A consumer takes the flake as an input and the tarballs through the route in [pnpm-release-management](https://github.com/systemfsoftware/pnpm-release-management#distribution-through-nix). `nix.systemfsoftware.com` is the registry for `@systemfsoftware` packages: Nix fetches what a producer has pushed there and builds the rest from source. This repository pushes its own tarball on every push to `main`, so Nix substitutes `api-extractor` from `nix.systemfsoftware.com`.

### Add the flake as an input

```nix
{
nixConfig = {
extra-substituters = "https://nix.systemfsoftware.com";
extra-trusted-public-keys = "nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=";
};
inputs = {
nixpkgs.follows = "producer/nixpkgs";
producer.url = "github:systemfsoftware/api-extractor-effect/<rev>";
pnpm-release-management.url = "github:systemfsoftware/pnpm-release-management";
};
}
```sh
pnpm add @systemfsoftware/api-extractor effect
```

### Build the tarballs and the pnpm store

```nix
packages = forEachSystem (pkgs: rec {
producer-tarballs = pnpm-release-management.lib.mkProducerTarballs {
inherit pkgs;
producers = { inherit producer; };
};
pnpm-store = pnpm-release-management.lib.mkPnpmConsumerStore {
inherit pkgs;
src = self;
files.".deps" = producer-tarballs;
};
});
```

### Requirements

The package needs Node 24 or later and has `effect` `^4.1.2` as a peer, which installs from npm as usual:

```bash
pnpm add 'effect@^4.1.2'
```
The package needs Node 24 or later. Its peer dependency, `effect@^4.1.2`, comes from your project: the package declares it but does not install it, so one copy is shared with the rest of your project.

## The verdict

Expand Down
10 changes: 5 additions & 5 deletions apps/api-extractor-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"devDependencies": {
"@effect/platform-node": "catalog:",
"@systemfsoftware/api-extractor": "workspace:*",
"@systemfsoftware/effect-gherkin-spec": "^7.0.1",
"@systemfsoftware/oxlint-config-recommended": "^4.0.0",
"@systemfsoftware/tsconfig": "^2.0.1",
"@systemfsoftware/vitest": "^2.0.0",
"@systemfsoftware/vitest-config": "^0.1.0",
"@systemfsoftware/effect-gherkin-spec": "^8.1.4",
"@systemfsoftware/oxlint-config-recommended": "^6.0.1",
"@systemfsoftware/tsconfig": "^2.1.0",
"@systemfsoftware/vitest": "^4.1.1",
"@systemfsoftware/vitest-config": "^0.1.3",
"@types/node": "catalog:",
"effect": "catalog:",
"oxlint": "catalog:",
Expand Down
4 changes: 2 additions & 2 deletions apps/api-extractor-profile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"devDependencies": {
"@effect/platform-node": "catalog:",
"@systemfsoftware/api-extractor": "workspace:*",
"@systemfsoftware/oxlint-config-recommended": "^4.0.0",
"@systemfsoftware/tsconfig": "^2.0.1",
"@systemfsoftware/oxlint-config-recommended": "^6.0.1",
"@systemfsoftware/tsconfig": "^2.1.0",
"@types/node": "catalog:",
"effect": "catalog:",
"oxc-parser": "catalog:",
Expand Down
Loading
Loading