From 0447977c0ac5d507f4c423d5d09d6e14a39002f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 30 Aug 2022 16:34:38 +0100 Subject: [PATCH 1/2] chore: Upgrade immer to v9 --- editor.planx.uk/package.json | 2 +- editor.planx.uk/pnpm-lock.yaml | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/editor.planx.uk/package.json b/editor.planx.uk/package.json index ea0ad1b39b..25aa14e12b 100644 --- a/editor.planx.uk/package.json +++ b/editor.planx.uk/package.json @@ -26,7 +26,7 @@ "formik": "^2.2.9", "graphql": "^16.5.0", "graphql-tag": "^2.12.6", - "immer": "^7.0.14", + "immer": "^9.0.15", "js-cookie": "^3.0.1", "jwt-decode": "^3.1.2", "lodash": "^4.17.21", diff --git a/editor.planx.uk/pnpm-lock.yaml b/editor.planx.uk/pnpm-lock.yaml index 7660560e48..14628ddaaf 100644 --- a/editor.planx.uk/pnpm-lock.yaml +++ b/editor.planx.uk/pnpm-lock.yaml @@ -103,7 +103,7 @@ specifiers: graphql-tag: ^2.12.6 husky: ^8.0.1 identity-obj-proxy: ^3.0.0 - immer: ^7.0.14 + immer: ^9.0.15 jest-axe: ^6.0.0 jest-localstorage-mock: ^2.4.21 js-cookie: ^3.0.1 @@ -179,7 +179,7 @@ dependencies: formik: 2.2.9_react@17.0.2 graphql: 16.5.0 graphql-tag: 2.12.6_graphql@16.5.0 - immer: 7.0.14 + immer: 9.0.15 js-cookie: 3.0.1 jwt-decode: 3.1.2 lodash: 4.17.21 @@ -10515,12 +10515,8 @@ packages: resolution: {integrity: sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==} engines: {node: '>= 4'} - /immer/7.0.14: - resolution: {integrity: sha512-BxCs6pJwhgSEUEOZjywW7OA8DXVzfHjkBelSEl0A+nEu0+zS4cFVdNOONvt55N4WOm8Pu4xqSPYxhm1Lv2iBBA==} - dev: false - - /immer/9.0.7: - resolution: {integrity: sha512-KGllzpbamZDvOIxnmJ0jI840g7Oikx58lBPWV0hUh7dtAyZpFqqrBZdKka5GlTwMTZ1Tjc/bKKW4VSFAt6BqMA==} + /immer/9.0.15: + resolution: {integrity: sha512-2eB/sswms9AEUSkOm4SbV5Y7Vmt/bKRwByd52jfLkW4OLYeaTP3EEiJ9agqU0O/tq6Dk62Zfj+TJSqfm1rLVGQ==} /immutable/3.7.6: resolution: {integrity: sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw==} @@ -15017,7 +15013,7 @@ packages: global-modules: 2.0.0 globby: 11.0.4 gzip-size: 6.0.0 - immer: 9.0.7 + immer: 9.0.15 is-root: 2.1.0 loader-utils: 3.2.0 open: 8.4.0 From 211e7e42f49b9742c3a83ebd0a0c6919d374f326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 30 Aug 2022 17:17:38 +0100 Subject: [PATCH 2/2] test: Fix tests --- editor.planx.uk/src/@planx/graph/__tests__/move.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor.planx.uk/src/@planx/graph/__tests__/move.test.ts b/editor.planx.uk/src/@planx/graph/__tests__/move.test.ts index 2fb92cc938..7aeacbc9d1 100644 --- a/editor.planx.uk/src/@planx/graph/__tests__/move.test.ts +++ b/editor.planx.uk/src/@planx/graph/__tests__/move.test.ts @@ -16,7 +16,8 @@ test("move within same parent", () => { b: {}, }); expect(ops).toEqual([ - { od: ["a", "b"], oi: ["b", "a"], p: ["_root", "edges"] }, + { p: ["_root", "edges", 0], ld: "a", li: "b" }, + { p: ["_root", "edges", 1], ld: "b", li: "a" }, ]); });