Pull request 2380: ADG-9744-node-20

Squashed commit of the following:

commit 16e43b10edc8218f3d1ccec711d965c654dd851d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Mar 28 12:32:58 2025 +0300

    all: upd chlog

commit 2a8dcab14e9cf43fe941f67f215efe2801f2aa65
Merge: 95a4ea8cc 8b4768aad
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Mar 28 12:32:05 2025 +0300

    Merge branch 'master' into ADG-9744-node-20

commit 95a4ea8ccbcc8cb5911b6c33007e36a04b03e616
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 24 14:06:25 2025 +0300

    bamboo-specs: fix test

commit c535028cd16bf2100b45828fe7f7693b938aaeb5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Mar 24 14:02:47 2025 +0300

    all: imp npm cache

commit bfc9d11153446b865b9756f35753e791d4040595
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Mar 21 19:06:37 2025 +0300

    all: fix specs

commit 7127498d6aa0e0ca4585d79a15ed5f3c5e643e3a
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Mar 21 18:50:57 2025 +0300

    all: upd node; rm outdated openapi lint
This commit is contained in:
Ainar Garipov
2025-03-28 14:54:02 +03:00
parent 8b4768aadd
commit 295b2fefb1
12 changed files with 42 additions and 1696 deletions

View File

@@ -2,7 +2,7 @@
'env':
'GO_VERSION': '1.24.1'
'NODE_VERSION': '18'
'NODE_VERSION': '20'
'on':
'push':

View File

@@ -18,6 +18,17 @@ See also the [v0.107.60 GitHub milestone][ms-v0.107.60].
NOTE: Add new changes BELOW THIS COMMENT.
-->
### Deprecated
- Node 20 support, Node 22 will be required in future releases.
**NOTE:** `npm` may be replaced with a different tool, such as `pnpm` or
`yarn`, in a future release.
### Removed
- Node 18 support.
<!--
NOTE: Add new changes ABOVE THIS COMMENT.
-->

View File

@@ -38,7 +38,6 @@ REVISION = $${REVISION:-$$(git rev-parse --short HEAD)}
SIGN = 1
SIGNER_API_KEY = not-a-real-key
VERSION = v0.0.0
YARN = yarn
NEXTAPI = 0
@@ -139,5 +138,4 @@ txt-lint: ; $(ENV) "$(SHELL)" ./scripts/make/txt-lint.sh
md-lint: ; $(ENV_MISC) "$(SHELL)" ./scripts/make/md-lint.sh
sh-lint: ; $(ENV_MISC) "$(SHELL)" ./scripts/make/sh-lint.sh
openapi-lint: ; cd ./openapi/ && $(YARN) test
openapi-show: ; cd ./openapi/ && $(YARN) start
# TODO(a.garipov): Re-add openapi-lint.

View File

