@artsy/reaction 29.2.1 → 29.3.0
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.
- package/CHANGELOG.md +90 -47
- package/README.md +3 -5
- package/dist/Artsy/Relay/middleware/metaphysicsExtensionsLoggerMiddleware.js +1 -1
- package/dist/Artsy/Relay/middleware/metaphysicsExtensionsLoggerMiddleware.js.map +1 -1
- package/dist/Components/Publishing/Sections/Video.js +2 -2
- package/dist/Components/Publishing/Sections/Video.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
# v29.3.0 (Thu Apr 07 2022)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- fix: formating [#3723](https://github.com/artsy/reaction/pull/3723) ([@mc-jones](https://github.com/mc-jones))
|
|
6
|
+
|
|
7
|
+
#### 🐛 Bug Fix
|
|
8
|
+
|
|
9
|
+
- chore(inclusive-language): Rename master to main [#3716](https://github.com/artsy/reaction/pull/3716) ([@damassi](https://github.com/damassi))
|
|
10
|
+
- chore: Adopt inclusive language [#3715](https://github.com/artsy/reaction/pull/3715) ([@sonecabr](https://github.com/sonecabr))
|
|
11
|
+
|
|
12
|
+
#### 🏠 Internal
|
|
13
|
+
|
|
14
|
+
- chore(deps): update dep @artsy/lint-changed from 3.4.0 to v5 [#3693](https://github.com/artsy/reaction/pull/3693) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
|
|
15
|
+
- chore(deps): update dep vscode-apollo-relay from 1.5.1 to v1.5.2 [#3713](https://github.com/artsy/reaction/pull/3713) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
|
|
16
|
+
- Bump lodash from 4.17.11 to 4.17.21 [#3684](https://github.com/artsy/reaction/pull/3684) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
17
|
+
- Bump path-parse from 1.0.6 to 1.0.7 [#3696](https://github.com/artsy/reaction/pull/3696) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
18
|
+
- chore(deps): update dep @artsy/lint-changed from 3.1.0 to v3.4.0 [#3689](https://github.com/artsy/reaction/pull/3689) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
|
|
19
|
+
- Bump ssri from 6.0.1 to 6.0.2 [#3680](https://github.com/artsy/reaction/pull/3680) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
20
|
+
- Bump y18n from 3.2.1 to 3.2.2 [#3679](https://github.com/artsy/reaction/pull/3679) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
21
|
+
- Bump tmpl from 1.0.4 to 1.0.5 [#3706](https://github.com/artsy/reaction/pull/3706) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
22
|
+
- chore(deps): update dep @artsy/auto-config from 1.0.2 to v1.1.0 [#3708](https://github.com/artsy/reaction/pull/3708) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
|
|
23
|
+
- chore(deps): update auto orb from 1.3.2 to v2 [#3711](https://github.com/artsy/reaction/pull/3711) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
|
|
24
|
+
- chore: Update Rennovate [#3712](https://github.com/artsy/reaction/pull/3712) ([@icirellik](https://github.com/icirellik))
|
|
25
|
+
- chore: (PLATFORM-3528) update node version to 14LTS, update README [#3705](https://github.com/artsy/reaction/pull/3705) ([@ovasdi](https://github.com/ovasdi))
|
|
26
|
+
|
|
27
|
+
#### 🔩 Dependency Updates
|
|
28
|
+
|
|
29
|
+
- Bump ini from 1.3.5 to 1.3.8 [#3668](https://github.com/artsy/reaction/pull/3668) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
30
|
+
|
|
31
|
+
#### Authors: 8
|
|
32
|
+
|
|
33
|
+
- [@dependabot[bot]](https://github.com/dependabot[bot])
|
|
34
|
+
- [@renovate[bot]](https://github.com/renovate[bot])
|
|
35
|
+
- Andre Rocha ([@sonecabr](https://github.com/sonecabr))
|
|
36
|
+
- Cameron Rollheiser ([@icirellik](https://github.com/icirellik))
|
|
37
|
+
- Christopher Pappas ([@damassi](https://github.com/damassi))
|
|
38
|
+
- Matt Jones ([@mc-jones](https://github.com/mc-jones))
|
|
39
|
+
- Ozzie Vasdi ([@ovasdi](https://github.com/ovasdi))
|
|
40
|
+
- WhiteSource Renovate ([@renovate-bot](https://github.com/renovate-bot))
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
1
44
|
# v29.2.1 (Thu Aug 12 2021)
|
|
2
45
|
|
|
3
46
|
#### 🐛 Bug Fix
|
|
@@ -382,7 +425,7 @@
|
|
|
382
425
|
- add "schedule:nonOfficeHours" [#3608](https://github.com/artsy/reaction/pull/3608) ([@eessex](https://github.com/eessex))
|
|
383
426
|
- Reenable renovate [#3608](https://github.com/artsy/reaction/pull/3608) ([@eessex](https://github.com/eessex))
|
|
384
427
|
|
|
385
|
-
#### ⚠️ Pushed to `
|
|
428
|
+
#### ⚠️ Pushed to `main`
|
|
386
429
|
|
|
387
430
|
- Disable renovate ([@dblandin](https://github.com/dblandin))
|
|
388
431
|
|
|
@@ -409,7 +452,7 @@
|
|
|
409
452
|
|
|
410
453
|
- Remove tracking calls for now [#3591](https://github.com/artsy/reaction/pull/3591) ([@sweir27](https://github.com/sweir27))
|
|
411
454
|
|
|
412
|
-
#### ⚠️ Pushed to `
|
|
455
|
+
#### ⚠️ Pushed to `main`
|
|
413
456
|
|
|
414
457
|
- Update renovate.json ([@damassi](https://github.com/damassi))
|
|
415
458
|
- Update README ([@damassi](https://github.com/damassi))
|
|
@@ -623,7 +666,7 @@
|
|
|
623
666
|
|
|
624
667
|
- 2FA enrollment responsive fix: switch to maxWidth [#3567](https://github.com/artsy/reaction/pull/3567) ([@dblandin](https://github.com/dblandin))
|
|
625
668
|
|
|
626
|
-
#### ⚠️ Pushed to `
|
|
669
|
+
#### ⚠️ Pushed to `main`
|
|
627
670
|
|
|
628
671
|
- Bump to trigger npm publish :rocket: ([@dblandin](https://github.com/dblandin))
|
|
629
672
|
|
|
@@ -639,7 +682,7 @@
|
|
|
639
682
|
|
|
640
683
|
- Add responsive styles to 2FA Enrollment UI [#3566](https://github.com/artsy/reaction/pull/3566) ([@dblandin](https://github.com/dblandin))
|
|
641
684
|
|
|
642
|
-
#### ⚠️ Pushed to `
|
|
685
|
+
#### ⚠️ Pushed to `main`
|
|
643
686
|
|
|
644
687
|
- empty commit to trigger build ([@ds300](https://github.com/ds300))
|
|
645
688
|
|
|
@@ -1027,7 +1070,7 @@
|
|
|
1027
1070
|
- Update metaphysics schema [#3500](https://github.com/artsy/reaction/pull/3500) ([@artsyit](https://github.com/artsyit))
|
|
1028
1071
|
- Fallback to base route if no route found through index [#3504](https://github.com/artsy/reaction/pull/3504) ([@zephraph](https://github.com/zephraph))
|
|
1029
1072
|
|
|
1030
|
-
#### ⚠️ Pushed to `
|
|
1073
|
+
#### ⚠️ Pushed to `main`
|
|
1031
1074
|
|
|
1032
1075
|
- Force deploy ([@zephraph](https://github.com/zephraph))
|
|
1033
1076
|
|
|
@@ -1173,7 +1216,7 @@
|
|
|
1173
1216
|
- Update metaphysics schema [#3483](https://github.com/artsy/reaction/pull/3483) ([@artsyit](https://github.com/artsyit))
|
|
1174
1217
|
- Fix Formik boolean handling [#3481](https://github.com/artsy/reaction/pull/3481) ([@dblandin](https://github.com/dblandin))
|
|
1175
1218
|
|
|
1176
|
-
#### ⚠️ Pushed to `
|
|
1219
|
+
#### ⚠️ Pushed to `main`
|
|
1177
1220
|
|
|
1178
1221
|
- empty commit to trigger build ([@ds300](https://github.com/ds300))
|
|
1179
1222
|
|
|
@@ -1262,7 +1305,7 @@
|
|
|
1262
1305
|
- [mWeb] Show OTP prompt during login when 2FA-enabled [#3472](https://github.com/artsy/reaction/pull/3472) ([@dblandin](https://github.com/dblandin))
|
|
1263
1306
|
- [Chore] Turns on exhaustive-deps [#3473](https://github.com/artsy/reaction/pull/3473) ([@dzucconi](https://github.com/dzucconi))
|
|
1264
1307
|
|
|
1265
|
-
#### ⚠️ Pushed to `
|
|
1308
|
+
#### ⚠️ Pushed to `main`
|
|
1266
1309
|
|
|
1267
1310
|
- Fix @artsy/cohesion Intent.login reference ([@dblandin](https://github.com/dblandin))
|
|
1268
1311
|
|
|
@@ -1452,7 +1495,7 @@
|
|
|
1452
1495
|
- Update metaphysics schema [#3452](https://github.com/artsy/reaction/pull/3452) ([@artsyit](https://github.com/artsyit))
|
|
1453
1496
|
- [NavBar Drop Down QA] add a new prop to control background color [#3447](https://github.com/artsy/reaction/pull/3447) ([@xtina-starr](https://github.com/xtina-starr))
|
|
1454
1497
|
|
|
1455
|
-
#### ⚠️ Pushed to `
|
|
1498
|
+
#### ⚠️ Pushed to `main`
|
|
1456
1499
|
|
|
1457
1500
|
- Bump for force reaction release ([@zephraph](https://github.com/zephraph))
|
|
1458
1501
|
|
|
@@ -2479,7 +2522,7 @@ Cypress integration testing. [#3384](https://github.com/artsy/reaction/pull/3384
|
|
|
2479
2522
|
- Organize MobileNav into folder [#3335](https://github.com/artsy/reaction/pull/3335) ([@damassi](https://github.com/damassi))
|
|
2480
2523
|
- Display information about identity verification on credit card form [#3334](https://github.com/artsy/reaction/pull/3334) ([@bhoggard](https://github.com/bhoggard))
|
|
2481
2524
|
|
|
2482
|
-
#### ⚠️ Pushed to
|
|
2525
|
+
#### ⚠️ Pushed to main
|
|
2483
2526
|
|
|
2484
2527
|
- Forcing a reaction release ([@zephraph](https://github.com/zephraph))
|
|
2485
2528
|
|
|
@@ -3856,7 +3899,7 @@ Cypress integration testing. [#3384](https://github.com/artsy/reaction/pull/3384
|
|
|
3856
3899
|
|
|
3857
3900
|
- Fix conversation detail link [#3187](https://github.com/artsy/reaction/pull/3187) ([@ashkan18](https://github.com/ashkan18))
|
|
3858
3901
|
|
|
3859
|
-
#### ⚠️ Pushed to
|
|
3902
|
+
#### ⚠️ Pushed to main
|
|
3860
3903
|
|
|
3861
3904
|
- [BundleSplitting] Comment out for now ([@damassi](https://github.com/damassi))
|
|
3862
3905
|
|
|
@@ -5071,7 +5114,7 @@ Paired with @abhitip @mikehrom on updates to these event payloads. [#3099](https
|
|
|
5071
5114
|
- Bump down threshold for lazy-loading on artist artwork grid [#3053](https://github.com/artsy/reaction/pull/3053) ([@zephraph](https://github.com/zephraph))
|
|
5072
5115
|
- Restore Artworks link to mobile nav [#3046](https://github.com/artsy/reaction/pull/3046) ([@xtina-starr](https://github.com/xtina-starr))
|
|
5073
5116
|
|
|
5074
|
-
#### ⚠️ Pushed to
|
|
5117
|
+
#### ⚠️ Pushed to main
|
|
5075
5118
|
|
|
5076
5119
|
- Bump to 23.0.1 to get around issues with auto-release (steven.j.hicks@gmail.com)
|
|
5077
5120
|
|
|
@@ -5389,7 +5432,7 @@ addresses https://artsyproduct.atlassian.net/browse/AUCT-773 [#3034](https://git
|
|
|
5389
5432
|
|
|
5390
5433
|
#### 🚀 Enhancement
|
|
5391
5434
|
|
|
5392
|
-
- Meta: Merge recent auctions team product work into
|
|
5435
|
+
- Meta: Merge recent auctions team product work into main [#3022](https://github.com/artsy/reaction/pull/3022) ([@yuki24](https://github.com/yuki24) [@dleve123](https://github.com/dleve123))
|
|
5393
5436
|
|
|
5394
5437
|
#### Authors: 2
|
|
5395
5438
|
|
|
@@ -6713,7 +6756,7 @@ Details
|
|
|
6713
6756
|
|
|
6714
6757
|
# v20.0.9 (Mon Sep 30 2019)
|
|
6715
6758
|
|
|
6716
|
-
#### ⚠️ Pushed to
|
|
6759
|
+
#### ⚠️ Pushed to main
|
|
6717
6760
|
|
|
6718
6761
|
- Remove Luc from point people (eve.essex@gmail.com)
|
|
6719
6762
|
|
|
@@ -8335,7 +8378,7 @@ Co-authored-by: Erik Stockmeier <erik.d.stock@gmail.com> [#2703](https://github.
|
|
|
8335
8378
|
|
|
8336
8379
|
- update test [#2644](https://github.com/artsy/reaction/pull/2644) (jiahaodavid4040@gmail.com)
|
|
8337
8380
|
|
|
8338
|
-
#### ⚠️ Pushed to
|
|
8381
|
+
#### ⚠️ Pushed to main
|
|
8339
8382
|
|
|
8340
8383
|
- resolve conflicting files (jiahaodavid4040@gmail.com)
|
|
8341
8384
|
|
|
@@ -9195,7 +9238,7 @@ Co-authored-by: Daniel Levenson <dleve123@gmail.com> [#2672](https://github.com/
|
|
|
9195
9238
|
<details>
|
|
9196
9239
|
<summary>artsy/palette</summary>
|
|
9197
9240
|
|
|
9198
|
-
### [`v4.14.23`](https://togithub.com/artsy/palette/blob/
|
|
9241
|
+
### [`v4.14.23`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41423-Thu-Jun-27-2019)
|
|
9199
9242
|
|
|
9200
9243
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.22...v4.14.23)
|
|
9201
9244
|
|
|
@@ -9302,7 +9345,7 @@ _From #2577_
|
|
|
9302
9345
|
<details>
|
|
9303
9346
|
<summary>artsy/palette</summary>
|
|
9304
9347
|
|
|
9305
|
-
### [`v4.14.22`](https://togithub.com/artsy/palette/blob/
|
|
9348
|
+
### [`v4.14.22`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41422-Mon-Jun-24-2019)
|
|
9306
9349
|
|
|
9307
9350
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.21...v4.14.22)
|
|
9308
9351
|
|
|
@@ -9370,7 +9413,7 @@ _From #2577_
|
|
|
9370
9413
|
<details>
|
|
9371
9414
|
<summary>artsy/palette</summary>
|
|
9372
9415
|
|
|
9373
|
-
### [`v4.14.21`](https://togithub.com/artsy/palette/blob/
|
|
9416
|
+
### [`v4.14.21`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41421-Fri-Jun-21-2019)
|
|
9374
9417
|
|
|
9375
9418
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.20...v4.14.21)
|
|
9376
9419
|
|
|
@@ -9583,7 +9626,7 @@ _From #2577_
|
|
|
9583
9626
|
<details>
|
|
9584
9627
|
<summary>artsy/palette</summary>
|
|
9585
9628
|
|
|
9586
|
-
### [`v4.14.16`](https://togithub.com/artsy/palette/blob/
|
|
9629
|
+
### [`v4.14.16`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v41416-Thu-Jun-13-2019)
|
|
9587
9630
|
|
|
9588
9631
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.15...v4.14.16)
|
|
9589
9632
|
|
|
@@ -9915,7 +9958,7 @@ _From #2577_
|
|
|
9915
9958
|
<details>
|
|
9916
9959
|
<summary>artsy/palette</summary>
|
|
9917
9960
|
|
|
9918
|
-
### [`v4.14.9`](https://togithub.com/artsy/palette/blob/
|
|
9961
|
+
### [`v4.14.9`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4149-Fri-Jun-07-2019)
|
|
9919
9962
|
|
|
9920
9963
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.8...v4.14.9)
|
|
9921
9964
|
|
|
@@ -10085,19 +10128,19 @@ _From #2577_
|
|
|
10085
10128
|
<details>
|
|
10086
10129
|
<summary>artsy/palette</summary>
|
|
10087
10130
|
|
|
10088
|
-
### [`v4.14.2`](https://togithub.com/artsy/palette/blob/
|
|
10131
|
+
### [`v4.14.2`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4142-Mon-Jun-03-2019)
|
|
10089
10132
|
|
|
10090
10133
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.1...v4.14.2)
|
|
10091
10134
|
|
|
10092
10135
|
* * *
|
|
10093
10136
|
|
|
10094
|
-
### [`v4.14.1`](https://togithub.com/artsy/palette/blob/
|
|
10137
|
+
### [`v4.14.1`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4141-Mon-Jun-03-2019)
|
|
10095
10138
|
|
|
10096
10139
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.14.0...v4.14.1)
|
|
10097
10140
|
|
|
10098
10141
|
* * *
|
|
10099
10142
|
|
|
10100
|
-
### [`v4.14.0`](https://togithub.com/artsy/palette/blob/
|
|
10143
|
+
### [`v4.14.0`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4140-Sun-Jun-02-2019)
|
|
10101
10144
|
|
|
10102
10145
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.13.5...v4.14.0)
|
|
10103
10146
|
|
|
@@ -10150,7 +10193,7 @@ _From #2577_
|
|
|
10150
10193
|
<details>
|
|
10151
10194
|
<summary>artsy/palette</summary>
|
|
10152
10195
|
|
|
10153
|
-
### [`v4.13.5`](https://togithub.com/artsy/palette/blob/
|
|
10196
|
+
### [`v4.13.5`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4135-Sat-Jun-01-2019)
|
|
10154
10197
|
|
|
10155
10198
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.13.4...v4.13.5)
|
|
10156
10199
|
|
|
@@ -10165,7 +10208,7 @@ _From #2577_
|
|
|
10165
10208
|
|
|
10166
10209
|
* * *
|
|
10167
10210
|
|
|
10168
|
-
### [`v4.13.4`](https://togithub.com/artsy/palette/blob/
|
|
10211
|
+
### [`v4.13.4`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4134-Sat-Jun-01-2019)
|
|
10169
10212
|
|
|
10170
10213
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.13.3...v4.13.4)
|
|
10171
10214
|
|
|
@@ -10276,7 +10319,7 @@ _From #2577_
|
|
|
10276
10319
|
<details>
|
|
10277
10320
|
<summary>artsy/palette</summary>
|
|
10278
10321
|
|
|
10279
|
-
### [`v4.13.2`](https://togithub.com/artsy/palette/blob/
|
|
10322
|
+
### [`v4.13.2`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4132-Thu-May-30-2019)
|
|
10280
10323
|
|
|
10281
10324
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.13.1...v4.13.2)
|
|
10282
10325
|
|
|
@@ -10291,7 +10334,7 @@ _From #2577_
|
|
|
10291
10334
|
|
|
10292
10335
|
* * *
|
|
10293
10336
|
|
|
10294
|
-
### [`v4.13.1`](https://togithub.com/artsy/palette/blob/
|
|
10337
|
+
### [`v4.13.1`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4131-Thu-May-30-2019)
|
|
10295
10338
|
|
|
10296
10339
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.13.0...v4.13.1)
|
|
10297
10340
|
|
|
@@ -10306,7 +10349,7 @@ _From #2577_
|
|
|
10306
10349
|
|
|
10307
10350
|
* * *
|
|
10308
10351
|
|
|
10309
|
-
### [`v4.13.0`](https://togithub.com/artsy/palette/blob/
|
|
10352
|
+
### [`v4.13.0`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4130-Wed-May-29-2019)
|
|
10310
10353
|
|
|
10311
10354
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.9...v4.13.0)
|
|
10312
10355
|
|
|
@@ -10321,7 +10364,7 @@ _From #2577_
|
|
|
10321
10364
|
|
|
10322
10365
|
* * *
|
|
10323
10366
|
|
|
10324
|
-
### [`v4.12.9`](https://togithub.com/artsy/palette/blob/
|
|
10367
|
+
### [`v4.12.9`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4129-Wed-May-29-2019)
|
|
10325
10368
|
|
|
10326
10369
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.8...v4.12.9)
|
|
10327
10370
|
|
|
@@ -10382,7 +10425,7 @@ _From #2577_
|
|
|
10382
10425
|
<details>
|
|
10383
10426
|
<summary>artsy/palette</summary>
|
|
10384
10427
|
|
|
10385
|
-
### [`v4.12.8`](https://togithub.com/artsy/palette/blob/
|
|
10428
|
+
### [`v4.12.8`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4128-Tue-May-28-2019)
|
|
10386
10429
|
|
|
10387
10430
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.7...v4.12.8)
|
|
10388
10431
|
|
|
@@ -10406,7 +10449,7 @@ _From #2471_
|
|
|
10406
10449
|
<details>
|
|
10407
10450
|
<summary>artsy/palette</summary>
|
|
10408
10451
|
|
|
10409
|
-
### [`v4.12.7`](https://togithub.com/artsy/palette/blob/
|
|
10452
|
+
### [`v4.12.7`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4127-Tue-May-28-2019)
|
|
10410
10453
|
|
|
10411
10454
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.6...v4.12.7)
|
|
10412
10455
|
|
|
@@ -10430,7 +10473,7 @@ _From #2455_
|
|
|
10430
10473
|
<details>
|
|
10431
10474
|
<summary>artsy/palette</summary>
|
|
10432
10475
|
|
|
10433
|
-
### [`v4.12.6`](https://togithub.com/artsy/palette/blob/
|
|
10476
|
+
### [`v4.12.6`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4126-Tue-May-28-2019)
|
|
10434
10477
|
|
|
10435
10478
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.5...v4.12.6)
|
|
10436
10479
|
|
|
@@ -10451,7 +10494,7 @@ _From #2455_
|
|
|
10451
10494
|
|
|
10452
10495
|
* * *
|
|
10453
10496
|
|
|
10454
|
-
### [`v4.12.5`](https://togithub.com/artsy/palette/blob/
|
|
10497
|
+
### [`v4.12.5`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4125-Thu-May-23-2019)
|
|
10455
10498
|
|
|
10456
10499
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.4...v4.12.5)
|
|
10457
10500
|
|
|
@@ -10465,7 +10508,7 @@ _From #2455_
|
|
|
10465
10508
|
|
|
10466
10509
|
* * *
|
|
10467
10510
|
|
|
10468
|
-
### [`v4.12.4`](https://togithub.com/artsy/palette/blob/
|
|
10511
|
+
### [`v4.12.4`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4124-Thu-May-23-2019)
|
|
10469
10512
|
|
|
10470
10513
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.3...v4.12.4)
|
|
10471
10514
|
|
|
@@ -10480,7 +10523,7 @@ _From #2455_
|
|
|
10480
10523
|
|
|
10481
10524
|
* * *
|
|
10482
10525
|
|
|
10483
|
-
### [`v4.12.3`](https://togithub.com/artsy/palette/blob/
|
|
10526
|
+
### [`v4.12.3`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4123-Thu-May-23-2019)
|
|
10484
10527
|
|
|
10485
10528
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.2...v4.12.3)
|
|
10486
10529
|
|
|
@@ -10646,7 +10689,7 @@ _From #2455_
|
|
|
10646
10689
|
<details>
|
|
10647
10690
|
<summary>webpack-contrib/webpack-bundle-analyzer</summary>
|
|
10648
10691
|
|
|
10649
|
-
### [`v3.3.2`](https://togithub.com/webpack-contrib/webpack-bundle-analyzer/blob/
|
|
10692
|
+
### [`v3.3.2`](https://togithub.com/webpack-contrib/webpack-bundle-analyzer/blob/main/CHANGELOG.md#​332)
|
|
10650
10693
|
|
|
10651
10694
|
[Compare Source](https://togithub.com/webpack-contrib/webpack-bundle-analyzer/compare/v2.13.1...v3.3.2)
|
|
10652
10695
|
|
|
@@ -10777,7 +10820,7 @@ _From #2455_
|
|
|
10777
10820
|
<details>
|
|
10778
10821
|
<summary>omakase-js/omakase</summary>
|
|
10779
10822
|
|
|
10780
|
-
### [`v0.0.9`](https://togithub.com/omakase-js/omakase/blob/
|
|
10823
|
+
### [`v0.0.9`](https://togithub.com/omakase-js/omakase/blob/main/CHANGELOG.md#​009-Tue-May-21-2019)
|
|
10781
10824
|
|
|
10782
10825
|
[Compare Source](https://togithub.com/omakase-js/omakase/compare/v0.0.8...v0.0.9)
|
|
10783
10826
|
|
|
@@ -10792,7 +10835,7 @@ _From #2455_
|
|
|
10792
10835
|
|
|
10793
10836
|
* * *
|
|
10794
10837
|
|
|
10795
|
-
### [`v0.0.8`](https://togithub.com/omakase-js/omakase/blob/
|
|
10838
|
+
### [`v0.0.8`](https://togithub.com/omakase-js/omakase/blob/main/CHANGELOG.md#​008-Tue-May-21-2019)
|
|
10796
10839
|
|
|
10797
10840
|
[Compare Source](https://togithub.com/omakase-js/omakase/compare/v0.0.7...v0.0.8)
|
|
10798
10841
|
|
|
@@ -10816,7 +10859,7 @@ _From #2443_
|
|
|
10816
10859
|
<details>
|
|
10817
10860
|
<summary>artsy/palette</summary>
|
|
10818
10861
|
|
|
10819
|
-
### [`v4.12.1`](https://togithub.com/artsy/palette/blob/
|
|
10862
|
+
### [`v4.12.1`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4121-Tue-May-21-2019)
|
|
10820
10863
|
|
|
10821
10864
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.12.0...v4.12.1)
|
|
10822
10865
|
|
|
@@ -10894,7 +10937,7 @@ _From #2443_
|
|
|
10894
10937
|
<details>
|
|
10895
10938
|
<summary>artsy/palette</summary>
|
|
10896
10939
|
|
|
10897
|
-
### [`v4.12.0`](https://togithub.com/artsy/palette/blob/
|
|
10940
|
+
### [`v4.12.0`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4120-Fri-May-17-2019)
|
|
10898
10941
|
|
|
10899
10942
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.11.9...v4.12.0)
|
|
10900
10943
|
|
|
@@ -11235,7 +11278,7 @@ _From #2443_
|
|
|
11235
11278
|
<details>
|
|
11236
11279
|
<summary>artsy/palette</summary>
|
|
11237
11280
|
|
|
11238
|
-
### [`v4.11.9`](https://togithub.com/artsy/palette/blob/
|
|
11281
|
+
### [`v4.11.9`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4119-Fri-May-10-2019)
|
|
11239
11282
|
|
|
11240
11283
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.11.8...v4.11.9)
|
|
11241
11284
|
|
|
@@ -11259,7 +11302,7 @@ _From #2399_
|
|
|
11259
11302
|
<details>
|
|
11260
11303
|
<summary>artsy/palette</summary>
|
|
11261
11304
|
|
|
11262
|
-
### [`v4.11.8`](https://togithub.com/artsy/palette/blob/
|
|
11305
|
+
### [`v4.11.8`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4118-Fri-May-10-2019)
|
|
11263
11306
|
|
|
11264
11307
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.11.7...v4.11.8)
|
|
11265
11308
|
|
|
@@ -11333,7 +11376,7 @@ _From #2399_
|
|
|
11333
11376
|
<details>
|
|
11334
11377
|
<summary>artsy/palette</summary>
|
|
11335
11378
|
|
|
11336
|
-
### [`v4.11.7`](https://togithub.com/artsy/palette/blob/
|
|
11379
|
+
### [`v4.11.7`](https://togithub.com/artsy/palette/blob/main/CHANGELOG.md#v4117-Fri-May-10-2019)
|
|
11337
11380
|
|
|
11338
11381
|
[Compare Source](https://togithub.com/artsy/palette/compare/v4.11.6...v4.11.7)
|
|
11339
11382
|
|
|
@@ -14829,11 +14872,11 @@ Co-authored-by: Renovate Bot <bot@renovateapp.com> [#2297](https://github.com/ar
|
|
|
14829
14872
|
- Revert "Refactor tests" [#1963](https://github.com/artsy/reaction/pull/1963) ([@ds300](https://github.com/ds300))
|
|
14830
14873
|
- Refactor tests [#1899](https://github.com/artsy/reaction/pull/1899) ([@ds300](https://github.com/ds300) sweir27@gmail.com)
|
|
14831
14874
|
|
|
14832
|
-
#### ⚠️ Pushed to
|
|
14875
|
+
#### ⚠️ Pushed to main
|
|
14833
14876
|
|
|
14834
14877
|
- remove --detectOpenHandles ([@ds300](https://github.com/ds300))
|
|
14835
14878
|
- add --forceExit to jest invocation ([@ds300](https://github.com/ds300))
|
|
14836
|
-
- Merge remote-tracking branch 'upstream/
|
|
14879
|
+
- Merge remote-tracking branch 'upstream/main' into refactor-tests ([@ds300](https://github.com/ds300))
|
|
14837
14880
|
- don't re-calculate path array ([@ds300](https://github.com/ds300))
|
|
14838
14881
|
- add todo comment context ([@ds300](https://github.com/ds300))
|
|
14839
14882
|
- More sanity checks ([@ds300](https://github.com/ds300))
|
|
@@ -14842,8 +14885,8 @@ Co-authored-by: Renovate Bot <bot@renovateapp.com> [#2297](https://github.com/ar
|
|
|
14842
14885
|
- abmiguous -> ambiguous ([@ds300](https://github.com/ds300))
|
|
14843
14886
|
- Update src/DevTools/createMockNetworkLayer/index.ts ([@alloy](https://github.com/alloy))
|
|
14844
14887
|
- Update src/DevTools/createMockNetworkLayer/index.ts ([@alloy](https://github.com/alloy))
|
|
14845
|
-
- Merge remote-tracking branch 'upstream/
|
|
14846
|
-
- Merge branch '
|
|
14888
|
+
- Merge remote-tracking branch 'upstream/main' into refactor-tests ([@ds300](https://github.com/ds300))
|
|
14889
|
+
- Merge branch 'main' into refactor-tests ([@d.j.sheldrick@gmail.com](https://github.com/d.j.sheldrick@gmail.com))
|
|
14847
14890
|
- bring countdown timer test fixtures closer to the tests ([@ds300](https://github.com/ds300))
|
|
14848
14891
|
|
|
14849
14892
|
---
|
|
@@ -15807,4 +15850,4 @@ Update dependency @artsy/palette to v2.34.0 [#1921](https://github.com/artsy/rea
|
|
|
15807
15850
|
#### Authors: 2
|
|
15808
15851
|
|
|
15809
15852
|
- Art.sy ([@artsyit](https://github.com/artsyit))
|
|
15810
|
-
- Justin Bennett ([@zephraph](https://github.com/zephraph))
|
|
15853
|
+
- Justin Bennett ([@zephraph](https://github.com/zephraph))
|
package/README.md
CHANGED
|
@@ -13,11 +13,9 @@
|
|
|
13
13
|
## Meta
|
|
14
14
|
|
|
15
15
|
- **State:** production
|
|
16
|
-
- **Demo:** <https://artsy.github.io/reaction>
|
|
17
16
|
- **CI:** [](https://circleci.com/gh/artsy/reaction)
|
|
18
17
|
- **NPM:** [](https://www.npmjs.com/package/@artsy/reaction)
|
|
19
|
-
- **Coverage:** [
|
|
18
|
+
- **Coverage:** [](https://codecov.io/gh/artsy/reaction)
|
|
21
19
|
|
|
22
20
|
## Installation
|
|
23
21
|
|
|
@@ -133,8 +131,8 @@ You can learn more about this work from [our blog][footer_blog] and by following
|
|
|
133
131
|
our [job postings][footer_jobs]!
|
|
134
132
|
|
|
135
133
|
[footer_website]: https://www.artsy.net/
|
|
136
|
-
[footer_principles]: https://github.com/artsy/README/blob/
|
|
137
|
-
[footer_open]: https://github.com/artsy/README/blob/
|
|
134
|
+
[footer_principles]: https://github.com/artsy/README/blob/main/culture/engineering-principles.md
|
|
135
|
+
[footer_open]: https://github.com/artsy/README/blob/main/culture/engineering-principles.md#open-source-by-default
|
|
138
136
|
[footer_blog]: https://artsy.github.io/
|
|
139
137
|
[footer_twitter]: https://twitter.com/ArtsyOpenSource
|
|
140
138
|
[footer_api]: https://developers.artsy.net/
|
|
@@ -33,7 +33,7 @@ function metaphysicsExtensionsLoggerMiddleware() {
|
|
|
33
33
|
return function (req) {
|
|
34
34
|
return next(req).then(function (res) {
|
|
35
35
|
if (res.json.extensions && console.groupCollapsed && res.json.extensions.requests) {
|
|
36
|
-
// See: https://github.com/artsy/metaphysics/blob/
|
|
36
|
+
// See: https://github.com/artsy/metaphysics/blob/main/src/lib/loaders/api/extensionsLogger.ts
|
|
37
37
|
var requests = res.json.extensions.requests; // Pull out the stitching logs, e.g. what graphql requests
|
|
38
38
|
// did stitching do for you under the hood
|
|
39
39
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Artsy/Relay/middleware/metaphysicsExtensionsLoggerMiddleware.ts"],"names":["metaphysicsExtensionsLoggerMiddleware","next","req","then","res","json","extensions","console","groupCollapsed","requests","stitching","stitchCount","Object","keys","length","stitchSummary","apis","requestCount","map","k","reduce","a","c","colorForRequests","noBold","noColor","requestSummary","title","forEach","host","group","route","log","groupEnd","stitchedSchema"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;AAKO,SAASA,qCAAT,GAAiD;AACtD,SAAO,UAAAC,IAAI;AAAA,WAAI,UAAAC,GAAG,EAAI;AACpB,aAAOD,IAAI,CAACC,GAAD,CAAJ,CAAUC,IAAV,CAAe,UAAAC,GAAG,EAAI;AAC3B,YACE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,CAACC,cAAR,CAAuBmB,KAAvB,EAA8BH,MAA9B,EAAsCD,gBAAtC,EAAwDE,OAAxD,EAF+B,CAI/B;AACA;;AACA,gBAAIR,YAAJ,EAAkB;AAChBL,cAAAA,MAAM,CAACC,IAAP,CAAYG,IAAZ,EAAkBY,OAAlB,CAA0B,UAAAC,IAAI,EAAI;AAChCtB,gBAAAA,OAAO,CAACuB,KAAR,CAAcD,IAAd;AACAjB,gBAAAA,MAAM,CAACC,IAAP,CAAYG,IAAI,CAACa,IAAD,CAAJ,CAAWpB,QAAvB,EAAiCmB,OAAjC,CAAyC,UAAAG,KAAK,EAAI;AAChDxB,kBAAAA,OAAO,CAACyB,GAAR,CAAYD,KAAZ,EAAmBf,IAAI,CAACa,IAAD,CAAJ,CAAWpB,QAAX,CAAoBsB,KAApB,CAAnB;AACD,iBAFD;AAGAxB,gBAAAA,OAAO,CAAC0B,QAAR;AACD,eAND;AAOD,aAd8B,CAgB/B;AACA;;;AAEA,gBAAItB,WAAJ,EAAiB;AACfJ,cAAAA,OAAO,CAACuB,KAAR,CAAc,UAAd;AACAlB,cAAAA,MAAM,CAACC,IAAP,CAAYH,SAAS,CAACD,QAAtB,EAAgCmB,OAAhC,CAAwC,UAAAM,cAAc,EAAI;AACxD3B,gBAAAA,OAAO,CAACyB,GAAR,CAAYtB,SAAS,CAACD,QAAV,CAAmByB,cAAnB,CAAZ;AACD,eAFD;AAGA3B,cAAAA,OAAO,CAAC0B,QAAR;AACD,aAzB8B,CA2B/B;;;AACA1B,YAAAA,OAAO,CAAC0B,QAAR;AACD;AACF;;AACD,eAAO7B,GAAP;AACD,OAxEM,CAAP;AAyED,KA1EU;AAAA,GAAX;AA2ED","sourcesContent":["import _ from \"lodash\"\n\n/**\n * This takes the extra extension metadata that staging and dev metaphysics\n * sends about API requests it makes for you, and logs it out during dev\n * time into your console at the same places as the relay queries.\n */\nexport function metaphysicsExtensionsLoggerMiddleware() {\n return next => req => {\n return next(req).then(res => {\n if (\n res.json.extensions &&\n console.groupCollapsed &&\n res.json.extensions.requests\n ) {\n // See: https://github.com/artsy/metaphysics/blob/
|
|
1
|
+
{"version":3,"sources":["../../../../src/Artsy/Relay/middleware/metaphysicsExtensionsLoggerMiddleware.ts"],"names":["metaphysicsExtensionsLoggerMiddleware","next","req","then","res","json","extensions","console","groupCollapsed","requests","stitching","stitchCount","Object","keys","length","stitchSummary","apis","requestCount","map","k","reduce","a","c","colorForRequests","noBold","noColor","requestSummary","title","forEach","host","group","route","log","groupEnd","stitchedSchema"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;AAKO,SAASA,qCAAT,GAAiD;AACtD,SAAO,UAAAC,IAAI;AAAA,WAAI,UAAAC,GAAG,EAAI;AACpB,aAAOD,IAAI,CAACC,GAAD,CAAJ,CAAUC,IAAV,CAAe,UAAAC,GAAG,EAAI;AAC3B,YACEA,GAAG,CAACC,IAAJ,CAASC,UAAT,IACAC,OAAO,CAACC,cADR,IAEAJ,GAAG,CAACC,IAAJ,CAASC,UAAT,CAAoBG,QAHtB,EAIE;AACA;AACA,cAAMA,QAAQ,GAAGL,GAAG,CAACC,IAAJ,CAASC,UAAT,CAAoBG,QAArC,CAFA,CAIA;AACA;;AACA,cAAMC,SAAS,GAAGD,QAAQ,CAACC,SAA3B;AACA,cAAMC,WAAW,GAAGD,SAAS,IAAIE,MAAM,CAACC,IAAP,CAAYH,SAAS,CAACD,QAAtB,EAAgCK,MAAjE;AACA,cAAMC,aAAa,GAAGJ,WAAW,aAAMA,WAAN,iBAA+B,EAAhE,CARA,CAUA;AACA;;AACA,cAAMK,IAAI,GAAG,oBAAOP,QAAP,EAAiB,CAAC,WAAD,CAAjB,CAAb;AACA,cAAMQ,YAAY,GAAGL,MAAM,CAACC,IAAP,CAAYG,IAAZ,EAClBE,GADkB,CACd,UAAAC,CAAC;AAAA,mBAAIP,MAAM,CAACC,IAAP,CAAYJ,QAAQ,CAACU,CAAD,CAAR,CAAYV,QAAxB,EAAkCK,MAA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AAM,CAACC,IAAP,CAAYH,SAAS,CAACD,QAAtB,EAAgCmB,OAAhC,CAAwC,UAAAM,cAAc,EAAI;AACxD3B,gBAAAA,OAAO,CAACyB,GAAR,CAAYtB,SAAS,CAACD,QAAV,CAAmByB,cAAnB,CAAZ;AACD,eAFD;AAGA3B,cAAAA,OAAO,CAAC0B,QAAR;AACD,aAzB8B,CA2B/B;;;AACA1B,YAAAA,OAAO,CAAC0B,QAAR;AACD;AACF;;AACD,eAAO7B,GAAP;AACD,OAxEM,CAAP;AAyED,KA1EU;AAAA,GAAX;AA2ED","sourcesContent":["import _ from \"lodash\"\n\n/**\n * This takes the extra extension metadata that staging and dev metaphysics\n * sends about API requests it makes for you, and logs it out during dev\n * time into your console at the same places as the relay queries.\n */\nexport function metaphysicsExtensionsLoggerMiddleware() {\n return next => req => {\n return next(req).then(res => {\n if (\n res.json.extensions &&\n console.groupCollapsed &&\n res.json.extensions.requests\n ) {\n // See: https://github.com/artsy/metaphysics/blob/main/src/lib/loaders/api/extensionsLogger.ts\n const requests = res.json.extensions.requests\n\n // Pull out the stitching logs, e.g. what graphql requests\n // did stitching do for you under the hood\n const stitching = requests.stitching\n const stitchCount = stitching && Object.keys(stitching.requests).length\n const stitchSummary = stitchCount ? `${stitchCount} stitched` : \"\"\n\n // Grab the rest API requests (only ones that use DataLoader)\n // so this is kinda a sub-set but it's more or less everything\n const apis = _.omit(requests, [\"stitching\"])\n const requestCount = Object.keys(apis)\n .map(k => Object.keys(requests[k].requests).length) // API requests\n .reduce((a, c) => a + c, 0) // Add them all up\n\n // Not telling anyone off, but over 15 is probably a point\n // where you want that highlighted.\n const colorForRequests =\n requestCount >= 15 ? \"color: #F1AF1B;\" : \"color: #6E1EFF;\"\n\n // The way the console coloring works is you use %c as an inline span\n // sentinal to correlate style to the next set of characters\n //\n // So we'll need some styles to work with\n const noBold = \"font-weight: normal;\"\n const noColor = \"color: black; font-weight: normal;\"\n const requestSummary = requestCount\n ? `%c ${requestCount} %ccalls` // These need consistent amounts of %c\n : \"%c%c\"\n\n const title = `%cMetaphysics API -${requestSummary} ${stitchSummary}`\n\n // Make sure we have something to show\n if (requestCount || stitchCount) {\n // The main title for the metaphysics section\n console.groupCollapsed(title, noBold, colorForRequests, noColor)\n\n // Loop through all of the hosts, make a subsection for those\n // and show the raw request obj in-case we add new things to it\n if (requestCount) {\n Object.keys(apis).forEach(host => {\n console.group(host)\n Object.keys(apis[host].requests).forEach(route => {\n console.log(route, apis[host].requests[route])\n })\n console.groupEnd()\n })\n }\n\n // Show stitched queries inline. This will probably need work in\n // the future, because I bet it's ugly.\n\n if (stitchCount) {\n console.group(\"Stitched\")\n Object.keys(stitching.requests).forEach(stitchedSchema => {\n console.log(stitching.requests[stitchedSchema])\n })\n console.groupEnd()\n }\n\n // Wrap up the metaphysics section\n console.groupEnd()\n }\n }\n return res\n })\n }\n}\n"],"file":"metaphysicsExtensionsLoggerMiddleware.js"}
|
|
@@ -97,7 +97,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
97
97
|
|
|
98
98
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
99
99
|
|
|
100
|
-
var
|
|
100
|
+
var DENYLIST = ["gif", "jpg", "jpeg", "png"];
|
|
101
101
|
var QUERYSTRING = "?title=0&portrait=0&badge=0&byline=0&showinfo=0&rel=0&controls=2&modestbranding=1&iv_load_policy=3&color=E5E5E5";
|
|
102
102
|
var VIDEO_RATIO = 0.5625;
|
|
103
103
|
exports.VIDEO_RATIO = VIDEO_RATIO;
|
|
@@ -209,7 +209,7 @@ function (_React$Component) {
|
|
|
209
209
|
|
|
210
210
|
function isValidVideoUrl(url) {
|
|
211
211
|
var urlExtension = url && url.split(".").pop();
|
|
212
|
-
var isValid =
|
|
212
|
+
var isValid = DENYLIST.every(function (bad) {
|
|
213
213
|
return urlExtension !== bad;
|
|
214
214
|
});
|
|
215
215
|
return isValid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Components/Publishing/Sections/Video.tsx"],"names":["BLACKLIST","QUERYSTRING","VIDEO_RATIO","VideoComponent","props","trackingData","dispatch","data","Events","postEvent","url","section","isValid","isValidVideoUrl","parsedUrl","urlParser","parse","playerUrl","getPlayerUrl","id","getId","playerSrc","state","src","hidden","console","error","playVideo","bind","tracking","trackEvent","action","label","setState","trackVideoClick","color","layout","caption","cover_image_url","width","size","showCaption","children","React","Component","x","urlExtension","split","pop","every","bad","hostname","indexOf","pathname","query","v","IFrame","styled","iframe","height","VideoContainer","div","p","breakpoint","md","xs","CoverImage","sizeMeOptions","refreshRate","SIZE_ME_REFRESH_RATE","noPlaceholder","Video"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,CAAC,KAAD,EAAQ,KAAR,EAAe,MAAf,EAAuB,KAAvB,CAAlB;AACA,IAAMC,WAAW,GACf,iHADF;AAEO,IAAMC,WAAW,GAAG,MAApB;;IA4BDC,c,WARL,4BACC,UAAAC,KAAK,EAAI;AACP,SAAOA,KAAK,CAACC,YAAN,GAAqBD,KAAK,CAACC,YAA3B,GAA0C,EAAjD;AACD,CAHF,EAIC;AACEC,EAAAA,QAAQ,EAAE,kBAAAC,IAAI;AAAA,WAAIC,gBAAOC,SAAP,CAAiBF,IAAjB,CAAJ;AAAA;AADhB,CAJD,C;;;;;AAkBC,0BAAYH,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,wFAAMA,KAAN;AADiB,QAGTM,GAHS,GAGD,MAAKN,KAAL,CAAWO,OAHV,CAGTD,GAHS;AAIjB,QAAME,OAAO,GAAGF,GAAG,IAAIG,eAAe,CAACH,GAA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AAWC,EALf,4CASID,gBAAWE,EATf;AAcD;AACF,CArBiB,CAApB;;AAwBO,IAAMC,UAAU,GAAGT,0BAAOI,GAAV;AAAA;AAAA;AAAA,2LACV,UAAAzD,KAAK;AAAA,SAAKA,KAAK,CAACoB,MAAN,IAAgB,CAACpB,KAAK,CAACmB,GAAvB,GAA6B,MAA7B,GAAsC,MAA3C;AAAA,CADK,EAKX,UAAAnB,KAAK;AAAA,SAAKA,KAAK,CAACuD,MAAN,aAAkBvD,KAAK,CAACuD,MAAxB,UAAqC,MAA1C;AAAA,CALM,EAOH,UAAAvD,KAAK;AAAA,SAAIA,KAAK,CAACmB,GAAN,IAAa,EAAjB;AAAA,CAPF,CAAhB;;;AAYP,IAAM4C,aAAa,GAAG;AACpBC,EAAAA,WAAW,EAAEC,+BADO;AAEpBC,EAAAA,aAAa,EAAE;AAFK,CAAtB;AAKO,IAAMC,KAAK,GAAG,0BAAOJ,aAAP,EAAsBhE,cAAtB,CAAd","sourcesContent":["import React from \"react\"\nimport sizeMe from \"react-sizeme\"\nimport track, { TrackingProp } from \"react-tracking\"\nimport styled from \"styled-components\"\nimport urlParser from \"url\"\nimport Events from \"../../../Utils/Events\"\nimport { resize } from \"../../../Utils/resizer\"\nimport { pMedia as breakpoint } from \"../../Helpers\"\nimport { SIZE_ME_REFRESH_RATE } from \"../Constants\"\nimport { ArticleLayout } from \"../Typings\"\nimport { Caption } from \"./Caption\"\nimport { VideoControls } from \"./VideoControls\"\n\nconst BLACKLIST = [\"gif\", \"jpg\", \"jpeg\", \"png\"]\nconst QUERYSTRING =\n \"?title=0&portrait=0&badge=0&byline=0&showinfo=0&rel=0&controls=2&modestbranding=1&iv_load_policy=3&color=E5E5E5\"\nexport const VIDEO_RATIO = 0.5625\n\ninterface VideoProps {\n color?: string\n section: {\n url: string\n caption?: string\n cover_image_url?: string\n }\n size?: any\n tracking?: TrackingProp\n trackingData?: any\n layout?: ArticleLayout\n}\n\ninterface VideoState {\n src?: string // FIXME: Coming from Positron, this can be empty / invalid\n hidden: boolean\n}\n\n@track(\n props => {\n return props.trackingData ? props.trackingData : {}\n },\n {\n dispatch: data => Events.postEvent(data),\n }\n)\nclass VideoComponent extends React.Component<VideoProps, VideoState> {\n static defaultProps = {\n size: {\n width: 500,\n },\n tracking: {\n trackEvent: x => x,\n },\n }\n\n constructor(props) {\n super(props)\n\n const { url } = this.props.section\n const isValid = url && isValidVideoUrl(url)\n\n if (isValid) {\n const parsedUrl = urlParser.parse(url, true)\n const playerUrl = getPlayerUrl(parsedUrl)\n const id = getId(parsedUrl)\n const playerSrc = playerUrl + id + QUERYSTRING\n\n this.state = {\n src: playerSrc,\n hidden: false,\n }\n } else {\n console.error(\n \"(@artsy/reaction) Video.tsx: A url is required for video.\",\n this.props\n )\n\n this.state = {\n hidden: true,\n }\n }\n this.playVideo = this.playVideo.bind(this)\n }\n\n trackVideoClick() {\n this.props.tracking.trackEvent({\n action: \"Click\",\n label: \"Play video\",\n })\n }\n\n playVideo() {\n const playerSrc = this.state.src + \"&autoplay=1\"\n this.setState({ src: playerSrc, hidden: true })\n this.trackVideoClick()\n }\n\n render() {\n const {\n color,\n layout,\n section: { caption, cover_image_url },\n size: { width },\n } = this.props\n const showCaption = layout !== \"feature\"\n\n return (\n <VideoContainer layout={layout} className=\"VideoContainer\">\n {cover_image_url && (\n <CoverImage\n className=\"VideoCover\"\n src={resize(cover_image_url, { width: 1200 })}\n height={width && width * VIDEO_RATIO}\n onClick={this.playVideo}\n hidden={this.state.hidden}\n >\n <VideoControls />\n </CoverImage>\n )}\n\n <IFrame\n src={this.state.src}\n frameBorder=\"0\"\n allowFullScreen\n height={width && width * VIDEO_RATIO}\n />\n\n {showCaption && (\n <Caption caption={caption} layout={layout} color={color}>\n {this.props.children}\n </Caption>\n )}\n </VideoContainer>\n )\n }\n}\n\n// Utils\nexport function isValidVideoUrl(url: string) {\n const urlExtension = url && url.split(\".\").pop()\n const isValid = BLACKLIST.every(bad => urlExtension !== bad)\n return isValid\n}\n\nexport function getPlayerUrl(url) {\n const { hostname } = url\n\n if (hostname) {\n if (hostname.indexOf(\"vimeo.com\") > -1) {\n return \"https://player.vimeo.com/video/\"\n } else if (hostname.indexOf(\"youtu\") > -1) {\n return \"https://www.youtube.com/embed/\"\n }\n } else {\n return \"\" // FIXME: check for errors\n }\n}\n\nfunction getId(url) {\n const { hostname, pathname } = url\n\n if (hostname && pathname) {\n if (url.hostname.indexOf(\"youtube.com\") > 0) {\n return url.query.v\n } else {\n return url.pathname.split(\"/\").pop()\n }\n } else {\n return \"\" // FIXME: error\n }\n}\n\n// Styles\n\nexport const IFrame = styled.iframe`\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n`\n\ninterface CoverImageProps {\n src?: string\n height?: number\n layout?: ArticleLayout\n}\n\nconst VideoContainer = styled.div<CoverImageProps>`\n width: 100%;\n position: relative;\n\n ${p => {\n if (p.layout === \"feature\") {\n return `\n text-align: center;\n padding-bottom: 53px;\n max-width: 1200px;\n margin: 0 auto;\n ${breakpoint.md`\n height: 450px;\n `}\n\n ${breakpoint.xs`\n height: 300px;\n padding-bottom: 20px;\n `}\n `\n }\n }};\n`\n\nexport const CoverImage = styled.div<CoverImageProps>`\n display: ${props => (props.hidden || !props.src ? \"none\" : \"flex\")};\n justify-content: center;\n align-items: center;\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n position: absolute;\n background: url(${props => props.src || \"\"}) no-repeat center center;\n background-size: cover;\n cursor: pointer;\n`\n\nconst sizeMeOptions = {\n refreshRate: SIZE_ME_REFRESH_RATE,\n noPlaceholder: true,\n}\n\nexport const Video = sizeMe(sizeMeOptions)(VideoComponent)\n"],"file":"Video.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/Components/Publishing/Sections/Video.tsx"],"names":["DENYLIST","QUERYSTRING","VIDEO_RATIO","VideoComponent","props","trackingData","dispatch","data","Events","postEvent","url","section","isValid","isValidVideoUrl","parsedUrl","urlParser","parse","playerUrl","getPlayerUrl","id","getId","playerSrc","state","src","hidden","console","error","playVideo","bind","tracking","trackEvent","action","label","setState","trackVideoClick","color","layout","caption","cover_image_url","width","size","showCaption","children","React","Component","x","urlExtension","split","pop","every","bad","hostname","indexOf","pathname","query","v","IFrame","styled","iframe","height","VideoContainer","div","p","breakpoint","md","xs","CoverImage","sizeMeOptions","refreshRate","SIZE_ME_REFRESH_RATE","noPlaceholder","Video"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,GAAG,CAAC,KAAD,EAAQ,KAAR,EAAe,MAAf,EAAuB,KAAvB,CAAjB;AACA,IAAMC,WAAW,GACf,iHADF;AAEO,IAAMC,WAAW,GAAG,MAApB;;IA4BDC,c,WARL,4BACC,UAAAC,KAAK,EAAI;AACP,SAAOA,KAAK,CAACC,YAAN,GAAqBD,KAAK,CAACC,YAA3B,GAA0C,EAAjD;AACD,CAHF,EAIC;AACEC,EAAAA,QAAQ,EAAE,kBAAAC,IAAI;AAAA,WAAIC,gBAAOC,SAAP,CAAiBF,IAAjB,CAAJ;AAAA;AADhB,CAJD,C;;;;;AAkBC,0BAAYH,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,wFAAMA,KAAN;AADiB,QAGTM,GAHS,GAGD,MAAKN,KAAL,CAAWO,OAHV,CAGTD,GAHS;AAIjB,QAAME,OAAO,GAAGF,GAAG,IAAIG,eAAe,CAACH,GAAD,CAAtC;;AAEA,QAAIE,OAAJ,EAAa;AACX,UAAME,SAAS,GAAGC,aAAUC,KAAV,CAAgBN,GAAhB,EAAqB,IAArB,CAAlB;;AACA,UAAMO,SAAS,GAAGC,YAAY,CAACJ,SAAD,CAA9B;AACA,UAAMK,EAAE,GAAGC,KAAK,CAACN,SAAD,CAAhB;AACA,UAAMO,S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A3C;AAAA,CADK,EAKX,UAAAnB,KAAK;AAAA,SAAKA,KAAK,CAACuD,MAAN,aAAkBvD,KAAK,CAACuD,MAAxB,UAAqC,MAA1C;AAAA,CALM,EAOH,UAAAvD,KAAK;AAAA,SAAIA,KAAK,CAACmB,GAAN,IAAa,EAAjB;AAAA,CAPF,CAAhB;;;AAYP,IAAM4C,aAAa,GAAG;AACpBC,EAAAA,WAAW,EAAEC,+BADO;AAEpBC,EAAAA,aAAa,EAAE;AAFK,CAAtB;AAKO,IAAMC,KAAK,GAAG,0BAAOJ,aAAP,EAAsBhE,cAAtB,CAAd","sourcesContent":["import React from \"react\"\nimport sizeMe from \"react-sizeme\"\nimport track, { TrackingProp } from \"react-tracking\"\nimport styled from \"styled-components\"\nimport urlParser from \"url\"\nimport Events from \"../../../Utils/Events\"\nimport { resize } from \"../../../Utils/resizer\"\nimport { pMedia as breakpoint } from \"../../Helpers\"\nimport { SIZE_ME_REFRESH_RATE } from \"../Constants\"\nimport { ArticleLayout } from \"../Typings\"\nimport { Caption } from \"./Caption\"\nimport { VideoControls } from \"./VideoControls\"\n\nconst DENYLIST = [\"gif\", \"jpg\", \"jpeg\", \"png\"]\nconst QUERYSTRING =\n \"?title=0&portrait=0&badge=0&byline=0&showinfo=0&rel=0&controls=2&modestbranding=1&iv_load_policy=3&color=E5E5E5\"\nexport const VIDEO_RATIO = 0.5625\n\ninterface VideoProps {\n color?: string\n section: {\n url: string\n caption?: string\n cover_image_url?: string\n }\n size?: any\n tracking?: TrackingProp\n trackingData?: any\n layout?: ArticleLayout\n}\n\ninterface VideoState {\n src?: string // FIXME: Coming from Positron, this can be empty / invalid\n hidden: boolean\n}\n\n@track(\n props => {\n return props.trackingData ? props.trackingData : {}\n },\n {\n dispatch: data => Events.postEvent(data),\n }\n)\nclass VideoComponent extends React.Component<VideoProps, VideoState> {\n static defaultProps = {\n size: {\n width: 500,\n },\n tracking: {\n trackEvent: x => x,\n },\n }\n\n constructor(props) {\n super(props)\n\n const { url } = this.props.section\n const isValid = url && isValidVideoUrl(url)\n\n if (isValid) {\n const parsedUrl = urlParser.parse(url, true)\n const playerUrl = getPlayerUrl(parsedUrl)\n const id = getId(parsedUrl)\n const playerSrc = playerUrl + id + QUERYSTRING\n\n this.state = {\n src: playerSrc,\n hidden: false,\n }\n } else {\n console.error(\n \"(@artsy/reaction) Video.tsx: A url is required for video.\",\n this.props\n )\n\n this.state = {\n hidden: true,\n }\n }\n this.playVideo = this.playVideo.bind(this)\n }\n\n trackVideoClick() {\n this.props.tracking.trackEvent({\n action: \"Click\",\n label: \"Play video\",\n })\n }\n\n playVideo() {\n const playerSrc = this.state.src + \"&autoplay=1\"\n this.setState({ src: playerSrc, hidden: true })\n this.trackVideoClick()\n }\n\n render() {\n const {\n color,\n layout,\n section: { caption, cover_image_url },\n size: { width },\n } = this.props\n const showCaption = layout !== \"feature\"\n\n return (\n <VideoContainer layout={layout} className=\"VideoContainer\">\n {cover_image_url && (\n <CoverImage\n className=\"VideoCover\"\n src={resize(cover_image_url, { width: 1200 })}\n height={width && width * VIDEO_RATIO}\n onClick={this.playVideo}\n hidden={this.state.hidden}\n >\n <VideoControls />\n </CoverImage>\n )}\n\n <IFrame\n src={this.state.src}\n frameBorder=\"0\"\n allowFullScreen\n height={width && width * VIDEO_RATIO}\n />\n\n {showCaption && (\n <Caption caption={caption} layout={layout} color={color}>\n {this.props.children}\n </Caption>\n )}\n </VideoContainer>\n )\n }\n}\n\n// Utils\nexport function isValidVideoUrl(url: string) {\n const urlExtension = url && url.split(\".\").pop()\n const isValid = DENYLIST.every(bad => urlExtension !== bad)\n return isValid\n}\n\nexport function getPlayerUrl(url) {\n const { hostname } = url\n\n if (hostname) {\n if (hostname.indexOf(\"vimeo.com\") > -1) {\n return \"https://player.vimeo.com/video/\"\n } else if (hostname.indexOf(\"youtu\") > -1) {\n return \"https://www.youtube.com/embed/\"\n }\n } else {\n return \"\" // FIXME: check for errors\n }\n}\n\nfunction getId(url) {\n const { hostname, pathname } = url\n\n if (hostname && pathname) {\n if (url.hostname.indexOf(\"youtube.com\") > 0) {\n return url.query.v\n } else {\n return url.pathname.split(\"/\").pop()\n }\n } else {\n return \"\" // FIXME: error\n }\n}\n\n// Styles\n\nexport const IFrame = styled.iframe`\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n`\n\ninterface CoverImageProps {\n src?: string\n height?: number\n layout?: ArticleLayout\n}\n\nconst VideoContainer = styled.div<CoverImageProps>`\n width: 100%;\n position: relative;\n\n ${p => {\n if (p.layout === \"feature\") {\n return `\n text-align: center;\n padding-bottom: 53px;\n max-width: 1200px;\n margin: 0 auto;\n ${breakpoint.md`\n height: 450px;\n `}\n\n ${breakpoint.xs`\n height: 300px;\n padding-bottom: 20px;\n `}\n `\n }\n }};\n`\n\nexport const CoverImage = styled.div<CoverImageProps>`\n display: ${props => (props.hidden || !props.src ? \"none\" : \"flex\")};\n justify-content: center;\n align-items: center;\n width: 100%;\n height: ${props => (props.height ? `${props.height}px` : \"100%\")};\n position: absolute;\n background: url(${props => props.src || \"\"}) no-repeat center center;\n background-size: cover;\n cursor: pointer;\n`\n\nconst sizeMeOptions = {\n refreshRate: SIZE_ME_REFRESH_RATE,\n noPlaceholder: true,\n}\n\nexport const Video = sizeMe(sizeMeOptions)(VideoComponent)\n"],"file":"Video.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artsy/reaction",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.3.0",
|
|
4
4
|
"description": "Force’s React Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://github.com/artsy/reaction.git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prettier-write": "yarn run prettier --write",
|
|
33
33
|
"relay": "relay-compiler",
|
|
34
34
|
"release": "auto shipit",
|
|
35
|
-
"sync-schema": "curl https://raw.githubusercontent.com/artsy/metaphysics/
|
|
35
|
+
"sync-schema": "curl https://raw.githubusercontent.com/artsy/metaphysics/main/_schemaV2.graphql -o data/schema.graphql; yarn prettier --write --parser graphql data/schema.graphql",
|
|
36
36
|
"sync-schema:localhost": "cd ../metaphysics && yarn dump-schema v2 ../reaction/data/",
|
|
37
37
|
"test": "ALLOW_CONSOLE_LOGS=true jest",
|
|
38
38
|
"test:watch": "jest --watch --runInBand",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"chokidar": "^3.0.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@artsy/auto-config": "1.0
|
|
50
|
-
"@artsy/lint-changed": "
|
|
49
|
+
"@artsy/auto-config": "1.1.0",
|
|
50
|
+
"@artsy/lint-changed": "5.0.2",
|
|
51
51
|
"@artsy/palette": "13.28.0",
|
|
52
52
|
"@babel/cli": "7.0.0",
|
|
53
53
|
"@babel/core": "7.7.2",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"ts-node": "8.2.0",
|
|
151
151
|
"typescript": "3.8.3",
|
|
152
152
|
"typescript-styled-plugin": "0.13.0",
|
|
153
|
-
"vscode-apollo-relay": "1.5.
|
|
153
|
+
"vscode-apollo-relay": "1.5.2",
|
|
154
154
|
"webpack": "4.29.6",
|
|
155
155
|
"webpack-bundle-analyzer": "3.4.1",
|
|
156
156
|
"webpack-merge": "4.1.2",
|