snapshot of https://github.com/RocketChat/Rocket.Chat.git (develop, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s

This commit is contained in:
upstream-mirror
2026-09-16 01:21:02 +05:00
commit 30810eecd7
10161 changed files with 987110 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
# @rocket.chat/jest-presets
## 0.0.3
### Patch Changes
- ([#41653](https://github.com/RocketChat/Rocket.Chat/pull/41653)) Bumps patch-level dependency updates: `react`, `react-dom` and `react-is` to 19.2.8, `ws` to 8.21.3, `nodemailer` to 9.0.5, `mailparser` to 3.9.15, `google-libphonenumber` to 3.2.46, `twitter-api-v2` to 1.29.1, `ip-range-check` to 0.2.1, `esbuild` to 0.28.2, `@octokit/core` to 7.0.7 and `@octokit/plugin-throttling` to 11.0.5, plus build and test tooling (`@swc/core`, `ts-jest`, `rollup`, `html-webpack-plugin`, `@vitejs/plugin-react`, `@testing-library/user-event`, and the `@types/*` packages). No behavior changes are expected.
## 0.0.3-rc.0
### Patch Changes
- ([#41653](https://github.com/RocketChat/Rocket.Chat/pull/41653)) Bumps patch-level dependency updates: `react`, `react-dom` and `react-is` to 19.2.8, `ws` to 8.21.3, `nodemailer` to 9.0.5, `mailparser` to 3.9.15, `google-libphonenumber` to 3.2.46, `twitter-api-v2` to 1.29.1, `ip-range-check` to 0.2.1, `esbuild` to 0.28.2, `@octokit/core` to 7.0.7 and `@octokit/plugin-throttling` to 11.0.5, plus build and test tooling (`@swc/core`, `ts-jest`, `rollup`, `html-webpack-plugin`, `@vitejs/plugin-react`, `@testing-library/user-event`, and the `@types/*` packages). No behavior changes are expected.
## 0.0.2
### Patch Changes
- ([#38989](https://github.com/RocketChat/Rocket.Chat/pull/38989)) chore(eslint): Upgrades ESLint and its configuration
## 0.0.2-rc.0
### Patch Changes
- ([#38989](https://github.com/RocketChat/Rocket.Chat/pull/38989)) chore(eslint): Upgrades ESLint and its configuration

View File

@@ -0,0 +1 @@
dist/client

View File

@@ -0,0 +1,51 @@
{
"name": "@rocket.chat/jest-presets",
"version": "0.0.3",
"private": true,
"type": "module",
"exports": {
"./server": {
"types": "./dist/server/index.d.ts",
"default": "./dist/server/index.js"
},
"./server/jest-preset": "./dist/server/jest-preset.js",
"./client": {
"types": "./dist/client/index.d.ts",
"default": "./dist/client/index.js"
},
"./client/jest-preset": "./dist/client/jest-preset.js",
"./client/jest-setup": "./dist/client/jest-setup.js"
},
"files": [
"/dist",
"/client",
"/server"
],
"scripts": {
"build": "tsc",
"clean": "rm -rf ./dist",
"lint": "eslint ."
},
"dependencies": {
"@swc/core": "1.15.47",
"@swc/jest": "~0.2.39",
"@testing-library/jest-dom": "~6.8.0",
"@types/jest-axe": "~3.5.9",
"identity-obj-proxy": "~3.0.0",
"jest-axe": "~10.0.0",
"jest-environment-jsdom": "~30.2.0",
"jest-environment-node": "~30.2.0",
"uuid": "~11.1.1"
},
"devDependencies": {
"@types/identity-obj-proxy": "^3.0.2",
"@types/jest": "~30.0.0",
"@types/uuid": "^10.0.0",
"eslint": "~9.39.5",
"jest": "~30.2.0",
"typescript": "~5.9.3"
},
"volta": {
"extends": "../../package.json"
}
}

View File

@@ -0,0 +1 @@
dist/server

View File

@@ -0,0 +1,10 @@
import type { Config } from 'jest';
export type {} from '@testing-library/jest-dom'; // trick to cascade global types for Jest matchers
const preset = '@rocket.chat/jest-presets/client';
export default {
preset,
setupFilesAfterEnv: [`${preset}/jest-setup`],
} satisfies Config;

View File

@@ -0,0 +1,38 @@
import type * as SWC from '@swc/core';
import type { Config } from 'jest';
export default {
testEnvironment: 'jsdom',
errorOnDeprecated: true,
transform: {
'^.+\\.m?(t|j)sx?$': [
'@swc/jest',
{
sourceMaps: true,
jsc: {
target: 'es2015',
transform: {
react: {
runtime: 'automatic',
},
},
parser: {
syntax: 'typescript',
tsx: true,
decorators: false,
dynamicImport: true,
},
},
} satisfies SWC.Config,
],
},
transformIgnorePatterns: ['<rootDir>/node_modules/@babel', '<rootDir>/node_modules/@jest', '/node_modules/(?!@testing-library/)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', 'mjs'],
moduleNameMapper: {
'\\.css$': 'identity-obj-proxy',
},
collectCoverage: true,
} satisfies Config;

View File

@@ -0,0 +1,74 @@
import { webcrypto } from 'node:crypto';
import { TextEncoder, TextDecoder } from 'node:util';
import { toHaveNoViolations } from 'jest-axe';
import * as uuid from 'uuid';
import '@testing-library/jest-dom';
expect.extend(toHaveNoViolations);
const urlByBlob = new WeakMap<Blob, string>();
const blobByUrl = new Map<string, Blob>();
Object.defineProperty(globalThis, 'crypto', {
value: webcrypto,
});
globalThis.URL.createObjectURL = (blob: Blob): string => {
const url = urlByBlob.get(blob) ?? `blob://${uuid.v4()}`;
urlByBlob.set(blob, url);
blobByUrl.set(url, blob);
return url;
};
globalThis.URL.revokeObjectURL = (url: string): void => {
const blob = blobByUrl.get(url);
if (!blob) {
return;
}
urlByBlob.delete(blob);
blobByUrl.delete(url);
};
globalThis.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}));
Object.defineProperty(global.navigator, 'serviceWorker', {
value: {
register: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
},
});
globalThis.IntersectionObserver = class IntersectionObserver {
root = null;
rootMargin = '';
thresholds = [];
disconnect() {
return null;
}
observe() {
return null;
}
takeRecords() {
return [];
}
unobserve() {
return null;
}
} as unknown as typeof IntersectionObserver;
globalThis.TextEncoder = TextEncoder as any;
globalThis.TextDecoder = TextDecoder as any;

View File

@@ -0,0 +1,7 @@
import type { Config } from 'jest';
const preset = '@rocket.chat/jest-presets/server';
export default {
preset,
} satisfies Config;

View File

@@ -0,0 +1,28 @@
import type * as SWC from '@swc/core';
import type { Config } from 'jest';
export default {
testEnvironment: 'node',
errorOnDeprecated: true,
transform: {
'^.+\\.m?(t|j)sx?$': [
'@swc/jest',
{
sourceMaps: true,
jsc: {
target: 'es2020',
parser: {
syntax: 'typescript',
decorators: false,
dynamicImport: true,
},
},
} satisfies SWC.Config,
],
},
transformIgnorePatterns: ['<rootDir>/node_modules/@babel', '<rootDir>/node_modules/@jest', '/node_modules/(?!@testing-library/)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', 'mjs'],
collectCoverage: true,
} satisfies Config;

View File

@@ -0,0 +1,12 @@
{
"extends": "@rocket.chat/tsconfig/base.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"declaration": true,
"target": "ES2024",
"module": "nodenext",
"moduleResolution": "nodenext",
},
"include": ["./src"]
}