@theokit/gateway 0.16.0 → 0.16.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f8ba934: Fix `defaultStrategy` giving two different senders the same session key. Ids that differed only by `-` versus `_` (sender, channel or topic) collided. Ids are now escaped (`_` to `__`, `-` to `_d`), so distinct ids always give distinct keys. Note: the session key of any existing session whose id contains `_` or `-` changes, so consumers with stored sessions may need a one-time migration.
8
+
3
9
  ## 0.16.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -1268,7 +1268,7 @@ function defaultStrategy(event) {
1268
1268
  }
1269
1269
  }
1270
1270
  function sanitize(s) {
1271
- return s.replace(/-/g, "_");
1271
+ return s.replace(/_/g, "__").replace(/-/g, "_d");
1272
1272
  }
1273
1273
  var SessionRouter = class {
1274
1274
  constructor(strategy = defaultStrategy) {