File tree Expand file tree Collapse file tree 9 files changed +19
-19
lines changed
Expand file tree Collapse file tree 9 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 7777 "etag" : " ^1.8.1" ,
7878 "exsolve" : " ^1.0.5" ,
7979 "fs-extra" : " ^11.3.0" ,
80- "globby" : " ^14.1.0" ,
8180 "gzip-size" : " ^7.0.0" ,
8281 "h3" : " ^1.15.3" ,
8382 "hookable" : " ^5.5.3" ,
107106 "serve-static" : " ^2.2.0" ,
108107 "source-map" : " ^0.7.4" ,
109108 "std-env" : " ^3.9.0" ,
109+ "tinyglobby" : " ^0.2.12" ,
110110 "ufo" : " ^1.6.1" ,
111111 "ultrahtml" : " ^1.6.0" ,
112112 "uncrypto" : " ^0.1.3" ,
Original file line number Diff line number Diff line change 11import { existsSync , promises as fsp } from "node:fs" ;
2- import { globby } from "globby " ;
2+ import { glob } from "tinyglobby " ;
33import { isDirectory , prettyPath } from "../utils/fs" ;
44import type { Nitro } from "nitro/types" ;
55import { join , relative , resolve } from "pathe" ;
@@ -19,7 +19,7 @@ export async function scanUnprefixedPublicAssets(nitro: Nitro) {
1919 continue ;
2020 }
2121 const includePatterns = getIncludePatterns ( nitro , asset . dir ) ;
22- const publicAssets = await globby ( includePatterns , {
22+ const publicAssets = await glob ( includePatterns , {
2323 cwd : asset . dir ,
2424 absolute : false ,
2525 dot : true ,
@@ -40,7 +40,7 @@ export async function copyPublicAssets(nitro: Nitro) {
4040 const dstDir = join ( nitro . options . output . publicDir , asset . baseURL ! ) ;
4141 if ( await isDirectory ( srcDir ) ) {
4242 const includePatterns = getIncludePatterns ( nitro , srcDir ) ;
43- const publicAssets = await globby ( includePatterns , {
43+ const publicAssets = await glob ( includePatterns , {
4444 cwd : srcDir ,
4545 absolute : false ,
4646 dot : true ,
Original file line number Diff line number Diff line change 11import { promises as fsp } from "node:fs" ;
22import createEtag from "etag" ;
3- import { globby } from "globby " ;
3+ import { glob } from "tinyglobby " ;
44import mime from "mime" ;
55import type { Nitro } from "nitro/types" ;
66import type { PublicAsset } from "nitro/types" ;
@@ -26,7 +26,7 @@ export function publicAssets(nitro: Nitro): Plugin {
2626 // #nitro-internal-virtual/public-assets-data
2727 "#nitro-internal-virtual/public-assets-data" : async ( ) => {
2828 const assets : Record < string , PublicAsset > = { } ;
29- const files = await globby ( "**" , {
29+ const files = await glob ( "**" , {
3030 cwd : nitro . options . output . publicDir ,
3131 absolute : false ,
3232 dot : true ,
Original file line number Diff line number Diff line change 11import { promises as fsp } from "node:fs" ;
22import createEtag from "etag" ;
3- import { globby } from "globby " ;
3+ import { glob } from "tinyglobby " ;
44import mime from "mime" ;
55import type { Nitro } from "nitro/types" ;
66import { resolve } from "pathe" ;
@@ -33,7 +33,7 @@ export function serverAssets(nitro: Nitro): Plugin {
3333 // Scan all assets
3434 const assets : Record < string , ResolvedAsset > = { } ;
3535 for ( const asset of nitro . options . serverAssets ) {
36- const files = await globby ( asset . pattern || "**/*" , {
36+ const files = await glob ( asset . pattern || "**/*" , {
3737 cwd : asset . dir ,
3838 absolute : false ,
3939 ignore : asset . ignore ,
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import { writeFile } from "../_utils/fs";
88import { parseTOML , parseJSONC } from "confbox" ;
99import { readGitConfig , readPackageJSON , findNearestFile } from "pkg-types" ;
1010import { defu } from "defu" ;
11- import { globby } from "globby" ;
1211import { provider } from "std-env" ;
12+ import { glob } from "tinyglobby" ;
1313import { join , resolve } from "pathe" ;
1414import {
1515 joinURL ,
@@ -70,7 +70,7 @@ export async function writeCFRoutes(nitro: Nitro) {
7070 ) ;
7171
7272 // Unprefixed assets
73- const publicAssetFiles = await globby ( "**" , {
73+ const publicAssetFiles = await glob ( "**" , {
7474 cwd : nitro . options . output . dir ,
7575 absolute : false ,
7676 dot : true ,
Original file line number Diff line number Diff line change 1- import { globby } from "globby " ;
1+ import { glob } from "tinyglobby " ;
22import type { Nitro } from "nitro/types" ;
33import { join , relative } from "pathe" ;
44import { withBase , withLeadingSlash , withoutTrailingSlash } from "ufo" ;
@@ -156,7 +156,7 @@ async function scanDir(
156156 dir : string ,
157157 name : string
158158) : Promise < FileInfo [ ] > {
159- const fileNames = await globby ( join ( name , GLOB_SCAN_PATTERN ) , {
159+ const fileNames = await glob ( join ( name , GLOB_SCAN_PATTERN ) , {
160160 cwd : dir ,
161161 dot : true ,
162162 ignore : nitro . options . ignore ,
Original file line number Diff line number Diff line change 11import { existsSync } from "node:fs" ;
22import fsp from "node:fs/promises" ;
33import zlib from "node:zlib" ;
4- import { globby } from "globby " ;
4+ import { glob } from "tinyglobby " ;
55import mime from "mime" ;
66import type { Nitro } from "nitro/types" ;
77import { resolve } from "pathe" ;
88
99export async function compressPublicAssets ( nitro : Nitro ) {
10- const publicFiles = await globby ( "**" , {
10+ const publicFiles = await glob ( "**" , {
1111 cwd : nitro . options . output . publicDir ,
1212 absolute : false ,
1313 dot : true ,
Original file line number Diff line number Diff line change 11import { promises as fsp } from "node:fs" ;
22import { colors } from "consola/utils" ;
3- import { globby } from "globby " ;
3+ import { glob } from "tinyglobby " ;
44import { gzipSize } from "gzip-size" ;
55import { dirname , relative , resolve } from "pathe" ;
66import prettyBytes from "pretty-bytes" ;
@@ -15,7 +15,7 @@ export async function generateFSTree(
1515 return ;
1616 }
1717
18- const files = await globby ( "**/*.*" , { cwd : dir , ignore : [ "*.map" ] } ) ;
18+ const files = await glob ( "**/*.*" , { cwd : dir , ignore : [ "*.map" ] } ) ;
1919
2020 const items : { file : string ; path : string ; size : number ; gzip : number } [ ] =
2121 [ ] ;
You can’t perform that action at this time.
0 commit comments