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

FXA-5679-l-10-n-export-is-broken-fatal-error-unexpected-token-93-10 #13904

Conversation

dschom
Copy link
Contributor

@dschom dschom commented Aug 8, 2022

Because

  • The npx grunt l10n-extract was breaking due to optional chaining syntax present in sentry.js
  • The l10n-extract uses the acorn parser under the hood, which doesn't appear to like optional chaining syntax.

This pull request

  • Ensures there is no optional chaining syntax present in the sentry.js file.

Issue that this pull request solves

Closes: #13893

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

@dschom dschom requested a review from a team as a code owner August 8, 2022 20:29
let errorDetails = null;
if (err != null && err.details instanceof Map) {
errorDetails = err.details.get('body');
}

if (errorDetails) {
const message = `${errorDetails}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Is this used somewhere that I'm not seein'?
Ah, seems to be used on L119 below and is some stringified version of the errorDetails object.

packages/fxa-content-server/server/lib/sentry.js Outdated Show resolved Hide resolved
Because:
- The `npx grunt l10n-extract` was breaking due to optional chaining syntax present in sentry.js
- The l10n-extract uses the acorn parser under the hood, which doesn't appear to like optional chaining syntax.

This Commit:
- Ensures there is no optional chaining syntax present in the sentry.js file.
@dschom dschom force-pushed the FXA-5679-l-10-n-export-is-broken-fatal-error-unexpected-token-93-10 branch from e3d82b8 to 8b741d2 Compare August 9, 2022 16:49
@dschom dschom merged commit b3947c8 into main Aug 9, 2022
@dschom dschom deleted the FXA-5679-l-10-n-export-is-broken-fatal-error-unexpected-token-93-10 branch September 23, 2022 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

l10n export is broken (Fatal error: Unexpected token (93:10))
3 participants