newrelic / gatsby-plugin-newrelic

A Gatsby plugin for instrumenting your site with New Relic's Browser Agent
https://opensource.newrelic.com/projects/newrelic/gatsby-plugin-newrelic
Apache License 2.0
8 stars 19 forks source link

fixes regex on safari match for pro plus spa #8

Closed passion4code closed 4 years ago

passion4code commented 4 years ago

Fixes snippet of output of proAndSpaAgent causing syntax error to be thrown

Old: a=/Version\\/(\\S+)\\s+Safari/;

New: a=/Version\/(\S+)\s+Safari/;

Old pattern throws a syntax error when attempting to be used.

The "new" pattern is the same as what's being used in the "pro"

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

passion4code commented 4 years ago

@devfreddy Greetings, If you're not too busy, I was hoping to get this looked at. When using this plugin, there's a syntax error thrown due to some malformed regex. Ideally we would leverage this plugin rather than having to roll our own implementation of injecting the agent for Pro and SPA.

passion4code commented 4 years ago

@tangollama for your merging pleasure :)

jakemhiller commented 4 years ago

Just noticed this error in our application when trying out the plugin, is there an ETA on an NPM version with this fix?

passion4code commented 4 years ago

Pretty please :) npm publish :)

devfreddy commented 4 years ago

@jakemhiller @passion4code A fix to 1.X has been published on npm. There's an even better implementation in progress in https://github.com/newrelic/gatsby-plugin-newrelic/pull/10 which will ensure this is a non-issue in the future and keeps everything up to date.

nr-opensource-bot commented 4 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

nr-opensource-bot commented 4 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: