mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-24 15:41:14 +01:00
Merge branch 'master' into develop
This commit is contained in:
6
.github/workflows/test.yaml
vendored
6
.github/workflows/test.yaml
vendored
@@ -27,19 +27,19 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node: [18, 20]
|
||||
node: [20, 22]
|
||||
database: [mongo-dev, mongo, redis, postgres]
|
||||
include:
|
||||
# only run coverage once
|
||||
- os: ubuntu-latest
|
||||
node: 18
|
||||
node: 22
|
||||
coverage: true
|
||||
# test under development once
|
||||
- database: mongo-dev
|
||||
test_env: development
|
||||
# only run eslint once
|
||||
- os: ubuntu-latest
|
||||
node: 18
|
||||
node: 22
|
||||
database: mongo-dev
|
||||
lint: true
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
33
CHANGELOG.md
33
CHANGELOG.md
@@ -1,3 +1,36 @@
|
||||
#### v4.3.1 (2025-05-07)
|
||||
|
||||
##### Chores
|
||||
|
||||
* node 18 eol (800426d6)
|
||||
* up widgets (ee2f91ad)
|
||||
* up themes (18867fb1)
|
||||
* update bundled plugins to use eslint9 (343f13e1)
|
||||
* incrementing version number - v4.3.0 (bff291db)
|
||||
* update changelog for v4.3.0 (76c03019)
|
||||
* incrementing version number - v4.2.2 (17fecc24)
|
||||
* incrementing version number - v4.2.1 (852a270c)
|
||||
* incrementing version number - v4.2.0 (87581958)
|
||||
* incrementing version number - v4.1.1 (b2afbb16)
|
||||
* incrementing version number - v4.1.0 (36c80850)
|
||||
* incrementing version number - v4.0.6 (4a52fb2e)
|
||||
* incrementing version number - v4.0.5 (1792a62b)
|
||||
* incrementing version number - v4.0.4 (b1125cce)
|
||||
* incrementing version number - v4.0.3 (2b65c735)
|
||||
* incrementing version number - v4.0.2 (73fe5fcf)
|
||||
* incrementing version number - v4.0.1 (a461b758)
|
||||
* incrementing version number - v4.0.0 (c1eaee45)
|
||||
|
||||
##### Other Changes
|
||||
|
||||
* //github.com/NodeBB/NodeBB/issues/13367 (d35aad31)
|
||||
|
||||
##### Tests
|
||||
|
||||
* fix android test (31af05c7)
|
||||
* fix android test (25979294)
|
||||
* fix a test (7ef79981)
|
||||
|
||||
#### v4.3.0 (2025-05-01)
|
||||
|
||||
##### Chores
|
||||
|
||||
@@ -39,7 +39,7 @@ Our minimalist "Harmony" theme gets you going right away, no coding experience r
|
||||
|
||||
NodeBB requires the following software to be installed:
|
||||
|
||||
* A version of Node.js at least 18 or greater ([installation/upgrade instructions](https://github.com/nodesource/distributions))
|
||||
* A version of Node.js at least 20 or greater ([installation/upgrade instructions](https://github.com/nodesource/distributions))
|
||||
* MongoDB, version 3.6 or greater **or** Redis, version 2.8.9 or greater
|
||||
* If you are using [clustering](https://docs.nodebb.org/configuring/scaling/) you need Redis installed and configured.
|
||||
* nginx, version 1.3.13 or greater (**only if** intending to use nginx to proxy requests to a NodeBB)
|
||||
|
||||
@@ -58,8 +58,8 @@ RUN corepack enable \
|
||||
&& mkdir -p /usr/src/app/logs/ /opt/config/ \
|
||||
&& chown -R ${USER}:${USER} /usr/src/app/ /opt/config/
|
||||
|
||||
COPY --from=build --chown=${USER}:${USER} /usr/src/app/ /usr/src/app/install/docker/setup.json /usr/src/app/
|
||||
COPY --from=build --chown=${USER}:${USER} /usr/bin/tini /usr/src/app/install/docker/entrypoint.sh /usr/local/bin/
|
||||
COPY --from=git --chown=${USER}:${USER} /usr/src/app/ /usr/src/app/install/docker/setup.json /usr/src/app/
|
||||
COPY --from=git --chown=${USER}:${USER} /usr/bin/tini /usr/src/app/install/docker/entrypoint.sh /usr/local/bin/
|
||||
COPY --from=node_modules_touch --chown=${USER}:${USER} /usr/src/app/ /usr/src/app/
|
||||
COPY --from=git --chown=${USER}:${USER} /usr/src/app/ /usr/src/app/
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "nodebb",
|
||||
"license": "GPL-3.0",
|
||||
"description": "NodeBB Forum",
|
||||
"version": "4.3.0",
|
||||
"version": "4.3.1",
|
||||
"homepage": "https://www.nodebb.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -186,7 +186,7 @@
|
||||
"url": "https://github.com/NodeBB/NodeBB/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
"node": ">=20"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
|
||||
@@ -507,9 +507,15 @@ const utils = {
|
||||
return str.toString().replace(escapeChars, replaceChar);
|
||||
},
|
||||
|
||||
isAndroidBrowser: function () {
|
||||
isAndroidBrowser: function (nua) {
|
||||
if (!nua) {
|
||||
if (typeof navigator !== 'undefined' && navigator.userAgent) {
|
||||
nua = navigator.userAgent;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// http://stackoverflow.com/questions/9286355/how-to-detect-only-the-native-android-browser
|
||||
const nua = navigator.userAgent;
|
||||
return ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
|
||||
},
|
||||
|
||||
|
||||
@@ -285,18 +285,18 @@ describe('Utility Methods', () => {
|
||||
});
|
||||
|
||||
it('should return false if browser is not android', (done) => {
|
||||
global.navigator = {
|
||||
const navigator = {
|
||||
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',
|
||||
};
|
||||
assert.equal(utils.isAndroidBrowser(), false);
|
||||
assert.equal(utils.isAndroidBrowser(navigator.userAgent), false);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return true if browser is android', (done) => {
|
||||
global.navigator = {
|
||||
const navigator = {
|
||||
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Android /58.0.3029.96 Safari/537.36',
|
||||
};
|
||||
assert.equal(utils.isAndroidBrowser(), true);
|
||||
assert.equal(utils.isAndroidBrowser(navigator.userAgent), true);
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user