From 6810b5465156a1f46728f5422eb813f47a4899b5 Mon Sep 17 00:00:00 2001 From: Noemi <45180344+unflxw@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:05:24 +0100 Subject: [PATCH] Publish packages Update version number and CHANGELOG.md. - @appsignal/javascript@1.5.0 - @appsignal/plugin-breadcrumbs-console@1.1.35 --- .../custom-backtrace-sanitization.md | 38 --------------- ...exes-with-global-flag-on--ignoreerrors-.md | 6 --- packages/javascript/CHANGELOG.md | 46 +++++++++++++++++++ packages/javascript/package.json | 2 +- packages/javascript/src/version.ts | 2 +- .../plugin-breadcrumbs-console/CHANGELOG.md | 8 ++++ .../plugin-breadcrumbs-console/package.json | 4 +- 7 files changed, 58 insertions(+), 48 deletions(-) delete mode 100644 packages/javascript/.changesets/custom-backtrace-sanitization.md delete mode 100644 packages/javascript/.changesets/fix-regexes-with-global-flag-on--ignoreerrors-.md diff --git a/packages/javascript/.changesets/custom-backtrace-sanitization.md b/packages/javascript/.changesets/custom-backtrace-sanitization.md deleted file mode 100644 index 74361e3e..00000000 --- a/packages/javascript/.changesets/custom-backtrace-sanitization.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -bump: minor -type: add ---- - -Allow custom backtrace sanitization. - -> **Warning:** This is an advanced feature meant for specific use cases. For most use cases, you should not need this functionality. If in doubt, leave `matchBacktracePaths` unset. -> -> **Using `matchBacktracePaths` will cause public sourcemap detection to fail.** If using `matchBacktracePaths`, use our private sourcemap API to upload sourcemaps to AppSignal. - -Some applications, such as those running on Electron or React Native environments, emit backtrace lines containing paths relative to the device in which the application is running. - -The unpredictability of these backtrace line paths interferes with the correct functioning of backtrace error grouping, and makes it impossible to upload sourcemaps for these files using our private sourcemap API, as it is not possible to know the expected path beforehand. - -You can set the `matchBacktracePaths` configuration to a list of one or more regexes, which will be used to attempt to match the relevant section of the backtrace line path. - -For example, suppose you have an Electron application, which your users install at unpredictable locations. Your backtrace line paths may look something like this, with the username changing for each installation: - -```sh -/Users/${USERNAME}/Applications/CoolBeans.app/Contents/Resources/app/index.js -``` - -To ignore these parts of the path that are not predictable, you can configure AppSignal to ignore everything before the `app` folder as follows: - -```js -const appsignal = new AppSignal({ - matchBacktracePaths: [ - new RegExp("CoolBeans\\.app/Contents/Resources/(.*)$") - ] -}) -``` - -If set, the `matchBacktracePaths` configuration option must contain a regular expression, or an array of one or more regular expressions, which attempt to match the whole backtrace line path. These regular expressions must have one or more match groups, such as `(.*)` in the example above, which attempt to match against the relevant segments of the backtrace line path. - -AppSignal will attempt to match the whole backtrace line path against these regular expressions in order. If any of the regular expression matches and produces a match group, AppSignal will replace the path in the backtrace line with the matched segment. - -Make sure your regular expressions provide unique and stable points of reference in the path, such as `CoolBeans.app/Contents/Resources` in the example above. diff --git a/packages/javascript/.changesets/fix-regexes-with-global-flag-on--ignoreerrors-.md b/packages/javascript/.changesets/fix-regexes-with-global-flag-on--ignoreerrors-.md deleted file mode 100644 index c0cbd69a..00000000 --- a/packages/javascript/.changesets/fix-regexes-with-global-flag-on--ignoreerrors-.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -bump: patch -type: fix ---- - -Fix an issue when regexes with the `g` global flag are used on `ignoreErrors`. Before this change, after successfully matching on an error to ignore, if the following error would also match the same regular expression, the regular expression would then fail to match it. diff --git a/packages/javascript/CHANGELOG.md b/packages/javascript/CHANGELOG.md index 75698c7a..f55fa4ba 100644 --- a/packages/javascript/CHANGELOG.md +++ b/packages/javascript/CHANGELOG.md @@ -1,5 +1,51 @@ # AppSignal for JavaScript changelog +## 1.5.0 + +_Published on 2024-11-28._ + +### Added + +- Allow custom backtrace sanitization. + + > **Warning:** This is an advanced feature meant for specific use cases. For most use cases, you should not need this functionality. If in doubt, leave `matchBacktracePaths` unset. + > + > **Using `matchBacktracePaths` will cause public sourcemap detection to fail.** If using `matchBacktracePaths`, use our private sourcemap API to upload sourcemaps to AppSignal. + + Some applications, such as those running on Electron or React Native environments, emit backtrace lines containing paths relative to the device in which the application is running. + + The unpredictability of these backtrace line paths interferes with the correct functioning of backtrace error grouping, and makes it impossible to upload sourcemaps for these files using our private sourcemap API, as it is not possible to know the expected path beforehand. + + You can set the `matchBacktracePaths` configuration to a list of one or more regexes, which will be used to attempt to match the relevant section of the backtrace line path. + + For example, suppose you have an Electron application, which your users install at unpredictable locations. Your backtrace line paths may look something like this, with the username changing for each installation: + + ```sh + /Users/${USERNAME}/Applications/CoolBeans.app/Contents/Resources/app/index.js + ``` + + To ignore these parts of the path that are not predictable, you can configure AppSignal to ignore everything before the `app` folder as follows: + + ```js + const appsignal = new AppSignal({ + matchBacktracePaths: [ + new RegExp("CoolBeans\\.app/Contents/Resources/(.*)$") + ] + }) + ``` + + If set, the `matchBacktracePaths` configuration option must contain a regular expression, or an array of one or more regular expressions, which attempt to match the whole backtrace line path. These regular expressions must have one or more match groups, such as `(.*)` in the example above, which attempt to match against the relevant segments of the backtrace line path. + + AppSignal will attempt to match the whole backtrace line path against these regular expressions in order. If any of the regular expression matches and produces a match group, AppSignal will replace the path in the backtrace line with the matched segment. + + Make sure your regular expressions provide unique and stable points of reference in the path, such as `CoolBeans.app/Contents/Resources` in the example above. + + (minor [7d9bf42](https://github.com/appsignal/appsignal-javascript/commit/7d9bf427d5d29715a851590d09fba2e8a1e4725c), [d527ce3](https://github.com/appsignal/appsignal-javascript/commit/d527ce36d8f10d301276d36d80898143497e18e6), [ea9b9d3](https://github.com/appsignal/appsignal-javascript/commit/ea9b9d3dd12d8a20b159a4035519f10303f26248)) + +### Fixed + +- Fix an issue when regexes with the `g` global flag are used on `ignoreErrors`. Before this change, after successfully matching on an error to ignore, if the following error would also match the same regular expression, the regular expression would then fail to match it. (patch [385e9c2](https://github.com/appsignal/appsignal-javascript/commit/385e9c2ff46e11e2f8489b63f582cc753d8206d3)) + ## 1.4.1 _Published on 2024-11-12._ diff --git a/packages/javascript/package.json b/packages/javascript/package.json index e9ead878..82baee5f 100644 --- a/packages/javascript/package.json +++ b/packages/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@appsignal/javascript", - "version": "1.4.1", + "version": "1.5.0", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", "repository": { diff --git a/packages/javascript/src/version.ts b/packages/javascript/src/version.ts index abdd25bf..7c6954c2 100644 --- a/packages/javascript/src/version.ts +++ b/packages/javascript/src/version.ts @@ -1,2 +1,2 @@ // Do not touch this file, auto-generated by scripts/create-version -export const VERSION = "1.4.1" +export const VERSION = "1.5.0" diff --git a/packages/plugin-breadcrumbs-console/CHANGELOG.md b/packages/plugin-breadcrumbs-console/CHANGELOG.md index c5cd827c..76fb2627 100644 --- a/packages/plugin-breadcrumbs-console/CHANGELOG.md +++ b/packages/plugin-breadcrumbs-console/CHANGELOG.md @@ -1,5 +1,13 @@ # AppSignal for plugin-breadcrumbs-console changelog +## 1.1.35 + +_Published on 2024-11-28._ + +### Changed + +- Update @appsignal/javascript dependency to 1.5.0. (patch) + ## 1.1.34 _Published on 2024-11-12._ diff --git a/packages/plugin-breadcrumbs-console/package.json b/packages/plugin-breadcrumbs-console/package.json index 6e2541ce..ad08e73d 100644 --- a/packages/plugin-breadcrumbs-console/package.json +++ b/packages/plugin-breadcrumbs-console/package.json @@ -1,6 +1,6 @@ { "name": "@appsignal/plugin-breadcrumbs-console", - "version": "1.1.34", + "version": "1.1.35", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", "repository": { @@ -25,7 +25,7 @@ "access": "public" }, "dependencies": { - "@appsignal/javascript": "=1.4.1" + "@appsignal/javascript": "=1.5.0" }, "devDependencies": { "@appsignal/types": "=3.0.1"