Skip to content

Commit

Permalink
remove support for node 14 and node 16
Browse files Browse the repository at this point in the history
closes #261
  • Loading branch information
dangowans committed Oct 30, 2023
1 parent f4b0d87 commit d16520c
Show file tree
Hide file tree
Showing 32 changed files with 689 additions and 902 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@ permissions: read-all

jobs:
Coverage:
runs-on: ubuntu-20.04
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [18, 20, 21]

name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Install Application
run: |
npm ci
npm install -g mocha c8 cypress@12
npm install -g mocha c8 cypress@13
- name: Copy Test Config
run: cp ./data/config.testing.js ./data/config.js
Expand All @@ -36,13 +40,17 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

- name: Code Climate
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' }}
if: ${{ ! cancelled() && github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./codeclimate-test-reporter
chmod +x codeclimate-test-reporter
./codeclimate-test-reporter before-build
./codeclimate-test-reporter after-build -t lcov --exit-code $?
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

- name: Codacy
if: ${{ github.event_name != 'pull_request' && env.CODACY_PROJECT_TOKEN != '' }}
if: ${{ ! cancelled() && github.event_name != 'pull_request' && env.CODACY_PROJECT_TOKEN != '' && matrix.node == 20 }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./coverage/lcov.info
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
4 changes: 1 addition & 3 deletions .ncurc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"reject": [
"@fortawesome/fontawesome-free"
]
"reject": ["@fortawesome/fontawesome-free"]
}
2 changes: 1 addition & 1 deletion app.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export declare const app: import("express-serve-static-core").Express;
export declare const app: any;
export default app;
2 changes: 1 addition & 1 deletion cypress.config.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const _default: Cypress.ConfigOptions<any>;
declare const _default: any;
export default _default;
2 changes: 1 addition & 1 deletion cypress/e2e/01-admin/cleanupDatabase.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */

import { testAdmin } from '../../../test/_globals.js'

import { logout, login, ajaxDelayMillis } from '../../support/index.js'

describe('Admin - Cleanup Database', () => {
Expand Down
2 changes: 1 addition & 1 deletion handlers/permissions.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RequestHandler, Response } from "express";
import type { RequestHandler } from "express";
export declare const forbiddenJSON: (response: Response) => Response;
export declare const adminGetHandler: RequestHandler;
export declare const adminPostHandler: RequestHandler;
Expand Down
1 change: 0 additions & 1 deletion helpers/functions.user.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type { Request } from "express";
export declare const userIsAdmin: (request: Request) => boolean;
export declare const userCanUpdate: (request: Request) => boolean;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicence.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicence: (licenceId: number | string, requestSession: expressSession.Session) => boolean;
export default deleteLicence;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicenceCategory.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicenceCategory: (licenceCategoryKey: string, requestSession: expressSession.Session) => boolean;
export default deleteLicenceCategory;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicenceCategoryAdditionalFee.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicenceCategoryAdditionalFee: (licenceAdditionalFeeKey: string, requestSession: expressSession.Session) => boolean;
export default deleteLicenceCategoryAdditionalFee;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicenceCategoryApproval.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicenceCategoryApproval: (licenceApprovalKey: string, requestSession: expressSession.Session) => boolean;
export default deleteLicenceCategoryApproval;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicenceCategoryFee.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicenceCategoryFee: (licenceFeeId: number | string, requestSession: expressSession.Session) => boolean;
export default deleteLicenceCategoryFee;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicenceCategoryField.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicenceCategoryField: (licenceFieldKey: string, requestSession: expressSession.Session) => boolean;
export default deleteLicenceCategoryField;
1 change: 0 additions & 1 deletion helpers/licencesDB/deleteLicenceTransaction.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const deleteLicenceTransaction: (licenceId: number | string, transactionIndex: number | string, requestSession: expressSession.Session) => boolean;
export default deleteLicenceTransaction;
1 change: 0 additions & 1 deletion helpers/licencesDB/moveLicenceCategoryAdditionalFee.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const moveLicenceCategoryAdditionalFee: (licenceAdditionalFeeKey_from: string, licenceAdditionalFeeKey_to: string, requestSession: expressSession.Session) => string;
export default moveLicenceCategoryAdditionalFee;
1 change: 0 additions & 1 deletion helpers/licencesDB/moveLicenceCategoryApproval.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const moveLicenceCategoryApproval: (licenceApprovalKey_from: string, licenceApprovalKey_to: string, requestSession: expressSession.Session) => string;
export default moveLicenceCategoryApproval;
1 change: 0 additions & 1 deletion helpers/licencesDB/moveLicenceCategoryField.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import type * as expressSession from "express-session";
export declare const moveLicenceCategoryField: (licenceFieldKey_from: string, licenceFieldKey_to: string, requestSession: expressSession.Session) => string;
export default moveLicenceCategoryField;
1 change: 0 additions & 1 deletion helpers/licencesDB/updateLicence.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type * as expressSession from 'express-session';
interface UpdateLicenceForm {
licenceId: string;
licenceNumber: string;
Expand Down
1 change: 0 additions & 1 deletion helpers/licencesDB/updateLicenceCategoryField.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type * as expressSession from "express-session";
interface UpdateLicenceCategoryFieldForm {
licenceFieldKey: string;
licenceField: string;
Expand Down
Loading

0 comments on commit d16520c

Please sign in to comment.