From 556f9b74f82741b63887e77bfdcf1847d3d6ff81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:47:27 +0000 Subject: [PATCH 1/4] chore(deps): bump cookie from 0.6.0 to 0.7.2 Bumps [cookie](https://github.com/jshttp/cookie) from 0.6.0 to 0.7.2. - [Release notes](https://github.com/jshttp/cookie/releases) - [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.2) --- updated-dependencies: - dependency-name: cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] --- pnpm-lock.yaml | 79 +++++--------------------------------------------- 1 file changed, 8 insertions(+), 71 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5915fb83..6ee92524 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,7 +61,7 @@ importers: version: 14.2.21(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0) next-auth: specifier: ^4.24.11 - version: 4.24.11(@auth/core@0.29.0)(next@14.2.21(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 4.24.11(next@14.2.21(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -184,20 +184,6 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} - '@auth/core@0.29.0': - resolution: {integrity: sha512-MdfEjU6WRjUnPG1+XeBWrTIlAsLZU6V0imCIqVDDDPxLI6UZWldXVqAA2EsDazGofV78jqiCLHaN85mJITDqdg==} - peerDependencies: - '@simplewebauthn/browser': ^9.0.1 - '@simplewebauthn/server': ^9.0.2 - nodemailer: ^6.8.0 - peerDependenciesMeta: - '@simplewebauthn/browser': - optional: true - '@simplewebauthn/server': - optional: true - nodemailer: - optional: true - '@auth/core@0.37.4': resolution: {integrity: sha512-HOXJwXWXQRhbBDHlMU0K/6FT1v+wjtzdKhsNg0ZN7/gne6XPsIrjZ4daMcFnbq0Z/vsAbYBinQhhua0d77v7qw==} peerDependencies: @@ -868,9 +854,6 @@ packages: '@tanstack/virtual-core@3.10.9': resolution: {integrity: sha512-kBknKOKzmeR7lN+vSadaKWXaLS0SZZG+oqpQ/k80Q6g9REn6zRHS/ZYdrIzHnpHgy/eWs00SujveUN/GJT2qTw==} - '@types/cookie@0.6.0': - resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -1355,10 +1338,6 @@ packages: convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} - engines: {node: '>= 0.6'} - cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} @@ -2498,9 +2477,6 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} - oauth4webapi@2.17.0: - resolution: {integrity: sha512-lbC0Z7uzAFNFyzEYRIC+pkSVvDHJTbEW+dYlSBAlCYDe6RxUkJ26bClhk8ocBZip1wfI9uKTe0fm4Ib4RHn6uQ==} - oauth4webapi@3.1.4: resolution: {integrity: sha512-eVfN3nZNbok2s/ROifO0UAc5G8nRoLSbrcKJ09OqmucgnhXEfdIQOR4gq1eJH1rN3gV7rNw62bDEgftsgFtBEg==} @@ -2680,11 +2656,6 @@ packages: resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} engines: {node: ^10 || ^12 || >=14} - preact-render-to-string@5.2.3: - resolution: {integrity: sha512-aPDxUn5o3GhWdtJtW0svRC2SS/l8D9MAgo2+AWml+BhDImb27ALf04Q2d+AHqUUOc6RdSXFIBVa2gxzgMKgtZA==} - peerDependencies: - preact: '>=10' - preact-render-to-string@5.2.6: resolution: {integrity: sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==} peerDependencies: @@ -2695,9 +2666,6 @@ packages: peerDependencies: preact: '>=10' - preact@10.11.3: - resolution: {integrity: sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==} - preact@10.24.3: resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} @@ -3500,17 +3468,6 @@ snapshots: '@alloc/quick-lru@5.2.0': {} - '@auth/core@0.29.0': - dependencies: - '@panva/hkdf': 1.2.1 - '@types/cookie': 0.6.0 - cookie: 0.6.0 - jose: 5.9.6 - oauth4webapi: 2.17.0 - preact: 10.11.3 - preact-render-to-string: 5.2.3(preact@10.11.3) - optional: true - '@auth/core@0.37.4': dependencies: '@panva/hkdf': 1.2.1 @@ -4164,9 +4121,6 @@ snapshots: '@tanstack/virtual-core@3.10.9': {} - '@types/cookie@0.6.0': - optional: true - '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -4751,9 +4705,6 @@ snapshots: convert-source-map@1.9.0: {} - cookie@0.6.0: - optional: true - cookie@0.7.2: {} core-js@3.39.0: @@ -5043,7 +4994,7 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) eslint-plugin-react: 7.37.2(eslint@8.57.1) @@ -5067,13 +5018,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.3.7 enhanced-resolve: 5.17.1 eslint: 8.57.1 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.3.0 @@ -5086,14 +5037,14 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -5108,7 +5059,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -6151,7 +6102,7 @@ snapshots: neo-async@2.6.2: optional: true - next-auth@4.24.11(@auth/core@0.29.0)(next@14.2.21(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-auth@4.24.11(next@14.2.21(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.26.0 '@panva/hkdf': 1.2.1 @@ -6165,8 +6116,6 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) uuid: 8.3.2 - optionalDependencies: - '@auth/core': 0.29.0 next@14.2.21(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.81.0): dependencies: @@ -6216,9 +6165,6 @@ snapshots: normalize-range@0.1.2: {} - oauth4webapi@2.17.0: - optional: true - oauth4webapi@3.1.4: {} oauth@0.9.15: {} @@ -6396,12 +6342,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - preact-render-to-string@5.2.3(preact@10.11.3): - dependencies: - preact: 10.11.3 - pretty-format: 3.8.0 - optional: true - preact-render-to-string@5.2.6(preact@10.25.0): dependencies: preact: 10.25.0 @@ -6411,9 +6351,6 @@ snapshots: dependencies: preact: 10.24.3 - preact@10.11.3: - optional: true - preact@10.24.3: {} preact@10.25.0: {} From 747cf72f361e2741103129f24d4c4959fd76220d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Ta=C3=AFeb?= Date: Mon, 13 Jan 2025 18:27:45 +0100 Subject: [PATCH 2/4] fix: remove hubspot cookie when logging out --- src/app/(auth)/logout/page.tsx | 2 ++ src/components/hubspot/track-hubspot.tsx | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/app/(auth)/logout/page.tsx b/src/app/(auth)/logout/page.tsx index 4fb0f4c5..3cac39d5 100644 --- a/src/app/(auth)/logout/page.tsx +++ b/src/app/(auth)/logout/page.tsx @@ -2,12 +2,14 @@ import { signOut, useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; +import { removeHubspotCookies } from "@/src/components/hubspot/track-hubspot"; export default function Logout() { const router = useRouter(); const session = useSession(); useEffect(() => { if (session.data) { + removeHubspotCookies(); const callbackUrl = `/logout/agentconnect?id_token_hint=${session.data?.id_token}`; signOut({ redirect: false, callbackUrl }).then((signOutResponse) => router.push(signOutResponse.url)); } diff --git a/src/components/hubspot/track-hubspot.tsx b/src/components/hubspot/track-hubspot.tsx index 9776ea72..9e0ad70d 100644 --- a/src/components/hubspot/track-hubspot.tsx +++ b/src/components/hubspot/track-hubspot.tsx @@ -12,15 +12,19 @@ export const trackUserWithEmail = (path: string, email?: string | null) => { } }; +export const removeHubspotCookies = () => { + const hubspotCookies = ["__hssc", "__hssrc", "__hs_do_not_track", "__hstc", "hubspotutk", "messagesUtk"]; + hubspotCookies.forEach((cookieName) => { + document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;`; + }); +}; + export const declineHubspotCookie = () => { if (!enableHubspotTracking) { console.debug("declineHubspotCookie"); return; } - const hubspotCookies = ["__hssc", "__hssrc", "__hs_do_not_track", "__hstc", "hubspotutk", "messagesUtk"]; - hubspotCookies.forEach((cookieName) => { - document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;`; - }); + removeHubspotCookies(); window?._hsq?.push(["doNotTrack"]); window?._hsp?.push(["revokeCookieConsent"]); }; From e87060c8617e3ab155201c7b95369e64ab03f3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Ta=C3=AFeb?= Date: Tue, 14 Jan 2025 10:09:18 +0100 Subject: [PATCH 3/4] chore: deduplicate form ids --- .../partage/partage-member-modification-role-modale.tsx | 2 +- src/forms/contact/contact-form.tsx | 2 +- src/forms/estimation/EstimationInfoForm.tsx | 2 +- .../estimation/estimation-materiau-form-simple-field.tsx | 5 ++++- src/forms/projet/ProjetInfoForm.tsx | 2 +- src/forms/user/UserInfoForm.tsx | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/partage/partage-member-modification-role-modale.tsx b/src/components/partage/partage-member-modification-role-modale.tsx index 52d7412e..58d36340 100644 --- a/src/components/partage/partage-member-modification-role-modale.tsx +++ b/src/components/partage/partage-member-modification-role-modale.tsx @@ -75,7 +75,7 @@ export const PartageMemberModificationRoleModale = () => { {currentUserModification ? ( <>

Modifier les informations {"d'un membre"}

-
+ { !form.watch("objetMessage") || !form.watch("email"); return ( - + diff --git a/src/forms/estimation/EstimationInfoForm.tsx b/src/forms/estimation/EstimationInfoForm.tsx index db60d3da..5a543d0f 100644 --- a/src/forms/estimation/EstimationInfoForm.tsx +++ b/src/forms/estimation/EstimationInfoForm.tsx @@ -59,7 +59,7 @@ export const EstimationInfoForm = ({ projet }: { projet: ProjetWithRelations; es const { error } = form.getFieldState("ficheSolutionIds"); return ( - + - onSubmit(data))}> + onSubmit(data))} + > { return ( <> - + + From 239f53303ff4762966563d1171e74bfb25f8f2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Ta=C3=AFeb?= Date: Tue, 14 Jan 2025 10:28:32 +0100 Subject: [PATCH 4/4] feat : projets are now visible by default --- src/forms/projet/ProjetInfoForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forms/projet/ProjetInfoForm.tsx b/src/forms/projet/ProjetInfoForm.tsx index 07272be7..8b9ef599 100644 --- a/src/forms/projet/ProjetInfoForm.tsx +++ b/src/forms/projet/ProjetInfoForm.tsx @@ -34,7 +34,7 @@ export const ProjetInfoForm = ({ projet, readOnly }: ProjetInfoFormProps) => { defaultValues: { adresse: mapDBProjetToProjetAddress(projet), collectivite: mapDBCollectiviteToCollectiviteAddress(projet?.collectivite) ?? undefined, - isPublic: projet?.is_public ?? false, + isPublic: projet?.is_public ?? true, }, }); @@ -47,7 +47,7 @@ export const ProjetInfoForm = ({ projet, readOnly }: ProjetInfoFormProps) => { adresse: mapDBProjetToProjetAddress(projet), dateEcheance: monthDateToString(projet?.date_echeance), collectivite: mapDBCollectiviteToCollectiviteAddress(projet?.collectivite) ?? undefined, - isPublic: projet?.is_public ?? false, + isPublic: projet?.is_public ?? true, }); }, [form, projet]);