File tree 3 files changed +48
-0
lines changed 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ releases :
2
+ " @yarnpkg/cli " : patch
3
+ " @yarnpkg/core " : patch
4
+
5
+ declined :
6
+ - " @yarnpkg/plugin-compat"
7
+ - " @yarnpkg/plugin-constraints"
8
+ - " @yarnpkg/plugin-dlx"
9
+ - " @yarnpkg/plugin-essentials"
10
+ - " @yarnpkg/plugin-exec"
11
+ - " @yarnpkg/plugin-file"
12
+ - " @yarnpkg/plugin-git"
13
+ - " @yarnpkg/plugin-github"
14
+ - " @yarnpkg/plugin-http"
15
+ - " @yarnpkg/plugin-init"
16
+ - " @yarnpkg/plugin-interactive-tools"
17
+ - " @yarnpkg/plugin-link"
18
+ - " @yarnpkg/plugin-node-modules"
19
+ - " @yarnpkg/plugin-npm"
20
+ - " @yarnpkg/plugin-npm-cli"
21
+ - " @yarnpkg/plugin-pack"
22
+ - " @yarnpkg/plugin-patch"
23
+ - " @yarnpkg/plugin-pnp"
24
+ - " @yarnpkg/plugin-stage"
25
+ - " @yarnpkg/plugin-typescript"
26
+ - " @yarnpkg/plugin-version"
27
+ - " @yarnpkg/plugin-workspace-tools"
28
+ - " @yarnpkg/builder"
29
+ - " @yarnpkg/doctor"
30
+ - " @yarnpkg/pnpify"
Original file line number Diff line number Diff line change @@ -189,5 +189,7 @@ export class Workspace {
189
189
await xfs . changeFilePromise ( path , content , {
190
190
automaticNewlines : true ,
191
191
} ) ;
192
+
193
+ this . manifest . raw = data ;
192
194
}
193
195
}
Original file line number Diff line number Diff line change @@ -138,4 +138,20 @@ describe(`Project`, () => {
138
138
} ) ;
139
139
} ) ;
140
140
} ) ;
141
+
142
+ it ( `should update Manifest.raw when persisting a workspace` , async ( ) => {
143
+ await xfs . mktempPromise ( async path => {
144
+ await xfs . writeJsonPromise ( ppath . join ( path , Filename . manifest ) , { name : `foo` } ) ;
145
+ await xfs . writeFilePromise ( ppath . join ( path , Filename . lockfile ) , `` ) ;
146
+
147
+ const configuration = getConfiguration ( path ) ;
148
+ const { project} = await Project . find ( configuration , path ) ;
149
+
150
+ expect ( project . topLevelWorkspace . manifest . raw . main ) . toBeUndefined ( ) ;
151
+
152
+ project . topLevelWorkspace . manifest . main = `./index.js` as PortablePath ;
153
+ await project . topLevelWorkspace . persistManifest ( ) ;
154
+ expect ( project . topLevelWorkspace . manifest . raw . main ) . toEqual ( `./index.js` ) ;
155
+ } ) ;
156
+ } ) ;
141
157
} ) ;
You can’t perform that action at this time.
0 commit comments