@@ -33,9 +33,10 @@ it('pnpm catalog', async () => {
33
33
34
34
expect ( result . packages . map ( p => p . name ) ) . toMatchInlineSnapshot ( `
35
35
[
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",
39
40
"@taze/monorepo-example",
40
41
]
41
42
` )
@@ -48,7 +49,7 @@ it('pnpm catalog', async () => {
48
49
) . toMatchInlineSnapshot ( `
49
50
[
50
51
{
51
- "name": "catalog:default",
52
+ "name": "pnpm- catalog:default",
52
53
"packages": [
53
54
[
54
55
"react",
@@ -61,7 +62,7 @@ it('pnpm catalog', async () => {
61
62
],
62
63
},
63
64
{
64
- "name": "catalog:react17",
65
+ "name": "pnpm- catalog:react17",
65
66
"packages": [
66
67
[
67
68
"react",
@@ -74,7 +75,7 @@ it('pnpm catalog', async () => {
74
75
],
75
76
},
76
77
{
77
- "name": "catalog:react18",
78
+ "name": "pnpm- catalog:react18",
78
79
"packages": [
79
80
[
80
81
"react",
@@ -86,6 +87,15 @@ it('pnpm catalog', async () => {
86
87
],
87
88
],
88
89
},
90
+ {
91
+ "name": "pnpm-workspace:overrides",
92
+ "packages": [
93
+ [
94
+ "vue",
95
+ "~3.3.0",
96
+ ],
97
+ ],
98
+ },
89
99
{
90
100
"name": "@taze/monorepo-example",
91
101
"packages": [
@@ -133,12 +143,12 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
133
143
const context = parsePnpmWorkspaceYaml ( workspaceYamlContents )
134
144
const pkg : PnpmWorkspaceMeta = {
135
145
type : 'pnpm-workspace.yaml' ,
136
- name : 'catalog:default' ,
146
+ name : 'pnpm- catalog:default' ,
137
147
resolved : [
138
148
// 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 ,
140
150
// 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 ,
142
152
] ,
143
153
raw : context . toJSON ( ) ,
144
154
context,
@@ -151,10 +161,11 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
151
161
await pnpmWorkspaces . writePnpmWorkspace ( pkg , { } )
152
162
153
163
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
+ ` )
158
169
} )
159
170
160
171
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', () => {
168
179
`
169
180
const context = parsePnpmWorkspaceYaml ( workspaceYamlContents )
170
181
const pkg : PnpmWorkspaceMeta = {
171
- name : 'catalog:default' ,
182
+ name : 'pnpm- catalog:default' ,
172
183
resolved : [
173
184
// 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 ,
175
186
// 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 ,
177
188
] ,
178
189
raw : context . toJSON ( ) ,
179
190
context,
@@ -186,12 +197,13 @@ describe('pnpm catalog update w/ yaml anchors and aliases', () => {
186
197
}
187
198
await pnpmWorkspaces . writePnpmWorkspace ( pkg , { } )
188
199
expect ( output ) . toMatchInlineSnapshot ( `
189
- "defines:
190
- - &react ^18.3.1
200
+ "defines:
201
+ - &react ^18.3.1
191
202
192
- catalog:
193
- react: *react
194
- react-dom: *react
195
- "` )
203
+ catalog:
204
+ react: *react
205
+ react-dom: *react
206
+ "
207
+ ` )
196
208
} )
197
209
} )
0 commit comments