🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@astrojs/telemetry

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/telemetry - npm Package Compare versions

Comparing version
3.3.2
to
3.3.3
+1
-1
dist/index.d.ts

@@ -31,3 +31,3 @@ export type AstroTelemetryOptions = {

private get anonymousSessionId();
private get anonymousProjectInfo();
private getAnonymousProjectInfo;
private get isDisabled();

@@ -34,0 +34,0 @@ setEnabled(value: boolean): void;

@@ -61,4 +61,4 @@ import { randomBytes } from "node:crypto";

}
get anonymousProjectInfo() {
this._anonymousProjectInfo = this._anonymousProjectInfo || getProjectInfo(this.isCI);
async getAnonymousProjectInfo() {
this._anonymousProjectInfo = this._anonymousProjectInfo || await getProjectInfo(this.isCI);
return this._anonymousProjectInfo;

@@ -112,4 +112,5 @@ }

};
const anonymousProjectInfo = await this.getAnonymousProjectInfo();
const context = {
...this.anonymousProjectInfo,
...anonymousProjectInfo,
anonymousId: this.anonymousId,

@@ -116,0 +117,0 @@ anonymousSessionId: this.anonymousSessionId

@@ -48,2 +48,2 @@ /**

}
export declare function getProjectInfo(isCI: boolean): ProjectInfo;
export declare function getProjectInfo(isCI: boolean): Promise<ProjectInfo>;
import { execSync } from "node:child_process";
import { createHash } from "node:crypto";
import detectPackageManager from "which-pm-runs";
import { detect } from "package-manager-detector";
function createAnonymousValue(payload) {

@@ -44,5 +44,5 @@ if (payload === "") {

}
function getProjectInfo(isCI) {
async function getProjectInfo(isCI) {
const projectId = getProjectId(isCI);
const packageManager = detectPackageManager();
const packageManager = await detect();
return {

@@ -49,0 +49,0 @@ ...projectId,

import os from "node:os";
import { name as ciName, isCI } from "ci-info";
import isDocker from "is-docker";
import isWSL from "is-wsl";
let meta;

@@ -28,3 +27,3 @@ function getSystemInfo(versions) {

isTTY: process.stdout.isTTY,
isWSL,
isWSL: !!process.env.WSL_DISTRO_NAME,
isCI,

@@ -31,0 +30,0 @@ ciName

{
"name": "@astrojs/telemetry",
"version": "3.3.2",
"version": "3.3.3",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",

@@ -16,6 +15,3 @@ "license": "MIT",

"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
".": "./dist/index.js",
"./package.json": "./package.json"

@@ -30,8 +26,6 @@ },

"is-docker": "^4.0.0",
"is-wsl": "^3.1.1",
"which-pm-runs": "^1.1.0"
"package-manager-detector": "^1.6.0"
},
"devDependencies": {
"@types/node": "^22.10.6",
"@types/which-pm-runs": "^1.0.2",
"astro-scripts": "0.0.14"

@@ -38,0 +32,0 @@ },