File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 29
29
"size" : " filesize" ,
30
30
"test" : " jest" ,
31
31
"version" : " changeset version" ,
32
+ "postversion" : " node scripts/postversion.mjs" ,
32
33
"version:experimental" : " node scripts ./scripts/version experimental" ,
33
34
"watch" : " rollup -c -w"
34
35
},
Original file line number Diff line number Diff line change
1
+ import * as path from "path" ;
2
+ import { createRequire } from "node:module" ;
3
+
4
+ const require = createRequire ( import . meta. url ) ;
5
+ const jsonfile = require ( "jsonfile" ) ;
6
+
7
+ let file = path . join (
8
+ process . cwd ( ) ,
9
+ "packages/react-router-dom-v5-compat/package.json"
10
+ ) ;
11
+ let json = await jsonfile . readFile ( file ) ;
12
+ json . peerDependencies [ "react-router-dom" ] = "4 || 5" ;
13
+ await jsonfile . writeFile ( file , json , { spaces : 2 } ) ;
14
+
15
+ console . log ( "Patched peerDependencies for react-router-dom-v5-compat" ) ;
You can’t perform that action at this time.
0 commit comments