File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,34 @@ const overridePnpm = async () => {
9090 } , { } ) ;
9191
9292 const pkgJsonData = await fs . readJSON ( pkgJsonPath ) ;
93+ const prev = Object . keys ( pkgJsonData . pnpm . overrides ) ;
94+ const next = Object . keys ( overrides ) ;
9395
9496 pkgJsonData . pnpm . overrides = overrides ;
95-
9697 await fs . writeJSON ( pkgJsonPath , pkgJsonData , { spaces : 2 } ) ;
9798
9899 console . log (
99100 "Your CoSpace's workspace links have been overriden. Run `pnpm install`, `pnpm build` and you're good to go!"
100101 ) ;
102+
103+ const removed = prev . filter ( ( name ) => ! next . includes ( name ) ) ;
104+ const added = next . filter ( ( name ) => ! prev . includes ( name ) ) ;
105+
106+ if ( removed . length ) {
107+ console . log (
108+ `\nYou removed the following packages from your CoSpace:\n- ${ removed . join (
109+ "\n- "
110+ ) } `
111+ ) ;
112+ }
113+ if ( added . length ) {
114+ console . log (
115+ `\nYou added the following packages to your CoSpace:\n- ${ added . join (
116+ "\n- "
117+ ) } `
118+ ) ;
119+ }
120+
101121} ;
102122
103123const purge = async ( ) => {
Original file line number Diff line number Diff line change 11{
22 "name" : " cospace" ,
3- "version" : " 0.4.2 " ,
3+ "version" : " 0.4.3 " ,
44 "description" : " Setup a `CoSpace` to link multiple (mono)repos together!" ,
55 "author" : " https://github.com/aruniverse" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change 44 "private" : true ,
55 "scripts" : {
66 "preinstall" : " npx only-allow pnpm" ,
7- "init:test" : " cospace init test" ,
8- "purge" : " cospace purge" ,
9- "setOverrides" : " cospace override" ,
107 "list-pkgs" : " pnpm ls -r --depth -1"
118 },
129 "packageManager" :
" [email protected] " ,
You can’t perform that action at this time.
0 commit comments