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

chore: bump meteor and node version #34048

Merged
merged 29 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e82275a
bump meteor and node version
ggazzo Nov 25, 2024
7783fb6
isolated vm
ggazzo Nov 25, 2024
dbff4d6
underscore
ggazzo Dec 5, 2024
67c041e
bson
ggazzo Dec 5, 2024
5524dc9
deleted proxy file
ggazzo Jan 3, 2025
0bfb6fd
mongo
ggazzo Dec 5, 2024
20d513a
fix models
sampaiodiego Dec 27, 2024
622a123
move DatabaseWatcher to models package
sampaiodiego Dec 27, 2024
6947302
move dbWatchersDisabled to models package
sampaiodiego Dec 27, 2024
812fca6
add meteor types
sampaiodiego Dec 27, 2024
0cc65ff
fix changes to findOneAndUpdate from mongodb
sampaiodiego Dec 27, 2024
0346447
fix omnichannel types
sampaiodiego Dec 27, 2024
8c472de
fix bson
sampaiodiego Dec 27, 2024
480f163
fix gridfs types
sampaiodiego Dec 27, 2024
080397b
fix new _id query types
sampaiodiego Dec 27, 2024
bdf9faa
add type commonjs
ggazzo Dec 27, 2024
ab9fc5f
fix dbWatchersDisabled: test
ggazzo Dec 27, 2024
37b3735
remove ddp-streamer dep from meteor package
ggazzo Dec 27, 2024
ce241be
fix ts
sampaiodiego Dec 29, 2024
9690f3a
fix gridfs
sampaiodiego Dec 30, 2024
6ecf192
use types from meteor
sampaiodiego Dec 30, 2024
63545c5
make typecheck use meteor types
sampaiodiego Dec 30, 2024
bce6572
dont use specific tsconfig for typecheck
sampaiodiego Dec 30, 2024
4376a2a
meteor lint
sampaiodiego Dec 30, 2024
14018cb
fix contentType
sampaiodiego Dec 30, 2024
d31cc6d
fix user model findOneAndUpdate
ggazzo Jan 3, 2025
9241547
fix: failing priority updates
ggazzo Jan 3, 2025
f82dfcf
..
ggazzo Jan 3, 2025
0185114
Update apps/meteor/app/file/server/file.server.ts
ggazzo Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci-code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,27 @@ jobs:
typecheck-cache-${{ runner.OS }}
typecheck-cache

- name: Install Meteor
if: matrix.check == 'ts'
shell: bash
run: |
# Restore bin from cache
set +e
METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor)
METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET")
set -e
LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor
if [ -e $LAUNCHER ]
then
echo "Cached Meteor bin found, restoring it"
sudo cp "$LAUNCHER" "/usr/local/bin/meteor"
else
echo "No cached Meteor bin found."
fi

# only install meteor if bin isn't found
command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh

- name: TS TypeCheck
if: matrix.check == 'ts'
run: yarn turbo run typecheck
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: 20.18.0
node-version: 22.11.0
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ jobs:
uses: ./.github/actions/setup-node
if: github.event.action != 'closed'
with:
node-version: 20.18.0
node-version: 22.11.0
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: 20.18.0
node-version: 22.11.0
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: 20.18.0
node-version: 22.11.0
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: 20.18.0
node-version: 22.11.0
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 20.18.0
node-version: 22.11.0
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-version-durability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4.1.0
with:
node-version: '20.18.0'
node-version: '22.11.0'

