New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@servicetitan/component-usage

Package Overview
Dependencies
Maintainers
7
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@servicetitan/component-usage - npm Package Compare versions

Comparing version

to
0.0.4

2

package.json
{
"name": "@servicetitan/component-usage",
"version": "0.0.3",
"version": "0.0.4",
"description": "Usage metrics of @servicetitan components",

@@ -5,0 +5,0 @@ "homepage": "https://docs.st.dev/docs/frontend/component-usage",

@@ -5,5 +5,2 @@ const DependencyReport = require('@segment/dependency-report');

// const carrotSearchFileContents = require('../static/carrotsearch.foamtree.js');
// const treemapFileContents = require('../static/treemap.html');
// FIXME: remove .test after done testing

@@ -57,6 +54,6 @@ const metricPrefix = 'far.test.componentUsage.v2';

// TODO: referencing node_modules here seems brittle...
console.log("__dirname is ", __dirname);
fs.mkdirSync(`${options.outputDir}/treemap`);
fs.copyFileSync('node_modules/@servicetitan/component-usage/static/treemap.html', `${options.outputDir}/treemap/index.html`);
fs.copyFileSync('node_modules/@servicetitan/component-usage/static/carrotsearch.foamtree.js', `${options.outputDir}/treemap/carrotsearch.foamtree.js`);
fs.copyFileSync(`${__dirname}/../static/treemap.html`, `${options.outputDir}/treemap/index.html`);
fs.copyFileSync(`${__dirname}/../static/carrotsearch.foamtree.js`, `${options.outputDir}/treemap/carrotsearch.foamtree.js`);
fs.writeFileSync(`${options.outputDir}/treemap/treemap.json`, JSON.stringify(treemap, null, 2));

@@ -113,5 +110,2 @@

const [component, pathsList] = entry;
// TODO: remove random offsets for testing data
// const componentUsageCount = Math.max(Math.floor(pathsList.length - Math.random() * 15), 0)
const componentUsageCount = pathsList.length;

@@ -118,0 +112,0 @@