Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mozilla/glean

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mozilla/glean - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/entry/base.js

2

dist/core/constants.js
export const GLEAN_SCHEMA_VERSION = 1;
export const GLEAN_VERSION = "1.0.0";
export const GLEAN_VERSION = "1.1.0";
export const PING_INFO_STORAGE = "glean_ping_info";

@@ -4,0 +4,0 @@ export const CLIENT_INFO_STORAGE = "glean_client_info";

@@ -37,3 +37,3 @@ import { GLEAN_RESERVED_EXTRA_KEYS } from "../../constants.js";

validate(v) {
if (!isObject(v) || ![3, 4].includes(Object.keys(v).length)) {
if (!isObject(v)) {
return {

@@ -40,0 +40,0 @@ type: MetricValidation.Error,

@@ -1,2 +0,2 @@

import { isObject, isJSONValue, isString } from "../utils.js";
import { isNumber, isObject, isJSONValue, isString } from "../utils.js";
import log, { LoggingLevel } from "../log.js";

@@ -14,7 +14,8 @@ import { DELETION_REQUEST_PING_NAME } from "../constants.js";

export function isValidPingInternalRepresentation(v) {
if (isObject(v) && (Object.keys(v).length === 2 || Object.keys(v).length === 3)) {
if (isObject(v)) {
const hasValidCollectionDate = "collectionDate" in v && isString(v.collectionDate) && isNumber(new Date(v.collectionDate).getTime());
const hasValidPath = "path" in v && isString(v.path);
const hasValidPayload = "payload" in v && isJSONValue(v.payload) && isObject(v.payload);
const hasValidHeaders = (!("headers" in v)) || (isJSONValue(v.headers) && isObject(v.headers));
if (!hasValidPath || !hasValidPayload || !hasValidHeaders) {
if (!hasValidCollectionDate || !hasValidPath || !hasValidPayload || !hasValidHeaders) {
return false;

@@ -58,3 +59,3 @@ }

else {
log(LOG_TAG, "Unexpected data found in pings database. Deleting.", LoggingLevel.Warn);
log(LOG_TAG, `Unexpected data found in pings database: ${JSON.stringify(ping, null, 2)}. Deleting.`, LoggingLevel.Warn);
await this.store.delete([identifier]);

@@ -61,0 +62,0 @@ }

import https from "https";
import http from "http";
import { isString } from "../../core/utils.js";
import log, { LoggingLevel } from "../../core/log.js";

@@ -33,3 +34,3 @@ import Uploader, { UploadResult, DEFAULT_UPLOAD_TIMEOUT_MS } from "../../core/upload/uploader.js";

});
request.end(body);
request.end(isString(body) ? body : Buffer.from(body.buffer));
});

@@ -36,0 +37,0 @@ }

export declare const GLEAN_SCHEMA_VERSION = 1;
export declare const GLEAN_VERSION = "1.0.0";
export declare const GLEAN_VERSION = "1.1.0";
export declare const PING_INFO_STORAGE = "glean_ping_info";

@@ -4,0 +4,0 @@ export declare const CLIENT_INFO_STORAGE = "glean_client_info";

{
"name": "@mozilla/glean",
"version": "1.0.0",
"version": "1.1.0",
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for JavaScript environments.",

@@ -8,2 +8,3 @@ "type": "module",

"exports": {
"./error": "./dist/core/error/error_type.js",
"./package.json": "./package.json",

@@ -15,5 +16,5 @@ "./private/metrics/*": "./dist/core/metrics/types/*.js",

"./testing": "./dist/core/testing/index.js",
"./node": "./dist/index/node.js",
"./webext": "./dist/index/webext.js",
"./web": "./dist/index/web.js"
"./node": "./dist/entry/node.js",
"./webext": "./dist/entry/webext.js",
"./web": "./dist/entry/web.js"
},

@@ -23,9 +24,9 @@ "typesVersions": {

"webext": [
"./dist/types/index/webext.d.ts"
"./dist/types/entry/webext.d.ts"
],
"node": [
"./dist/types/index/node.d.ts"
"./dist/types/entry/node.d.ts"
],
"web": [
"./dist/types/index/web.d.ts"
"./dist/types/entry/web.d.ts"
],

@@ -46,2 +47,5 @@ "private/ping": [

"./dist/types/core/testing/index.d.ts"
],
"error": [
"./dist/types/core/error/error_type.d.ts"
]

@@ -73,3 +77,4 @@ }

"fix": "eslint . --ext .ts,.js,.json --fix",
"build": "rm -rf dist && run-s build:cli build:lib build:types build:qt",
"build": "run-s build:no-qt build:qt",
"build:no-qt": "rm -rf dist && run-s build:cli build:lib build:types",
"build:cli": "tsc -p ./tsconfig/cli.json",

@@ -112,3 +117,3 @@ "build:lib": "tsc -p ./tsconfig/lib.json",

"eslint-plugin-import": "2.25.4",
"eslint-plugin-jsdoc": "^38.0.4",
"eslint-plugin-jsdoc": "^39.2.9",
"eslint-plugin-json": "^3.0.0",

@@ -115,0 +120,0 @@ "eslint-plugin-mocha": "^10.0.1",

@@ -32,5 +32,5 @@ # Glean.js

* Find us in the [#glean channel on chat.mozilla.org](https://chat.mozilla.org/#/room/#glean:mozilla.org).
* To report issues or request changes, file a bug in [Bugzilla in Data Platform & Tools :: Glean.js](https://bugzilla.mozilla.org/enter_bug.cgi?product=Data+Platform+and+Tools&component=Glean.js&priority=P4&status_whiteboard=%5Btelemetry%3Aglean-js%3Am%3F%5D).
* To report issues or request changes, file a bug in [Bugzilla in Data Platform & Tools :: Glean SDK](https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&bug_ignored=0&bug_severity=normal&bug_status=NEW&bug_type=defect&cf_fx_iteration=---&cf_fx_points=---&cf_status_firefox100=---&cf_status_firefox101=---&cf_status_firefox99=---&cf_status_firefox_esr91=---&cf_tracking_firefox100=---&cf_tracking_firefox101=---&cf_tracking_firefox99=---&cf_tracking_firefox_esr91=---&component=Glean%3A%20SDK&contenttypemethod=list&contenttypeselection=text%2Fplain&defined_groups=1&filed_via=standard_form&flag_type-4=X&flag_type-607=X&flag_type-721=X&flag_type-737=X&flag_type-799=X&flag_type-800=X&flag_type-803=X&flag_type-936=X&flag_type-947=X&form_name=enter_bug&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=Unspecified&priority=P3&product=Data%20Platform%20and%20Tools&rep_platform=Unspecified&status_whiteboard=%5Bglean-sdk%3Am%3F%5D%5Bglean-js%5D&target_milestone=---&version=unspecified).
* Send an email to *glean-team@mozilla.com*.
* The Glean Core team is: *:dexter*, *:janerik*, *:mdroettboom*, *:travis_*, *:chutten*, *:brizental*.
* The Glean SDKs team is: *:dexter*, *:janerik*, *:travis_*, *:chutten*.

@@ -37,0 +37,0 @@ ## Credits

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc