Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: NodeJS tests using native test runner #32191

Closed
wants to merge 13 commits into from
Closed
13 changes: 13 additions & 0 deletions .changeset/fair-seahorses-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@rocket.chat/meteor': major
---

As per MongoDB Lifecycle Schedules ([mongodb.com/legal/support-policy/lifecycles](https://www.mongodb.com/legal/support-policy/lifecycles)) we're removing official support to MongoDB version 4.4 that has reached end of life in February 2024.

We recommend upgrading to at least MongoDB 6.0+, though 5.0 is still a supported version.

Here are official docs on how to upgrade to some of the supported versions:

- [mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set](https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set/)
- [mongodb.com/docs/manual/release-notes/6.0-upgrade-replica-set](https://www.mongodb.com/docs/manual/release-notes/6.0-upgrade-replica-set/)
- [mongodb.com/docs/manual/release-notes/7.0-upgrade-replica-set](https://www.mongodb.com/docs/manual/release-notes/7.0-upgrade-replica-set/)
5 changes: 5 additions & 0 deletions .changeset/fluffy-knives-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": major
---

Added MongoDB 7.0 support
7 changes: 7 additions & 0 deletions .changeset/fuzzy-cherries-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": major
---

Api login should not suggest which credential is wrong (password/username)

Failed login attemps will always return `Unauthorized` instead of the internal fail reason
14 changes: 14 additions & 0 deletions .changeset/large-bikes-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@rocket.chat/meteor": major
"rocketchat-services": major
---

Upgrades the version of the Meteor framework to 3.0

The main reason behind this is the upgrade of the Node.js version, where version 14 will be removed and version 20 will be used instead.

Internally, significant changes have been made, mostly due to the removal of fibers.

As a result, it was necessary to adapt our code to work with the new version.

No functionality should have been affected by this, but if you are running Rocket.Chat in unconventional ways, please note that you need to upgrade your Node.js version.
6 changes: 6 additions & 0 deletions .changeset/quick-moles-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": major
"rocketchat-services": major
---

Node.js 20.x support
5 changes: 5 additions & 0 deletions .changeset/quiet-kings-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': major
---

Removed the ability to import data in the HipChat Enterprise format, as it was discontinued over five years ago.
6 changes: 3 additions & 3 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
transporter:
type: string
mongodb-version:
default: "['4.4', '6.0']"
default: "['5.0', '7.0']"
required: false
type: string
release:
Expand Down Expand Up @@ -74,8 +74,8 @@ jobs:
test:
runs-on: ubuntu-20.04
env:
RC_DOCKERFILE: ${{ matrix.mongodb-version == '6.0' && inputs.rc-dockerfile-alpine || inputs.rc-dockerfile }}
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '6.0' && inputs.rc-docker-tag-alpine || inputs.rc-docker-tag }}
RC_DOCKERFILE: ${{ matrix.mongodb-version == '7.0' && inputs.rc-dockerfile-alpine || inputs.rc-dockerfile }}
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '7.0' && inputs.rc-docker-tag-alpine || inputs.rc-docker-tag }}

strategy:
fail-fast: false
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
fi;

curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"4.4\", \"5.0\", \"6.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
https://releases.rocket.chat/update

packages-build:
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
release: ee
transporter: 'nats://nats:4222'
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
mongodb-version: "['4.4']"
mongodb-version: "['5.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
Expand All @@ -372,7 +372,7 @@ jobs:
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
shard: '[1, 2, 3, 4, 5]'
total-shard: 5
mongodb-version: "['4.4']"
mongodb-version: "['5.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
Expand Down Expand Up @@ -720,7 +720,7 @@ jobs:
fi;

curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"4.4\", \"5.0\", \"6.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \
https://releases.rocket.chat/update

# Makes build fail if the release isn't there
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
node-version: 20.9.0
cache-modules: true
install: true

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr-update-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
node-version: 20.9.0
cache-modules: true
install: true

Expand All @@ -36,4 +36,3 @@ jobs:
action: update-pr-description
env:
GITHUB_TOKEN: ${{ secrets.CI_PAT }}

2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
node-version: 20.9.0
cache-modules: true
install: true

