@@ -33,9 +33,10 @@ it('pnpm catalog', async () => {
3333
3434 expect ( result . packages . map ( p => p . name ) ) . toMatchInlineSnapshot ( `
3535 [
36- "catalog:default",
37- "catalog:react17",
38- "catalog:react18",
36+ "pnpm-catalog:default",
37+ "pnpm-catalog:react17",
38+ "pnpm-catalog:react18",
39+ "pnpm-workspace:overrides",
3940 "@taze/monorepo-example",
4041 ]
4142 ` )
@@ -48,7 +49,7 @@ it('pnpm catalog', async () => {
4849 ) . toMatchInlineSnapshot ( `
4950 [
5051 {
51- "name": "catalog:default",
52+ "name": "pnpm- catalog:default",
5253 "packages": [
5354 [
5455 "react",
@@ -61,7 +62,7 @@ it('pnpm catalog', async () => {
6162 ],
6263 },
6364 {
64- "name": "catalog:react17",
65+ "name": "pnpm- catalog:react17",
6566 "packages": [
6667 [
6768 "react",
@@ -74,7 +75,7 @@ it('pnpm catalog', async () => {
7475 ],
7576 },
7677 {
77- "name": "catalog:react18",
78+ "name": "pnpm- catalog:react18",
7879 "packages": [
7980 [
8081 "react",
@@ -86,6 +87,15 @@ it('pnpm catalog', async () => {
8687 ],
8788 ],
8889 },
90+ {
91+ "name": "pnpm-workspace:overrides",
92+ "packages": [
93+ [
94+ "vue",
95+ "~3.3.0",
96+ ],
97+ ],
98+ },
8999 {
90100 "name": "@taze/monorepo-example",
91101 "packages": [
@@ -133,12 +143,12 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
133143 const context = parsePnpmWorkspaceYaml ( workspaceYamlContents )
134144 const pkg : PnpmWorkspaceMeta = {
135145 type : 'pnpm-workspace.yaml' ,
136- name : 'catalog:default' ,
146+ name : 'pnpm- catalog:default' ,
137147 resolved : [
138148 // testing purpose
139- { name : 'react' , targetVersion : '^18.3.1' , source : 'pnpm:catalog ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
149+ { name : 'react' , targetVersion : '^18.3.1' , source : 'pnpm-workspace ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
140150 // testing purpose
141- { name : 'react-dom' , targetVersion : '^18.3.1' , source : 'pnpm:catalog ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
151+ { name : 'react-dom' , targetVersion : '^18.3.1' , source : 'pnpm-workspace ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
142152 ] ,
143153 raw : context . toJSON ( ) ,
144154 context,
@@ -151,10 +161,11 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
151161 await pnpmWorkspaces . writePnpmWorkspace ( pkg , { } )
152162
153163 expect ( output ) . toMatchInlineSnapshot ( `
154- "catalog:
155- react: &foo ^18.3.1
156- react-dom: *foo
157- "` )
164+ "catalog:
165+ react: &foo ^18.3.1
166+ react-dom: *foo
167+ "
168+ ` )
158169 } )
159170
160171 it ( 'should preserve yaml anchors and aliases with single string value, when anchor is defined in a separate field' , async ( ) => {
@@ -168,12 +179,12 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
168179 `
169180 const context = parsePnpmWorkspaceYaml ( workspaceYamlContents )
170181 const pkg : PnpmWorkspaceMeta = {
171- name : 'catalog:default' ,
182+ name : 'pnpm- catalog:default' ,
172183 resolved : [
173184 // testing purpose
174- { name : 'react' , targetVersion : '^18.3.1' , source : 'pnpm:catalog ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
185+ { name : 'react' , targetVersion : '^18.3.1' , source : 'pnpm-workspace ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
175186 // testing purpose
176- { name : 'react-dom' , targetVersion : '^18.3.1' , source : 'pnpm:catalog ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
187+ { name : 'react-dom' , targetVersion : '^18.3.1' , source : 'pnpm-workspace ' , update : true , currentVersion : '^18.2.0' , diff : 'minor' } as any ,
177188 ] ,
178189 raw : context . toJSON ( ) ,
179190 context,
@@ -186,12 +197,13 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
186197 }
187198 await pnpmWorkspaces . writePnpmWorkspace ( pkg , { } )
188199 expect ( output ) . toMatchInlineSnapshot ( `
189- "defines:
190- - &react ^18.3.1
200+ "defines:
201+ - &react ^18.3.1
191202
192- catalog:
193- react: *react
194- react-dom: *react
195- "` )
203+ catalog:
204+ react: *react
205+ react-dom: *react
206+ "
207+ ` )
196208 } )
197209} )
0 commit comments