Skip to content

Commit 5aa113e

Browse files
authored
Merge pull request #1387 from shlinkio/develop
Release 4.3.0
2 parents 2e438f9 + a390e1b commit 5aa113e

Some content is hidden

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

41 files changed

+3219
-4120
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Test docker image build
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'Dockerfile'
7+
8+
jobs:
9+
build-docker-image:
10+
uses: shlinkio/github-actions/.github/workflows/docker-image-build-ci.yml@main

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
ci:
1212
uses: shlinkio/github-actions/.github/workflows/web-app-ci.yml@main
1313
with:
14-
node-version: 20.7
14+
node-version: 22.x
1515
publish-coverage: true

.github/workflows/deploy-preview.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ jobs:
99
continue-on-error: true
1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
with:
1414
repository: ${{ github.event.pull_request.head.repo.full_name }}
1515
ref: ${{ github.event.pull_request.head.ref }}
1616
- name: Use node.js
17-
uses: actions/setup-node@v3
17+
uses: actions/setup-node@v4
1818
with:
19-
node-version: 20.7
19+
node-version: 22.x
2020
- name: Build
2121
run: |
2222
npm ci && \
2323
node ./scripts/set-homepage.cjs /shlink-web-client/${GITHUB_HEAD_REF#refs/heads/} && \
24-
npm run build
24+
node --run build
2525
- name: Deploy preview
2626
uses: shlinkio/[email protected]
2727
with:

.github/workflows/publish-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Use node.js
15-
uses: actions/setup-node@v3
15+
uses: actions/setup-node@v4
1616
with:
17-
node-version: 20.7
17+
node-version: 22.x
1818
- name: Generate release assets
1919
run: npm ci && VERSION=${GITHUB_REF#refs/tags/v} npm run build:dist
2020
- name: Publish release with assets

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
# production
99
/build
10+
/dist
1011

1112
npm-debug.log*
12-
13-
docker-compose.override.yml
14-
home
1513
public/servers.json*

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file.
44

55
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).
66

7+
## [4.3.0] - 2024-11-30
8+
### Added
9+
* [#1360](https://github.com/shlinkio/shlink-web-client/issues/1360) Added ability for server IDs to be generated based on the server name and URL, instead of generating a random UUID.
10+
11+
This can improve sharing a predefined set of servers cia servers.json, env vars, or simply export and import your servers in some other device, and then be able to share server URLs which continue working.
12+
13+
All existing servers will keep their generated IDs in existing devices for backwards compatibility, but newly created servers will use the new approach.
14+
15+
* [shlink-web-component#491](https://github.com/shlinkio/shlink-web-component/issues/491) Add support for colors in QR code configurator.
16+
* [shlink-web-component#515](https://github.com/shlinkio/shlink-web-component/issues/515) Add support for geolocation redirect conditions, when using Shlink 4.3 or newer.
17+
* [shlink-web-component#514](https://github.com/shlinkio/shlink-web-component/issues/514) Allow filtering short URLs list by domain, when using Shlink 4.3 or newer.
18+
* [shlink-web-component#520](https://github.com/shlinkio/shlink-web-component/issues/520) Allow navigating from domains list to short URLs list filtered by one domain, when using Shlink 4.3 or newer.
19+
* [shlink-web-component#517](https://github.com/shlinkio/shlink-web-component/issues/517) Update list of known domains when a short URL is created with a new domain.
20+
* [shlink-web-component#292](https://github.com/shlinkio/shlink-web-component/issues/292) Add icon in short URLs list indicating if a short URL has redirect rules.
21+
22+
### Changed
23+
* *Nothing*
24+
25+
### Deprecated
26+
* *Nothing*
27+
28+
### Removed
29+
* *Nothing*
30+
31+
### Fixed
32+
* [shlink-web-component#504](https://github.com/shlinkio/shlink-web-component/issues/504) Fix fallback interval not causing new visits to be loaded.
33+
34+
735
## [4.2.2] - 2024-10-19
836
### Added
937
* *Nothing*

CONTRIBUTING.md

+12-16
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ Because of this, the only actual dependencies are [docker](https://docs.docker.c
1414

1515
The first thing you need to do is fork the repository, and clone it in your local machine.
1616

17-
Then you will have to follow these steps:
17+
Then simply run `docker compose up` and you will have the project exposed in port `3000` (http://localhost:3000).
1818

19-
* Copy the file `docker-compose.override.yml.dist` by also removing the `dist` extension.
20-
* Start-up the project by running `docker compose up`.
21-
22-
Once this is finished, you will have the project exposed in port `3000` (http://localhost:3000).
19+
> The first time the container is created, the project dependencies will be installed and the container may take a bit longer to start.
2320
2421
## Project structure
2522

26-
This project is a [react](https://reactjs.org/) & [redux](https://redux.js.org/) application, built with [typescript](https://www.typescriptlang.org/), which is distributed as a 100% client-side progressive web application.
23+
This project is a [react](https://react.dev/) & [redux](https://redux.js.org/) application, built with [typescript](https://www.typescriptlang.org/), which is distributed as a 100% client-side progressive web application.
2724

2825
This is the basic project structure:
2926

@@ -39,7 +36,7 @@ shlink-web-client
3936
```
4037

4138
* `config`: It contains some configuration scripts, used during testing, linting and building of the project.
42-
* `public`: Will act as the application document root once built, and contains some static assets (favicons, images, etc).
39+
* `public`: Will act as the application document root once built, and contains some static assets (favicons, images, etc.).
4340
* `scripts`: It has some of the CLI scripts used to run tests or building.
4441
* `src`: Contains the main source code of the application, including both web components, SASS stylesheets and files with logic.
4542
* `test`: Contains the project tests.
@@ -48,20 +45,19 @@ shlink-web-client
4845

4946
> Note: The `indocker` shell script is a helper used to run commands inside the docker container.
5047
51-
* `./indocker npm run lint`: Checks coding styles are fulfilled, both in JS/TS files as well as in stylesheets.
52-
* `./indocker npm run lint:js`: Checks coding styles are fulfilled in JS/TS files.
53-
* `./indocker npm run lint:css`: Checks coding styles are fulfilled in stylesheets.
54-
* `./indocker npm run lint:js:fix`: Fixes coding styles in JS/TS files.
55-
* `./indocker npm run lint:css:fix`: Fixes coding styles in stylesheets.
56-
* `./indocker npm run test`: Runs unit tests with Jest.
57-
* `./indocker npm run mutate`: Runs mutation tests with StrykerJS (this command can be very slow).
48+
* `./indocker node --run lint`: Checks coding styles are fulfilled, both in JS/TS files and in stylesheets.
49+
* `./indocker node --run lint:js`: Checks coding styles are fulfilled in JS/TS files.
50+
* `./indocker node --run lint:css`: Checks coding styles are fulfilled in stylesheets.
51+
* `./indocker node --run lint:js:fix`: Fixes coding styles in JS/TS files.
52+
* `./indocker node --run lint:css:fix`: Fixes coding styles in stylesheets.
53+
* `./indocker node --run test`: Runs unit tests with Jest.
5854

5955
## Building the project
6056

6157
The source code in this project cannot be run directly in a web browser, you need to build it first.
6258

63-
* `./indocker npm run build`: Builds the project using a combination of `webpack`, `babel` and `tsc`, generating the final static files. The content is placed in the `build` folder, which is automatically created if it does not exist.
64-
* `./indocker npm run serve:build`: Serves the static files inside the `build` folder in port 5000 (http://localhost:5000). Useful to test the content built with previous command.
59+
* `./indocker node --run run build`: Builds the project for production using [vite](https://vite.dev/), generating the final static files. The content is placed in the `build` folder, which is automatically created if it does not exist.
60+
* `./indocker node --run run preview`: Serves the static files inside the `build` folder in a random port. Useful to test the content built with previous command.
6561

6662
## Pull request process
6763

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM node:23.0-alpine as node
1+
FROM node:23.3-alpine AS node
22
COPY . /shlink-web-client
33
ARG VERSION="latest"
4-
ENV VERSION ${VERSION}
5-
RUN cd /shlink-web-client && npm ci && npm run build
4+
ENV VERSION=${VERSION}
5+
RUN cd /shlink-web-client && npm ci && node --run build
66

77
FROM nginxinc/nginx-unprivileged:1.27-alpine
88
ARG UID=101

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![GitHub license](https://img.shields.io/github/license/shlinkio/shlink-web-client.svg?style=flat-square)](https://github.com/shlinkio/shlink-web-client/blob/main/LICENSE)
88

99
[![Mastodon](https://img.shields.io/mastodon/follow/109329425426175098?color=%236364ff&domain=https%3A%2F%2Ffosstodon.org&label=follow&logo=mastodon&logoColor=white&style=flat-square)](https://fosstodon.org/@shlinkio)
10-
[![Bluesky](https://img.shields.io/badge/follow-shlinkio-0285FF.svg?style=flat-square&logo=bluesky&logoColor=white)](https://bsky.app/profile/shlinkio.bsky.social)
10+
[![Bluesky](https://img.shields.io/badge/follow-shlinkio-0285FF.svg?style=flat-square&logo=bluesky&logoColor=white)](https://bsky.app/profile/shlink.io)
1111
[![Paypal Donate](https://img.shields.io/badge/Donate-paypal-blue.svg?style=flat-square&logo=paypal&colorA=cccccc)](https://slnk.to/donate)
1212

1313
A ReactJS-based progressive web application for [Shlink](https://shlink.io).

dist/.gitignore

-2
This file was deleted.

docker-compose.override.yml.dist

-7
This file was deleted.

docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
services:
22
shlink_web_client_node:
33
container_name: shlink_web_client_node
4-
image: node:22.3-alpine
4+
user: 1000:1000 # With this, files created via `indocker` script will belong to the host user
5+
image: node:22.10-alpine
56
command: /bin/sh -c "cd /home/shlink/www && npm install && npm run start"
67
volumes:
78
- ./:/home/shlink/www

0 commit comments

Comments
 (0)