Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React v18: WiP #523

Open
wants to merge 197 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
92202d8
package.json: update sharetribe-scripts v7.0.0
Gnito Dec 2, 2024
0840ee7
Update react-testing-library and tests
Gnito Dec 2, 2024
e88309e
react-final-form-arrays: update to v3.1.4
Gnito Dec 2, 2024
d93b05e
Update final-form and final-form-arrays and patch for final-form
Gnito Dec 2, 2024
6b78863
React Intl: update to v6.8.4
Gnito Dec 2, 2024
d77dbf8
Remove react-with-direction dep: that should have been removed with r…
Gnito Dec 2, 2024
6724e8a
react-router-dom: update to v5.3.4
Gnito Dec 2, 2024
600161e
react-redux: update from v7.2.8 to v8.1.2
Gnito Dec 2, 2024
1d24821
redux: update from v4.2.0 to v4.2.1
Gnito Dec 2, 2024
2d37f5a
redux-thunk: update from v4.2.1 to v4.2.2
Gnito Dec 2, 2024
ef726e2
react-image-gallery: update from v1.2.8 to v1.3.0
Gnito Dec 2, 2024
9ee992a
nodemon: update from v3.1.4 to v3.1.7
Gnito Dec 2, 2024
4566817
sitemap: update from v7.1.1 to v8.0.0
Gnito Dec 2, 2024
9e874b5
Remove url pkg in favor of node:url.
Gnito Dec 2, 2024
134029e
jose: update from v5.2.0 to v5.9.6
Gnito Dec 2, 2024
3bf004d
react-helmet-async: update from v1.3.0 to v2.0.5
Gnito Dec 2, 2024
0fe5475
React: update from v17.0.2 to v18.2.0
Gnito Dec 2, 2024
c668bbc
query-string: update from v7.1.1 to v7.1.3
Gnito Dec 2, 2024
2ea5335
path-to-regexp: update from v6.2.1 to v8.2.0
Gnito Dec 2, 2024
bf79a8c
inquirer: update from v8.2.4 to v8.2.6
Gnito Dec 2, 2024
be121ed
helmet: update from v7.1.0 to v8.0.0
Gnito Dec 2, 2024
7157d73
express: update from v4.19.2 to v4.21.1
Gnito Dec 2, 2024
69ac3fc
Remove React 16 related polyfills (Map, Set, raf)
Gnito Dec 2, 2024
d0e98d3
React: update to v18.3.1
Gnito Dec 2, 2024
9c13a27
React v18.3.1: avoid warning about key being among spread props
Gnito Dec 2, 2024
3aacb2e
cookie-parser: update from v1.4.6 to v1.4.7
Gnito Dec 2, 2024
8d410b9
compression: update from v1.7.4 to v1.7.5
Gnito Dec 2, 2024
2cb3fbd
body-parser: update from v1.20.2 to v1.20.3
Gnito Dec 2, 2024
abe9713
@babel-runtime: remove an old peer-dependency requirement
Gnito Dec 2, 2024
328e9cd
@mapbox/polyline: update from v1.1.1 to v1.2.1
Gnito Dec 2, 2024
15edbba
bfj: update from v7.0.2 to v9.1.1
Gnito Dec 2, 2024
c3b7c24
ListingPageCarousel: do not render ActionBar before mounting (hydrati…
Gnito Dec 2, 2024
6d2dc1b
Remove the new react-dom/server lib from the main code-chunk
Gnito Dec 5, 2024
836c776
Component's key can't be spread from collection of props
Gnito Dec 5, 2024
da199d7
src/index.js: use react-dom/client and React v18 rendering
Gnito Dec 9, 2024
4487900
src/index.js: add logging for onRecoverableError callback option
Gnito Dec 9, 2024
24001d3
Page: refactor attribute order
Gnito Dec 9, 2024
c82b058
OrderPanel: hydration should not render the actual form.
Gnito Dec 9, 2024
0b1e890
ListingPage/SectionHero: hydration must produce the same HTML structu…
Gnito Dec 9, 2024
03a3f45
ListingPage/UserCard: hydration must produce the same HTML structure …
Gnito Dec 9, 2024
8d8f924
ProfilePage: hydration must produce the same HTML structure as SSR.
Gnito Dec 9, 2024
206a0b1
StyleguidePage: hydration must produce the same HTML structure as SSR.
Gnito Dec 9, 2024
02f492d
Topbar: refactor - turn the class component to functional component.
Gnito Dec 9, 2024
7ac243c
TopbarDesktop/CustomLinksMenu: hydration must produce the same HTML s…
Gnito Dec 9, 2024
f5de822
TopbarSearchForm: refactor - turn the class component to functional c…
Gnito Dec 9, 2024
a2221ec
NamedLink: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
5e5b24f
StaticPage: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
cf26f85
BlockBuilder: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
64d02d4
BlockContainer: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
e833a6c
BlockDefault: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
60a0e65
BlockFooter: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
31cff5e
BlockSocialMediaLink: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
91dc017
Field: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
98c5e46
primitives/Code: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
21bf955
primitives/CustomAppearance: remove defaultProps (deprecated) and pro…
Gnito Dec 10, 2024
0105c87
primitives/Heading: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
0a660f7
primitives/Image: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
915f90e
primitives/Ingress: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
0e6d078
primitives/Link: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
0a6f41e
primitives/SocialMediaLink: remove defaultProps (deprecated) and prop…
Gnito Dec 10, 2024
34e468c
primitives/List: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
8494b8a
primitives/P: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
69568c8
primitives/Text: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
b8cca0a
primitives/YoutubeEmbed: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
7673e23
SectionBuilder: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
6f8adbb
SectionArticle: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
a8bd933
SectionCarousel: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
0771be1
SectionColumns: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
eda25f5
SectionFeatures: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
b3ce55a
SectionHero: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
93ea875
SectionFooter: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
808b465
SectionContainer: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
16c746e
PageBuilder: add JSDoc
Gnito Dec 10, 2024
c7ade43
TopbarContainer: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
ee19497
Topbar: refactor propTypes.
Gnito Dec 10, 2024
c1deba3
Topbar/MenuIcon: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
1ed3e28
Topbar/SearchIcon: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
60875d5
Topbar/TopbarDesktop: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
074521a
Topbar/TopbarMobileMenu: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
f4a9e8d
Topbar/TopbarSearchForm: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
dcf8999
components/AspectRatioWrapper: remove defaultProps (deprecated) and p…
Gnito Dec 10, 2024
af4b36c
components/Avatar: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
8dbbbfd
components/Button: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
f7b93ce
components/ExternalLink: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
9c62ef6
components/Form: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
a2d92b3
components/IconArrowHead: remove defaultProps (deprecated) and propTy…
Gnito Dec 10, 2024
42499a9
components/LimitedAccessBanner: remove defaultProps (deprecated) and …
Gnito Dec 10, 2024
fabe5cc
components/LocationAutocompleteInput: remove defaultProps (deprecated…
Gnito Dec 10, 2024
e009ce9
components/Logo: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
c381f1d
components/Logo/LinkedLogo: remove defaultProps (deprecated) and prop…
Gnito Dec 10, 2024
dbadea2
components/Modal: remove defaultProps (deprecated) and propTypes.
Gnito Dec 10, 2024
7e257b9
components/ModalMissingInformation: remove defaultProps (deprecated) …
Gnito Dec 10, 2024
ad36e15
components/ResponsiveImage: remove defaultProps (deprecated) and prop…
Gnito Dec 10, 2024
7faf2b3
components/FieldDateRangecontroller: remove defaultProps (deprecated)…
Gnito Dec 12, 2024
b0c512c
components/FieldDateRangePicker: remove defaultProps (deprecated) and…
Gnito Dec 12, 2024
5193b1a
components/FieldSingleDatePicker: remove defaultProps (deprecated) an…
Gnito Dec 12, 2024
281b9a8
components/FieldCheckbox: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
732887c
components/FieldCheckboxGroup: remove defaultProps (deprecated) and p…
Gnito Dec 12, 2024
8ba6192
components/FieldCurrencyInput: remove defaultProps (deprecated) and p…
Gnito Dec 12, 2024
2fc2615
components/FieldRadioButton: remove defaultProps (deprecated) and pro…
Gnito Dec 12, 2024
25727c2
components/FieldReviewRating: remove defaultProps (deprecated) and pr…
Gnito Dec 12, 2024
b83ef41
components/FieldSelect: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
6041650
components/FieldSelectTree: remove defaultProps (deprecated) and prop…
Gnito Dec 12, 2024
72a35af
components/FieldTextInput: remove defaultProps (deprecated) and propT…
Gnito Dec 12, 2024
2f0801c
components/Heading: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
a0ed9d8
components/IconAdd: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
a292af6
components/IconAlert: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
639c8a4
components/IconBannedUser: remove defaultProps (deprecated) and propT…
Gnito Dec 12, 2024
78725dd
components/IconCheckmark: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
57c8c03
components/IconClose: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
e98f029
components/IconDelete: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
2960c73
components/IconDisputeOrder: remove defaultProps (deprecated) and pro…
Gnito Dec 12, 2024
3544ffa
components/IconEdit: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
3b99693
components/IconEmailAttention: remove defaultProps (deprecated) and p…
Gnito Dec 12, 2024
bb6a2e5
components/IconEmailSent: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
38bd1c1
components/IconEmailSuccess: remove defaultProps (deprecated) and pro…
Gnito Dec 12, 2024
83d3c67
components/IconInquiry: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
aed2182
components/IconKeys: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
b02c1d0
components/IconKeysSuccess: remove defaultProps (deprecated) and prop…
Gnito Dec 12, 2024
0c4d3dd
components/IconReviewStar: remove defaultProps (deprecated) and propT…
Gnito Dec 12, 2024
1985691
components/IconReviewUser: remove defaultProps (deprecated) and propT…
Gnito Dec 12, 2024
9151510
components/IconSearch: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
2d8cd6e
components/IconSocialMediaFacebook: remove defaultProps (deprecated) …
Gnito Dec 12, 2024
cf301b0
components/IconSocialMediaInstagram: remove defaultProps (deprecated)…
Gnito Dec 12, 2024
b9f6153
components/IconSocialMediaTwitter: remove defaultProps (deprecated) a…
Gnito Dec 12, 2024
70e1fec
components/IconSpinner: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
c5dd9bc
components/IconSuccess: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
d3aefa2
components/ImageFromFile: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
6e3ac00
components/LayoutComposer: remove defaultProps (deprecated) and propT…
Gnito Dec 12, 2024
cbe4b5f
components/LayoutSideNavigation: remove defaultProps (deprecated) and…
Gnito Dec 12, 2024
1ddd91a
components/LayoutWrapperAccountSettingsSideNav: remove defaultProps (…
Gnito Dec 12, 2024
7a31c61
components/LayoutSingleColumn: remove defaultProps (deprecated) and p…
Gnito Dec 12, 2024
fd5a215
components/LimitedAccessBanner: remove defaultProps (deprecated) and …
Gnito Dec 12, 2024
c387522
components/ListingCard: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
170a5f6
components/ListingLink: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
a3177f9
components/Map/DynamicGoogleMap: remove defaultProps (deprecated) and…
Gnito Dec 12, 2024
cc608ca
components/Map/DynamicMapboxMap: remove defaultProps (deprecated) and…
Gnito Dec 12, 2024
58aee74
components/Map: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
79b289c
components/Map/StaticGoogleMap: remove defaultProps (deprecated) and …
Gnito Dec 12, 2024
3ebaa24
components/Map/StaticMapboxMap: remove defaultProps (deprecated) and …
Gnito Dec 12, 2024
5f6f038
components/Menu: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
7ec05ba
components/ModalInMobile: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
135298a
components/NamedRedirect: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
1c3124e
components/NotificationBadge: remove defaultProps (deprecated) and pr…
Gnito Dec 12, 2024
4f2ed1e
components/OrderBreakdown: remove defaultProps (deprecated) and propT…
Gnito Dec 12, 2024
40d0c89
components/OrderPanel: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
d3a57e1
components/OrderPanel/BookingDatesForm: remove defaultProps (deprecat…
Gnito Dec 12, 2024
be32939
components/OrderPanel/BookingTimeForm: remove defaultProps (deprecate…
Gnito Dec 12, 2024
c201d16
components/OrderPanel/InquiryWithoutPaymentForm: remove defaultProps …
Gnito Dec 12, 2024
d0fd481
components/OrderPanel/ProductOrderForm: remove defaultProps (deprecat…
Gnito Dec 12, 2024
2409c5d
components/OutsideClickHandler: remove defaultProps (deprecated) and …
Gnito Dec 12, 2024
468b301
components/Pages: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
a48c6a3
components/PaginationLinks: remove defaultProps (deprecated) and prop…
Gnito Dec 12, 2024
f5c2c7d
components/Promised: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
8688b58
components/PropertyGroup: remove defaultProps (deprecated) and propTy…
Gnito Dec 12, 2024
cf0891d
components/RangeSlider: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
9161e39
components/ResponsiveBackgroundImageContainer: remove defaultProps (d…
Gnito Dec 12, 2024
f0b1f02
components/ResponsiveImage/NoImageIcon: remove defaultProps (deprecat…
Gnito Dec 12, 2024
2eb3713
components/ReviewRating: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
13e43f3
components/Reviews: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
616fe11
components/SaveCardDetails: remove defaultProps (deprecated) and prop…
Gnito Dec 12, 2024
d058c1e
components/StripeConnectAccountForm: remove defaultProps (deprecated)…
Gnito Dec 12, 2024
d3e1fb4
components/StripePaymentAddress: remove defaultProps (deprecated) and…
Gnito Dec 12, 2024
632d616
components/TabNav: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
5bab47e
components/TabNavHorizontal: remove defaultProps (deprecated) and pro…
Gnito Dec 12, 2024
ef7450b
components/Tabs: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
3a70396
components/TimeRange: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
09d577e
components/UserDisplayName: remove defaultProps (deprecated) and prop…
Gnito Dec 12, 2024
4e5a781
components/UserNav: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
b018632
components/ValidationError: remove defaultProps (deprecated) and prop…
Gnito Dec 12, 2024
1f32291
components/FieldBoolean: remove defaultProps (deprecated) and propTypes.
Gnito Dec 12, 2024
3bd0eb2
components/OrderBreakdown (line-items): remove defaultProps (deprecat…
Gnito Dec 12, 2024
c7f486d
SearchPage: fix hydration issue
Gnito Jan 7, 2025
0e496e7
containers/AuthenticationPage: remove defaultProps (deprecated) and p…
Gnito Jan 7, 2025
159acb7
containers/CheckoutPage: remove defaultProps (deprecated) and propTypes.
Gnito Jan 7, 2025
7da7348
containers/ContactDetailsPage: remove defaultProps (deprecated) and p…
Gnito Jan 7, 2025
f56773a
containers/EditListingPage: remove defaultProps (deprecated) and prop…
Gnito Jan 7, 2025
e45c3ed
containers/EmailVerificationPage: remove defaultProps (deprecated) an…
Gnito Jan 7, 2025
1ab7ef1
containers/InboxPage: remove defaultProps (deprecated) and propTypes.
Gnito Jan 7, 2025
0f4a4f1
containers/ListingPage: remove defaultProps (deprecated) and propTypes.
Gnito Jan 7, 2025
e87daf4
containers/ManageListingPage: remove defaultProps (deprecated) and pr…
Gnito Jan 7, 2025
700489d
containers/NoAccessPage: remove defaultProps (deprecated) and propTypes.
Gnito Jan 7, 2025
4fe484a
containers/NotFoundPage: remove defaultProps (deprecated) and propTypes.
Gnito Jan 7, 2025
889c035
containers/PasswordChangePage: remove defaultProps (deprecated) and p…
Gnito Jan 7, 2025
32997a8
containers/PasswordRecoveryPage: remove defaultProps (deprecated) and…
Gnito Jan 7, 2025
49d1977
containers/PasswordResetPage: remove defaultProps (deprecated) and pr…
Gnito Jan 7, 2025
d64a120
containers/PaymentMethodsPage: remove defaultProps (deprecated) and p…
Gnito Jan 7, 2025
8337148
containers/ProfilePage: remove defaultProps (deprecated) and propTypes.
Gnito Jan 8, 2025
d5111fb
containers/ProfileSettingsPage: remove defaultProps (deprecated) and …
Gnito Jan 8, 2025
6a3140a
containers/SearchPage (and its nested components): remove defaultProp…
Gnito Jan 8, 2025
2bd6468
containers/StripePayoutPage: remove defaultProps (deprecated) and pro…
Gnito Jan 8, 2025
ee7bfb6
containers/StripeStyleguidePage: remove defaultProps (deprecated) and…
Gnito Jan 8, 2025
d0d1b41
containers/TransactionPage (and its nested components): remove defaul…
Gnito Jan 8, 2025
956e1ae
routing/Routes: remove defaultProps (deprecated) and propTypes.
Gnito Jan 8, 2025
fe13467
CustomListingFields: handle warning 'React keys must be passed direct…
Gnito Jan 8, 2025
3317d99
SearchMap: undefined 'center' prop was causing wrong zoom level
Gnito Jan 9, 2025
7a19fc3
Safari enforces https on localhost if upgrade-insecure-requests flag …
Gnito Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 29 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,28 @@
"private": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@loadable/component": "^5.16.4",
"@loadable/server": "^5.16.5",
"@mapbox/polyline": "^1.1.1",
"@mapbox/polyline": "^1.2.1",
"@sentry/browser": "^8.26.0",
"@sentry/node": "^8.26.0",
"autosize": "^5.0.1",
"basic-auth": "^2.0.1",
"body-parser": "^1.20.2",
"body-parser": "^1.20.3",
"classnames": "^2.5.1",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"core-js": "^3.22.5",
"compression": "^1.7.5",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"decimal.js": "^10.4.3",
"dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0",
"express": "^4.19.2",
"express": "^4.21.1",
"express-enforces-ssl": "^1.1.0",
"final-form": "4.20.7",
"final-form-arrays": "3.0.2",
"final-form": "4.20.10",
"final-form-arrays": "3.1.0",
"full-icu": "^1.4.0",
"helmet": "^7.1.0",
"jose": "5.2.0",
"helmet": "^8.0.0",
"jose": "5.9.6",
"lodash": "^4.17.21",
"mapbox-gl-multitouch": "^1.0.3",
"moment": "^2.30.1",
Expand All @@ -36,47 +34,45 @@
"passport-facebook": "^3.0.0",
"passport-google-oauth": "^2.0.0",
"patch-package": "^8.0.0",
"path-to-regexp": "^6.2.1",
"path-to-regexp": "^8.2.0",
"postinstall-postinstall": "^2.1.0",
"prop-types": "^15.8.1",
"query-string": "^7.1.1",
"raf": "^3.4.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"query-string": "^7.1.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-final-form": "6.5.9",
"react-final-form-arrays": "3.1.3",
"react-helmet-async": "^1.3.0",
"react-image-gallery": "1.2.8",
"react-intl": "^5.25.1",
"react-final-form-arrays": "3.1.4",
"react-helmet-async": "^2.0.5",
"react-image-gallery": "1.3.0",
"react-intl": "6.8.4",
"react-moment-proptypes": "^1.8.1",
"react-redux": "^7.2.8",
"react-router-dom": "^5.3.2",
"react-with-direction": "^1.4.0",
"redux": "^4.2.0",
"redux-thunk": "^2.4.1",
"react-redux": "^8.1.2",
"react-router-dom": "^5.3.4",
"redux": "^4.2.1",
"redux-thunk": "^2.4.2",
"rehype-react": "^6.2.1",
"rehype-sanitize": "^4.0.0",
"remark-parse": "^9.0.0",
"remark-rehype": "^8.1.0",
"seedrandom": "^3.0.5",
"sharetribe-flex-sdk": "^1.21.1",
"sharetribe-scripts": "6.0.2",
"sitemap": "^7.1.1",
"sharetribe-scripts": "7.0.0",
"sitemap": "^8.0.0",
"smoothscroll-polyfill": "^0.4.0",
"source-map-support": "^0.5.21",
"unified": "^9.2.2",
"url": "^0.11.0"
"unified": "^9.2.2"
},
"devDependencies": {
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.2",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^13.5.0",
"bfj": "^7.0.2",
"bfj": "^9.1.1",
"chalk": "^v4.1.2",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"inquirer": "^8.2.4",
"nodemon": "^3.1.4",
"inquirer": "^8.2.6",
"nodemon": "^3.1.7",
"prettier": "^1.18.2"
},
"resolutions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
diff --git a/node_modules/final-form/dist/final-form.es.js b/node_modules/final-form/dist/final-form.es.js
index a1fa14f..72011ef 100644
index e31d7f3..0757644 100644
--- a/node_modules/final-form/dist/final-form.es.js
+++ b/node_modules/final-form/dist/final-form.es.js
@@ -1,6 +1,17 @@
@@ -1,6 +1,16 @@
-import _extends from '@babel/runtime/helpers/esm/extends';
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';

+const _extends = function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target;
+};
+
+}
//

var charCodeOfDot = ".".charCodeAt(0);
var reEscapeChar = /\\(\\)?/g;
2 changes: 1 addition & 1 deletion server/csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ exports.csp = (reportUri, reportOnly) => {
// https://github.com/helmetjs/helmet/blob/bdb09348c17c78698b0c94f0f6cc6b3968cd43f9/middlewares/content-security-policy/index.ts#L51

const directives = Object.assign({ reportUri: [reportUri] }, defaultDirectives, customDirectives);
if (!reportOnly) {
if (!reportOnly && !dev) {
directives.upgradeInsecureRequests = [];
}

Expand Down
7 changes: 4 additions & 3 deletions server/dataLoader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const url = require('url');
const { URL } = require('node:url');
const log = require('./log');
const { getRootURL } = require('./api-util/rootURL');

const PREVENT_DATA_LOADING_IN_SSR = process.env.PREVENT_DATA_LOADING_IN_SSR === 'true';

Expand All @@ -19,7 +20,7 @@ exports.loadData = function(requestUrl, sdk, appInfo) {
mergeConfig,
fetchAppAssets,
} = appInfo;
const { pathname, query } = url.parse(requestUrl);
const { pathname, search } = new URL(`${getRootURL()}${requestUrl}`);

let translations = {};
let hostedConfig = {};
Expand All @@ -43,7 +44,7 @@ exports.loadData = function(requestUrl, sdk, appInfo) {
return matchedRoutes.reduce((calls, match) => {
const { route, params } = match;
if (typeof route.loadData === 'function' && !route.auth) {
calls.push(store.dispatch(route.loadData(params, query, config)));
calls.push(store.dispatch(route.loadData(params, search, config)));
}
return calls;
}, []);
Expand Down
7 changes: 4 additions & 3 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const noCacheHeaders = {
'Cache-control': 'no-cache, no-store, must-revalidate',
};

app.get('*', (req, res) => {
app.get('*', async (req, res) => {
if (req.url.startsWith('/static/')) {
// The express.static middleware only handles static resources
// that it finds, otherwise passes them through. However, we don't
Expand Down Expand Up @@ -226,8 +226,9 @@ app.get('*', (req, res) => {
.loadData(req.url, sdk, appInfo)
.then(data => {
const cspNonce = cspEnabled ? res.locals.cspNonce : null;
const html = renderer.render(req.url, context, data, renderApp, webExtractor, cspNonce);

return renderer.render(req.url, context, data, renderApp, webExtractor, cspNonce);
})
.then(html => {
if (dev) {
const debugData = {
url: req.url,
Expand Down
62 changes: 31 additions & 31 deletions server/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,44 +97,44 @@ exports.render = function(requestUrl, context, data, renderApp, webExtractor, no
const collectWebChunks = webExtractor.collectChunks.bind(webExtractor);

// Render the app with given route, preloaded state, hosted translations.
const { head, body } = renderApp(
return renderApp(
requestUrl,
context,
preloadedState,
translations,
hostedConfig,
collectWebChunks
);
).then(({ head, body }) => {
// Preloaded state needs to be passed for client side too.
// For security reasons we ensure that preloaded state is considered as a string
// by replacing '<' character with its unicode equivalent.
// http://redux.js.org/docs/recipes/ServerRendering.html#security-considerations
const serializedState = JSON.stringify(preloadedState, replacer).replace(/</g, '\\u003c');

// Preloaded state needs to be passed for client side too.
// For security reasons we ensure that preloaded state is considered as a string
// by replacing '<' character with its unicode equivalent.
// http://redux.js.org/docs/recipes/ServerRendering.html#security-considerations
const serializedState = JSON.stringify(preloadedState, replacer).replace(/</g, '\\u003c');
// At this point the serializedState is a string, the second
// JSON.stringify wraps it within double quotes and escapes the
// contents properly so the value can be injected in the script tag
// as a string.
const nonceMaybe = nonce ? `nonce="${nonce}"` : '';
const preloadedStateScript = `
<script ${nonceMaybe}>window.__PRELOADED_STATE__ = ${JSON.stringify(
serializedState
)};</script>
`;
// Add nonce to server-side rendered script tags
const nonceParamMaybe = nonce ? { nonce } : {};

// At this point the serializedState is a string, the second
// JSON.stringify wraps it within double quotes and escapes the
// contents properly so the value can be injected in the script tag
// as a string.
const nonceMaybe = nonce ? `nonce="${nonce}"` : '';
const preloadedStateScript = `
<script ${nonceMaybe}>window.__PRELOADED_STATE__ = ${JSON.stringify(
serializedState
)};</script>
`;
// Add nonce to server-side rendered script tags
const nonceParamMaybe = nonce ? { nonce } : {};

return template({
htmlAttributes: head.htmlAttributes.toString(),
title: head.title.toString(),
link: head.link.toString(),
meta: head.meta.toString(),
script: head.script.toString(),
preloadedStateScript,
ssrStyles: webExtractor.getStyleTags(),
ssrLinks: webExtractor.getLinkTags(),
ssrScripts: webExtractor.getScriptTags(nonceParamMaybe),
body,
return template({
htmlAttributes: head.htmlAttributes.toString(),
title: head.title.toString(),
link: head.link.toString(),
meta: head.meta.toString(),
script: head.script.toString(),
preloadedStateScript,
ssrStyles: webExtractor.getStyleTags(),
ssrLinks: webExtractor.getLinkTags(),
ssrScripts: webExtractor.getScriptTags(nonceParamMaybe),
body,
});
});
};
12 changes: 8 additions & 4 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { any, string } from 'prop-types';
import ReactDOMServer from 'react-dom/server';

import { HelmetProvider } from 'react-helmet-async';
import { BrowserRouter, StaticRouter } from 'react-router-dom';
Expand Down Expand Up @@ -340,7 +339,12 @@ export const renderApp = (
hostedConfig={hostedConfig}
/>
);
const body = ReactDOMServer.renderToString(WithChunks);
const { helmet: head } = helmetContext;
return { head, body };

// Let's keep react-dom/server out of the main code-chunk.
return import('react-dom/server').then(mod => {
const { default: ReactDOMServer } = mod;
const body = ReactDOMServer.renderToString(WithChunks);
const { helmet: head } = helmetContext;
return { head, body };
});
};
12 changes: 8 additions & 4 deletions src/app.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import React, { act } from 'react';
import ReactDOMClient from 'react-dom/client';
import { getHostedConfiguration } from './util/testHelpers';
import { ClientApp } from './app';
import configureStore from './store';
Expand All @@ -15,7 +15,7 @@ afterAll(() => {
});

describe('Application - JSDOM environment', () => {
it('renders the LandingPage without crashing', () => {
it('renders the LandingPage without crashing', async () => {
window.google = { maps: {} };

// LandingPage gets rendered and it calls hostedAsset > fetchPageAssets > sdk.assetByVersion
Expand All @@ -32,7 +32,11 @@ describe('Application - JSDOM environment', () => {
const fakeSdk = { assetByVersion: resolvePageAssetCall, assetByAlias: resolvePageAssetCall };
const store = configureStore({}, fakeSdk);
const div = document.createElement('div');
ReactDOM.render(<ClientApp store={store} hostedConfig={getHostedConfiguration()} />, div);
const root = ReactDOMClient.createRoot(div);

await act(async () => {
root.render(<ClientApp store={store} hostedConfig={getHostedConfiguration()} />);
});
delete window.google;
});
});
27 changes: 12 additions & 15 deletions src/components/AspectRatioWrapper/AspectRatioWrapper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import React from 'react';
import { node, number, string } from 'prop-types';
import classNames from 'classnames';

import css from './AspectRatioWrapper.module.css';

/**
* Container that maintains a given aspect ratio, which should be given through width and heigh props
*
* @component
* @param {Object} props
* @param {string?} props.className add more style rules in addition to components own css.root
* @param {string?} props.rootClassName overwrite components own css.root
* @param {number} props.width
* @param {number} props.height
* @param {ReactNode} props.children
* @returns {JSX.Element} container element that maintains given aspect ratio
*/
const AspectRatioWrapper = props => {
const { children, className, rootClassName, width, height, ...rest } = props;
const classes = classNames(rootClassName || css.root, className);
Expand All @@ -20,18 +31,4 @@ const AspectRatioWrapper = props => {
);
};

AspectRatioWrapper.defaultProps = {
className: null,
rootClassName: null,
children: null,
};

AspectRatioWrapper.propTypes = {
className: string,
rootClassName: string,
width: number.isRequired,
height: number.isRequired,
children: node,
};

export default AspectRatioWrapper;
Loading