From cf43537a65449f47326f859a206d04348499252d Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 31 Jul 2024 21:13:23 -0300 Subject: [PATCH 1/3] chore: Remove `ui-kit` from `yarn fuselage` script (#32942) --- fuselage.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fuselage.sh b/fuselage.sh index 17c912745b9e..fdcd559a3b5b 100755 --- a/fuselage.sh +++ b/fuselage.sh @@ -94,11 +94,10 @@ echo "📦 @rocket.chat/emitter [UPDATING to $targetVersion version...] 📦 @rocket.chat/message-parser [UPDATING to $targetVersion version...] 📦 @rocket.chat/onboarding-ui [UPDATING to $targetVersion version...] 📦 @rocket.chat/string-helpers [UPDATING to $targetVersion version...] -📦 @rocket.chat/ui-kit [UPDATING to $targetVersion version...] 📦 @rocket.chat/layout [UPDATING to $targetVersion version...] 📦 @rocket.chat/message-parser [UPDATING to $targetVersion version...]" - eval "yarn up @rocket.chat/emitter@$targetVersion @rocket.chat/fuselage-polyfills@$targetVersion @rocket.chat/fuselage-toastbar@$targetVersion @rocket.chat/fuselage-tokens@$targetVersion @rocket.chat/css-in-js@$targetVersion @rocket.chat/styled@$targetVersion @rocket.chat/fuselage@$targetVersion @rocket.chat/fuselage-hooks@$targetVersion @rocket.chat/icons@$targetVersion @rocket.chat/logo@$targetVersion @rocket.chat/memo@$targetVersion @rocket.chat/message-parser@$targetVersion @rocket.chat/onboarding-ui@$targetVersion @rocket.chat/string-helpers@$targetVersion @rocket.chat/ui-kit@$targetVersion @rocket.chat/layout@$targetVersion @rocket.chat/message-parser@$targetVersion" + eval "yarn up @rocket.chat/emitter@$targetVersion @rocket.chat/fuselage-polyfills@$targetVersion @rocket.chat/fuselage-toastbar@$targetVersion @rocket.chat/fuselage-tokens@$targetVersion @rocket.chat/css-in-js@$targetVersion @rocket.chat/styled@$targetVersion @rocket.chat/fuselage@$targetVersion @rocket.chat/fuselage-hooks@$targetVersion @rocket.chat/icons@$targetVersion @rocket.chat/logo@$targetVersion @rocket.chat/memo@$targetVersion @rocket.chat/message-parser@$targetVersion @rocket.chat/onboarding-ui@$targetVersion @rocket.chat/string-helpers@$targetVersion @rocket.chat/layout@$targetVersion @rocket.chat/message-parser@$targetVersion" exit 1 fi From a6630787d7e66ec87de0ca7ea9a2e9352e32a4cb Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 31 Jul 2024 21:13:43 -0300 Subject: [PATCH 2/3] chore: Exclude Storybook stories from the build of `@rocket.chat/ui-composer` (#32944) --- packages/ui-composer/package.json | 31 ++++++++++++++---------- packages/ui-composer/tsconfig.build.json | 4 +++ 2 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 packages/ui-composer/tsconfig.build.json diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index 4fd68cc71d76..d738da4186c5 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -2,6 +2,20 @@ "name": "@rocket.chat/ui-composer", "version": "0.2.0", "private": true, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "files": [ + "/dist" + ], + "scripts": { + "lint": "eslint --ext .js,.jsx,.ts,.tsx .", + "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "test": "jest", + "build": "rm -rf dist && tsc -p tsconfig.build.json", + "typecheck": "tsc --noEmit", + "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", + "storybook": "start-storybook -p 6006" + }, "devDependencies": { "@babel/core": "~7.22.20", "@react-aria/toolbar": "^3.0.0-beta.1", @@ -17,12 +31,16 @@ "@storybook/testing-library": "~0.0.13", "@types/babel__core": "~7.20.3", "@types/jest": "~29.5.12", + "@types/react": "~17.0.69", + "@types/react-dom": "~17.0.22", "eslint": "~8.45.0", "eslint-plugin-react": "~7.32.2", "eslint-plugin-react-hooks": "~4.6.0", "eslint-plugin-storybook": "~0.6.15", "jest": "~29.7.0", + "react": "~17.0.2", "react-docgen-typescript-plugin": "~1.0.5", + "react-dom": "~17.0.2", "ts-jest": "~29.1.1", "typescript": "~5.3.3" }, @@ -33,19 +51,6 @@ "react": "^17.0.2", "react-dom": "^17.0.2" }, - "scripts": { - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", - "test": "jest", - "build": "rm -rf dist && tsc -p tsconfig.json", - "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "storybook": "start-storybook -p 6006" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "files": [ - "/dist" - ], "volta": { "extends": "../../package.json" } diff --git a/packages/ui-composer/tsconfig.build.json b/packages/ui-composer/tsconfig.build.json new file mode 100644 index 000000000000..1201960b9fb1 --- /dev/null +++ b/packages/ui-composer/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["./src/**/*.stories.tsx"] +} From dd4270397dd41ce67e6e767fbdaa0c0534fbeee3 Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Wed, 31 Jul 2024 23:35:58 -0600 Subject: [PATCH 3/3] chore: Use index on `unlockAll` query called when changing OM routing methods (#32860) --- apps/meteor/server/models/raw/LivechatInquiry.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/meteor/server/models/raw/LivechatInquiry.ts b/apps/meteor/server/models/raw/LivechatInquiry.ts index 3178d217be4f..52aedd0585f8 100644 --- a/apps/meteor/server/models/raw/LivechatInquiry.ts +++ b/apps/meteor/server/models/raw/LivechatInquiry.ts @@ -154,10 +154,7 @@ export class LivechatInquiryRaw extends BaseRaw implemen }, }, { - locked: false, - }, - { - locked: { $exists: false }, + locked: { $ne: true }, }, ], }, @@ -189,7 +186,7 @@ export class LivechatInquiryRaw extends BaseRaw implemen async unlockAll(): Promise { return this.updateMany( - { $or: [{ lockedAt: { $exists: true } }, { locked: { $exists: true } }] }, + { locked: { $exists: true } }, { $unset: { locked: 1, lockedAt: 1 }, $set: { status: LivechatInquiryStatus.QUEUED, queuedAt: new Date() } }, ); }