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

@xylit/ssg

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylit/ssg - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "@xylit/ssg",
"version": "0.0.5",
"version": "0.0.6",
"description": "A pure static site generator",

@@ -5,0 +5,0 @@ "homepage": "https://ssg.xylit.dev/",

@@ -1,4 +0,1 @@

import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { parse } from "acorn";

@@ -13,3 +10,3 @@ import * as walk from "acorn-walk";

[
'import { initialize as __initializeSSG } from "#src/runtime.js";',
'import { initialize as __initializeSSG } from "@xylit/ssg/runtime";',
"const __SSG = __initializeSSG(import.meta);",

@@ -36,4 +33,4 @@ "const { html, style } = __SSG",

const compile = async path => {
const source = new MagicString(await readFile(path, { encoding: "utf-8" }));
const compile = async source => {
source = new MagicString(source);

@@ -53,5 +50,5 @@ const ast = parse(source.toString(), {

const url = new URL(urlStr);
if (!url.pathname.endsWith(".ssg.js")) return next(urlStr, context);
const result = await next(urlStr, context);
const path = fileURLToPath(urlStr);
if (!url.pathname.endsWith(".ssg.js")) return result;

@@ -61,4 +58,4 @@ return {

shortCircuit: true,
source: await compile(path),
source: await compile(result.source.toString()),
};
}
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