Skip to content

Commit

Permalink
feat!: Meteor 3.0 - Node.js 20 (#31438)
Browse files Browse the repository at this point in the history
Co-authored-by: Douglas Gubert <[email protected]>
  • Loading branch information
ggazzo and d-gubert committed Oct 11, 2024
1 parent 2295670 commit dab2afb
Show file tree
Hide file tree
Showing 75 changed files with 431 additions and 752 deletions.
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/sixty-owls-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": major
---

Remove linkedin oauth package, now linkedin oauth must to me configured as custom oauth
2 changes: 1 addition & 1 deletion .github/workflows/ci-deploy-gh-pages-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: ./.github/actions/setup-node
if: github.event.action != 'closed'
with:
node-version: 14.21.3
node-version: 20.15.1
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
node-version: 20.15.1
deno-version: 1.37.1
cache-modules: true
install: true
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.15.1
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
2 changes: 1 addition & 1 deletion .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.15.1
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
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.15.1
deno-version: 1.37.1
cache-modules: true
install: true
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 @@ -29,7 +29,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.15.1-bullseye-slim

LABEL maintainer="[email protected]"

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/.docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG DENO_VERSION="1.37.1"

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

FROM node:14.21.3-bullseye-slim
FROM node:20.15.1-bullseye-slim

LABEL maintainer="[email protected]"

Expand Down
68 changes: 8 additions & 60 deletions apps/meteor/.docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,62 +1,10 @@
ARG DENO_VERSION="1.37.1"

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

FROM node:14.21.3-alpine3.16
FROM node:20.15.1-alpine3.20

LABEL maintainer="[email protected]"

ENV LANG=C.UTF-8

## Alpine 3.16 does not have a deno package, but newer versions have it
## So as soon as we can update the Alpine version, we can replace the following
## GLIBC installation part by an `apk add deno`

# Installing glibc deps required by Deno
# This replaces libc6-compat
# Copied from https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc, which denoland/deno:alpine-1.37.1 uses
# NOTE: Glibc 2.35 package is broken: https://github.com/sgerrand/alpine-pkg-glibc/issues/176, so we stick to 2.34 for now
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
ALPINE_GLIBC_PACKAGE_VERSION="2.34-r0" && \
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
apk add --no-cache --virtual=.build-dependencies wget ca-certificates ttf-dejavu && \
echo \
"-----BEGIN PUBLIC KEY-----\
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
1QIDAQAB\
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
wget \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
mv /etc/nsswitch.conf /etc/nsswitch.conf.bak && \
apk add --no-cache --force-overwrite \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
\
mv /etc/nsswitch.conf.bak /etc/nsswitch.conf && \
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
(/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true) && \
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
\
apk del glibc-i18n && \
\
rm "/root/.wget-hsts" && \
apk del .build-dependencies && \
rm \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"

COPY --from=deno /deno /bin/deno
RUN apk add --no-cache deno ttf-dejavu

ADD . /app

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

RUN set -x \
&& apk add --no-cache --virtual .fetch-deps python3 make g++ \
&& apk add --no-cache --virtual .fetch-deps python3 make g++ py3-setuptools libc6-compat \
&& cd /app/bundle/programs/server \
&& npm install --omit=dev --unsafe-perm \
# Start hack for sharp...
&& rm -rf npm/node_modules/sharp \
&& npm install [email protected] \
&& mv node_modules/sharp npm/node_modules/sharp \
# End hack for sharp
# Start hack for isolated-vm...
&& rm -rf npm/node_modules/isolated-vm \
&& npm install isolated-vm@4.4.2 \
&& mv node_modules/isolated-vm npm/node_modules/isolated-vm \
# End hack for isolated-vm
# # Start hack for isolated-vm...
# && rm -rf npm/node_modules/isolated-vm \
# && npm install isolated-vm@4.6.0 \
# && mv node_modules/isolated-vm npm/node_modules/isolated-vm \
# # End hack for isolated-vm
&& cd /app/bundle/programs/server/npm \
&& npm rebuild bcrypt --build-from-source \
&& npm cache clear --force \
Expand Down
83 changes: 40 additions & 43 deletions apps/meteor/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,40 @@

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

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

pauli:accounts-linkedin
[email protected]
[email protected]
[email protected]

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

[email protected]
[email protected]
[email protected]

[email protected]

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

[email protected]
[email protected]
[email protected]

[email protected]
[email protected]
[email protected]
[email protected]

[email protected]
[email protected]
[email protected]

[email protected]

[email protected]
[email protected]
[email protected]
[email protected]

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

meteorhacks:inject-initial

[email protected].1
[email protected].2

[email protected].1
[email protected].1
[email protected].2
[email protected].2

[email protected].3
[email protected].1
[email protected].12
[email protected].4
[email protected].2
[email protected].13

babel-compiler@7.10.5
[email protected].2
[email protected].3
[email protected].8
typescript@4.9.5
babel-compiler@7.11.0
[email protected].3
[email protected].4
[email protected].9
typescript@5.4.3

autoupdate@1.8.0
autoupdate@2.0.0

# 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.16
METEOR@3.0.3
Loading

0 comments on commit dab2afb

Please sign in to comment.