Skip to content

Commit 9307a05

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 2558513 + 792d84c commit 9307a05

File tree

6 files changed

+127
-127
lines changed

6 files changed

+127
-127
lines changed

src/components/LandingPage/Developers/Developers.astro

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import homenko from './Images/team/homenko.jpg'
1515
import artem from './Images/team/artem.jpg'
1616
import vitalii from './Images/team/vitalii.jpg'
1717
import shippingData from '../../../data/shipping.yaml';
18-
import getWeekLabel from "../../../utils/getWeekLabel";
18+
import getMonthLabel from "../../../utils/getMonthLabel";
1919
import ProgressBar from "./ProgressBar.astro";
20-
import fillWeeksGaps from "../../../utils/fillWeeksGaps";
20+
import fillMonthsGaps from "../../../utils/fillMonthsGaps";
2121
import progress from "../../../data/progress";
2222
import addNofollowToExternalLinks from "../../../utils/addNofollowToExternalLinks";
2323
@@ -83,7 +83,7 @@ const contributors: { name: string, photo: string}[] = [
8383
},
8484
];
8585
86-
const shipping = fillWeeksGaps(shippingData);
86+
const shipping = fillMonthsGaps(shippingData);
8787
---
8888
<div class="developers_container">
8989
<div class="flex-container">
@@ -124,7 +124,7 @@ const shipping = fillWeeksGaps(shippingData);
124124
.map(([key, value]) => (
125125
<div class="week">
126126
<div class="week-title">
127-
{getWeekLabel(key)}
127+
{getMonthLabel(key)}
128128
</div>
129129
<div class="week-details-wrap">
130130
<ul class="week-details">
@@ -170,6 +170,17 @@ const shipping = fillWeeksGaps(shippingData);
170170
.week-text b {
171171
font-weight: 700;
172172
}
173+
174+
.week-text code {
175+
font-size: 0.8125em;
176+
padding: 1px 3px;
177+
}
178+
179+
html.dark .week-text code {
180+
background-color: #1a1a1a;
181+
border-color: #292929;
182+
color: #e2e8f0;
183+
}
173184
</style>
174185
<style>
175186
.developers_container {
@@ -484,6 +495,7 @@ const shipping = fillWeeksGaps(shippingData);
484495
position: relative;
485496
border-radius: 8px;
486497
white-space: pre-line;
498+
vertical-align: baseline;
487499
}
488500

489501
html.dark .week-text {

src/data/shipping.yaml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
2024-10-07:
1+
2024-10:
22
- |
33
Documentation site restructure and improvements
44
@@ -48,32 +48,29 @@
4848
<li>LibSQL/Turso "generate" and "push" statement updates</li>
4949
<li>New `casing` param in `drizzle-kit`</li>
5050
</ul>
51-
52-
2024-09-09:
53-
- Some Tweets
5451
55-
2024-08-19:
56-
- We've updated <a href='https://x.com/DrizzleORM/status/1826693369357369712'>benchmarks</a> 🚀
52+
2024-09:
53+
- Some Tweets
5754

58-
2024-08-05:
55+
2024-08:
5956
- |
6057
<a href='https://x.com/DrizzleORM/status/1820462321942036749'><b>Drizzle Gateway</b></a> closed alpha release 🎉
6158
- |
6259
<a href='https://github.com/drizzle-team/brocli'><b>Brocli</b></a> - our new open-source library 👀
6360
64-
- |
61+
- |
6562
<a href='https://3310snake.com/'>Snake Game</a> released 🎉
6663
have some fun
6764
we've had a lot of fun
6865
6966
- |
7067
<b>Kit <a href='https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.24.0'>v0.24.0</a> release</b>
71-
68+
7269
<strong>Breaking changes:</strong>
7370
<ul>
7471
<li>Fixed <a href='https://github.com/drizzle-team/drizzle-kit-mirror/issues/342'>Composite primary key order is not consistent</a> by removing `sort` in SQLite</li>
7572
</ul>
76-
73+
7774
<strong>Bug fixes:</strong>
7875
<ul>
7976
<li><a href='https://github.com/drizzle-team/drizzle-kit-mirror/issues/403'>[BUG] When using double type columns, import is not inserted</a></li>
@@ -95,14 +92,14 @@
9592
<li><a href='https://github.com/drizzle-team/drizzle-orm/issues/724'>[BUG]: jsonb always inserted as a json string when using postgres-js</a></li>
9693
<li><a href='https://github.com/drizzle-team/drizzle-orm/issues/1511'>[BUG]: jsonb type on postgres implement incorrectly</a></li>
9794
</ul>
98-
95+
9996
<strong>Bug fixes:</strong>
10097
<ul>
10198
<li><a href='https://github.com/drizzle-team/drizzle-orm/issues/2568'>[BUG]: boolean mode not working with prepared statements (bettersqlite)</a></li>
10299
<li><a href='https://github.com/drizzle-team/drizzle-orm/issues/2672'>[BUG]: isTable helper function is not working</a></li>
103100
<li><a href='https://github.com/drizzle-team/drizzle-orm/issues/2690'>[BUG]: Documentation is outdated on inArray and notInArray Methods</a></li>
104101
</ul>
105-
102+
106103
- |
107104
<b>Kit <a href='https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.23.2'>v0.23.2</a> release</b>
108105
@@ -126,7 +123,28 @@
126123
127124
• <a href='/docs/tutorials/drizzle-with-supabase'>Drizzle with Supabase Database</a>
128125
• <a href='/docs/tutorials/drizzle-with-vercel-edge-functions'>Drizzle with Vercel Edge Functions</a>
129-
2024-07-29:
126+
127+
- We've updated <a href='https://x.com/DrizzleORM/status/1826693369357369712'>benchmarks</a> 🚀
128+
129+
2024-07:
130+
- |
131+
We've had podcast on <a href='https://www.youtube.com/watch?v=Hh9xqRWYEJs'>syntax.fm</a> 🎙️
132+
Drizzle <> Sytnax merch drop - <a href='https://x.com/DrizzleORM/status/1815793307877871912'>see here</a>
133+
- |
134+
<b>ORM <a href='https://github.com/drizzle-team/drizzle-orm/releases/tag/0.32.1'>v0.32.1</a> release</b>
135+
136+
<ul>
137+
<li>improved indexes API and typings</li>
138+
<li>support for limit 0</li>
139+
<li>array and notInArray accept empty []</li>
140+
</ul>
141+
- |
142+
<b>Community highlights</b>
143+
144+
• <a href='https://drizzle.run'>drizzle.run</a> ships <a href='https://drizzle.run/visualizer'>schema visualizer</a> 👀
145+
• <a href='https://x.com/thdxr/status/1818439495361937781'>sst dev</a> & drizzle studio update
146+
• <a href='https://github.com/rhinobase/honohub'>Hono + Drizzle</a> headless CMS
147+
• TypeScript based <a href='https://github.com/drepkovsky/drizzle-migrations'>down migrations</a>
130148
- |
131149
<b>Drizzle Kit goes open-source 🎉</b>
132150
@@ -151,24 +169,4 @@
151169
• <a href='/docs/tutorials/drizzle-with-turso'>Drizzle <> Turso</a>
152170
• <a href='/docs/tutorials/drizzle-with-neon'>Drizzle <> Neon Postgres</a>
153171
• <a href='/docs/tutorials/drizzle-nextjs-neon'>Todo App with Neon Postgres</a>
154-
2024-07-22:
155-
- |
156-
<b>ORM <a href='https://github.com/drizzle-team/drizzle-orm/releases/tag/0.32.1'>v0.32.1</a> release</b>
157-
158-
<ul>
159-
<li>improved indexes API and typings</li>
160-
<li>support for limit 0</li>
161-
<li>array and notInArray accept empty []</li>
162-
</ul>
163-
- |
164-
<b>Community highlights</b>
165-
166-
• <a href='https://drizzle.run'>drizzle.run</a> ships <a href='https://drizzle.run/visualizer'>schema visualizer</a> 👀
167-
• <a href='https://x.com/thdxr/status/1818439495361937781'>sst dev</a> & drizzle studio update
168-
• <a href='https://github.com/rhinobase/honohub'>Hono + Drizzle</a> headless CMS
169-
• TypeScript based <a href='https://github.com/drepkovsky/drizzle-migrations'>down migrations</a>
170-
2024-07-15:
171-
- |
172-
We've had podcast on <a href='https://www.youtube.com/watch?v=Hh9xqRWYEJs'>syntax.fm</a> 🎙️
173-
Drizzle <> Sytnax merch drop - <a href='https://x.com/DrizzleORM/status/1815793307877871912'>see here</a>
174-
2024-06-10:
172+
2024-06:

src/utils/fillMonthsGaps.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export type Months = Record<string, string[]>;
2+
3+
export default (monthsObject: Months): Months => {
4+
const months = { ...monthsObject };
5+
6+
const getMonthStart = (date: Date): Date => {
7+
return new Date(date.getFullYear(), date.getMonth(), 1);
8+
};
9+
10+
const addMonths = (date: Date, monthsToAdd: number): Date => {
11+
const result = new Date(date);
12+
result.setMonth(result.getMonth() + monthsToAdd);
13+
return result;
14+
};
15+
16+
const parseDate = (dateString: string): Date => {
17+
return new Date(dateString);
18+
};
19+
20+
const formatDate = (date: Date): string => {
21+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
22+
};
23+
24+
const sortedKeys = Object.keys(months).sort(
25+
(a, b) => parseDate(a).getTime() - parseDate(b).getTime(),
26+
);
27+
28+
let currentMonthStart = getMonthStart(parseDate(sortedKeys[0]));
29+
30+
const now = new Date();
31+
const currentMonth = getMonthStart(now);
32+
33+
let filledMonths: Months = {};
34+
35+
for (const key of sortedKeys) {
36+
const month = months[key];
37+
const monthStart = getMonthStart(parseDate(key));
38+
39+
while (currentMonthStart.getTime() < monthStart.getTime()) {
40+
filledMonths = { ...filledMonths, [formatDate(currentMonthStart)]: [] };
41+
currentMonthStart = addMonths(currentMonthStart, 1);
42+
}
43+
44+
filledMonths = { ...filledMonths, [key]: month };
45+
currentMonthStart = addMonths(currentMonthStart, 1);
46+
}
47+
48+
while (currentMonthStart.getTime() <= currentMonth.getTime()) {
49+
filledMonths = { ...filledMonths, [formatDate(currentMonthStart)]: [] };
50+
currentMonthStart = addMonths(currentMonthStart, 1);
51+
}
52+
53+
return filledMonths;
54+
};

src/utils/fillWeeksGaps.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

src/utils/getMonthLabel.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export default (startDate: string): string => {
2+
const start = new Date(startDate);
3+
const now = new Date();
4+
5+
const currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1);
6+
const inputMonthStart = new Date(start.getFullYear(), start.getMonth(), 1);
7+
8+
const diffTime = currentMonthStart.getTime() - inputMonthStart.getTime();
9+
const diffMonths = Math.floor(diffTime / (30 * 24 * 60 * 60 * 1000));
10+
11+
if (diffMonths === 0) {
12+
return "this month";
13+
} else {
14+
if (start.getFullYear() !== now.getFullYear()) {
15+
return inputMonthStart.toLocaleString("en-US", {
16+
month: "long",
17+
year: "numeric",
18+
});
19+
} else {
20+
return inputMonthStart.toLocaleString("en-US", {
21+
month: "long",
22+
});
23+
}
24+
}
25+
};

src/utils/getWeekLabel.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)