@toa.io/atomicity 1.0.0-alpha.288 → 1.0.0-alpha.291
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 +19 -0
- package/package.json +5 -4
- package/src/atom.js +2 -1
- package/src/connection.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.291](https://github.com/toa-io/toa/compare/v1.0.0-alpha.290...v1.0.0-alpha.291) (2026-09-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @toa.io/atomicity
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.0.0-alpha.289](https://github.com/toa-io/toa/compare/v1.0.0-alpha.288...v1.0.0-alpha.289) (2026-09-07)
|
|
15
|
+
|
|
16
|
+
* A deploy moves only what changed, and a component sees none of the runtime's environment (#1073) ([f38e3db](https://github.com/toa-io/toa/commit/f38e3db533f24db866c57bfa1ef294eff1eaf499)), closes [#1073](https://github.com/toa-io/toa/issues/1073) [#1064](https://github.com/toa-io/toa/issues/1064) [#1066](https://github.com/toa-io/toa/issues/1066) [#1067](https://github.com/toa-io/toa/issues/1067) [#1068](https://github.com/toa-io/toa/issues/1068) [#1069](https://github.com/toa-io/toa/issues/1069) [#1071](https://github.com/toa-io/toa/issues/1071) [#1070](https://github.com/toa-io/toa/issues/1070) [#1072](https://github.com/toa-io/toa/issues/1072)
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* a component that read `process.env.TOA_*` reads `context` instead;
|
|
21
|
+
`echo(input)` no longer substitutes from the environment; a bash operation sees no
|
|
22
|
+
`TOA_*`; images no longer set `USER node` — see migrations/289.md.
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [1.0.0-alpha.288](https://github.com/toa-io/toa/compare/v1.0.0-alpha.287...v1.0.0-alpha.288) (2026-09-06)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @toa.io/atomicity
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/atomicity",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.291",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa Atomicity Connector",
|
|
6
6
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@sesamecare-oss/redlock": "1.4.0",
|
|
21
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
21
|
+
"@toa.io/core": "1.0.0-alpha.291",
|
|
22
|
+
"@toa.io/generic": "1.0.0-alpha.291",
|
|
22
23
|
"ioredis": "6.0.0",
|
|
23
|
-
"n-and-i": "0.3.
|
|
24
|
+
"n-and-i": "0.3.3",
|
|
24
25
|
"openspan": "1.0.0-alpha.286"
|
|
25
26
|
},
|
|
26
27
|
"scripts": {
|
|
27
28
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
28
29
|
},
|
|
29
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "bcd8d8d07bd3e64fc826af8719472404662cc37f"
|
|
30
31
|
}
|
package/src/atom.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { console } from 'openspan'
|
|
2
2
|
import { Connector } from '@toa.io/core'
|
|
3
|
+
import { environment } from '@toa.io/generic'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* What one group of replicas decides together, in one place: which of them owns what, what they
|
|
@@ -192,7 +193,7 @@ export class Atom extends Connector {
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
function override() {
|
|
195
|
-
const value = Number(
|
|
196
|
+
const value = Number(environment.get('TOA_ATOMICITY_INTERVAL'))
|
|
196
197
|
|
|
197
198
|
return Number.isNaN(value) || value <= 0 ? undefined : value
|
|
198
199
|
}
|
package/src/connection.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Redis } from 'ioredis'
|
|
|
3
3
|
import { console } from 'openspan'
|
|
4
4
|
import { Connector } from '@toa.io/core'
|
|
5
5
|
import { Meter } from './meter.js'
|
|
6
|
+
import { environment } from '@toa.io/generic'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* One set of clients per process, shared by every atom in it. Each keeps its own keys, so a
|
|
@@ -95,11 +96,11 @@ export class Connection extends Connector {
|
|
|
95
96
|
const OPTIONS = { enableReadyCheck: true }
|
|
96
97
|
|
|
97
98
|
function resolve() {
|
|
98
|
-
const value =
|
|
99
|
+
const value = environment.get(VARIABLE)
|
|
99
100
|
|
|
100
101
|
// an empty value is atomicity turned off, where an absent one in development is the
|
|
101
102
|
// local Redis — as everything else in development resolves
|
|
102
|
-
if (value === undefined) return
|
|
103
|
+
if (value === undefined) return environment.get('TOA_DEV') === '1' ? [DEV] : []
|
|
103
104
|
|
|
104
105
|
return value.split(' ').filter((url) => url !== '')
|
|
105
106
|
}
|