@opetope/runtime 0.1.0 → 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.
- package/CHANGELOG.md +7 -0
- package/README.md +5 -4
- package/README.ru.md +5 -4
- package/docs/decisions.md +1 -1
- package/docs/releases.md +38 -17
- package/docs/releases.ru.md +37 -17
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -64,8 +64,9 @@ The data sugar lives in that same `own` section and is lowered into ordinary att
|
|
|
64
64
|
- `effect({ from, when?, run, onDispose? })` takes an imported `Readable`, runs for the
|
|
65
65
|
initial snapshot and then latest-wins; the signal, the per-run timers and the returned disposer belong to that
|
|
66
66
|
exact run;
|
|
67
|
-
- `event(from, subscribe, { run })` gives the `subscribe` context a non-replayed `emit`, serialises
|
|
68
|
-
limits the queue to one pending payload;
|
|
67
|
+
- `event(from, subscribe, { run, backpressure? })` gives the `subscribe` context a non-replayed `emit`, serialises
|
|
68
|
+
the handler and limits the queue to one pending payload; `latest()` replaces that waiting payload, while the
|
|
69
|
+
default keeps it and reports a newer emit as an overflow. A failure and an overflow go to the application reporter.
|
|
69
70
|
Retirement aborts the handler, drops the pending payload and drains work already started before the source is released;
|
|
70
71
|
- `resource(from, target, { key, load, retry?, retention? })` watches a
|
|
71
72
|
`Readable<T | null | undefined>` returned by the target selector:
|
|
@@ -114,8 +115,8 @@ release/reacquire into one microtask and aborts unfinished work after the last l
|
|
|
114
115
|
cache. The UI of a feature gets an instance-bound facade through `bindFeatureResource(instance, own.x)`,
|
|
115
116
|
and the React `useResource` holds one lease per mounted consumer.
|
|
116
117
|
|
|
117
|
-
There are exactly two
|
|
118
|
-
`latest()` for stream backpressure. The former `drop`, `sample` and `queue` are removed together with their branches:
|
|
118
|
+
There are exactly two policy factories, and both have a production pilot: `scoped({ capacity })` for retention and
|
|
119
|
+
`latest()` for stream and event backpressure. The former `drop`, `sample` and `queue` are removed together with their branches:
|
|
119
120
|
they could not be named from the author vocabulary, so they measured only themselves (D160).
|
|
120
121
|
|
|
121
122
|
## Calls and lanes
|
package/README.ru.md
CHANGED
|
@@ -64,8 +64,9 @@ Cleanup failure по умолчанию best-effort `report`; retryable `quarant
|
|
|
64
64
|
- `effect({ from, when?, run, onDispose? })` принимает imported `Readable`, запускается для
|
|
65
65
|
начального snapshot и затем latest-wins; signal, per-run timers и возвращённый disposer принадлежат
|
|
66
66
|
exact запуску;
|
|
67
|
-
- `event(from, subscribe, { run })` даёт `subscribe`-контексту non-replayed `emit`, сериализует
|
|
68
|
-
ограничивает очередь одним ожидающим payload;
|
|
67
|
+
- `event(from, subscribe, { run, backpressure? })` даёт `subscribe`-контексту non-replayed `emit`, сериализует
|
|
68
|
+
обработчик и ограничивает очередь одним ожидающим payload; `latest()` заменяет этот ожидающий payload, а поведение
|
|
69
|
+
по умолчанию сохраняет его и репортит новый emit как переполнение. Отказ и переполнение уходят reporter-у приложения.
|
|
69
70
|
Retirement abort-ит handler, удаляет ожидающий payload и drain-ит уже запущенную работу до release source;
|
|
70
71
|
- `resource(from, target, { key, load, retry?, retention? })` следит за
|
|
71
72
|
`Readable<T | null | undefined>`, возвращённым target-селектором:
|
|
@@ -114,8 +115,8 @@ release/reacquire в одну микрозадачу и abort-ит незаве
|
|
|
114
115
|
кэша. UI фичи получает привязанный к экземпляру фасад через `bindFeatureResource(instance, own.x)`,
|
|
115
116
|
а React `useResource` держит один lease на смонтированного потребителя.
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
backpressure
|
|
118
|
+
Фабрик политик ровно две, и обе с production-пилотом: `scoped({ capacity })` для удержания и `latest()` для
|
|
119
|
+
backpressure стрима и события. Прежние `drop`, `sample` и `queue` удалены вместе с их ветками: назвать их из авторского
|
|
119
120
|
словаря было нельзя, поэтому они измеряли только сами себя (D160).
|
|
120
121
|
|
|
121
122
|
## Calls and lanes
|
package/docs/decisions.md
CHANGED
|
@@ -1392,7 +1392,7 @@ cap панели поднимается с 20 до 21 kb. Поднятие по
|
|
|
1392
1392
|
|
|
1393
1393
|
## D247 — `event` допускает `backpressure: latest()`, дефолт не меняется
|
|
1394
1394
|
|
|
1395
|
-
|
|
1395
|
+
оба authoring-пути, `own.event` и `ModelContext.event`, допускают необязательную опцию `backpressure` с тем же публичным словом `latest()`, которое требует `stream`: пока `run` исполняется и один payload ждёт, новый payload заменяет ожидающего и запись отказа не пишется. Дефолт без опции остаётся прежним: слот принадлежит payload, занявшему его первым, а новый `emit` отбрасывается разделяемой записью `queue-capacity`.
|
|
1396
1396
|
|
|
1397
1397
|
<a id="d248"></a>
|
|
1398
1398
|
|
package/docs/releases.md
CHANGED
|
@@ -25,9 +25,9 @@ npx playwright install --with-deps chromium firefox webkit
|
|
|
25
25
|
npm run check
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
CI
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
CI uses the official Playwright image, pinned by version and digest to match the locked Playwright dependency.
|
|
29
|
+
Update the dependency, image tag and digest together. The local commands above install browsers and their platform
|
|
30
|
+
dependencies without requiring that image.
|
|
31
31
|
|
|
32
32
|
`ci:pack` creates five real tarballs and installs them in isolated consumers. It verifies all export entries,
|
|
33
33
|
NodeNext/Bundler declarations, renderer and headless paths, Lint without runtime packages, maps and shipped links. React/React DOM and their type packages are installed separately at `19.0.0` and at the contributor toolchain versions; both renderer/Devtools consumers also run on Node `20.19.0`.
|
|
@@ -37,27 +37,48 @@ finishes. `pack-local` prepares archives for development and does not mark them
|
|
|
37
37
|
The Git commit and archive checksums must match at publication. Do not edit or rebuild the packages after
|
|
38
38
|
acceptance. The publish script rejects an unaccepted manifest, another commit or a dirty checkout.
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Local release
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
publish the accepted set:
|
|
42
|
+
After the Version packages PR is merged, update a clean local `main` and run:
|
|
44
43
|
|
|
45
44
|
```sh
|
|
46
|
-
|
|
45
|
+
npm run release:local
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
The
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
The command derives the shared version from the five package manifests; verifies pinned Node and automatically
|
|
49
|
+
relaunches itself with the pinned npm when necessary; checks the canonical repository, clean `main`, exact
|
|
50
|
+
`origin/main` commit and absence of pending changesets; checks npm authentication and starts `npm login` only when
|
|
51
|
+
no session exists; installs dependencies and matching Playwright browsers; runs the complete acceptance; then asks
|
|
52
|
+
you to type the exact version before calling the protected publisher. It publishes stable versions under
|
|
53
|
+
`candidate` and prereleases under `next`.
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
The low-level publisher remains available for recovery of an interrupted publication from unchanged accepted
|
|
56
|
+
archives:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
node tooling/release/publish.mjs --version <exact-version>
|
|
60
|
+
```
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
## First release and authentication
|
|
63
|
+
|
|
64
|
+
Local publication authenticates interactively with `npm login` using an account allowed to publish in `@opetope`.
|
|
65
|
+
|
|
66
|
+
The script publishes exact archives with lifecycle scripts disabled. Release candidates use `next`; stable
|
|
67
|
+
versions first use `candidate`. It checks existing versions before writing and resumes a partial publication only
|
|
68
|
+
when the already-published integrity matches. It never overwrites versions or requests promotion to `latest`;
|
|
69
|
+
verify the actual registry tags separately.
|
|
70
|
+
|
|
71
|
+
A successful upload can precede registry availability while [npm scans the package](https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/).
|
|
72
|
+
The final verification retries metadata reads after temporary failures or `E404`, with one 20-minute deadline
|
|
73
|
+
and at most 100 reads for all five packages. Each read is bounded to 15 seconds or the remaining deadline.
|
|
74
|
+
Integrity mismatches, authentication failures and malformed responses stop verification immediately; publish
|
|
75
|
+
commands are never retried automatically. If verification times out after uploads succeeded, preserve the accepted
|
|
76
|
+
archives, check registry availability and rerun only after it recovers. Do not rebuild or change versions to work
|
|
77
|
+
around this delay. An existing matching version is skipped on the next run.
|
|
78
|
+
|
|
79
|
+
Pushes to `main` run the **Version packages** workflow, which only prepares the release PR. npm publication is local
|
|
80
|
+
through `npm run release:local`; the repository currently has no GitHub publish job, npm token or OIDC publishing
|
|
81
|
+
permission. Enable GitHub Actions' permission to create PRs in the repository settings.
|
|
61
82
|
|
|
62
83
|
## Registry acceptance and promotion
|
|
63
84
|
|
package/docs/releases.ru.md
CHANGED
|
@@ -25,9 +25,9 @@ npx playwright install --with-deps chromium firefox webkit
|
|
|
25
25
|
npm run check
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
CI
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
CI использует официальный образ Playwright, закреплённый по версии и digest в соответствии с версией Playwright в
|
|
29
|
+
lockfile. Обновляйте зависимость, тег образа и digest вместе. Локальные команды выше устанавливают браузеры и нужные
|
|
30
|
+
системе зависимости без необходимости использовать этот образ.
|
|
31
31
|
|
|
32
32
|
`ci:pack` создаёт пять настоящих tarballs и устанавливает их в изолированных потребителях. Проверяются все export
|
|
33
33
|
entries, типы NodeNext/Bundler, renderer и headless пути, Lint без runtime-пакетов, maps и ссылки документов. React/React DOM и их типы устанавливаются отдельно в версии `19.0.0` и версиях contributor toolchain; оба renderer/Devtools consumer также исполняются на Node `20.19.0`.
|
|
@@ -37,27 +37,47 @@ entries, типы NodeNext/Bundler, renderer и headless пути, Lint без r
|
|
|
37
37
|
При публикации должны совпасть Git commit и контрольные суммы. После приёмки не меняйте и не пересобирайте
|
|
38
38
|
пакеты. Скрипт отклоняет непринятый manifest, другой commit и грязное рабочее дерево.
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Локальный релиз
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
принятый набор:
|
|
42
|
+
После merge PR Version packages обновите чистый локальный `main` и запустите:
|
|
44
43
|
|
|
45
44
|
```sh
|
|
46
|
-
|
|
45
|
+
npm run release:local
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
Команда определяет общую версию по manifest пяти пакетов; проверяет закреплённый Node и при необходимости сама
|
|
49
|
+
перезапускается с закреплённым npm; проверяет канонический репозиторий, чистый `main`, точное совпадение с commit
|
|
50
|
+
`origin/main` и отсутствие ожидающих changesets; проверяет npm-аутентификацию и запускает `npm login` только при
|
|
51
|
+
отсутствии сессии; устанавливает зависимости и подходящие браузеры Playwright; выполняет полную приёмку; затем
|
|
52
|
+
просит ввести точную версию перед вызовом защищённого publisher. Stable-версии публикуются под `candidate`,
|
|
53
|
+
prerelease — под `next`.
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
Низкоуровневый publisher остаётся для восстановления прерванной публикации из неизменённых принятых архивов:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
node tooling/release/publish.mjs --version <exact-version>
|
|
59
|
+
```
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
## Первый выпуск и аутентификация
|
|
62
|
+
|
|
63
|
+
Локальная публикация интерактивно аутентифицируется через `npm login` под аккаунтом с правом публикации в `@opetope`.
|
|
64
|
+
|
|
65
|
+
Скрипт отправляет точные архивы с отключёнными lifecycle scripts. RC используют `next`, stable сначала использует
|
|
66
|
+
`candidate`. До записи скрипт проверяет существующие версии; частичную публикацию можно продолжить только при
|
|
67
|
+
совпадении integrity уже опубликованного содержимого. Версии не перезаписываются, продвижение в `latest` не
|
|
68
|
+
запрашивается; фактические теги registry проверяйте отдельно.
|
|
69
|
+
|
|
70
|
+
Успешная отправка может предшествовать доступности версии, пока [npm проверяет пакет](https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/).
|
|
71
|
+
Финальная проверка повторяет чтение метаданных после временных ошибок или `E404`: общий предел для пяти пакетов —
|
|
72
|
+
20 минут и 100 чтений. Каждое чтение ограничено 15 секундами или оставшимся временем. Несовпадение integrity,
|
|
73
|
+
ошибка аутентификации или некорректный ответ сразу останавливают проверку; команды публикации автоматически не
|
|
74
|
+
повторяются. Если после успешной отправки истекло время проверки, сохраните принятые архивы, проверьте доступность
|
|
75
|
+
registry и повторите запуск только после её восстановления. Не пересобирайте пакеты и не меняйте версии ради
|
|
76
|
+
обхода задержки. Уже опубликованная версия с совпадающим integrity будет пропущена при следующем запуске.
|
|
77
|
+
|
|
78
|
+
Push в `main` запускает workflow **Version packages**, который только готовит release PR. Публикация в npm выполняется
|
|
79
|
+
локально через `npm run release:local`; сейчас в репозитории нет GitHub publish job, npm-токена или разрешения на
|
|
80
|
+
OIDC-публикацию. В настройках репозитория разрешите GitHub Actions создавать PR.
|
|
61
81
|
|
|
62
82
|
## Приёмка registry и продвижение
|
|
63
83
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opetope/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.19.0"
|
|
6
6
|
},
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@opetope/core": "0.1.
|
|
55
|
+
"@opetope/core": "0.1.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@opetope/core": "0.1.
|
|
58
|
+
"@opetope/core": "0.1.1"
|
|
59
59
|
},
|
|
60
60
|
"sideEffects": false,
|
|
61
61
|
"description": "Feature composition and owned lifecycles for Opetope.",
|