Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
fix: nullish-coalescing issue on old browser (#267)
Browse files Browse the repository at this point in the history
* fix: nullish-coalescing issue on old browser

* fix: freeze node
  • Loading branch information
rap2hpoutre authored Oct 27, 2022
1 parent a859b80 commit ab5e500
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"presets": ["next/babel"]
"presets": ["next/babel"],
"plugins": ["@babel/plugin-proposal-nullish-coalescing-operator"]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
node-version: 16
cache: yarn

- name: Installing
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@faker-js/faker": "^7.3.0",
"@gouvfr/dsfr": "1.3.1",
"@monsonjeremy/react-leaflet": "^3.2.2",
"@sentry/nextjs": "^6.17.9",
"@socialgouv/matomo-next": "^1.4.0",
"axios": "^0.27.0",
Expand All @@ -32,7 +33,6 @@
"react": "^18.0.0",
"react-autocomplete": "^1.8.1",
"react-dom": "^18.0.0",
"react-leaflet": "^4.0.0",
"react-modal": "^3.15.1",
"sanitize-html": "^2.7.0",
"sequelize": "^6.21.2",
Expand All @@ -43,6 +43,7 @@
"zod": "^3.14.4"
},
"devDependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@socialgouv/eslint-config-react": "^1.104.0",
Expand Down
10 changes: 9 additions & 1 deletion src/components/Directory/PsychologistsMap.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
// See: https://github.com/PaulLeCam/react-leaflet/pull/885
// We have to use a fork because a lot of people can't see Directory:
// https://sentry.fabrique.social.gouv.fr/organizations/incubateur/issues/42409/?project=61&query=is%3Aunresolved
import {
MapContainer,
Marker,
TileLayer,
useMap,
} from "@monsonjeremy/react-leaflet";
import * as L from "leaflet";
import React, { useEffect, useState } from "react";
import { MapContainer, Marker, TileLayer, useMap } from "react-leaflet";

import { DistanceBasedOn } from "../../types/enums/psychologist";
import { Psychologist as PsychologistType } from "../../types/psychologist";
Expand Down
32 changes: 20 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78"
integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==

"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1"
integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==
dependencies:
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3"

"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
Expand Down Expand Up @@ -838,6 +846,18 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"

"@monsonjeremy/react-leaflet-core@1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@monsonjeremy/react-leaflet-core/-/react-leaflet-core-1.1.1.tgz#123aaf1f500214c0585967c5efd9f43453846220"
integrity sha512-7FeQIoSUjapFkBMQlrIn1yztKGP3tAnNkfUl6UQ2rdToPU9MAETxgn2VnoCd6B4L+ntTyjidEQXFU2YFDHuf+A==

"@monsonjeremy/react-leaflet@^3.2.2":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@monsonjeremy/react-leaflet/-/react-leaflet-3.2.2.tgz#06dab9befb46105e945ed7a125a26e9743c99580"
integrity sha512-LZPm4nXpypqrTIqZzYfQorOtFbZ9osWWWmee831TA4/HAWPGkGgxXfh0W/qzsEP3ruIjmV2NaHnj+Uh/xMSKbA==
dependencies:
"@monsonjeremy/react-leaflet-core" "1.1.1"

"@next/env@12.1.6":
version "12.1.6"
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.6.tgz#5f44823a78335355f00f1687cfc4f1dafa3eca08"
Expand Down Expand Up @@ -936,11 +956,6 @@
resolved "https://registry.yarnpkg.com/@panva/hkdf/-/hkdf-1.0.2.tgz#bab0f09d09de9fd83628220d496627681bc440d6"
integrity sha512-MSAs9t3Go7GUkMhpKC44T58DJ5KGk2vBo+h1cqQeqlMfdGkxaVB78ZWpv9gYi/g2fa4sopag9gJsNvS8XGgWJA==

"@react-leaflet/core@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@react-leaflet/core/-/core-2.0.0.tgz#212f4d87dc7681f40ca0e47d99672676c20c8ef6"
integrity sha512-SQQ5DCQIaLzvslN6wCXs5OWqtlvk1Ubv2n5d7zTM8SDl9hM5Rr2wVy7/nOCIY958D75/ovhq6ZoSvT7GLCX6sg==

"@rushstack/eslint-patch@^1.1.3":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz#6801033be7ff87a6b7cadaf5b337c9f366a3c4b0"
Expand Down Expand Up @@ -5767,13 +5782,6 @@ react-is@^18.0.0:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67"
integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==

react-leaflet@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-4.0.0.tgz#9c2b8de82c6f5930387f5b1b37cb0ec4d8f98d61"
integrity sha512-qJJvoCNe12XHSWVUwhXYmMObPoSYy8h/hn0aDNvcBuq3O8zmVI5S2RdabhaDg/iWMCJ2jbCWZWtIU5VtztO9sg==
dependencies:
"@react-leaflet/core" "^2.0.0"

react-lifecycles-compat@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
Expand Down

0 comments on commit ab5e500

Please sign in to comment.