From 0631c7de34f595168aa32bccc630aba71deed349 Mon Sep 17 00:00:00 2001 From: Christopher Pappas Date: Fri, 21 Feb 2020 22:38:28 -0800 Subject: [PATCH] [Toolchain] Add optional chaining plugin --- .babelrc | 2 ++ package.json | 2 ++ src/Artsy/Relay/renderWithLoadProgress.tsx | 2 +- src/Utils/getENV.tsx | 2 +- yarn.lock | 32 +++++++++++++++++++++- 5 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.babelrc b/.babelrc index 0b7ff71abe..69e76253c9 100644 --- a/.babelrc +++ b/.babelrc @@ -19,6 +19,8 @@ } ], "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-proposal-nullish-coalescing-operator", [ "relay", { diff --git a/package.json b/package.json index 9d5748e954..0fd2559873 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,8 @@ "@babel/plugin-proposal-class-properties": "7.3.4", "@babel/plugin-proposal-decorators": "7.3.0", "@babel/plugin-proposal-json-strings": "7.2.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/plugin-syntax-import-meta": "7.0.0", "@babel/preset-env": "7.3.4", diff --git a/src/Artsy/Relay/renderWithLoadProgress.tsx b/src/Artsy/Relay/renderWithLoadProgress.tsx index 1272705868..639b9fee04 100644 --- a/src/Artsy/Relay/renderWithLoadProgress.tsx +++ b/src/Artsy/Relay/renderWithLoadProgress.tsx @@ -71,7 +71,7 @@ export function renderWithLoadProgress

( initialProps: object = {}, wrapperProps: object = {}, spinnerProps: SpinnerProps = { - delay: 800, + delay: 1000, } ): LoadProgressRenderer

{ // TODO: We need design for retrying or the approval to use the iOS design. diff --git a/src/Utils/getENV.tsx b/src/Utils/getENV.tsx index 6fa4f12db2..9888b31dd3 100644 --- a/src/Utils/getENV.tsx +++ b/src/Utils/getENV.tsx @@ -6,7 +6,7 @@ export function getENV(ENV_VAR) { let envVar if (isServer) { const httpContext = require("express-http-context") - envVar = httpContext.get(ENV_VAR) || process.env[ENV_VAR] + envVar = httpContext.get(ENV_VAR) ?? process.env[ENV_VAR] } else { envVar = sd[ENV_VAR] } diff --git a/yarn.lock b/yarn.lock index a1f8a3ff11..c699506f37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -441,7 +441,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== -"@babel/helper-plugin-utils@^7.8.0": +"@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== @@ -676,6 +676,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" +"@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" + integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-proposal-object-rest-spread@7.4.3": version "7.4.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz#be27cd416eceeba84141305b93c282f5de23bbb4" @@ -708,6 +716,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" +"@babel/plugin-proposal-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz#ae10b3214cb25f7adb1f3bc87ba42ca10b7e2543" + integrity sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-proposal-unicode-property-regex@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" @@ -796,6 +812,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" @@ -810,6 +833,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-optional-chaining@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-typescript@^7.2.0": version "7.3.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz#a7cc3f66119a9f7ebe2de5383cce193473d65991"