diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index 696faece56..e711182d19 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -27,9 +27,9 @@ jobs: run: "yarn run lint:types" - name: Switch js-sdk to release mode + working-directory: node_modules/matrix-js-sdk run: | - scripts/ci/js-sdk-to-release.js - cd node_modules/matrix-js-sdk + scripts/switch_package_to_release.js yarn install yarn run build:compile yarn run build:types diff --git a/scripts/ci/js-sdk-to-release.js b/scripts/ci/js-sdk-to-release.js deleted file mode 100755 index e1fecfde03..0000000000 --- a/scripts/ci/js-sdk-to-release.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/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();