@@ -28,6 +28,8 @@ t.test('query-selector-all', async t => {
2828 │ └── [email protected] (production dep of b, deduped) 2929 ├─┬ [email protected] (production dep of query-selector-all-tests) 3030 │ └── [email protected] (production dep of bar) 31+ |-┬ [email protected] -> ./c (workspace) 32+ │ └── [email protected] (production dep of c, deduped) 3133 ├─┬ [email protected] (dev dep of query-selector-all-tests) 3234 │ ├─┬ [email protected] (production dep of foo, deduped) 3335 │ │ └── [email protected] (overridden peer dep of bar) @@ -65,6 +67,9 @@ t.test('query-selector-all', async t => {
6567 '1.0.0' : undefined ,
6668 '1.0.1' : yesterday ,
6769 } ,
70+ c : {
71+ '1.0.0' : today ,
72+ } ,
6873 'dash-separated-pkg' : {
6974 '1.0.0' : dayBeforeYesterday ,
7075 '2.0.0' : yesterday ,
@@ -173,6 +178,7 @@ t.test('query-selector-all', async t => {
173178 } ,
174179 } ) ,
175180 } ,
181+ c : t . fixture ( 'symlink' , '../c' ) ,
176182 foo : {
177183 node_modules : {
178184 bar : {
@@ -275,10 +281,19 @@ t.test('query-selector-all', async t => {
275281 bar : '^2.0.0' ,
276282 } ,
277283 } ) } ,
284+ c : {
285+ 'package.json' : JSON . stringify ( {
286+ name : 'c' ,
287+ version : '1.0.0' ,
288+ dependencies : {
289+ b : '^1.0.0' ,
290+ } ,
291+ } ) ,
292+ } ,
278293 'package.json' : JSON . stringify ( {
279294 name : 'query-selector-all-tests' ,
280295 version : '1.0.0' ,
281- workspaces : [ 'a' , 'b' ] ,
296+ workspaces : [ 'a' , 'b' , 'c' ] ,
282297 dependencies : {
283298 a : '^1.0.0' ,
284299 abbrev : '^1.1.1' ,
@@ -387,6 +402,7 @@ t.test('query-selector-all', async t => {
387402388403389404405+ 390406391407392408@@ -404,6 +420,7 @@ t.test('query-selector-all', async t => {
404420 [ '* > *' , [
405421406422423+ 407424408425409426@@ -425,18 +442,19 @@ t.test('query-selector-all', async t => {
425442 [ ':root > *' , [
426443427444445+ 428446429447430448431449432450433451434452 ] ] ,
435- 436- [ ':root > *.workspace' , [ '[email protected] ' , '[email protected] ' ] ] , 453+ 454+ 437455 [ ':root > .workspace[name=a]' , [ '[email protected] ' ] ] , 438456 [ ':root > [name=bar]' , [ '[email protected] ' ] ] , 439- [ ':root > .workspace[version=1.0.0]' , [ '[email protected] ' , '[email protected] ' ] ] , 457+ [ ':root > .workspace[version=1.0.0]' , [ '[email protected] ' , '[email protected] ' , '[email protected] ' ] ] , 440458 [ ':root > .workspace[name=a][version=1.0.0]' , [ '[email protected] ' ] ] , 441459 [ ':root > :root' , [ ] ] ,
442460 [ '* > :root' , [ ] ] ,
@@ -452,6 +470,7 @@ t.test('query-selector-all', async t => {
452470453471454472473+ 455474456475457476@@ -461,12 +480,12 @@ t.test('query-selector-all', async t => {
461480462481463482483+ 464484465485 ] ] ,
466486 [ ':extraneous' , [ '@npmcli/[email protected] ' ] ] , 467487 [ ':invalid' , [ '[email protected] ' ] ] , 468- 469- 488+ 470489 [ ':deduped' , [
471490472491@@ -481,6 +500,7 @@ t.test('query-selector-all', async t => {
481500482501483502503+ 484504485505486506@@ -494,34 +514,36 @@ t.test('query-selector-all', async t => {
494514495515496516 ] ] ,
497- [ ':root > .workspace:not(#b)' , [ '[email protected] ' ] ] , 498- [ ':root > .workspace > *:not(#bar)' , [ '[email protected] ' , '[email protected] ' ] ] , 517+ [ ':root > .workspace:not(#b)' , [ '[email protected] ' , '[email protected] ' ] ] , 518+ [ ':root > .workspace > *:not(#bar)' , [ '[email protected] ' , '[email protected] ' , ' [email protected] '] ] , 499519 [ '.bundled ~ :not(.workspace)' , [
500520501521502522503523504524505525 ] ] ,
506- [ '*:root > *:empty:not(*[name^=a], #b)' , [ '[email protected] ' ] ] , 526+ [ '*:root > *:empty:not(*[name^=a], #b, #c )' , [ '[email protected] ' ] ] , 507527 [ ':not(:not(:link))' , [
508528509529530+ 510531 ] ] ,
511532
512533 // has pseudo
513534 [ ':root > *:has(* > #bar:semver(1.4.0))' , [ '[email protected] ' ] ] , 514535 [ '*:has(* > #bar:semver(1.4.0))' , [ '[email protected] ' ] ] , 515536 [ '*:has(> #bar:semver(1.4.0))' , [ '[email protected] ' ] ] , 516537 [ '.workspace:has(> * > #lorem)' , [ '[email protected] ' ] ] , 517- [ '.workspace:has(* #lorem, ~ #b)' , [ '[email protected] ' , '[email protected] ' ] ] , 538+ 518539
519540 // is pseudo
520541521542 // TODO: ipsum is not empty but its child is missing so it doesn't return a
522543 // result here
523544 [ ':root > *:is(.prod:not(:empty), .dev > [name=bar]) > *' , [
524545546+ 525547526548527549@@ -538,6 +560,7 @@ t.test('query-selector-all', async t => {
538560539561540562563+ 541564542565543566@@ -557,6 +580,7 @@ t.test('query-selector-all', async t => {
557580 [ ':type(range)' , [
558581559582583+ 560584561585562586@@ -584,11 +608,12 @@ t.test('query-selector-all', async t => {
584608 [ ':path(./node_modules/bar)' , [ '[email protected] ' ] ] , 585609 [ ':path(node_modules/foo/node_modules/bar)' , [ '[email protected] ' ] ] , 586610587- 611+ 588612 [ ':path()' , [
589613590614591615616+ 592617593618594619@@ -609,6 +634,7 @@ t.test('query-selector-all', async t => {
609634610635611636637+ 612638613639614640@@ -627,6 +653,7 @@ t.test('query-selector-all', async t => {
627653628654629655656+ 630657631658632659@@ -690,6 +717,7 @@ t.test('query-selector-all', async t => {
690717691718692719720+ 693721694722695723@@ -702,6 +730,7 @@ t.test('query-selector-all', async t => {
702730703731704732733+ 705734706735707736@@ -720,6 +749,7 @@ t.test('query-selector-all', async t => {
720749721750722751752+ 723753724754725755@@ -731,6 +761,7 @@ t.test('query-selector-all', async t => {
731761732762733763764+ 734765735766736767@@ -832,6 +863,7 @@ t.test('query-selector-all', async t => {
832863833864834865866+ 835867836868837869@@ -882,15 +914,18 @@ t.test('query-selector-all', async t => {
882914883915884916917+ 885918886919887920888921889922890923891924 ] ] ,
892- 893- 925+ 926+ 927+ [ '.workspace .workspace' , [ '[email protected] ' , '[email protected] ' ] ] , 928+ [ '.workspace .workspace .workspace' , [ '[email protected] ' ] ] , 894929 [ '.workspace ~ *' , [
895930896931@@ -911,9 +946,11 @@ t.test('query-selector-all', async t => {
911946912947 ] ] ,
913948 [ '.dev *' , [
949+ 914950915951916952953+ 917954918955919956 ] ] ,
@@ -923,6 +960,7 @@ t.test('query-selector-all', async t => {
923960 [ '.bundled ~ *' , [
924961925962963+ 926964927965928966
0 commit comments