Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.39.0 #311

Merged
merged 10 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ jobs:
- name: Install deps
run: npm ci --prefer-offline

- run: npm test -- --silent --coverage

- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- run: npm test -- --silent

e2e-tests:
runs-on: ubuntu-latest
Expand Down
90 changes: 51 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"lint-staged": {
"*.{ts,js,tsx,jsx}": "eslint --fix"
},
"version": "0.38.1",
"version": "0.39.0",
"engines": {
"node": "20.x"
},
Expand Down
1 change: 1 addition & 0 deletions src/__mocks__/playerAliasMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default function playerAliasMock(extra: Partial<PlayerAlias> = {}): Playe
service: PlayerAliasService.STEAM,
identifier: 'yxre12',
player: playerMock(),
lastSeenAt: new Date().toISOString(),
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
...extra
Expand Down
2 changes: 1 addition & 1 deletion src/api/updateGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import makeValidatedRequest from './makeValidatedRequest'
import { Prop } from '../entities/prop'

const updateGame = makeValidatedRequest(
(gameId: number, data: { props: Prop[] }) => api.patch(`/games/${gameId}`, data),
(gameId: number, data: { name?: string, props?: Prop[] }) => api.patch(`/games/${gameId}`, data),
z.object({
game: gameSchema
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlayerAliases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type PlayerAliasesProps = {
export default function PlayerAliases({
aliases
}: PlayerAliasesProps) {
const sortedAliases = useSortedItems(aliases, 'createdAt')
const sortedAliases = useSortedItems(aliases, 'lastSeenAt')

const getIcon = useCallback((alias: PlayerAlias) => {
/* v8ignore next */
Expand Down
6 changes: 3 additions & 3 deletions src/components/__tests__/PlayerAliases.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ describe('<PlayerAliases />', () => {

it('should render the latest alias and an indicator for how many more', () => {
const aliases: PlayerAlias[] = [
playerAliasMock({ service: PlayerAliasService.STEAM, identifier: 'yxre12', createdAt: '2024-10-28 10:00:00' }),
playerAliasMock({ service: PlayerAliasService.USERNAME, identifier: 'ryet12', createdAt: '2024-10-27 10:00:00' }),
playerAliasMock({ service: PlayerAliasService.EPIC, identifier: 'epic_23rd', createdAt: '2024-10-26 10:00:00' })
playerAliasMock({ service: PlayerAliasService.STEAM, identifier: 'yxre12', lastSeenAt: '2024-10-28 10:00:00' }),
playerAliasMock({ service: PlayerAliasService.USERNAME, identifier: 'ryet12', lastSeenAt: '2024-10-27 10:00:00' }),
playerAliasMock({ service: PlayerAliasService.EPIC, identifier: 'epic_23rd', lastSeenAt: '2024-10-26 10:00:00' })
]

render(<PlayerAliases aliases={aliases} />)
Expand Down
1 change: 1 addition & 0 deletions src/entities/playerAlias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const playerAliasSchema = z.object({
service: z.string(),
identifier: z.string(),
player: z.lazy(() => basePlayerSchema),
lastSeenAt: z.string().datetime(),
createdAt: z.string().datetime(),
updatedAt: z.string().datetime()
})
Expand Down
Loading