Skip to content

Commit

Permalink
build: Bump to Node 20 and Webpack 5 (#296)
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
sasjo authored Aug 6, 2024
1 parent b2049a0 commit 562ab13
Show file tree
Hide file tree
Showing 33 changed files with 22,978 additions and 23,132 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: npm
directories:
- /
- /server
schedule:
interval: weekly
groups:
deps:
patterns:
- '*'
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
workflows:
patterns:
- '*'
12 changes: 8 additions & 4 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: |
package-lock.json
server/package-lock.json
- name: NPM install
run: |
Expand All @@ -63,10 +67,6 @@ jobs:
- name: Build radar
run: npm run build

- uses: actions/setup-node@v4
with:
node-version: 20

- name: SonarCloud Scan
uses: extenda/actions/sonar-scanner@v0
with:
Expand All @@ -89,6 +89,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: |
package-lock.json
server/package-lock.json
- uses: extenda/actions/gcp-secret-manager@v0
with:
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/launchdarkly.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ coverage/
.scannerwork/
server/dist
.scripts/*.pyc
radar_it/
radar_it
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13
20
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:13-alpine
FROM node:20-alpine

ENV PUBLIC_HTML /var/www

Expand Down
54 changes: 54 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
module.exports = {
automock: false,
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: [
'lcov',
'text',
],
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!src/js/lib/*.js',
'!server/**',
],
coveragePathIgnorePatterns: [
'/node_modules/',
],
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy',
'react-markdown': '<rootDir>/node_modules/react-markdown/react-markdown.min.js',
},
// transform: {
// '^.+\\.(js|jsx)$': 'babel-jest',
// },
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'test-results',
outputName: 'TEST-jest.xml',
},
],
[
'jest-sonar',
{
outputDirectory: 'test-results',
outputName: 'sonar-report.xml',
},
],
],
setupFilesAfterEnv: ['<rootDir>/test/setup.js'],

snapshotSerializers: ['enzyme-to-json/serializer'],

testPathIgnorePatterns: [
'/node_modules/',
'<rootDir>/server/',
],

// rootDir: process.cwd(),
testEnvironment: 'jsdom',
// maxWorkers: '50%',
// setupFiles: ['./jest.setup.js'],
};
Loading

0 comments on commit 562ab13

Please sign in to comment.