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
7 changes: 2 additions & 5 deletions .changeset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ Short release note for the change.
- This README is NOT a changeset: the gate requires a file whose frontmatter
parses as `"<pkg>": <none|patch|minor|major>`.

Nothing is published to a registry. The release path writes a `<pkg>@vX.Y.Z` git
tag and a GitHub Release for each unreleased version; distribution is this
repository's Nix flake outputs consumed from a git ref (pinned by `flake.lock`
rev + narHash). There is no npm token, no OIDC trusted publishing, and no
registry to configure.
The release path writes a `<pkg>@vX.Y.Z` git tag and a GitHub Release for each unreleased version, and publishes
the packages to npm through trusted publishing.
10 changes: 10 additions & 0 deletions .changeset/install-from-npm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@systemfsoftware/xstate": patch
"@systemfsoftware/xstate-effect": patch
"@systemfsoftware/xstate-react": patch
"@systemfsoftware/xstate-store": patch
"@systemfsoftware/xstate-store-react": patch
"@systemfsoftware/xstate-test": patch
---

The READMEs tell readers to install with `pnpm add` from npm instead of building a flake output.
1 change: 0 additions & 1 deletion .github/workflows/nix-cache-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
EXTRA_OUTPUTS: >-
sandbox-proofs
pnpm-store
producer-tarballs

jobs:
push:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ packages/*/temp/
.direnv/
result
result-*
.deps
.cache/
65 changes: 10 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,63 +18,18 @@ xstate holds the `@systemfsoftware/xstate*` packages: a fork of [XState](https:/

## Install

These packages are not on npm. They are distributed as Nix tarballs from [nix.systemfsoftware.com](https://nix.systemfsoftware.com), the registry for `@systemfsoftware` packages.

Add this repository as a flake input, and take its tarballs through [pnpm-release-management](https://github.com/systemfsoftware/pnpm-release-management#distribution-through-nix):

```nix
{
nixConfig = {
extra-substituters = "https://nix.systemfsoftware.com";
extra-trusted-public-keys = "nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=";
};

inputs = {
nixpkgs.follows = "xstate/nixpkgs";
xstate.url = "github:systemfsoftware/xstate/<rev>";
pnpm-release-management.url = "github:systemfsoftware/pnpm-release-management";
};

outputs = { self, nixpkgs, xstate, pnpm-release-management }:
let
lib = nixpkgs.lib;
forEachSystem = fn: lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: fn nixpkgs.legacyPackages.${system});
in
{
packages = forEachSystem (pkgs: rec {
producer-tarballs = pnpm-release-management.lib.mkProducerTarballs {
inherit pkgs;
producers = { inherit xstate; };
};
pnpm-store = pnpm-release-management.lib.mkPnpmConsumerStore {
inherit pkgs;
src = self;
files.".deps" = producer-tarballs;
};
});

devShells = forEachSystem (pkgs: {
default = pkgs.mkShell {
shellHook = self.packages.${pkgs.stdenv.hostPlatform.system}.producer-tarballs.shellHook;
};
});
};
}
Install the packages you use from npm, with their peers:

```sh
pnpm add @systemfsoftware/xstate
pnpm add @systemfsoftware/xstate-effect @systemfsoftware/xstate 'effect@^4.1.0'
pnpm add @systemfsoftware/xstate-react @systemfsoftware/xstate 'react@^19.3.0'
pnpm add @systemfsoftware/xstate-store @systemfsoftware/xstate
pnpm add @systemfsoftware/xstate-store-react 'react@^19.3.0'
pnpm add -D @systemfsoftware/xstate-test @systemfsoftware/xstate 'effect@^4.1.0' 'fast-check@^4' 'vitest@^5' 'zod@^4'
```

Replace `<rev>` with the commit you pin. Nix only applies `nixConfig` for trusted users or with `--accept-flake-config`.

Each package is a tarball named after its last segment, so `@systemfsoftware/xstate-store` is `xstate-store.tgz`. Point your `package.json` at the ones you use:

```json
{
"dependencies": {
"@systemfsoftware/xstate": "file:.deps/xstate.tgz"
}
}
```

Add `.deps/` to `.gitignore`, then run `pnpm install` inside the dev shell. Third-party peers such as `effect`, `react`, `fast-check`, `vitest` and `zod` install from npm as usual, for the packages you use.
The packages are published under the `latest` tag while the repository is in pre-release, so pnpm resolves their beta versions.

## Quick start

Expand Down
Loading
Loading