@servicetitan/component-usage
Advanced tools
Comparing version
{ | ||
"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 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
-100%154404
-0.25%910
-0.44%