@mozilla/glean
Advanced tools
Comparing version 2.0.5 to 3.0.0-pre.0
@@ -11,3 +11,3 @@ #!/usr/bin/env node | ||
const VIRTUAL_ENVIRONMENT_DIR = process.env.VIRTUAL_ENV || path.join(process.cwd(), ".venv"); | ||
const GLEAN_PARSER_VERSION = "8.1"; | ||
const GLEAN_PARSER_VERSION = "10.0.3"; | ||
const PYTHON_SCRIPT = ` | ||
@@ -14,0 +14,0 @@ import importlib |
@@ -13,4 +13,2 @@ import { DEFAULT_TELEMETRY_ENDPOINT, GLEAN_MAX_SOURCE_TAGS } from "./constants.js"; | ||
this.appDisplayVersion = config === null || config === void 0 ? void 0 : config.appDisplayVersion; | ||
this.architecture = config === null || config === void 0 ? void 0 : config.architecture; | ||
this.osVersion = config === null || config === void 0 ? void 0 : config.osVersion; | ||
this.buildDate = config === null || config === void 0 ? void 0 : config.buildDate; | ||
@@ -17,0 +15,0 @@ this.maxEvents = (config === null || config === void 0 ? void 0 : config.maxEvents) || DEFAULT_MAX_EVENTS; |
export const GLEAN_SCHEMA_VERSION = 1; | ||
export const GLEAN_VERSION = "2.0.5"; | ||
export const GLEAN_VERSION = "3.0.0-pre.0"; | ||
export const PING_INFO_STORAGE = "glean_ping_info"; | ||
@@ -4,0 +4,0 @@ export const CLIENT_INFO_STORAGE = "glean_client_info"; |
@@ -88,4 +88,4 @@ import { KNOWN_CLIENT_ID, CLIENT_INFO_STORAGE } from "../constants.js"; | ||
await this.os.setUndispatched(await Context.platform.info.os()); | ||
await this.osVersion.setUndispatched(await Context.platform.info.osVersion(Context.config.osVersion)); | ||
await this.architecture.setUndispatched(await Context.platform.info.arch(Context.config.architecture)); | ||
await this.osVersion.setUndispatched(await Context.platform.info.osVersion()); | ||
await this.architecture.setUndispatched(await Context.platform.info.arch()); | ||
await this.locale.setUndispatched(await Context.platform.info.locale()); | ||
@@ -92,0 +92,0 @@ await this.appBuild.setUndispatched(Context.config.appBuild || "Unknown"); |
@@ -96,4 +96,4 @@ import { KNOWN_CLIENT_ID, CLIENT_INFO_STORAGE } from "../constants.js"; | ||
this.os.set(Context.platform.info.os()); | ||
this.osVersion.set(Context.platform.info.osVersion(Context.config.osVersion)); | ||
this.architecture.set(Context.platform.info.arch(Context.config.architecture)); | ||
this.osVersion.set(Context.platform.info.osVersion()); | ||
this.architecture.set(Context.platform.info.arch()); | ||
this.locale.set(Context.platform.info.locale()); | ||
@@ -100,0 +100,0 @@ this.appBuild.set(Context.config.appBuild || "Unknown"); |
@@ -12,7 +12,3 @@ import { Context } from "../context.js"; | ||
this.type = type; | ||
try { | ||
this.name = "MetricValidationError"; | ||
} | ||
catch (_a) { | ||
} | ||
this.name = "MetricValidationError"; | ||
} | ||
@@ -19,0 +15,0 @@ async recordError(metric) { |
@@ -30,2 +30,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
this.reasonCodes = (_a = meta.reasonCodes) !== null && _a !== void 0 ? _a : []; | ||
this.preciseTimestamps = meta.preciseTimestamps; | ||
} | ||
@@ -32,0 +33,0 @@ submit(reason) { |
@@ -22,4 +22,2 @@ import type Plugin from "../plugins/index.js"; | ||
httpClient?: Uploader; | ||
readonly architecture?: string; | ||
readonly osVersion?: string; | ||
readonly buildDate?: Date; | ||
@@ -33,4 +31,2 @@ readonly migrateFromLegacyStorage?: boolean; | ||
readonly serverEndpoint: string; | ||
readonly architecture?: string; | ||
readonly osVersion?: string; | ||
readonly buildDate?: Date; | ||
@@ -37,0 +33,0 @@ readonly maxEvents: number; |
export declare const GLEAN_SCHEMA_VERSION = 1; | ||
export declare const GLEAN_VERSION = "2.0.5"; | ||
export declare const GLEAN_VERSION = "3.0.0-pre.0"; | ||
export declare const PING_INFO_STORAGE = "glean_ping_info"; | ||
@@ -4,0 +4,0 @@ export declare const CLIENT_INFO_STORAGE = "glean_client_info"; |
@@ -9,2 +9,3 @@ /** | ||
readonly reasonCodes?: string[]; | ||
readonly preciseTimestamps?: boolean; | ||
} |
@@ -9,2 +9,3 @@ import type CommonPingData from "./common_ping_data.js"; | ||
readonly reasonCodes: string[]; | ||
readonly preciseTimestamps?: boolean; | ||
private resolveTestPromiseFunction?; | ||
@@ -11,0 +12,0 @@ private rejectTestPromiseFunction?; |
import type { IPlatformInfo, KnownOperatingSystems } from "../platform_info/shared.js"; | ||
interface PlatformInfo extends IPlatformInfo { | ||
os(): Promise<KnownOperatingSystems>; | ||
osVersion(fallback?: string): Promise<string>; | ||
arch(fallback?: string): Promise<string>; | ||
osVersion(): Promise<string>; | ||
arch(): Promise<string>; | ||
locale(): Promise<string>; | ||
} | ||
export default PlatformInfo; |
@@ -32,13 +32,11 @@ import type { OptionalAsync } from "../types"; | ||
* | ||
* @param fallback A fallback value in case Glean is unable to retrieve this value from the environment. | ||
* @returns The current OS version. | ||
*/ | ||
osVersion(fallback?: string): OptionalAsync<string>; | ||
osVersion(): OptionalAsync<string>; | ||
/** | ||
* Gets and returns the current system architecture. | ||
* | ||
* @param fallback A fallback value in case Glean is unable to retrieve this value from the environment. | ||
* @returns The current system architecture. | ||
*/ | ||
arch(fallback?: string): OptionalAsync<string>; | ||
arch(): OptionalAsync<string>; | ||
/** | ||
@@ -45,0 +43,0 @@ * Gets and returns the current system / browser locale. |
import type { IPlatformInfo, KnownOperatingSystems } from "../platform_info/shared.js"; | ||
interface PlatformInfoSync extends IPlatformInfo { | ||
os(): KnownOperatingSystems; | ||
osVersion(fallback?: string): string; | ||
arch(fallback?: string): string; | ||
osVersion(): string; | ||
arch(): string; | ||
locale(): string; | ||
} | ||
export default PlatformInfoSync; |
import type { ConfigurationInterface } from "../../core/config.js"; | ||
export declare type RestrictedConfigurationInterface = Omit<ConfigurationInterface, "architecture" | "osVersion">; | ||
export interface IGlean { | ||
@@ -4,0 +3,0 @@ /** |
{ | ||
"name": "@mozilla/glean", | ||
"version": "2.0.5", | ||
"version": "3.0.0-pre.0", | ||
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for JavaScript environments.", | ||
@@ -73,8 +73,6 @@ "type": "module", | ||
"fix": "eslint . --ext .ts,.js,.json --fix", | ||
"build": "run-s build:no-qt build:qt", | ||
"build:no-qt": "rimraf dist && run-s build:cli build:lib build:types", | ||
"build": "rimraf dist && run-s build:cli build:lib build:types", | ||
"build:cli": "tsc -p ./tsconfig/cli.json", | ||
"build:lib": "tsc -p ./tsconfig/lib.json", | ||
"build:types": "tsc -p ./tsconfig/types.json", | ||
"build:qt": "rimraf dist/qt && webpack --config webpack.config.qt.js && ../bin/prepare-qml-module.sh", | ||
"build:docs": "rimraf dist/docs && typedoc --entryPointStrategy expand ./src --out dist/docs --tsconfig tsconfig/docs.json", | ||
@@ -107,3 +105,2 @@ "build:metrics-docs": "npm run cli -- translate src/metrics.yaml src/pings.yaml -o ../docs/reference/ --format markdown --allow-reserved", | ||
"@types/sinon": "^10.0.0", | ||
"@types/sqlite3": "^3.1.7", | ||
"@types/uuid": "^9.0.1", | ||
@@ -113,3 +110,3 @@ "@typescript-eslint/eslint-plugin": "^5.0.0", | ||
"eslint": "^8.0.1", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-import": "2.29.0", | ||
"eslint-plugin-jsdoc": "^39.2.9", | ||
@@ -121,3 +118,3 @@ "eslint-plugin-json": "^3.0.0", | ||
"geckodriver": "^4.1.3", | ||
"gh-pages": "^5.0.0", | ||
"gh-pages": "^6.0.0", | ||
"jsdom": "22.1.0", | ||
@@ -136,3 +133,2 @@ "jsdom-global": "3.0.2", | ||
"sinon": "^15.0.1", | ||
"sqlite3": "^5.0.2", | ||
"terser-webpack-plugin": "^5.2.4", | ||
@@ -139,0 +135,0 @@ "ts-loader": "^9.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39
471190
12082
1