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

astro-compress

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-compress - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

20

package.json
{
"name": "astro-compress",
"version": "2.0.5",
"version": "2.0.6",
"description": "🗜️ AstroJS compression utilities. Compress HTML, CSS, JavaScript and more!",

@@ -16,13 +16,13 @@ "keywords": [

"performance",
"svg"
"svg",
"withastro"
],
"homepage": "https://github.com/baxast/astro-compress#readme",
"homepage": "https://github.com/NikolaRHristov/AstroCompress#readme",
"bugs": {
"url": "https://github.com/baxast/astro-compress/issues"
"url": "https://github.com/NikolaRHristov/AstroCompress/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/baxast/astro-compress.git"
"url": "git+https://github.com/NikolaRHristov/AstroCompress.git"
},
"license": "MIT",
"type": "module",

@@ -32,3 +32,3 @@ "main": "./Target/Index.js",

"scripts": {
"prepublishOnly": "baxast 'Source/**/*.ts'"
"prepublishOnly": "TypeScriptESBuild 'Source/**/*.ts'"
},

@@ -39,3 +39,3 @@ "dependencies": {

"csso": "5.0.5",
"files-pipe": "2.0.8",
"files-pipe": "2.0.9",
"html-minifier-terser": "7.2.0",

@@ -47,5 +47,5 @@ "sharp": "0.32.4",

"devDependencies": {
"astro": "2.10.4",
"baxast": "0.1.0"
"astro": "2.10.7",
"typescript-esbuild": "0.1.8"
}
}

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

<h2><picture><source media="(prefers-color-scheme: dark)" srcset=https://raw.githubusercontent.com/baxast/astro-compress/main/.github/Image/DarkAstro.svg><source media="(prefers-color-scheme: light)" srcset=https://raw.githubusercontent.com/baxast/astro-compress/main/.github/Image/LightAstro.svg><img src=https://raw.githubusercontent.com/baxast/astro-compress/main/.github/Image/LightAstro.svg alt=Astro width=28></picture><span>&nbsp;</span>Related</h2><table><tbody><tr><td colspan=1 valign=top><br><a href=https://github.com/baxast/astro-critters/actions/workflows/Node.yml target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/baxast/astro-critters/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/baxast/astro-critters/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/actions/workflow/status/baxast/astro-critters/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/v/astro-critters?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/v/astro-critters?label=Version&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/v/astro-critters?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/librariesio/release/npm/astro-critters?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/librariesio/release/npm/astro-critters?label=Dependencies&amp;logo=dependabot&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/librariesio/release/npm/astro-critters?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dw/astro-critters?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dw/astro-critters?label=Downloads&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/dw/astro-critters?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><br></td><td colspan=1 valign=top><br><a href=https://github.com/baxast/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/stars/baxast/astro-critters?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/stars/baxast/astro-critters?label=stars&amp;logo=github&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/stars/baxast/astro-critters?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://github.com/baxast/astro-critters target=_blank><b>astro-critters</b></a><br><b>🦔 AstroJS GoogleChromeLabs critters integration.<br>Inline your critical CSS with Astro.<br></b></td><td colspan=1 valign=top><br><a href=https://github.com/baxast/astro-rome/actions/workflows/Node.yml target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/baxast/astro-rome/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/baxast/astro-rome/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/actions/workflow/status/baxast/astro-rome/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/v/astro-rome?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/v/astro-rome?label=Version&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/v/astro-rome?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/librariesio/release/npm/astro-rome?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/librariesio/release/npm/astro-rome?label=Dependencies&amp;logo=dependabot&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/librariesio/release/npm/astro-rome?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dw/astro-rome?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dw/astro-rome?label=Downloads&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/dw/astro-rome?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><br></td><td colspan=1 valign=top><br><a href=https://github.com/baxast/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/stars/baxast/astro-rome?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/stars/baxast/astro-rome?label=stars&amp;logo=github&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/stars/baxast/astro-rome?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://github.com/baxast/astro-rome target=_blank><b>astro-rome</b></a><br><b>🏛️ AstroJS Rome tools.<br>Format, lint and check your Astro website with Rome.<br></b></td></tr></tbody></table>
<h2><picture><source media="(prefers-color-scheme: dark)" srcset=https://raw.githubusercontent.com/NikolaRHristov/AstroCompress/main/.github/Image/DarkAstro.svg><source media="(prefers-color-scheme: light)" srcset=https://raw.githubusercontent.com/NikolaRHristov/AstroCompress/main/.github/Image/LightAstro.svg><img src=https://raw.githubusercontent.com/NikolaRHristov/AstroCompress/main/.github/Image/LightAstro.svg alt=Astro width=28></picture><span>&nbsp;</span>Related</h2><table><tbody><tr><td colspan=1 valign=top><br><a href=https://github.com/NikolaRHristov/astro-critters/actions/workflows/Node.yml target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/NikolaRHristov/astro-critters/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/NikolaRHristov/astro-critters/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/actions/workflow/status/NikolaRHristov/astro-critters/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/v/astro-critters?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/v/astro-critters?label=Version&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/v/astro-critters?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/librariesio/release/npm/astro-critters?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/librariesio/release/npm/astro-critters?label=Dependencies&amp;logo=dependabot&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/librariesio/release/npm/astro-critters?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dw/astro-critters?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dw/astro-critters?label=Downloads&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/dw/astro-critters?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><br></td><td colspan=1 valign=top><br><a href=https://github.com/NikolaRHristov/astro-critters target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/stars/NikolaRHristov/astro-critters?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/stars/NikolaRHristov/astro-critters?label=stars&amp;logo=github&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/stars/NikolaRHristov/astro-critters?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://github.com/NikolaRHristov/astro-critters target=_blank><b>astro-critters</b></a><br><b>🦔 AstroJS GoogleChromeLabs critters integration.<br>Inline your critical CSS with Astro.<br></b></td><td colspan=1 valign=top><br><a href=https://github.com/NikolaRHristov/astro-rome/actions/workflows/Node.yml target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/NikolaRHristov/astro-rome/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/NikolaRHristov/astro-rome/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/actions/workflow/status/NikolaRHristov/astro-rome/Node.yml?branch=main&amp;label=Build&amp;logo=node.js&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/v/astro-rome?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/v/astro-rome?label=Version&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/v/astro-rome?label=Version&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/librariesio/release/npm/astro-rome?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/librariesio/release/npm/astro-rome?label=Dependencies&amp;logo=dependabot&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/librariesio/release/npm/astro-rome?label=Dependencies&amp;logo=dependabot&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://npmjs.org/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dw/astro-rome?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dw/astro-rome?label=Downloads&amp;logo=npm&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/npm/dw/astro-rome?label=Downloads&amp;logo=npm&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><br></td><td colspan=1 valign=top><br><a href=https://github.com/NikolaRHristov/astro-rome target=_blank><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/stars/NikolaRHristov/astro-rome?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/stars/NikolaRHristov/astro-rome?label=stars&amp;logo=github&amp;color=white&amp;logoColor=black&amp;labelColor=white&amp;logoWidth=15"><img src="https://img.shields.io/github/stars/NikolaRHristov/astro-rome?label=stars&amp;logo=github&amp;color=black&amp;logoColor=white&amp;labelColor=black&amp;logoWidth=15"></picture></a><br><a href=https://github.com/NikolaRHristov/astro-rome target=_blank><b>astro-rome</b></a><br><b>🏛️ AstroJS Rome tools.<br>Format, lint and check your Astro website with Rome.<br></b></td></tr></tbody></table>
# [astro-compress] 🗜️
# [AstroCompress] 🗜️

@@ -13,3 +13,3 @@ This **[Astro integration][astro-integration]** brings compression utilities to

>
> `astro-compress` will not compress your requests, only your statically
> AstroCompress will not compress your requests, only your statically
> generated build and pre-rendered routes.

@@ -19,3 +19,3 @@

>
> Use `astro-compress` last in your integration list for the best optimizations.
> Use AstroCompress last in your integration list for the best optimizations.

@@ -35,3 +35,3 @@ ## Installation

To install `astro-compress`, run the following from your project directory and
To install AstroCompress, run the following from your project directory and
follow the prompts:

@@ -59,3 +59,3 @@

First, install the `astro-compress` integration like so:
First, install the AstroCompress integration like so:

@@ -134,19 +134,2 @@ ```

#### If your path is different than the Astro `outDir` be sure to update it accordingly:
**`astro.config.ts`**
```ts
import Compress from "astro-compress";
export default {
outDir: "./Target",
integrations: [
Compress({
Path: "./Target",
}),
],
};
```
#### You can add multiple paths to compress by specifying an array as the `path` variable.

@@ -241,3 +224,3 @@

[astro-compress]: https://npmjs.org/astro-compress
[AstroCompress]: https://npmjs.org/astro-compress
[csso]: https://npmjs.org/csso

@@ -244,0 +227,0 @@ [html-minifier-terser]: https://npmjs.org/html-minifier-terser

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

import e from"files-pipe/Target/Library/Bytes.js";import t from"files-pipe/Target/Library/Merge.js";import r from"files-pipe/Target/Option/Index.js";import p from"./CSS.js";import a from"./HTML.js";import f from"./Image.js";import i from"./JavaScript.js";import m from"./Map.js";import s from"./SVG.js";var d=t(r,{CSS:p,HTML:a,JavaScript:i,Image:f,SVG:s,Map:m,Pipe:{Failed:async o=>`Error: Cannot compress file ${o.Input}!`,Passed:async o=>o.Before>Buffer.byteLength(o.Buffer.toString()),Accomplished:async o=>`Compressed ${o.Input} for ${await e(o.Before-o.After)} (${((o.Before-o.After)/o.Before*100).toFixed(2)}% reduction) in ${o.Output}.`,Changed:async o=>(o.Info.Total=(o.Info.Total?o.Info.Total:0)+(o.On.Before-o.On.After),o)}});export{d as default};
import e from"files-pipe/Target/Library/Bytes.js";import o from"files-pipe/Target/Library/Merge.js";var i=o((await import("files-pipe/Target/Option/Index.js")).default,{CSS:(await import("./CSS.js")).default,HTML:(await import("./HTML.js")).default,JavaScript:(await import("./JavaScript.js")).default,Image:(await import("./Image.js")).default,SVG:(await import("./SVG.js")).default,Map:(await import("./Map.js")).default,Pipe:{Failed:async t=>`Error: Cannot compress file ${t.Input}!`,Passed:async t=>t.Before>Buffer.byteLength(t.Buffer.toString()),Accomplished:async t=>`Compressed ${t.Input} for ${await e(t.Before-t.After)} (${((t.Before-t.After)/t.Before*100).toFixed(2)}% reduction) in ${t.Output}.`,Changed:async t=>(t.Info.Total=(t.Info.Total?t.Info.Total:0)+(t.On.Before-t.On.After),t)}});export{i as default};

@@ -5,4 +5,4 @@ {

},
"extends": "baxast/Target/Configuration/TypeScript",
"extends": "typescript-esbuild/Target/Configuration/TypeScript",
"include": ["Source"]
}

Sorry, the diff of this file is not supported yet

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