@tietokilta/ilmomasiina-client 2.0.0 → 2.1.0-beta.2

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.
@@ -1,11 +1,11 @@
1
1
  export declare const useUpdateSignup: () => (answers: {
2
2
  firstName?: string | null | undefined;
3
3
  lastName?: string | null | undefined;
4
+ namePublic?: boolean | undefined;
4
5
  answers?: {
5
6
  questionId: string;
6
7
  answer: string | string[];
7
8
  }[] | undefined;
8
- namePublic?: boolean | undefined;
9
9
  email?: string | null | undefined;
10
10
  language?: string | null | undefined;
11
11
  }) => Promise<void>;
@@ -45,7 +45,7 @@ function useAbortablePromise(effect, deps) {
45
45
  pending: true,
46
46
  });
47
47
  // Track promise from latest effect call, ignore updates from other promises
48
- const pendingPromise = (0, react_1.useRef)();
48
+ const pendingPromise = (0, react_1.useRef)(undefined);
49
49
  useAbortableEffect((signal) => {
50
50
  const promise = ignoreAbort(effect(signal));
51
51
  pendingPromise.current = promise;
@@ -25,7 +25,7 @@ function shallowEqual(a, b) {
25
25
  }
26
26
  /** Returns the given object. Returns a previously used object, if shallow-equal to the current one. */
27
27
  function useShallowMemo(value) {
28
- const ref = (0, react_1.useRef)();
28
+ const ref = (0, react_1.useRef)(undefined);
29
29
  if (!shallowEqual(ref.current, value))
30
30
  ref.current = value;
31
31
  return ref.current;
@@ -1,11 +1,11 @@
1
1
  export declare const useUpdateSignup: () => (answers: {
2
2
  firstName?: string | null | undefined;
3
3
  lastName?: string | null | undefined;
4
+ namePublic?: boolean | undefined;
4
5
  answers?: {
5
6
  questionId: string;
6
7
  answer: string | string[];
7
8
  }[] | undefined;
8
- namePublic?: boolean | undefined;
9
9
  email?: string | null | undefined;
10
10
  language?: string | null | undefined;
11
11
  }) => Promise<void>;
@@ -39,7 +39,7 @@ export function useAbortablePromise(effect, deps) {
39
39
  pending: true,
40
40
  });
41
41
  // Track promise from latest effect call, ignore updates from other promises
42
- const pendingPromise = useRef();
42
+ const pendingPromise = useRef(undefined);
43
43
  useAbortableEffect((signal) => {
44
44
  const promise = ignoreAbort(effect(signal));
45
45
  pendingPromise.current = promise;
@@ -22,7 +22,7 @@ function shallowEqual(a, b) {
22
22
  }
23
23
  /** Returns the given object. Returns a previously used object, if shallow-equal to the current one. */
24
24
  export default function useShallowMemo(value) {
25
- const ref = useRef();
25
+ const ref = useRef(undefined);
26
26
  if (!shallowEqual(ref.current, value))
27
27
  ref.current = value;
28
28
  return ref.current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tietokilta/ilmomasiina-client",
3
- "version": "2.0.0",
3
+ "version": "2.1.0-beta.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Tietokilta/ilmomasiina.git"
@@ -22,11 +22,11 @@
22
22
  "./src/*": "./src/*.ts"
23
23
  },
24
24
  "dependencies": {
25
- "lodash-es": "^4.17.21",
26
- "@tietokilta/ilmomasiina-models": "2.0.0"
25
+ "lodash-es": "^4.17.22",
26
+ "@tietokilta/ilmomasiina-models": "2.1.0-beta.2"
27
27
  },
28
28
  "peerDependencies": {
29
- "react": "^17 || ^18"
29
+ "react": "^17 || ^18 || ^19"
30
30
  },
31
31
  "peerDependenciesMeta": {
32
32
  "react": {
@@ -35,9 +35,9 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/lodash-es": "^4.17.12",
38
- "@types/react": "^17.0.87",
39
- "react": "^18.3.0",
40
- "rimraf": "^5.0.10",
38
+ "@types/react": "^19.2.7",
39
+ "react": "^19.2.3",
40
+ "rimraf": "^6.1.2",
41
41
  "typescript": "~5.9.3"
42
42
  },
43
43
  "scripts": {