@@ -36,6 +36,23 @@ const updatePackageVersions = (version: string): void => {
36
36
37
37
fs . writeFileSync ( pkgJsonPath , JSON . stringify ( pkgJson , null , 2 ) ) ;
38
38
}
39
+
40
+ // Update versions in the docs directory
41
+ const docsPath = path . resolve ( __dirname , `../docs` ) ;
42
+ const docsJsonPath = path . resolve ( docsPath , './package.json' ) ;
43
+ const docsJson = JSON . parse ( fs . readFileSync ( docsJsonPath , 'utf8' ) ) ;
44
+ docsJson . version = version ;
45
+ fs . writeFileSync ( docsJsonPath , JSON . stringify ( docsJson , null , 2 ) ) ;
46
+
47
+ if ( docsJson . dependencies != null ) {
48
+ for ( const dep of Object . keys ( docsJson . dependencies ) ) {
49
+ if ( packageNames . includes ( dep ) ) {
50
+ docsJson . dependencies [ dep ] = version ;
51
+ }
52
+ }
53
+ }
54
+
55
+ fs . writeFileSync ( docsJsonPath , JSON . stringify ( docsJson , null , 2 ) ) ;
39
56
} ;
40
57
41
58
const preparePackages = async ( ) => {
@@ -59,10 +76,10 @@ const preparePackages = async () => {
59
76
await exec ( 'yarn build' ) ;
60
77
console . log ( '\t- ✅ Built!' ) ;
61
78
62
- // console.log(' Test:');
63
- // console.log('\t- 🧪 Testing packages...');
64
- // await exec('yarn test:solo');
65
- // console.log('\t- ✅ Success!');
79
+ console . log ( ' Test:' ) ;
80
+ console . log ( '\t- 🧪 Testing packages...' ) ;
81
+ await exec ( 'yarn test:solo' ) ;
82
+ console . log ( '\t- ✅ Success!' ) ;
66
83
67
84
console . log ( ' Version:' ) ;
68
85
console . log ( `\t- 🏷 Updating package versions to ${ version } ...` ) ;
0 commit comments