Expand Down
1 change: 0 additions & 1 deletion FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
- Incoming / Outgoing Webhooks
- Data Importer
- Import from Slack
- Import from Hipchat
- Slack Bridge
- Profiles
- Custom avatars
Expand Down
1 change: 0 additions & 1 deletion _templates/service/new/package.json.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ to: ee/apps/<%= name %>/package.json
"@types/node": "^14.18.51",
"ejson": "^2.2.3",
"eventemitter3": "^4.0.7",
"fibers": "^5.0.3",
"mem": "^8.1.1",
"moleculer": "^0.14.29",
"mongodb": "^4.12.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/.docker-mongo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.21.3-bullseye-slim
FROM node:20.9.0-bullseye-slim

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/.docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.21.3-bullseye-slim
FROM node:20.9.0-bullseye-slim

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/.docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.21.3-alpine3.16
FROM node:20.9.0-alpine3.18

RUN apk add --no-cache ttf-dejavu

Expand All @@ -17,7 +17,7 @@ RUN set -x \
# End hack for sharp
# Start hack for isolated-vm...
&& rm -rf npm/node_modules/isolated-vm \
&& npm install isolated-vm@4.4.2 \
&& npm install isolated-vm@4.6.0 \
&& mv node_modules/isolated-vm npm/node_modules/isolated-vm \
# End hack for isolated-vm
&& cd npm \
Expand Down
72 changes: 35 additions & 37 deletions apps/meteor/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,41 @@

rocketchat:ddp
rocketchat:mongo-config
rocketchat:oauth2-server
rocketchat:restivus
rocketchat:livechat
rocketchat:streamer
rocketchat:version
rocketchat:user-presence

accounts-base@2.2.10
accounts-facebook@1.3.3
accounts-github@1.5.0
accounts-google@1.4.0
accounts-meteor-developer@1.5.0
accounts-oauth@1.4.3
accounts-password@2.4.0
accounts-twitter@1.5.0
accounts-base@3.0.0-beta300.7
accounts-facebook@1.3.4-beta300.7
accounts-github@1.5.1-beta300.7
accounts-google@1.4.1-beta300.7
accounts-meteor-developer@1.5.1-beta300.7
accounts-oauth@1.4.3-beta300.7
accounts-password@3.0.0-beta300.7
accounts-twitter@1.5.1-beta300.7

pauli:accounts-linkedin
google-oauth@1.4.4
oauth@2.2.1
oauth2@1.3.2
google-oauth@1.4.5-beta300.7
oauth@3.0.0-beta300.7
oauth2@1.3.3-beta300.7

check@1.3.2
ddp-rate-limiter@1.2.1
rate-limit@1.1.1
email@2.2.5
http@2.0.0
check@1.3.3-beta300.7
ddp-rate-limiter@1.2.1-beta300.7
rate-limit@1.1.2-beta300.7
email@3.0.0-beta300.7

meteor-base@1.5.1
ddp-common@1.4.0
webapp@1.13.8
meteor-base@1.5.2-beta300.7
ddp-common@1.4.1-beta300.7
webapp@2.0.0-beta300.7

mongo@1.16.8
mongo@2.0.0-beta300.7

reload@1.3.1
service-configuration@1.3.3
session@1.2.1
shell-server@0.5.0
reload@1.3.2-beta300.7
service-configuration@1.3.2-beta300.7
session@1.2.2-beta300.7
shell-server@0.6.0-beta300.7

dispatch:run-as-user
ostrio:cookies
Expand All @@ -53,22 +51,22 @@ kadira:flow-router

meteorhacks:inject-initial

routepolicy@1.1.1
routepolicy@1.1.2-beta300.7

webapp-hashing@1.1.1
facts-base@1.0.1
webapp-hashing@1.1.2-beta300.7
facts-base@1.0.2-beta300.7

tracker@1.3.3
reactive-dict@1.3.1
reactive-var@1.0.12
tracker@1.3.3-beta300.7
reactive-dict@1.3.2-beta300.7
reactive-var@1.0.13-beta300.7

babel-compiler@7.10.5
standard-minifier-css@1.9.2
dynamic-import@0.7.3
ecmascript@0.16.8
typescript@4.9.5
babel-compiler@7.11.0-beta300.7
standard-minifier-css@1.9.3-beta300.7
dynamic-import@0.7.4-beta300.7
ecmascript@0.16.8-beta300.7
typescript@5.4.3-beta300.7

autoupdate@1.8.0
autoupdate@2.0.0-beta300.7

# photoswipe

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.15
METEOR@3.0-beta.7