File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
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
You can’t perform that action at this time.
0 commit comments