Skip to content

Commit

Permalink
TPv2: Update required node version to >= 18, eslint-plugin-jsdoc (#7933)
Browse files Browse the repository at this point in the history
* fix: update required node version to >= 18, eslint-plugin-jsdoc

* fix: turn off eslint jsdoc rules

* enable eslint MethodDefinition

* revert: eslint jsdoc

* chore: config eslint jsdoc/tag-lines
  • Loading branch information
ntheanh201 committed Feb 7, 2024
1 parent b7f5774 commit a01d4af
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 42 deletions.
2 changes: 1 addition & 1 deletion experimental/traffic-portal/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
],
"id-match": "error",
"import/no-deprecated": "warn",
"jsdoc/newline-after-description": "error",
"jsdoc/tag-lines": ["error", "any", {"startLines":1}],
"max-classes-per-file": "off",
"no-caller": "error",
"no-cond-assign": "error",
Expand Down
2 changes: 1 addition & 1 deletion experimental/traffic-portal/build/traffic_portal_v2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ License: Apache License, Version 2.0
URL: https://github.com/apache/trafficcontrol/
Source: %{_sourcedir}/traffic-portal-%{traffic_control_version}.tgz
AutoReqProv: no
Requires: nodejs >= 2:16.14.0
Requires: nodejs >= 2:18.0.0
Requires(pre): /usr/sbin/useradd, /usr/bin/getent

%define traffic_portal_home /opt/traffic-portal
Expand Down
143 changes: 107 additions & 36 deletions experimental/traffic-portal/package-lock.json

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

4 changes: 2 additions & 2 deletions experimental/traffic-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Traffic Portal"
],
"engines": {
"node": ">=16.14.0"
"node": ">=18.0.0"
},
"engineStrict": true,
"scripts": {
Expand Down Expand Up @@ -101,7 +101,7 @@
"cypress": "^13.6.2",
"eslint": "^8.39.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^37.0.3",
"eslint-plugin-jsdoc": "^48.0.5",
"eslint-plugin-prefer-arrow": "^1.2.3",
"geckodriver": "^3.2.0",
"jasmine-core": "^3.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
fi

RUN set -o pipefail && \
curl -sLf https://rpm.nodesource.com/setup_16.x | bash
curl -sLf https://rpm.nodesource.com/setup_18.x | bash

# Override TRAFFIC_PORTAL_RPM arg to use a different one using --build-arg TRAFFIC_PORTAL_RPM=... Can be local file or http://...
ARG TRAFFIC_PORTAL_RPM=traffic_portal_v2/traffic_portal_v2.rpm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.
FROM os-dependencies AS node-dependencies
# Download and install node
RUN set -o pipefail; \
curl -sLf https://rpm.nodesource.com/setup_16.x | bash
curl -sLf https://rpm.nodesource.com/setup_18.x | bash
RUN dnf -y install nodejs || ( \
# rpm --rebuilddb after installing the nodejs is necessary on docker 20.10.8,
# build 3967b7d as of 2023-01-19, though that was not always the case for that
Expand Down

0 comments on commit a01d4af

Please sign in to comment.