From b62bb785aea640d3944fb9d1c8040f15eacde5c0 Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 09:37:11 +0000 Subject: [PATCH] feat: bump actions versions (#8) * feat: bump actions versions * fix: add missing license --- .github/workflows/core.yml | 6 ++--- index.tsx | 2 +- lib/views/error.tsx | 55 +++++++++++++++++++------------------- makefile | 7 ++--- package-lock.json | 29 +++++++++----------- package.json | 1 - readme.md | 9 +++++++ tsconfig.json | 2 +- webpack.config.js | 9 ++++++- 9 files changed, 66 insertions(+), 54 deletions(-) create mode 100644 readme.md diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index a92b019..56c98da 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -11,14 +11,14 @@ jobs: runs-on: ubuntu-latest name: Licensing (SPDX) steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: REUSE Compliance Check - uses: fsfe/reuse-action@v1 + uses: fsfe/reuse-action@v2 release: runs-on: ubuntu-latest name: Release (Make) steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: release application run: make release diff --git a/index.tsx b/index.tsx index f40ed0c..83ca8c3 100644 --- a/index.tsx +++ b/index.tsx @@ -8,7 +8,7 @@ import * as ReactRouter from 'react-router-dom' import { Main } from './lib/views/main' import { RoutingError } from './lib/views/error' -function banner(): undefined { +function banner (): undefined { console.log( '** additional logs emitted at verbose/debug log levels **' ) diff --git a/lib/views/error.tsx b/lib/views/error.tsx index 5b05753..de2da2c 100644 --- a/lib/views/error.tsx +++ b/lib/views/error.tsx @@ -7,33 +7,32 @@ import * as Polaris from '@cloudscape-design/components' import { Navigation } from '../components/navigation' const breadcrumbs = [ - { - text: "Main", - href: "#/main", - }, - { - text: "Error", - href: "#/error", - }, -]; + { + text: 'Main', + href: '#/main' + }, + { + text: 'Error', + href: '#/error' + } +] -export function RoutingError(): React.ReactElement { - - const content = ( - Error}> - - You have been routed to nowhere... :'( - - - ) - return ( - - } - navigation={} - tools={} - content={content} - /> - ) +export function RoutingError (): React.ReactElement { + const content = ( + Error}> + + You have been routed to nowhere... :'( + + + ) + return ( + + } + navigation={} + tools={} + content={content} + /> + ) } diff --git a/makefile b/makefile index 14be4af..5a59ed6 100644 --- a/makefile +++ b/makefile @@ -2,15 +2,16 @@ # # SPDX-License-Identifier: MIT +release: clean build test + npx webpack --mode="production" + ls -lah dist + build: npm install npx ts-standard --fix "lib/**/*.tsx" "index.tsx" mkdir -p dist cp -r ./static/** dist -release: clean build test - npx webpack --mode="production" - live: build npx webpack serve --mode="development" diff --git a/package-lock.json b/package-lock.json index 031bf1d..18e3b38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5499,15 +5499,6 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/hpack.js/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/html-encoding-sniffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", @@ -9330,14 +9321,20 @@ } }, "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "safe-buffer": "~5.2.0" + "safe-buffer": "~5.1.0" } }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -10832,9 +10829,9 @@ } }, "node_modules/ws": { - "version": "8.15.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", - "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "dev": true, "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index afa10ee..e9a1b8b 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "jest": { "verbose": true, "preset": "ts-jest", - "testEnvironment": "jsdom", "transform": { "^.+\\.ts?$": "ts-jest", "^.+\\.tsx?$": "ts-jest" diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..3fc26d3 --- /dev/null +++ b/readme.md @@ -0,0 +1,9 @@ + + +# WWW + +See `makefile` for build targets \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 76c2c3a..3ee1a1e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,6 @@ "node_modules", "dist", "build", - "webpack.config.ts" + "webpack.config.js" ], } \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 4b1a01d..87f6c6d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,9 +6,14 @@ var path = require('path'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +//const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') + module.exports = { - plugins: [new MiniCssExtractPlugin({ filename: "webpack.css" })], + plugins: [ + new MiniCssExtractPlugin({ filename: "webpack.css" }), + //new BundleAnalyzerPlugin.BundleAnalyzerPlugin() + ], entry: path.join(__dirname, "index.tsx"), output: { @@ -35,6 +40,8 @@ module.exports = { ] }, + stats: 'summary', + devtool: "eval-source-map", devServer: {