- name: Install dependencies
run: |
Expand Down
13 changes: 0 additions & 13 deletions .yarn/patches/mongodb-npm-4.17.2-40d1286d70.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/mongodb.d.ts b/mongodb.d.ts
index dd080b553309594c28093365ea101adec5c0a20c..20a616de8c97ec68629c01a848ea8df4fe122bf2 100644
index 8d68644d312c22d8c8c992ef0bc78431bffa2cf4..3f0a5664cd04bb2abb155288e3c245be72e8549f 100644
--- a/mongodb.d.ts
+++ b/mongodb.d.ts
@@ -5539,7 +5539,7 @@ export declare interface MonitorOptions extends Omit<ConnectionOptions, 'id' | '
@@ -6661,7 +6661,7 @@ export declare interface MonitorOptions extends Omit<ConnectionOptions, 'id' | '
* depth any helpers that make use of NestedPaths should devolve to not asserting any
* type safety on the input.
*/
-export declare type NestedPaths<Type, Depth extends number[]> = Depth['length'] extends 8 ? [] : Type extends string | number | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | {
+export declare type NestedPaths<Type, Depth extends number[]> = Depth['length'] extends 1 ? [] : Type extends string | number | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | {
-export declare type NestedPaths<Type, Depth extends number[]> = Depth['length'] extends 8 ? [] : Type extends string | number | bigint | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | {
+export declare type NestedPaths<Type, Depth extends number[]> = Depth['length'] extends 4 ? [] : Type extends string | number | bigint | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | {
_bsontype: string;
} ? [] : Type extends ReadonlyArray<infer ArrayType> ? [] | [number, ...NestedPaths<ArrayType, [...Depth, 1]>] : Type extends Map<string, any> ? [string] : Type extends object ? {
[Key in Extract<keyof Type, string>]: Type[Key] extends Type ? [Key] : Type extends Type[Key] ? [Key] : Type[Key] extends ReadonlyArray<infer ArrayType> ? Type extends ArrayType ? [Key] : ArrayType extends Type ? [Key] : [
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:20.18.0-bullseye-slim
FROM node:22.11.0-bullseye-slim

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/.docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.18.0-alpine3.20
FROM node:22.11.0-alpine3.20

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/.docker/Dockerfile.debian
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:20.18.0-bullseye-slim
FROM node:22.11.0-bullseye-slim

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
16 changes: 8 additions & 8 deletions apps/meteor/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ accounts-github@1.5.1
accounts-google@1.4.1
accounts-meteor-developer@1.5.1
accounts-oauth@1.4.5
accounts-password@3.0.2
accounts-password@3.0.3
accounts-twitter@1.5.2

google-oauth@1.4.5
Expand All @@ -30,18 +30,18 @@ oauth2@1.3.3
check@1.4.4
ddp-rate-limiter@1.2.2
rate-limit@1.1.2
email@3.1.0
email@3.1.1

meteor-base@1.5.2
ddp-common@1.4.4
webapp@2.0.3
webapp@2.0.4

mongo@2.0.2
mongo@2.0.3

reload@1.3.2
service-configuration@1.3.5
session@1.2.2
shell-server@0.6.0
shell-server@0.6.1

dispatch:run-as-user
ostrio:cookies
Expand All @@ -59,11 +59,11 @@ tracker@1.3.4
reactive-dict@1.3.2
reactive-var@1.0.13

babel-compiler@7.11.1
babel-compiler@7.11.2
standard-minifier-css@1.9.3
dynamic-import@0.7.4
ecmascript@0.16.9
typescript@5.4.3
ecmascript@0.16.10
typescript@5.6.3

autoupdate@2.0.0

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@3.0.4
METEOR@3.1
32 changes: 16 additions & 16 deletions apps/meteor/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ accounts-github@1.5.1
accounts-google@1.4.1
accounts-meteor-developer@1.5.1
accounts-oauth@1.4.5
accounts-password@3.0.2
accounts-password@3.0.3
accounts-twitter@1.5.2
allow-deny@2.0.0
autoupdate@2.0.0
babel-compiler@7.11.1
babel-compiler@7.11.2
babel-runtime@1.5.2
base64@1.0.13
binary-heap@1.0.12
Expand All @@ -17,19 +17,19 @@ callback-hook@1.6.0
check@1.4.4
core-runtime@1.0.0
ddp@1.4.2
ddp-client@3.0.2
ddp-client@3.0.3
ddp-common@1.4.4
ddp-rate-limiter@1.2.2
ddp-server@3.0.2
ddp-server@3.0.3
diff-sequence@1.1.3
dispatch:run-as-user@1.1.1
dynamic-import@0.7.4
ecmascript@0.16.9
ecmascript@0.16.10
ecmascript-runtime@0.8.3
ecmascript-runtime-client@0.12.2
ecmascript-runtime-server@0.11.1
ejson@1.1.4
email@3.1.0
email@3.1.1
es5-shim@4.8.1
facebook-oauth@1.11.4
facts-base@1.0.2
Expand All @@ -44,20 +44,20 @@ inter-process-messaging@0.1.2
kadira:flow-router@2.12.1
localstorage@1.2.1
logging@1.3.5
meteor@2.0.1
meteor@2.0.2
meteor-base@1.5.2
meteor-developer-oauth@1.3.3
meteorhacks:inject-initial@1.0.5
minifier-css@2.0.0
minimongo@2.0.1
minimongo@2.0.2
modern-browsers@0.1.11
modules@0.20.2
modules@0.20.3
modules-runtime@0.13.2
mongo@2.0.2
mongo-decimal@0.1.4-beta300.7
mongo@2.0.3
mongo-decimal@0.2.0
mongo-dev-server@1.1.1
mongo-id@1.0.9
npm-mongo@4.17.4
npm-mongo@6.10.0
oauth@3.0.0
oauth1@1.5.2
oauth2@1.3.3
Expand All @@ -82,15 +82,15 @@ routepolicy@1.1.2
service-configuration@1.3.5
session@1.2.2
sha@1.0.10
shell-server@0.6.0
shell-server@0.6.1
socket-stream-client@0.5.3
standard-minifier-css@1.9.3
tracker@1.3.4
twitter-oauth@1.3.4
typescript@5.4.3
typescript@5.6.3
underscore@1.6.4
url@1.3.4
webapp@2.0.3
url@1.3.5
webapp@2.0.4
webapp-hashing@1.1.2
zodern:caching-minifier@0.5.0
zodern:standard-minifier-js@5.2.0
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/app/api/server/lib/emailInbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ export const updateEmailInbox = async (

const updatedResponse = await EmailInbox.updateById(_id, updateEmailInbox);

if (!updatedResponse.value) {
if (!updatedResponse) {
throw new Error('error-invalid-email-inbox');
}

void notifyOnEmailInboxChanged(
{
...updatedResponse.value,
...updatedResponse,
...(department === 'All' && { department: undefined }),
},
'updated',
);

return updatedResponse.value;
return updatedResponse;
};

export const removeEmailInbox = async (emailInboxId: IEmailInbox['_id']): Promise<DeleteResult> => {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/app/apps/server/bridges/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { IAppServerOrchestrator } from '@rocket.chat/apps';
import type { IProcessor, IOnetimeSchedule, IRecurringSchedule, IJobContext } from '@rocket.chat/apps-engine/definition/scheduler';
import { StartupType } from '@rocket.chat/apps-engine/definition/scheduler';
import { SchedulerBridge } from '@rocket.chat/apps-engine/server/bridges/SchedulerBridge';
import { ObjectID } from 'bson';
import { ObjectId } from 'bson';
import { MongoInternals } from 'meteor/mongo';

function _callProcessor(processor: IProcessor['processor']): (job: Job) => Promise<void> {
Expand Down Expand Up @@ -159,7 +159,7 @@ export class AppSchedulerBridge extends SchedulerBridge {

let cancelQuery;
try {
cancelQuery = { _id: new ObjectID(jobId.split('_')[0]) };
cancelQuery = { _id: new ObjectId(jobId.split('_')[0]) };
} catch (jobDocIdError) {
// it is not a valid objectid, so it won't try to cancel by document id
cancelQuery = { name: jobId };
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/apps/server/bridges/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class AppSettingBridge extends ServerSettingBridge {
throw new Error(`The setting "${id}" is not readable.`);
}

const { value: setting } = await Settings.incrementValueById(id, value, { returnDocument: 'after' });
const setting = await Settings.incrementValueById(id, value, { returnDocument: 'after' });
if (setting) {
void notifyOnSettingChanged(setting);
}
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/app/assets/server/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ const listener = (req: IncomingMessage, res: ServerResponse, next: NextHandleFun

if (asset && Array.isArray(asset.constraints.extensions) && !asset.constraints.extensions.includes(format)) {
res.writeHead(403);
return res.end();
res.end();
return;
}
if (!file) {
const defaultUrl = asset?.defaultUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { deleteRoom } from '../../../lib/server/functions/deleteRoom';
import { notifyOnMessageChange } from '../../../lib/server/lib/notifyListener';

const updateAndNotifyParentRoomWithParentMessage = async (room: IRoom): Promise<void> => {
const { value: parentMessage } = await Messages.refreshDiscussionMetadata(room);
const parentMessage = await Messages.refreshDiscussionMetadata(room);
if (!parentMessage) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ export const provideUsersSuggestedGroupKeys = async (

const usersWithSuggestedKeys = [];
for await (const user of usersSuggestedGroupKeys[roomId]) {
const { value } = await Subscriptions.setGroupE2ESuggestedKeyAndOldRoomKeys(
user._id,
roomId,
user.key,
parseOldKeysDates(user.oldKeys),
);
const value = await Subscriptions.setGroupE2ESuggestedKeyAndOldRoomKeys(user._id, roomId, user.key, parseOldKeysDates(user.oldKeys));
if (!value) {
continue;
}
Expand Down
8 changes: 4 additions & 4 deletions apps/meteor/app/e2e/server/functions/resetRoomKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ export async function resetRoomKey(roomId: string, userId: string, newRoomKey: s
// And set the new key to the user that called the func
const result = await Subscriptions.setE2EKeyByUserIdAndRoomId(userId, roomId, newRoomKey);

if (result.value) {
void notifyOnSubscriptionChanged(result.value);
if (result) {
void notifyOnSubscriptionChanged(result);
}
if (roomResult.value) {
void notifyOnRoomChanged(roomResult.value);
if (roomResult) {
void notifyOnRoomChanged(roomResult);
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/e2e/server/methods/updateGroupKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function updateGroupKey(rid: string, uid: string, key: string, call
}

// uid also has subscription to this room
const { value } = await Subscriptions.setGroupE2ESuggestedKey(uid, rid, key);
const value = await Subscriptions.setGroupE2ESuggestedKey(uid, rid, key);
if (value) {
void notifyOnSubscriptionChanged(value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { settings } from '../../../settings/server';

const incException = throttledCounter((counter) => {
Settings.incrementValueById('Uncaught_Exceptions_Count', counter, { returnDocument: 'after' })
.then(({ value }) => {
.then((value) => {
if (value) {
settings.set(value);
}
Expand Down
Loading
Loading