File tree Expand file tree Collapse file tree 3 files changed +22
-10
lines changed Expand file tree Collapse file tree 3 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 103
103
"execa" : " ^8.0.1" ,
104
104
"find-up" : " ^7.0.0" ,
105
105
"formik" : " ^2.2.9" ,
106
- "glob" : " ^10.0.0" ,
107
106
"istanbul-lib-report" : " ^3.0.1" ,
108
107
"pathe" : " ^1.1.2" ,
109
108
"picocolors" : " ^1.1.0" ,
112
111
"semver" : " ^7.6.3" ,
113
112
"slash" : " ^5.0.0" ,
114
113
"strip-ansi" : " ^7.1.0" ,
114
+ "tinyglobby" : " ^0.2.10" ,
115
115
"ts-dedent" : " ^2.2.0" ,
116
116
"typescript" : " ^5.3.2" ,
117
117
"vitest" : " ^2.1.3"
Original file line number Diff line number Diff line change @@ -12,9 +12,8 @@ import { readConfig, vitestTransform } from 'storybook/internal/csf-tools';
12
12
import { MainFileMissingError } from 'storybook/internal/server-errors' ;
13
13
import type { DocsOptions , StoriesEntry } from 'storybook/internal/types' ;
14
14
15
- // eslint-disable-next-line depend/ban-dependencies
16
- import { escape } from 'glob' ;
17
15
import { join , resolve } from 'pathe' ;
16
+ import { convertPathToPattern } from 'tinyglobby' ;
18
17
19
18
import type { InternalOptions , UserOptions } from './types' ;
20
19
@@ -121,11 +120,7 @@ export const storybookTest = (options?: UserOptions): Plugin => {
121
120
config . test ??= { } ;
122
121
123
122
config . test . include ??= [ ] ;
124
- config . test . include . push (
125
- // Escape magic characters in paths because they shouldn't be treated as glob patterns
126
- // Paths are resolved using `pathe` to convert Windows paths to POSIX paths first
127
- ...storiesFiles . map ( ( path ) => escape ( resolve ( path ) ) )
128
- ) ;
123
+ config . test . include . push ( ...storiesFiles . map ( ( path ) => convertPathToPattern ( path ) ) ) ;
129
124
130
125
config . test . exclude ??= [ ] ;
131
126
config . test . exclude . push ( '**/*.mdx' ) ;
Original file line number Diff line number Diff line change @@ -6623,7 +6623,6 @@ __metadata:
6623
6623
execa: "npm:^8.0.1"
6624
6624
find-up: "npm:^7.0.0"
6625
6625
formik: "npm:^2.2.9"
6626
- glob: "npm:^10.0.0"
6627
6626
istanbul-lib-report: "npm:^3.0.1"
6628
6627
pathe: "npm:^1.1.2"
6629
6628
picocolors: "npm:^1.1.0"
@@ -6634,6 +6633,7 @@ __metadata:
6634
6633
semver: "npm:^7.6.3"
6635
6634
slash: "npm:^5.0.0"
6636
6635
strip-ansi: "npm:^7.1.0"
6636
+ tinyglobby: "npm:^0.2.10"
6637
6637
ts-dedent: "npm:^2.2.0"
6638
6638
typescript: "npm:^5.3.2"
6639
6639
vitest: "npm:^2.1.3"
@@ -15759,7 +15759,7 @@ __metadata:
15759
15759
languageName: node
15760
15760
linkType: hard
15761
15761
15762
- "fdir@npm:^6.2.0":
15762
+ "fdir@npm:^6.2.0, fdir@npm:^6.4.2 ":
15763
15763
version: 6.4.2
15764
15764
resolution: "fdir@npm:6.4.2"
15765
15765
peerDependencies:
@@ -23193,6 +23193,13 @@ __metadata:
23193
23193
languageName: node
23194
23194
linkType: hard
23195
23195
23196
+ "picomatch@npm:^4.0.2":
23197
+ version: 4.0.2
23198
+ resolution: "picomatch@npm:4.0.2"
23199
+ checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc
23200
+ languageName: node
23201
+ linkType: hard
23202
+
23196
23203
"picoquery@npm:^1.4.0":
23197
23204
version: 1.4.0
23198
23205
resolution: "picoquery@npm:1.4.0"
@@ -27704,6 +27711,16 @@ __metadata:
27704
27711
languageName: node
27705
27712
linkType: hard
27706
27713
27714
+ "tinyglobby@npm:^0.2.10":
27715
+ version: 0.2.10
27716
+ resolution: "tinyglobby@npm:0.2.10"
27717
+ dependencies:
27718
+ fdir: "npm:^6.4.2"
27719
+ picomatch: "npm:^4.0.2"
27720
+ checksum: 10c0/ce946135d39b8c0e394e488ad59f4092e8c4ecd675ef1bcd4585c47de1b325e61ec6adfbfbe20c3c2bfa6fd674c5b06de2a2e65c433f752ae170aff11793e5ef
27721
+ languageName: node
27722
+ linkType: hard
27723
+
27707
27724
"tinypool@npm:^1.0.0":
27708
27725
version: 1.0.0
27709
27726
resolution: "tinypool@npm:1.0.0"
You can’t perform that action at this time.
0 commit comments