@@ -205,9 +205,9 @@ Run `make init` to prepare the development environment.
You will need this to build AdGuard Home:
- [Go](https://golang.org/dl/) v1.23 or later;
- [Node.js](https://nodejs.org/en/download/) v18.18 or later;
- [npm](https://www.npmjs.com/) v8 or later;
- [Go](https://golang.org/dl/) v1.24 or later;
- [Node.js](https://nodejs.org/en/download/) v20.19 or later;
- [npm](https://www.npmjs.com/) v10.8 or later;
### <a href="#building" id="building" name="building">Building</a>

View File

@@ -7,7 +7,7 @@
# Make sure to sync any changes with the branch overrides below.
'variables':
'channel': 'edge'
'dockerFrontend': 'adguard/home-js-builder:2.1-bullseye'
'dockerFrontend': 'adguard/home-js-builder:3.0'
'dockerGo': 'adguard/go-builder:1.24.1--1'
'stages':
@@ -50,7 +50,7 @@
'docker':
'image': '${bamboo.dockerFrontend}'
'volumes':
'${system.YARN_DIR}': '${bamboo.cacheYarn}'
'${system.NPM_DIR}': '${bamboo.cacheNpm}'
'key': 'BF'
'other':
'clean-working-dir': true
@@ -277,7 +277,7 @@
# need to build a few of these.
'variables':
'channel': 'beta'
'dockerFrontend': 'adguard/home-js-builder:2.1-bullseye'
'dockerFrontend': 'adguard/home-js-builder:3.0'
'dockerGo': 'adguard/go-builder:1.24.1--1'
# release-vX.Y.Z branches are the branches from which the actual final
# release is built.
@@ -293,5 +293,5 @@
# are the ones that actually get released.
'variables':
'channel': 'release'
'dockerFrontend': 'adguard/home-js-builder:2.1-bullseye'
'dockerFrontend': 'adguard/home-js-builder:3.0'
'dockerGo': 'adguard/go-builder:1.24.1--1'

View File

@@ -5,7 +5,7 @@
'key': 'AHBRTSPECS'
'name': 'AdGuard Home - Build and run tests'
'variables':
'dockerFrontend': 'adguard/home-js-builder:2.1-bullseye'
'dockerFrontend': 'adguard/home-js-builder:3.0'
'dockerGo': 'adguard/go-builder:1.24.1--1'
'channel': 'development'
@@ -39,7 +39,7 @@
'docker':
'image': '${bamboo.dockerFrontend}'
'volumes':
'${system.YARN_DIR}': '${bamboo.cacheYarn}'
'${system.NPM_DIR}': '${bamboo.cacheNpm}'
'key': 'JSTEST'
'other':
'clean-working-dir': true
@@ -103,7 +103,7 @@
'docker':
'image': '${bamboo.dockerFrontend}'
'volumes':
'${system.YARN_DIR}': '${bamboo.cacheYarn}'
'${system.NPM_DIR}': '${bamboo.cacheNpm}'
'key': 'BF'
'other':
'clean-working-dir': true
@@ -178,7 +178,7 @@
'docker':
'image': '${bamboo.dockerFrontend}'
'volumes':
'${system.YARN_DIR}': '${bamboo.cacheYarn}'
'${system.NPM_DIR}': '${bamboo.cacheNpm}'
'key': 'E2ETEST'
'other':
'clean-working-dir': true
@@ -233,6 +233,6 @@
# Set the default release channel on the release branch to beta, as we
# may need to build a few of these.
'variables':
'dockerFrontend': 'adguard/home-js-builder:2.1-bullseye'
'dockerFrontend': 'adguard/home-js-builder:3.0'
'dockerGo': 'adguard/go-builder:1.24.1--1'
'channel': 'candidate'

View File

@@ -6,12 +6,6 @@ We are using [OpenAPI specification](https://swagger.io/docs/specification/about
The easiest way would be to use [Swagger Editor](http://editor.swagger.io/) and just copy/paste the YAML file there.
## How to read the API doc
1. `yarn install`
2. `yarn start`
3. open `http://localhost:4000/`
## Changelog
[Here](CHANGELOG.md) we keep track of all non-compatible changes that are being made.

View File

@@ -1,12 +0,0 @@
{
"name": "adguard-home-api",
"version": "0.2.0",
"private": true,
"scripts": {
"start": "node_modules/.bin/speccy serve -p 4000 openapi.yaml",
"test": "node_modules/.bin/speccy lint openapi.yaml"
},
"dependencies": {
"speccy": "^0.11.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -97,6 +97,7 @@ if [ "$(git diff --cached --name-only -- '*.go' '*.mod' 'Makefile' || :)" != ''
make VERBOSE="$verbose" go-os-check go-lint go-test
fi
if [ "$(git diff --cached --name-only -- './openapi/openapi.yaml' || :)" != '' ]; then
make VERBOSE="$verbose" openapi-lint
fi
# TODO(a.gairpov): Re-enable after finding a better linter.
# if [ "$(git diff --cached --name-only -- './openapi/openapi.yaml' || :)" != '' ]; then
# make VERBOSE="$verbose" openapi-lint
# fi

View File

@@ -34,6 +34,18 @@ trailing_newlines() (
readonly nl
find . \
'(' \
-type 'd' \
'(' \
-name 'node_modules' \
-o -path './.git' \
-o -path './bin' \
-o -path './build' \
-o -path './client/playwright-report' \
')' \
-prune \
')' \
-o \
-type 'f' \
'!' '(' \
-name '*.db' \
@@ -46,11 +58,8 @@ trailing_newlines() (
-o -name '*.zip' \
-o -name 'AdGuardHome' \
-o -name 'adguard-home' \
-o -path '*/node_modules/*' \
-o -path './.git/*' \
-o -path './bin/*' \
-o -path './build/*' \
')' \
-print \
| while read -r f; do
final_byte="$(tail -c -1 "$f")"
if [ "$final_byte" != "$nl" ]; then