From e3c4578a7fbbe4cbefc225fe1e2e63e8e061cbc9 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 22 Dec 2021 22:27:23 +0100 Subject: [PATCH] chore(deps): update eslint-config and globby --- packages/ui-templates/lib/prerender.ts | 4 ++-- packages/ui-templates/lib/render.ts | 4 ++-- packages/ui-templates/package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ui-templates/lib/prerender.ts b/packages/ui-templates/lib/prerender.ts index 6114ad5c8c..8de94df8e8 100644 --- a/packages/ui-templates/lib/prerender.ts +++ b/packages/ui-templates/lib/prerender.ts @@ -1,11 +1,11 @@ import { resolve, join } from 'path' import { promises as fsp } from 'fs' -import glob from 'globby' +import { globby } from 'globby' const r = (...path: string[]) => resolve(join(__dirname, '..', ...path)) async function main () { - const templates = await glob(r('dist/templates/*.mjs')) + const templates = await globby(r('dist/templates/*.mjs')) for (const file of templates) { const { template } = await import(file) const updated = template({ diff --git a/packages/ui-templates/lib/render.ts b/packages/ui-templates/lib/render.ts index e2808fc4bf..09f778957c 100644 --- a/packages/ui-templates/lib/render.ts +++ b/packages/ui-templates/lib/render.ts @@ -2,7 +2,6 @@ import { promises as fsp } from 'fs' import { resolve, join, dirname, basename } from 'upath' import type { Plugin } from 'vite' import Critters from 'critters' -import glob from 'globby' import template from 'lodash.template' import htmlMinifier from 'html-minifier' import { camelCase } from 'scule' @@ -19,7 +18,8 @@ export const RenderPlugin = () => { async writeBundle () { const distDir = r('dist') const critters = new Critters({ path: distDir }) - const htmlFiles = await glob(r('dist/templates/**/*.html')) + const globby = await import('globby').then(r => r.globby) + const htmlFiles = await globby(r('dist/templates/**/*.html')) const templateExports = [] diff --git a/packages/ui-templates/package.json b/packages/ui-templates/package.json index 3294224e17..52a9bb99b2 100644 --- a/packages/ui-templates/package.json +++ b/packages/ui-templates/package.json @@ -28,7 +28,7 @@ "@types/html-minifier": "^4.0.1", "@types/lodash.template": "^4.5.0", "critters": "^0.0.15", - "globby": "^11.0.4", + "globby": "^12.0.2", "html-minifier": "^4.0.0", "jiti": "^1.12.9", "lodash.template": "^4.5.0",