@code-fixer-23/pi-session-manager 1.0.2 → 1.0.3

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,3 +1,13 @@
1
+ ## 1.0.3 (2026-07-03)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **pi-session-manager:** persist session series without returns ([6d12cc0](https://github.com/louiss0/pi-packages/commit/6d12cc0))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - louiss0 @louiss0
10
+
1
11
  ## 1.0.2 (2026-07-03)
2
12
 
3
13
  ### 🩹 Fixes
@@ -13,6 +13,8 @@ import {
13
13
  handleSessionSeries,
14
14
  getSessionSeriesDataTempPath,
15
15
  persistSessionSeriesData,
16
+ consumePersistedSessionSeriesData,
17
+ applyPersistedSessionSeriesData,
16
18
  $TimestampCalculator,
17
19
  type $SessionFilter,
18
20
  type DurationRecord,
@@ -271,6 +273,9 @@ describe("persisted session series data", () => {
271
273
  },
272
274
  };
273
275
 
276
+ expect(applyPersistedSessionSeriesData(pi as never, ctx as never)).toBe(
277
+ true,
278
+ );
274
279
  expect(pi.setSessionName).toHaveBeenCalledWith(sessionData.sessionName);
275
280
  expect(pi.appendEntry).toHaveBeenCalledWith(sessionData.entry.customType, {
276
281
  series: sessionData.entry.series,
@@ -770,7 +775,7 @@ describe("handleSessionSeries", () => {
770
775
  "appendSessionSeriesBasedOnCwd",
771
776
  );
772
777
 
773
- const sessionData = await handleSessionSeries(
778
+ await handleSessionSeries(
774
779
  "new",
775
780
  {
776
781
  sessionManagerConfigurator,
@@ -818,7 +823,9 @@ describe("handleSessionSeries", () => {
818
823
  });
819
824
 
820
825
  const sessionSeriesAndTitle = `${context.ui.select.mock.settledResults[0]?.value}${SESION_TITLE_SEPARATOR}${context.ui.input.mock.settledResults[0]?.value}`;
821
- expect(sessionData).toMatchObject({ sessionName: sessionSeriesAndTitle });
826
+ expect(consumePersistedSessionSeriesData()).toMatchObject({
827
+ sessionName: sessionSeriesAndTitle,
828
+ });
822
829
 
823
830
  expect(sessionCtx.ui.notify).toHaveBeenCalledWith(
824
831
  expect.stringContaining(
@@ -969,7 +976,7 @@ describe("handleSessionSeries", () => {
969
976
  "appendSessionSeriesBasedOnCwd",
970
977
  );
971
978
 
972
- const sessionData = await handleSessionSeries(
979
+ await handleSessionSeries(
973
980
  "continue",
974
981
  {
975
982
  sessionFilter: new MockSessionFilter(
@@ -1026,7 +1033,9 @@ describe("handleSessionSeries", () => {
1026
1033
  });
1027
1034
 
1028
1035
  const sessionSeriesAndTitle = `${entry.data.series}${SESION_TITLE_SEPARATOR}${context.ui.input.mock.settledResults[1]?.value?.trim()}`;
1029
- expect(sessionData).toMatchObject({ sessionName: sessionSeriesAndTitle });
1036
+ expect(consumePersistedSessionSeriesData()).toMatchObject({
1037
+ sessionName: sessionSeriesAndTitle,
1038
+ });
1030
1039
  expect(appendSessionSeriesBasedOnCwdSpy).toHaveBeenCalledWith(
1031
1040
  sessionCtx.cwd,
1032
1041
  entry.data.series,