Skip to content

Commit 9cf1a37

Browse files
committed
Merge branch 'release-v5.0.7' into release
2 parents 6d5a414 + 523a95d commit 9cf1a37

File tree

6 files changed

+93
-17
lines changed

6 files changed

+93
-17
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.6...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.7...main)
44

5-
# v5.0.6 (2025-09-15)
5+
# v5.0.7 (2025-11-17)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.6...v5.0.7)
8+
9+
* [#2030](https://github.com/mozilla/glean.js/pull/2030): Add "types" fields to the exports map so TypeScript 5 projects using "moduleResolution": "bundler" can correctly resolve subpath type definitions.
610

711
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.5...v5.0.6)
812

docs/reference/metrics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ In addition to those built-in metrics, the following metrics are added to the pi
2626
| glean.error.invalid_label |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counts the number of times a metric was set with an invalid label. The labels are the `category.name` identifier of the metric. |[Bug 1499761](https://bugzilla.mozilla.org/show_bug.cgi?id=1499761#c5)||never |1 |
2727
| glean.error.invalid_overflow |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counts the number of times a metric was set a value that overflowed. The labels are the `category.name` identifier of the metric. |[Bug 1591912](https://bugzilla.mozilla.org/show_bug.cgi?id=1591912#c3)||never |1 |
2828
| glean.error.invalid_state |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counts the number of times a timing metric was used incorrectly. The labels are the `category.name` identifier of the metric. |[Bug 1499761](https://bugzilla.mozilla.org/show_bug.cgi?id=1499761#c5)||never |1 |
29+
| glean.error.invalid_type |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counts the number of times a metric set a value which was not of the expected type. The labels are the `category.name` identifier of the metric. This error type is only recorded by the Glean JavaScript SDK. This error may only happen in dynamically typed languages. |[Bug 1591912](https://bugzilla.mozilla.org/show_bug.cgi?id=1591912#c3)||never |1 |
2930
| glean.error.invalid_value |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counts the number of times a metric was set to an invalid value. The labels are the `category.name` identifier of the metric. |[Bug 1499761](https://bugzilla.mozilla.org/show_bug.cgi?id=1499761#c5)||never |1 |
3031
| glean.restarted |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Event that signals an application restart. **This event is included in all pings (custom or otherwise) that contain events.** |[mozilla/glean.js#526](https://github.com/mozilla/glean.js/pull/526#issuecomment-889892100)||never |1 |
3132

glean/package-lock.json

Lines changed: 26 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glean/package.json

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,46 @@
11
{
22
"name": "@mozilla/glean",
3-
"version": "5.0.6",
3+
"version": "5.0.7",
44
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for JavaScript environments.",
55
"type": "module",
66
"sideEffects": false,
77
"exports": {
8-
"./error": "./dist/core/error/error_type.js",
8+
"./error": {
9+
"types": "./dist/types/core/error/error_type.d.ts",
10+
"import": "./dist/core/error/error_type.js",
11+
"default": "./dist/core/error/error_type.js"
12+
},
913
"./package.json": "./package.json",
10-
"./private/metrics/*": "./dist/core/metrics/types/*.js",
11-
"./private/ping": "./dist/core/pings/ping_type.js",
12-
"./uploader": "./dist/core/upload/uploader.js",
13-
"./testing": "./dist/core/testing/index.js",
14-
"./web": "./dist/entry/web.js",
15-
"./metrics": "./dist/core/glean_metrics.js"
14+
"./private/metrics/*": {
15+
"types": "./dist/types/core/metrics/types/*.d.ts",
16+
"import": "./dist/core/metrics/types/*.js",
17+
"default": "./dist/core/metrics/types/*.js"
18+
},
19+
"./private/ping": {
20+
"types": "./dist/types/core/pings/ping_type.d.ts",
21+
"import": "./dist/core/pings/ping_type.js",
22+
"default": "./dist/core/pings/ping_type.js"
23+
},
24+
"./uploader": {
25+
"types": "./dist/types/core/upload/uploader.d.ts",
26+
"import": "./dist/core/upload/uploader.js",
27+
"default": "./dist/core/upload/uploader.js"
28+
},
29+
"./testing": {
30+
"types": "./dist/types/core/testing/index.d.ts",
31+
"import": "./dist/core/testing/index.js",
32+
"default": "./dist/core/testing/index.js"
33+
},
34+
"./web": {
35+
"types": "./dist/types/entry/web.d.ts",
36+
"import": "./dist/entry/web.js",
37+
"default": "./dist/entry/web.js"
38+
},
39+
"./metrics": {
40+
"types": "./dist/types/core/glean_metrics.d.ts",
41+
"import": "./dist/core/glean_metrics.js",
42+
"default": "./dist/core/glean_metrics.js"
43+
}
1644
},
1745
"typesVersions": {
1846
"*": {

glean/src/core/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const GLEAN_SCHEMA_VERSION = 1;
88
//
99
// PACKAGE_VERSION is defined as a global by webpack,
1010
// we need a default here for testing when the app is not build with webpack.
11-
export const GLEAN_VERSION = "5.0.6";
11+
export const GLEAN_VERSION = "5.0.7";
1212

1313
// The name of a "ping" that will include Glean ping_info metrics,
1414
// such as ping sequence numbers.

glean/src/metrics.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,29 @@ glean.error:
461461
no_lint:
462462
- COMMON_PREFIX
463463

464+
invalid_type:
465+
type: labeled_counter
466+
description: |
467+
Counts the number of times a metric set a value which was not of the
468+
expected type.
469+
The labels are the `category.name` identifier of the metric.
470+
471+
This error type is only recorded by the Glean JavaScript SDK.
472+
This error may only happen in dynamically typed languages.
473+
bugs:
474+
- https://bugzilla.mozilla.org/show_bug.cgi?id=1710828
475+
data_reviews:
476+
- https://bugzilla.mozilla.org/show_bug.cgi?id=1591912#c3
477+
data_sensitivity:
478+
- technical
479+
notification_emails:
480+
- glean-team@mozilla.com
481+
expires: never
482+
send_in_pings:
483+
- all-pings
484+
no_lint:
485+
- COMMON_PREFIX
486+
464487
glean:
465488
restarted:
466489
type: event

0 commit comments

Comments
 (0)