Skip to content

Commit e26db69

Browse files
ggazzod-gubert
andcommitted
feat!: Meteor 3.0 - Node.js 20 (#31438)
Co-authored-by: Douglas Gubert <[email protected]>
1 parent 861623a commit e26db69

File tree

74 files changed

+430
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+430
-751
lines changed

.changeset/large-bikes-brake.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@rocket.chat/meteor": major
3+
"rocketchat-services": major
4+
---
5+
6+
Upgrades the version of the Meteor framework to 3.0
7+
8+
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.
9+
10+
Internally, significant changes have been made, mostly due to the removal of fibers.
11+
12+
As a result, it was necessary to adapt our code to work with the new version.
13+
14+
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.

.changeset/quick-moles-jump.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rocket.chat/meteor": major
3+
"rocketchat-services": major
4+
---
5+
6+
Node.js 20.x support

.changeset/sixty-owls-arrive.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/meteor": major
3+
---
4+
5+
Remove linkedin oauth package, now linkedin oauth must to me configured as custom oauth

.github/workflows/ci-deploy-gh-pages-preview.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: ./.github/actions/setup-node
2323
if: github.event.action != 'closed'
2424
with:
25-
node-version: 14.21.3
25+
node-version: 20.15.1
2626
deno-version: 1.37.1
2727
cache-modules: true
2828
install: true

.github/workflows/ci-deploy-gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup NodeJS
1818
uses: ./.github/actions/setup-node
1919
with:
20-
node-version: 14.21.3
20+
node-version: 20.15.1
2121
deno-version: 1.37.1
2222
cache-modules: true
2323
install: true

.github/workflows/new-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup NodeJS
3535
uses: ./.github/actions/setup-node
3636
with:
37-
node-version: 14.21.3
37+
node-version: 20.15.1
3838
deno-version: 1.37.1
3939
cache-modules: true
4040
install: true

.github/workflows/pr-update-description.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup NodeJS
2222
uses: ./.github/actions/setup-node
2323
with:
24-
node-version: 14.21.3
24+
node-version: 20.15.1
2525
deno-version: 1.37.1
2626
cache-modules: true
2727
install: true

.github/workflows/publish-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup NodeJS
2525
uses: ./.github/actions/setup-node
2626
with:
27-
node-version: 14.21.3
27+
node-version: 20.15.1
2828
deno-version: 1.37.1
2929
cache-modules: true
3030
install: true

_templates/service/new/package.json.ejs.t

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ to: ee/apps/<%= name %>/package.json
2929
"@types/node": "^14.18.51",
3030
"ejson": "^2.2.3",
3131
"eventemitter3": "^4.0.7",
32-
"fibers": "^5.0.3",
3332
"mem": "^8.1.1",
3433
"moleculer": "^0.14.29",
3534
"mongodb": "^4.12.1",

apps/meteor/.docker-mongo/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.21.3-bullseye-slim
1+
FROM node:20.15.1-bullseye-slim
22

33
LABEL maintainer="[email protected]"
44

apps/meteor/.docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG DENO_VERSION="1.37.1"
22

33
FROM denoland/deno:bin-${DENO_VERSION} as deno
44

5-
FROM node:14.21.3-bullseye-slim
5+
FROM node:20.15.1-bullseye-slim
66

77
LABEL maintainer="[email protected]"
88

apps/meteor/.docker/Dockerfile.alpine

+8-60
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,10 @@
1-
ARG DENO_VERSION="1.37.1"
2-
3-
FROM denoland/deno:bin-${DENO_VERSION} as deno
4-
5-
FROM node:14.21.3-alpine3.16
1+
FROM node:20.15.1-alpine3.20
62

73
LABEL maintainer="[email protected]"
84

95
ENV LANG=C.UTF-8
106

11-
## Alpine 3.16 does not have a deno package, but newer versions have it
12-
## So as soon as we can update the Alpine version, we can replace the following
13-
## GLIBC installation part by an `apk add deno`
14-
15-
# Installing glibc deps required by Deno
16-
# This replaces libc6-compat
17-
# Copied from https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc, which denoland/deno:alpine-1.37.1 uses
18-
# NOTE: Glibc 2.35 package is broken: https://github.com/sgerrand/alpine-pkg-glibc/issues/176, so we stick to 2.34 for now
19-
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
20-
ALPINE_GLIBC_PACKAGE_VERSION="2.34-r0" && \
21-
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
22-
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
23-
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
24-
apk add --no-cache --virtual=.build-dependencies wget ca-certificates ttf-dejavu && \
25-
echo \
26-
"-----BEGIN PUBLIC KEY-----\
27-
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
28-
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
29-
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
30-
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
31-
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
32-
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
33-
1QIDAQAB\
34-
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
35-
wget \
36-
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
37-
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
38-
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
39-
mv /etc/nsswitch.conf /etc/nsswitch.conf.bak && \
40-
apk add --no-cache --force-overwrite \
41-
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
42-
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
43-
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
44-
\
45-
mv /etc/nsswitch.conf.bak /etc/nsswitch.conf && \
46-
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
47-
(/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true) && \
48-
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
49-
\
50-
apk del glibc-i18n && \
51-
\
52-
rm "/root/.wget-hsts" && \
53-
apk del .build-dependencies && \
54-
rm \
55-
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
56-
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
57-
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"
58-
59-
COPY --from=deno /deno /bin/deno
7+
RUN apk add --no-cache deno ttf-dejavu
608

619
ADD . /app
6210

@@ -70,19 +18,19 @@ ENV DEPLOY_METHOD=docker \
7018
Accounts_AvatarStorePath=/app/uploads
7119

7220
RUN set -x \
73-
&& apk add --no-cache --virtual .fetch-deps python3 make g++ \
21+
&& apk add --no-cache --virtual .fetch-deps python3 make g++ py3-setuptools libc6-compat \
7422
&& cd /app/bundle/programs/server \
7523
&& npm install --omit=dev --unsafe-perm \
7624
# Start hack for sharp...
7725
&& rm -rf npm/node_modules/sharp \
7826
&& npm install [email protected] \
7927
&& mv node_modules/sharp npm/node_modules/sharp \
8028
# End hack for sharp
81-
# Start hack for isolated-vm...
82-
&& rm -rf npm/node_modules/isolated-vm \
83-
&& npm install isolated-vm@4.4.2 \
84-
&& mv node_modules/isolated-vm npm/node_modules/isolated-vm \
85-
# End hack for isolated-vm
29+
# # Start hack for isolated-vm...
30+
# && rm -rf npm/node_modules/isolated-vm \
31+
# && npm install isolated-vm@4.6.0 \
32+
# && mv node_modules/isolated-vm npm/node_modules/isolated-vm \
33+
# # End hack for isolated-vm
8634
&& cd /app/bundle/programs/server/npm \
8735
&& npm rebuild bcrypt --build-from-source \
8836
&& npm cache clear --force \

apps/meteor/.meteor/packages

+40-43
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,40 @@
88

99
rocketchat:ddp
1010
rocketchat:mongo-config
11-
rocketchat:oauth2-server
1211
rocketchat:restivus
1312
rocketchat:livechat
1413
rocketchat:streamer
1514
rocketchat:version
1615
rocketchat:user-presence
1716

18-
19-
20-
21-
22-
23-
24-
25-
26-
27-
pauli:accounts-linkedin
28-
29-
30-
31-
32-
33-
34-
35-
36-
37-
38-
39-
40-
41-
42-
43-
44-
45-
46-
47-
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
4845

4946
dispatch:run-as-user
5047
ostrio:cookies
@@ -53,22 +50,22 @@ kadira:flow-router
5350

5451
meteorhacks:inject-initial
5552

56-
53+
5754

58-
59-
55+
56+
6057

61-
62-
63-
58+
59+
60+
6461

65-
babel-compiler@7.10.5
66-
67-
68-
69-
typescript@4.9.5
62+
babel-compiler@7.11.0
63+
64+
65+
66+
typescript@5.4.3
7067

71-
autoupdate@1.8.0
68+
autoupdate@2.0.0
7269

7370
# photoswipe
7471

apps/meteor/.meteor/release

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
METEOR@2.16
1+
METEOR@3.0.3

0 commit comments

Comments
 (0)