From 6a652cfd0a326453f058d53dd5407adc1bf4b8a3 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Tue, 18 Apr 2023 00:54:41 +0300 Subject: [PATCH] 1.1.32 --- CHANGELOG.md | 4 ++++ dist/index.js | 2 +- dist/options/index.d.ts | 2 +- dist/options/index.js | 2 +- package.json | 8 ++++---- src/index.ts | 12 +++--------- src/options/index.ts | 9 +++------ 7 files changed, 17 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7674c6a..888155a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.32 + +- Cleanup + ## 1.1.31 - Switches to the files-pipe component diff --git a/dist/index.js b/dist/index.js index 456d4ac..de76af6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -import p from"critters";import o from"./options/index.js";import{files as c}from"files-pipe";import n from"files-pipe/lib/deepmerge.js";import{fileURLToPath as m}from"url";import l from"files-pipe/lib/apply-to.js";var x=(t={})=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e]===!0&&(t[e]=o[e]);t=n(o,t);const i=new Set;if(typeof t.path<"u"&&(t.path instanceof Array||t.path instanceof Set))for(const e of t.path)i.add(e);return{name:"astro-critters",hooks:{"astro:build:done":async({dir:e})=>{if(i.size||i.add(e),!!t.critters)for(const s of i){const a=await l(s,r=>r instanceof URL?m(r):r),f=new p(n(t.critters,{path:a instanceof Map?a.keys().next().value:a,logLevel:(()=>{switch(t.logger){case 0:return"silent";case 1:return"silent";case 2:return"info";default:return"info"}})()}));await(await(await(await new c(t.logger).in(s)).by("**/*.html")).not(t.exclude)).pipe(n(o.pipe,{wrote:async r=>f.process(r.buffer.toString())}))}}}}};export{x as default}; +import p from"critters";import o from"./options/index.js";import{files as c}from"files-pipe";import n from"files-pipe/dist/lib/deepmerge.js";import{fileURLToPath as m}from"url";import l from"files-pipe/dist/lib/apply-to.js";var x=(t={})=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e]===!0&&(t[e]=o[e]);t=n(o,t);const i=new Set;if(typeof t.path<"u"&&(t.path instanceof Array||t.path instanceof Set))for(const e of t.path)i.add(e);return{name:"astro-critters",hooks:{"astro:build:done":async({dir:e})=>{if(i.size||i.add(e),!!t.critters)for(const s of i){const a=await l(s,r=>r instanceof URL?m(r):r),f=new p(n(t.critters,{path:a instanceof Map?a.keys().next().value:a,logLevel:(()=>{switch(t.logger){case 0:return"silent";case 1:return"silent";case 2:return"info";default:return"info"}})()}));await(await(await(await new c(t.logger).in(s)).by("**/*.html")).not(t.exclude)).pipe(n(o.pipe,{wrote:async r=>f.process(r.buffer.toString())}))}}}}};export{x as default}; diff --git a/dist/options/index.d.ts b/dist/options/index.d.ts index ab2e29d..70df05a 100644 --- a/dist/options/index.d.ts +++ b/dist/options/index.d.ts @@ -1,5 +1,5 @@ import type { CRITTERS } from "./critters.js"; -import type { Options as OptionsBase } from "files-pipe/options/index.js"; +import type { Options as OptionsBase } from "files-pipe/dist/options/index.js"; export interface Options extends OptionsBase { [key: string]: unknown; critters?: boolean | CRITTERS; diff --git a/dist/options/index.js b/dist/options/index.js index 7152c5d..b9cbedc 100644 --- a/dist/options/index.js +++ b/dist/options/index.js @@ -1 +1 @@ -import i from"files-pipe/lib/deepmerge.js";import s from"files-pipe/options/index.js";import t from"./critters.js";var n=i(s,{critters:t,pipe:{failed:async e=>`Error: Cannot inline file ${e.inputPath}!`,fulfilled:async e=>e.files>0?`Successfully inlined a total of ${e.files} HTML ${e.files===1?"file":"files"}.`:!1,accomplished:!1}});export{n as default}; +import i from"files-pipe/dist/lib/deepmerge.js";import s from"files-pipe/dist/options/index.js";import t from"./critters.js";var n=i(s,{critters:t,pipe:{failed:async e=>`Error: Cannot inline file ${e.inputPath}!`,fulfilled:async e=>e.files>0?`Successfully inlined a total of ${e.files} HTML ${e.files===1?"file":"files"}.`:!1,accomplished:!1}});export{n as default}; diff --git a/package.json b/package.json index f2e6574..06e7a6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "astro-critters", - "version": "1.1.31", + "version": "1.1.32", "type": "module", "description": "🦔 AstroJS GoogleChromeLabs critters integration. Inline your critical CSS with Astro.", "repository": { @@ -28,11 +28,11 @@ }, "dependencies": { "critters": "0.0.16", - "files-pipe": "0.0.1" + "files-pipe": "0.0.2" }, "devDependencies": { - "@lightrix/config": "0.0.8", - "@lightrix/scripts": "0.1.6", + "@lightrix/config": "0.0.9", + "@lightrix/scripts": "0.1.7", "astro": "2.3.0" }, "publishConfig": { diff --git a/src/index.ts b/src/index.ts index 510f465..769a0d5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,19 +1,13 @@ -import type { executions, optionPath } from "files-pipe/options/index.js"; +import type { executions, optionPath } from "files-pipe/dist/options/index.js"; // @ts-ignore import Critters from "critters"; - import defaults from "./options/index.js"; - import { files } from "files-pipe"; -import deepmerge from "files-pipe/lib/deepmerge.js"; - +import deepmerge from "files-pipe/dist/lib/deepmerge.js"; import { fileURLToPath } from "url"; - -import applyTo from "files-pipe/lib/apply-to.js"; - +import applyTo from "files-pipe/dist/lib/apply-to.js"; import type { AstroIntegration } from "astro"; - import type { Options } from "./options/index.js"; export default (options: Options = {}): AstroIntegration => { diff --git a/src/options/index.ts b/src/options/index.ts index 0922878..e245f76 100644 --- a/src/options/index.ts +++ b/src/options/index.ts @@ -1,11 +1,8 @@ -import deepmerge from "files-pipe/lib/deepmerge.js"; -import defaults from "files-pipe/options/index.js"; - +import deepmerge from "files-pipe/dist/lib/deepmerge.js"; +import defaults from "files-pipe/dist/options/index.js"; import defaultsCRITTERS from "./critters.js"; - import type { CRITTERS } from "./critters.js"; - -import type { Options as OptionsBase } from "files-pipe/options/index.js"; +import type { Options as OptionsBase } from "files-pipe/dist/options/index.js"; export interface Options extends OptionsBase { [key: string]: unknown;