Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@docusaurus/utils

Package Overview
Dependencies
Maintainers
3
Versions
1839
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/utils - npm Package Compare versions

Comparing version 2.0.0-alpha.11 to 2.0.0-alpha.12

4

package.json
{
"name": "@docusaurus/utils",
"version": "2.0.0-alpha.11",
"version": "2.0.0-alpha.12",
"description": "Node utility functions for Docusaurus packages",

@@ -16,3 +16,3 @@ "main": "src/index.js",

},
"gitHead": "7339bfea353bea6c904b7078e370a9b224c96cca"
"gitHead": "86c24e9cf520535a8c94a1448b06df0e757677d4"
}

@@ -16,9 +16,14 @@ /**

const genCache = new Map();
const fileHash = new Map();
async function generate(generatedFilesDir, file, content) {
const cached = genCache.get(file);
if (cached !== content) {
await fs.ensureDir(generatedFilesDir);
await fs.writeFile(path.join(generatedFilesDir, file), content);
genCache.set(file, content);
const filepath = path.join(generatedFilesDir, file);
const lastHash = fileHash.get(filepath);
const currentHash = createHash('md5')
.update(content)
.digest('hex');
if (lastHash !== currentHash) {
await fs.ensureDir(path.dirname(filepath));
await fs.writeFile(filepath, content);
fileHash.set(filepath, currentHash);
}

@@ -25,0 +30,0 @@ }

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