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

@raycast/generate-docs

Package Overview
Dependencies
Maintainers
8
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@raycast/generate-docs - npm Package Compare versions

Comparing version 0.8.6 to 0.8.8

29

index.js

@@ -60,10 +60,18 @@ #!/usr/bin/env node

const assetsPath = path.join(docsPath, ".gitbook", "assets");
const utilsPath = path.join(docsPath, "utils-reference");
const anchors = [];
const assets = [];
let hasUtilsDocs = false;
await iterateOverDocs(docsPath, (filepath, content) => {
if (filepath.startsWith(path.join(docsPath, ".gitbook", "assets"))) {
if (filepath.startsWith(assetsPath)) {
assets.push(filepath);
}
if (filepath.startsWith(utilsPath)) {
hasUtilsDocs = true;
}
if (content) {

@@ -113,3 +121,8 @@ anchors.push({ file: filepath, anchor: "", formattedAnchor: "" });

checkLinks(filepath, content, anchors);
checkLinks(
filepath,
content,
anchors,
hasUtilsDocs ? undefined : utilsPath
);
const imagesFound = checkImages(filepath, content, assets);

@@ -203,3 +216,3 @@ assetsFound = { ...assetsFound, ...imagesFound };

/** check that every relative links points to an existing document */
function checkLinks(filepath, content, anchors) {
function checkLinks(filepath, content, anchors, utilsPath) {
const links = [...content.matchAll(linkRegex)].map((x) => ({

@@ -218,2 +231,8 @@ file: filepath,

: path.resolve(path.dirname(x.file), x.link);
if (utilsPath && linkPath.startsWith(utilsPath)) {
// ignore the link to the utils when we don't have them
return;
}
if (

@@ -267,2 +286,6 @@ anchors.every(

if (!propsType.children) {
console.log(filepath, name)
}
const props = propsType.children

@@ -269,0 +292,0 @@ .filter(

2

package.json
{
"name": "@raycast/generate-docs",
"version": "0.8.6",
"version": "0.8.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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