Skip to content

Commit 68317ac

Browse files
authored
Remove browserify builds (#3759)
1 parent 5c45c98 commit 68317ac

16 files changed

+18
-1375
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
timeout-minutes: 10
1818
strategy:
1919
matrix:
20-
specs: [browserify, integ, unit]
20+
specs: [integ, unit]
2121
node: [18, latest]
2222
steps:
2323
- name: Checkout code
@@ -32,10 +32,6 @@ jobs:
3232
- name: Install dependencies
3333
run: "yarn install"
3434

35-
- name: Build
36-
if: matrix.specs == 'browserify'
37-
run: "yarn build"
38-
3935
- name: Get number of CPU cores
4036
id: cpu-cores
4137
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,7 @@ endpoints from before Matrix 1.1, for example.
2323

2424
## In a browser
2525

26-
### Note, the browserify build has been deprecated. Please use a bundler like webpack or vite instead.
27-
28-
Download the browser version from
29-
https://github.com/matrix-org/matrix-js-sdk/releases/latest and add that as a
30-
`<script>` to your page. There will be a global variable `matrixcs`
31-
attached to `window` through which you can access the SDK. See below for how to
32-
include libolm to enable end-to-end-encryption.
33-
34-
The browser bundle supports recent versions of browsers. Typically this is ES2015
35-
or `> 0.5%, last 2 versions, Firefox ESR, not dead` if using
36-
[browserlists](https://github.com/browserslist/browserslist).
37-
38-
Please check [the working browser example](examples/browser) for more information.
26+
### Note, the browserify build has been removed. Please use a bundler like webpack or vite instead.
3927

4028
## In Node.js
4129

@@ -375,9 +363,6 @@ To run tests (Jest):
375363
$ yarn test
376364
```
377365

378-
> **Note**
379-
> The `sync-browserify.spec.ts` requires a browser build (`yarn build`) in order to pass
380-
381366
To run linting:
382367

383368
```

examples/browser/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/browser/browserTest.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/browser/index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/browser/lib/matrix.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/crypto-browser/lib/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/crypto-browser/lib/matrix.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/crypto-browser/olm-device-export-import.html

Lines changed: 0 additions & 60 deletions
This file was deleted.

examples/crypto-browser/olm-device-export-import.js

Lines changed: 0 additions & 105 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
"start": "echo THIS IS FOR LEGACY PURPOSES ONLY. && babel src -w -s -d lib --verbose --extensions \".ts,.js\"",
1111
"dist": "echo 'This is for the release script so it can make assets (browser bundle).' && yarn build",
1212
"clean": "rimraf lib dist",
13-
"build": "yarn build:dev && yarn build:compile-browser && yarn build:minify-browser",
13+
"build": "yarn build:dev",
1414
"build:dev": "yarn clean && git rev-parse HEAD > git-revision.txt && yarn build:compile && yarn build:types",
1515
"build:types": "tsc -p tsconfig-build.json --emitDeclarationOnly",
1616
"build:compile": "babel -d lib --verbose --extensions \".ts,.js\" src",
17-
"build:compile-browser": "mkdir dist && BROWSERIFYSWAP_ENV='no-rust-crypto' browserify -d src/browser-index.ts -p [ tsify -p ./tsconfig-build.json ] | exorcist dist/browser-matrix.js.map > dist/browser-matrix.js",
18-
"build:minify-browser": "terser dist/browser-matrix.js --compress --mangle --source-map --output dist/browser-matrix.min.js",
1917
"gendoc": "typedoc",
2018
"lint": "yarn lint:types && yarn lint:js",
2119
"lint:js": "eslint --max-warnings 0 src spec && prettier --check .",
@@ -97,8 +95,6 @@
9795
"allchange": "^1.0.6",
9896
"babel-jest": "^29.0.0",
9997
"babelify": "^10.0.0",
100-
"browserify": "^17.0.0",
101-
"browserify-swap": "^0.2.2",
10298
"debug": "^4.3.4",
10399
"domexception": "^4.0.0",
104100
"eslint": "8.49.0",
@@ -136,25 +132,5 @@
136132
"outputDirectory": "coverage",
137133
"outputName": "jest-sonar-report.xml",
138134
"relativePaths": true
139-
},
140-
"browserify": {
141-
"transform": [
142-
"browserify-swap",
143-
[
144-
"babelify",
145-
{
146-
"sourceMaps": "inline",
147-
"presets": [
148-
"@babel/preset-env",
149-
"@babel/preset-typescript"
150-
]
151-
}
152-
]
153-
]
154-
},
155-
"browserify-swap": {
156-
"no-rust-crypto": {
157-
"src/rust-crypto/index.ts$": "./src/rust-crypto/browserify-index.ts"
158-
}
159135
}
160136
}

spec/browserify/setupTests.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)