Commit 56b50900 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'psi-chaining' into 'master'

Support optional chaining operator in JS

Closes gitlab-org/frontend/rfcs#11

See merge request gitlab-org/gitlab!21621
parents e2685e00 e5efa225
...@@ -21,6 +21,7 @@ const plugins = [ ...@@ -21,6 +21,7 @@ const plugins = [
'@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-json-strings', '@babel/plugin-proposal-json-strings',
'@babel/plugin-proposal-private-methods', '@babel/plugin-proposal-private-methods',
'@babel/plugin-proposal-optional-chaining',
]; ];
// add code coverage tooling if necessary // add code coverage tooling if necessary
......
...@@ -62,8 +62,8 @@ export default { ...@@ -62,8 +62,8 @@ export default {
...this.diffFileCommentForm, ...this.diffFileCommentForm,
}); });
const diffFileHeadSha = // eslint-disable-next-line camelcase
this.commit && this.diffFile && this.diffFile.diff_refs && this.diffFile.diff_refs.head_sha; const diffFileHeadSha = this.commit && this?.diffFile?.diff_refs?.head_sha;
postData.data.note.commit_id = diffFileHeadSha || null; postData.data.note.commit_id = diffFileHeadSha || null;
......
...@@ -278,6 +278,14 @@ ...@@ -278,6 +278,14 @@
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
"@babel/plugin-proposal-optional-chaining@^7.7.5":
version "7.7.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.7.5.tgz#f0835f044cef85b31071a924010a2a390add11d4"
integrity sha512-sOwFqT8JSchtJeDD+CjmWCaiFoLxY4Ps7NjvwHC/U7l4e9i5pTRNt8nDMIFSOUL+ncFbYSwruHM8WknYItWdXw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-chaining" "^7.7.4"
"@babel/plugin-proposal-private-methods@^7.6.0": "@babel/plugin-proposal-private-methods@^7.6.0":
version "7.6.0" version "7.6.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.6.0.tgz#19ddc493c7b5d47afdd4291e740c609a83c9fae4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.6.0.tgz#19ddc493c7b5d47afdd4291e740c609a83c9fae4"
...@@ -337,6 +345,13 @@ ...@@ -337,6 +345,13 @@
dependencies: dependencies:
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-chaining@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.7.4.tgz#c91fdde6de85d2eb8906daea7b21944c3610c901"
integrity sha512-2MqYD5WjZSbJdUagnJvIdSfkb/ucOC9/1fRJxm7GAxY6YQLWlUvkfxoNbUPcPLHJyetKUDQ4+yyuUyAoc0HriA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-arrow-functions@^7.2.0": "@babel/plugin-transform-arrow-functions@^7.2.0":
version "7.2.0" version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment