Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions frontend/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
const { defineConfig } = require("cypress");
const { loadEnv } = require("vite");
const {downloadFile} = require('cypress-downloadfile/lib/addPlugin');

const env = loadEnv(process.env.NODE_ENV || "development", __dirname, "");
const vitePort = Number(env.VITE_PORT) || 3069;

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
on('task', {downloadFile});
},
baseUrl: 'http://localhost:3000',
baseUrl: `http://localhost:${vitePort}`,
video: false
},
});
});
63 changes: 33 additions & 30 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
base: './',
plugins: [
react({
include: '**/*.{jsx,js}',
})
],
esbuild: {
loader: 'jsx',
include: /src\/.*\.[jt]sx?$/,
exclude: [],
},
optimizeDeps: {
esbuildOptions: {
loader: {
'.js': 'jsx',
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')

return {
base: './',
plugins: [
react({
include: '**/*.{jsx,js}',
})
],
esbuild: {
loader: 'jsx',
include: /src\/.*\.[jt]sx?$/,
exclude: [],
},
optimizeDeps: {
esbuildOptions: {
loader: {
'.js': 'jsx',
},
},
},
},
server: {
port: 3000,
open: true
},
build: {
outDir: 'build'
},
test: {
globals: true, // This enables test, describe, it, expect globally
environment: 'happy-dom',
setupFiles: './src/setupTests.js'
server: {
port: Number(env.VITE_PORT) || 3069,
open: true
},
build: {
outDir: 'build'
},
test: {
globals: true, // This enables test, describe, it, expect globally
environment: 'happy-dom',
setupFiles: './src/setupTests.js'
}
}
})


2 changes: 1 addition & 1 deletion website/src/components/InstallerTable/InstallerTable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';

function parseProjectVersionNumber(text, projectName) {
const regex = new RegExp(`${projectName} version: (\\d+(?:\\.\\d+)*(?:\\w+)?)`, 'i');
const regex = new RegExp(`${projectName} version: (\\d+(?:\\.[0-9A-Za-z]+)*)`, 'i');
const match = text.match(regex);
return match ? match[1] : null;
}
Expand Down
Loading