Skip to content

Commit

Permalink
Added additional themes throughout the year ☮️
Browse files Browse the repository at this point in the history
  • Loading branch information
01taylop committed Jun 19, 2024
1 parent fc29223 commit bbc96ff
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "git+https://github.com/01taylop/themed-progress-plugin.git"
},
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"main": "./lib/index.js",
"exports": {
Expand Down
11 changes: 10 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@ import chalk from 'chalk'

const dateConfigurations = {
'01-01': ['🎉', '⬜️'], // New Year's Day
'01-29-2025': ['🐍', '⬜️'], // Chinese New Year 2025
'02-14': ['🌹', '🥀'], // Valentine's Day
'03-04-2025': ['🥞', '🍽️'], // Pancake Day 2025
'03-14': ['🥧', '🍽️'], // Pi Day
'03-17': ['🍀', '⬜️'], // St Patrick's Day
'04-01': ['🃏', '⬜️'], // April Fool's Day
'04-10-2025_04-20-2025': ['🐣', '🥚'], // Easter 2025
'04-22': ['🌎', '⬜️'], // Earth Day
'05-04': ['⭐️', '⬜️'], // Star Wars Day
'05-20': ['🐝', '⬜️'], // World Bee Day
'05-30': ['🥔', '⬜️'], // International Day of Potato
'06-03': ['🚲', '⬜️'], // World Bicycle Day
'06-05': ['🌳', '⬜️'], // World Environment Day
'06-08': ['🌊', '⬜️'], // World Oceans Day
'06-19_06-23': ['☀️', '☁️'], // Summer Solstice (21st June)
'07-04': ['🎆', '⬜️'], // Independence Day (US)
'07-20': ['🌝', '🌚'], // International Moon Day
'07-01-2024_07-14-2024': ['🎾', '⬜️'], // Wimbledon 2024 (UK)
'09-05': ['💖', '🤍'], // International Charity Day
'09-21': ['☮️', '⬜️'], // International Day of Peace
'10-01': ['☕️', '⬜️'], // International Coffee Day
'10-24_10-31': ['🎃', '🦇'], // Halloween
'12-01_12-31': ['⛄️', '🧊'], // Winter
'11-28-2024': ['🦃', '🍂'], // Thanksgiving (US)
'12-01_12-31': ['⛄️', '🧊'], // Winter (Northern Hemisphere)
}

const getProgressConfig = () => {
Expand Down
43 changes: 27 additions & 16 deletions tests/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,37 @@ jest.mock('chalk', () => ({
describe('getProgressConfig', () => {

test.each([
['2025-01-01', ['🎉', '⬜️', 20]],
['2025-01-02', ['\u2588', ' ', 40]],
['2025-02-14', ['🌹', '🥀', 20]],
['2025-03-17', ['🍀', '⬜️', 20]],
['2000-01-01', ['🎉', '⬜️', 20]],
['2000-01-02', ['\u2588', ' ', 40]],
['2025-01-29', ['🐍', '⬜️', 20]],
['2000-02-14', ['🌹', '🥀', 20]],
['2025-03-04', ['🥞', '🍽️', 20]],
['2000-03-14', ['🥧', '🍽️', 20]],
['2000-03-17', ['🍀', '⬜️', 20]],
['2000-04-01', ['🃏', '⬜️', 20]],
['2025-04-10', ['🐣', '🥚', 20]],
['2025-04-20', ['🐣', '🥚', 20]],
['2025-04-22', ['🌎', '⬜️', 20]],
['2025-06-05', ['🌳', '⬜️', 20]],
['2025-06-08', ['🌊', '⬜️', 20]],
['2025-06-19', ['☀️', '☁️', 20]],
['2025-06-23', ['☀️', '☁️', 20]],
['2025-07-04', ['🎆', '⬜️', 20]],
['2000-04-22', ['🌎', '⬜️', 20]],
['2000-05-04', ['⭐️', '⬜️', 20]],
['2000-05-20', ['🐝', '⬜️', 20]],
['2000-05-30', ['🥔', '⬜️', 20]],
['2000-06-03', ['🚲', '⬜️', 20]],
['2000-06-05', ['🌳', '⬜️', 20]],
['2000-06-08', ['🌊', '⬜️', 20]],
['2000-06-19', ['☀️', '☁️', 20]],
['2000-06-23', ['☀️', '☁️', 20]],
['2000-07-04', ['🎆', '⬜️', 20]],
['2000-07-20', ['🌝', '🌚', 20]],
['2024-07-01', ['🎾', '⬜️', 20]],
['2024-07-14', ['🎾', '⬜️', 20]],
['2025-09-05', ['💖', '🤍', 20]],
['2025-10-01', ['☕️', '⬜️', 20]],
['2025-10-24', ['🎃', '🦇', 20]],
['2025-10-31', ['🎃', '🦇', 20]],
['2025-12-01', ['⛄️', '🧊', 20]],
['2025-12-31', ['⛄️', '🧊', 20]],
['2000-09-05', ['💖', '🤍', 20]],
['2000-09-21', ['☮️', '⬜️', 20]],
['2000-10-01', ['☕️', '⬜️', 20]],
['2000-10-24', ['🎃', '🦇', 20]],
['2000-10-31', ['🎃', '🦇', 20]],
['2024-11-28', ['🦃', '🍂', 20]],
['2000-12-01', ['⛄️', '🧊', 20]],
['2000-12-31', ['⛄️', '🧊', 20]],
])('returns the correct configuration for %s', (date, expectedResult) => {
jest.useFakeTimers().setSystemTime(new Date(date))

Expand Down

0 comments on commit bbc96ff

Please sign in to comment.