1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Switch type check to GitHub Actions

and add (working) type check for release mode js-sdk types
This commit is contained in:
David Baker
2021-09-08 11:43:46 +01:00
parent 92ad81ed76
commit 47fd11050f
3 changed files with 42 additions and 21 deletions

17
scripts/ci/js-sdk-to-release.js Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env node
const fsProm = require('fs/promises');
const PKGJSON = 'node_modules/matrix-js-sdk/package.json';
async function main() {
const pkgJson = JSON.parse(await fsProm.readFile(PKGJSON, 'utf8'));
for (const field of ['main', 'typings']) {
if (pkgJson["matrix_lib_"+field] !== undefined) {
pkgJson[field] = pkgJson["matrix_lib_"+field];
}
}
await fsProm.writeFile(PKGJSON, JSON.stringify(pkgJson, null, 2));
}
main();