Skip to content

Commit

Permalink
Merge pull request #848 from shlinkio/develop
Browse files Browse the repository at this point in the history
Release 3.10.2
  • Loading branch information
acelaya committed Jul 9, 2023
2 parents 5f91ad8 + f1014a4 commit f5e92c6
Show file tree
Hide file tree
Showing 149 changed files with 9,557 additions and 13,037 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -11,6 +11,6 @@ jobs:
ci:
uses: shlinkio/github-actions/.github/workflows/web-app-ci.yml@main
with:
node-version: 18.12
node-version: 20.2
publish-coverage: true
force-install: true
6 changes: 3 additions & 3 deletions .github/workflows/deploy-preview.yml
Expand Up @@ -9,14 +9,14 @@ jobs:
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Use node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18.12
node-version: 20.2
- name: Build
run: |
npm ci --force && \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docker-image-build.yml
Expand Up @@ -2,8 +2,6 @@ name: Build and publish docker image

on:
push:
branches:
- develop
tags:
- 'v*'

Expand All @@ -14,3 +12,4 @@ jobs:
with:
image-name: shlinkio/shlink-web-client
version-arg-name: VERSION
platforms: 'linux/arm64/v8,linux/amd64'
6 changes: 3 additions & 3 deletions .github/workflows/publish-release.yml
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18.12
node-version: 20.2
- name: Generate release assets
run: npm ci --force && VERSION=${GITHUB_REF#refs/tags/v} npm run build:dist
- name: Publish release with assets
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).

## [3.10.2] - 2023-07-09
### Added
* *Nothing*

### Changed
* [#781](https://github.com/shlinkio/shlink-web-client/issues/781) Migrate tests from jest to vitest.
* [#843](https://github.com/shlinkio/shlink-web-client/issues/843) Build docker image only for new tags, making sure it always includes an actual version number.

### Deprecated
* *Nothing*

### Removed
* *Nothing*

### Fixed
* *Nothing*


## [3.10.1] - 2023-04-23
### Added
* *Nothing*
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM node:18.12-alpine as node
FROM node:20.2-alpine as node
COPY . /shlink-web-client
ARG VERSION="latest"
ENV VERSION ${VERSION}
Expand Down
9 changes: 0 additions & 9 deletions babel.config.js

This file was deleted.

12 changes: 0 additions & 12 deletions config/jest/cssTransform.js

This file was deleted.

31 changes: 0 additions & 31 deletions config/jest/fileTransform.js

This file was deleted.

12 changes: 0 additions & 12 deletions config/jest/setupTests.ts

This file was deleted.

27 changes: 27 additions & 0 deletions config/test/setupTests.ts
@@ -0,0 +1,27 @@
import 'vitest-canvas-mock';
import 'chart.js/auto';
import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';
import matchers from '@testing-library/jest-dom/matchers';
import { cleanup } from '@testing-library/react';
import ResizeObserver from 'resize-observer-polyfill';
import { afterEach, expect } from 'vitest';

// Workaround for TypeScript error: https://github.com/testing-library/jest-dom/issues/439#issuecomment-1536524120
declare module 'vitest' {
interface Assertion<T = any> extends jest.Matchers<void, T>, TestingLibraryMatchers<T, void> {}
}

// Extends Vitest's expect method with methods from react-testing-library
expect.extend(matchers);

afterEach(() => {
// Clears all mocks after every test
vi.clearAllMocks();
// Run a cleanup after each test case (e.g. clearing jsdom)
cleanup();
});

(global as any).ResizeObserver = ResizeObserver;
(global as any).scrollTo = () => {};
(global as any).prompt = () => {};
(global as any).matchMedia = (media: string) => ({ matches: false, media });
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -3,7 +3,7 @@ version: '3'
services:
shlink_web_client_node:
container_name: shlink_web_client_node
image: node:18.12-alpine
image: node:20.2-alpine
command: /bin/sh -c "cd /home/shlink/www && npm install --force && npm run start"
volumes:
- ./:/home/shlink/www
Expand Down
39 changes: 0 additions & 39 deletions jest.config.js

This file was deleted.

0 comments on commit f5e92c6

Please sign in to comment.