Skip to content

Commit 7018903

Browse files
committed
Merge branch 'dev'
2 parents 5d130ba + 464716c commit 7018903

File tree

48 files changed

+347
-173
lines changed

Some content is hidden

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

48 files changed

+347
-173
lines changed

README.md

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,55 @@
11
# Hylo Monorepo
22

3-
**THIS REPOS IN ITS CURRENT STATE WAS THE RESULT OF THESE COMMANDS:**
3+
Thanks for checking out our code. The documentation below may be incomplete or incorrect. We welcome pull requests! But we're a very small team, so we can't guarantee timely responses.
44

5-
~~ Is that even true? ~~
5+
:heart:, [Tibet](https://github.com/tibetsprague), [Loren](https://github.com/lorenjohnson), [Tom](https://github.com/thomasgwatson)
6+
7+
[![Code Climate](https://codeclimate.com/github/Hylozoic/hylo-node/badges/gpa.svg)](https://codeclimate.com/github/Hylozoic/hylo-node) [![Test Coverage](https://codeclimate.com/github/Hylozoic/hylo-node/badges/coverage.svg)](https://codeclimate.com/github/Hylozoic/hylo-node/coverage)
8+
9+
## Quick Start
10+
11+
1. Use nvm to install the correct version of node. Once installed you can just do `nvm install` to ensure the correct version is installed and then `nvm use`
12+
13+
2. Install yarn and foreman
14+
15+
```shell
16+
npm install -g yarn foreman
17+
```
18+
19+
3. Install dependencies
20+
21+
```shell
22+
yarn install
23+
```
24+
25+
4. Build shared packages
26+
27+
```shell
28+
yarn build-packages
29+
```
30+
31+
5. Backend specific setup [here](./apps/backend/README.md)
32+
33+
6. Web/frontend specific setup [here](./apps/web/README.md)
34+
35+
7. Once the back-end and front-end are setup you can run the app locally with:
36+
Terminal 1:
37+
```shell
38+
yarn backend:dev
39+
```
40+
41+
Terminal 2:
42+
```shell
43+
yarn web:dev
44+
```
45+
46+
8. Mobile specific setup [here](./apps/mobile/README.md)
47+
48+
9. Desktop specific setup [here](./apps/desktop/README.md)
49+
50+
## Details on the setup of this Monorepo
51+
52+
How we got here:
653

754
1. Created bare nx monorepo:
855

@@ -47,17 +94,13 @@ git merge <backend|web|mobile|shared>/monorepo-setup --allow-unrelated-histories
4794
* Question: pnpm is somewhat the new hotness and shouldn't be difficult to switch to, also pnpm+nx is said to be a great combination. Do we switch to this?
4895

4996
Remaining work:
50-
* Get apps/backend (hylo-node) working in a modules environment as it is a blended CommonJS and ESM project currently
51-
* Get apps/mobile issues resolved around babel parsing emoji data, etc
5297
* Update CircleCI configuration for web and backend, including getting yarn berry working there
5398
* CircleCI and Bitrise triggers, etc configuration update for new paths
5499

55100
----
56101

57-
# WILL THE REAL README PLEASE STAND UP?
58-
59102
### Linting
60103

61104
Since this is a monorepo, your IDE will need to be setup to make sure the linting files for each of the apps and packages is respected.
62105

63-
For example, for VS Code based IDEs: https://stackoverflow.com/questions/60178254/vscode-eslint-configuration-for-a-two-projects-workspace
106+
For example, for VS Code based IDEs: https://stackoverflow.com/questions/60178254/vscode-eslint-configuration-for-a-two-projects-workspace

apps/backend/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [6.1.15] - 2025-08-21
10+
11+
### Fixed
12+
- Display of times for upcoming events in digest emails
13+
- Times for event RSPV ical attachements
14+
- Bug where deleting a comment would remove the tag froms the parent post!
15+
916
## [6.1.14] - 2025-08-14
1017

1118
### Fixed

apps/backend/README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
### hylo-node
1+
### Hylo Backend
22

33
Thanks for checking out our code. The documentation below may be incomplete or incorrect. We welcome pull requests! But we're a very small team, so we can't guarantee timely responses.
44

55
:heart:, [Tibet](https://github.com/tibetsprague), [Loren](https://github.com/lorenjohnson), [Tom](https://github.com/thomasgwatson)
66

77
[![Code Climate](https://codeclimate.com/github/Hylozoic/hylo-node/badges/gpa.svg)](https://codeclimate.com/github/Hylozoic/hylo-node) [![Test Coverage](https://codeclimate.com/github/Hylozoic/hylo-node/badges/coverage.svg)](https://codeclimate.com/github/Hylozoic/hylo-node/coverage)
88

9-
### setup
10-
11-
Use nvm to install the correct version of node. Once installed you can just do `nvm install` to ensure the correct version is installed and then `nvm use`
9+
### Setup
1210

1311
You need to install redis locally, then follow the steps to launch it on startup (on the default port of 6379). For OSX/MacOS:
1412

@@ -32,13 +30,6 @@ sudo systemctl enable redis
3230
sudo systemctl start redis
3331
```
3432

35-
Next install the node modules (and Yarn, if you don't already have it available):
36-
37-
```shell
38-
npm install -g foreman yarn
39-
yarn install
40-
```
41-
4233
Create a `.env` file in the root directory by copying .env.example. Values below are team specific and should be supplied as needed:
4334

4435
```
@@ -205,7 +196,7 @@ knex migrate:make my_migration_name
205196

206197
(You can either install knex globally with `npm install -g knex`, or run the version in your `node_modules` with `./node_modules/.bin/knex`.)
207198

208-
Run migrations with `npm run migrate` and rollback the last one with `npm run rollback`.
199+
Run migrations with `yarn migrate` and rollback the last one with `yarn rollback`.
209200

210201
### loading database snapshots
211202

apps/backend/api/models/Post.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ module.exports = bookshelf.Model.extend(Object.assign({
357357
summary: this.title(),
358358
description: TextHelpers.presentHTMLToText(this.details(forUserId)),
359359
location: this.get('location'),
360-
start: this.get('start_time'),
361-
end: this.get('end_time'),
360+
start: DateTimeHelpers.toDateTime(this.get('start_time'), { timezone: this.get('timezone') }),
361+
end: DateTimeHelpers.toDateTime(this.get('end_time'), { timezone: this.get('timezone') }),
362362
timezone: this.get('timezone'),
363363
status: eventInvitation.notGoing() ? ICalEventStatus.CANCELLED : ICalEventStatus.CONFIRMED,
364364
method: eventInvitation.notGoing() ? ICalCalendarMethod.CANCEL : ICalCalendarMethod.REQUEST,
@@ -405,15 +405,15 @@ module.exports = bookshelf.Model.extend(Object.assign({
405405
comments: [],
406406
day: type !== 'oneline' && this.get('start_time') && DateTimeHelpers.getDayFromDate(this.get('start_time'), this.get('timezone')),
407407
details: type !== 'oneline' && RichText.qualifyLinks(this.details(), slug),
408-
end_time: type === 'oneline' && this.get('end_time') && DateTimeHelpers.formatDatePair(this.get('end_time'), null, false, this.get('timezone'), locale),
408+
end_time: type === 'oneline' && this.get('end_time') && DateTimeHelpers.formatDatePair({ start: this.get('end_time'), timezone: this.get('timezone'), locale }),
409409
link_preview: type !== 'oneline' && linkPreview && linkPreview.id &&
410410
linkPreview.pick('title', 'description', 'url', 'image_url'),
411411
location: type !== 'oneline' && this.get('location'),
412412
image_url: type !== 'oneline' && media?.filter(m => m.get('type') === 'image')?.[0]?.get(type === 'full' ? 'url' : 'thumbnail_url'), // Thumbail for digest
413413
month: type !== 'oneline' && this.get('start_time') && DateTimeHelpers.getMonthFromDate(this.get('start_time'), this.get('timezone')),
414414
topic_name: type !== 'oneline' && this.get('type') === 'chat' ? tags?.first()?.get('name') : '',
415415
type: this.get('type'),
416-
start_time: type === 'oneline' && this.get('start_time') && DateTimeHelpers.formatDatePair(this.get('start_time'), null, false, this.get('timezone'), locale),
416+
start_time: type === 'oneline' && this.get('start_time') && DateTimeHelpers.formatDatePair({ start: this.get('start_time'), timezone: this.get('timezone'), locale }),
417417
title: this.summary(),
418418
unfollow_url: Frontend.Route.unfollow(this, group) + clickthroughParams,
419419
user: {

apps/backend/api/models/TagFollow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ module.exports = bookshelf.Model.extend(Object.assign({
216216
chat_topic: tagFollow.relations.tag.get('name'),
217217
// For the overall chat room URL use the URL of the last post in the email digest
218218
chat_room_url: Frontend.Route.post(posts.models[posts.models.length - 1], tagFollow.relations.group) + clickthroughParams,
219-
// date: DateTimeHelpers.formatDatePair(posts[0].get('created_at'), false, false, posts[0].get('timezone')),
219+
// date: DateTimeHelpers.formatDatePair({ start: posts[0].get('created_at'), timezone: posts[0].get('timezone') }),
220220
email_settings_url: Frontend.Route.notificationsSettings(clickthroughParams, tagFollow.relations.user),
221221
group_name: tagFollow.relations.group.get('name'),
222222
group_avatar_url: tagFollow.relations.group.get('avatar_url') + clickthroughParams,

apps/backend/api/models/comment/deleteComment.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ export default function deleteComment (comment, userId) {
1515
num_comments: post.get('num_comments') - 1,
1616
num_commenters: await post.getCommentersTotal()
1717
}, { transaction: trx })
18-
19-
await Tag.updateForPost(post, null, null, null, trx)
2018
})
2119
}

apps/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Hylo <hello@hylo.com>",
66
"license": "Apache-2.0",
77
"private": true,
8-
"version": "6.1.14",
8+
"version": "6.1.15",
99
"nyc": {
1010
"sourceMap": false,
1111
"instrument": false,

apps/backend/seeds/dummy/dummy.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const { faker } = require('@faker-js/faker')
33
const promisify = require('bluebird').promisify
44
const hash = promisify(bcrypt.hash, bcrypt)
55
const readline = require('readline')
6+
const { URL } = require('url')
67

78
const n = {
89
groups: 50,
@@ -22,16 +23,28 @@ const group = 'Test Group'
2223
const groupSlug = 'test'
2324
let provider_user_id = ''
2425

25-
function warning () {
26+
function warning (knex) {
2627
const rl = readline.createInterface({
2728
input: process.stdin,
2829
output: process.stdout
2930
})
3031

3132
return new Promise((resolve, reject) => {
33+
const connection = knex && knex.client && knex.client.config && knex.client.config.connection
34+
let dbName = '(unknown)'
35+
if (connection) {
36+
if (typeof connection === 'string') {
37+
try {
38+
const parsed = new URL(connection)
39+
dbName = (parsed.pathname || '').replace(/^\//, '')
40+
} catch (e) {}
41+
} else if (connection.database) {
42+
dbName = connection.database
43+
}
44+
}
3245
rl.question(`
3346
WARNING: Running the dummy seed will COMPLETELY WIPE anything you cared about
34-
in the database. If you're sure that's what you want, type 'yes'. Anything else
47+
in the database "${dbName}". If you're sure that's what you want, type 'yes'. Anything else
3548
will result in this script terminating.
3649
3750
`, answer => {
@@ -46,7 +59,7 @@ function warning () {
4659
})
4760
}
4861

49-
exports.seed = (knex) => warning()
62+
exports.seed = (knex) => warning(knex)
5063
.then(() => truncateAll(knex))
5164
.then(() => seed('users', knex))
5265
.then(() => hash(password, 10))
@@ -154,7 +167,7 @@ function addPostsToGroups (knex) {
154167
function seed (entity, knex, fake = fakeLookup, iterations = n) { // Default to the fakeLookup and n in this file, if none is passed in
155168
console.info(` --> ${entity}`)
156169
return Promise.all(
157-
[ ...new Array(iterations[entity]) ].map(
170+
[...new Array(iterations[entity])].map(
158171
() => fake[entity](knex).then(row => knex(entity).insert(row))
159172
)
160173
)
@@ -295,7 +308,8 @@ function fakeTag () {
295308
})
296309
}
297310

298-
function fakeUser (email) {
311+
function fakeUser (maybeEmail) {
312+
const email = typeof maybeEmail === 'string' ? maybeEmail : null
299313
return Promise.resolve({
300314
email: email || faker.internet.email(),
301315
name: `${faker.name.firstName()} ${faker.name.lastName()}`,

apps/mobile/CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to HyloReactNative (the Hylo mobile app) will be documented
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
### [6.1.10] - 2025-08-29
8+
9+
### [6.1.9] - 2025-08-20
10+
- Fix notifications list crashing
11+
- Fix location permissions
12+
- Allow any url link in post location field (zoom links, luma links, etc)
13+
714
### [6.1.8] - 2025-08-13
815
- Fix authenication bug for real-time updates
916
- Reduce query size to speed up response

apps/mobile/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ android {
9090
applicationId "com.hylo.hyloandroid"
9191
minSdkVersion rootProject.ext.minSdkVersion
9292
targetSdkVersion rootProject.ext.targetSdkVersion
93-
versionCode 306
94-
versionName "6.1.8"
93+
versionCode 308
94+
versionName "6.1.10"
9595
}
9696
signingConfigs {
9797
debug {

0 commit comments

Comments
 (0)