This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # This changes the js-sdk into 'release mode', that is:
4+ # * The entry point for the library is the babel-compiled lib/index.js rather than src/index.ts
5+ # * There's a 'typings' entry referencing the types output by tsc
6+ # We do this so we can test that each PR still builds / type checks correctly when built
7+ # against the released js-sdk, because if you do things like `import { User } from 'matrix-js-sdk';`
8+ # rather than `import { User } from 'matrix-js-sdk/src/models/user';` it will work fine with the
9+ # js-sdk in development mode but then break at release time.
10+ # We can't use the last release of the js-sdk though: it might not be up to date enough.
11+
12+ cd node_modules/matrix-js-sdk
13+ for i in main typings
14+ do
15+ lib_value=$( jq -r " .matrix_lib_$i " package.json)
16+ if [ " $lib_value " != " null" ]; then
17+ jq " .$i = .matrix_lib_$i " package.json > package.json.new && mv package.json.new package.json
18+ fi
19+ done
20+ yarn run build:compile
21+ yarn run build:types
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export default class Resizer<C extends IConfig = IConfig> {
8484 }
8585
8686 public detach ( ) {
87- const attachment = this ?. config ?. handler . parentElement ?? this . container ;
87+ const attachment = this ?. config ?. handler ? .parentElement ?? this . container ;
8888 attachment . removeEventListener ( "mousedown" , this . onMouseDown , false ) ;
8989 window . removeEventListener ( "resize" , this . onResize ) ;
9090 }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import PlatformPeg from "./PlatformPeg";
1919import SdkConfig from "./SdkConfig" ;
2020import { MatrixClientPeg } from "./MatrixClientPeg" ;
2121import SettingsStore from "./settings/SettingsStore" ;
22- import { MatrixClient } from "matrix-js-sdk" ;
22+ import { MatrixClient } from "matrix-js-sdk/src/client " ;
2323
2424/* eslint-disable camelcase */
2525
You can’t perform that action at this time.
0 commit comments