Skip to content

Commit

Permalink
Ws/replace nextjs with remix spa (#554)
Browse files Browse the repository at this point in the history
* feat: initial rewrite to remix

* chore: linting

* fix: update class for highlights

* feat: add back and base

- prepare for spa on GHA with a basename and remove loaders
- add feat to no go back in history when clicking on back button in overlay

* feat: some new features:
- add resize after resize screen
- close overlay on pressing ESC
- add text when no changes are detected

* feat: add demo content for report on GHA

* multiple stuff:

- clean up  output data
- add npm ignore
- update gitignore
- add missing scripts
- remove thumbnails
- add new scripts
- add script ts config

* chore: update generate thumbnail script

- add demo to the npm ignore

* fix linting

* chore: refactor assets generation

works for demo folder

* fix: fix proper links in output for asset generation

* fix: diffFilePath is optional

* chore: update server cli

* feat: Final upgrade

* chore: add changeset

* chore: update lockfile

* chore: bump version for alpha release [skip ci]

* fix: add run all2

* chore: bump version for alpha release [skip ci]

* chore: fix adding deps

* chore: bump version for alpha release [skip ci]

* chore: remove next and add vite as dependency

* chore: bump version for alpha release [skip ci]

* add remix dev

* chore: bump version for alpha release [skip ci]

* fix: multiple things

- revert all dependencies
- fix/simplifying determining the public/build path

* chore: cleanup for new alpha

* chore: bump version for alpha release [skip ci]

* chore: fix cli command for server

* chore: bump version for alpha release [skip ci]

* chore: cleanup stuff

* chore: update workflow

* chore: update build path

* chore: update readme

* chore: update release notes

* chore: update lock-file

* feat: add CLI mode

* chore: update readme

---------

Co-authored-by: WebdriverIO Release Bot <[email protected]>
  • Loading branch information
wswebcreation and wdio-bot authored Oct 15, 2024
1 parent 11853d7 commit 267c513
Show file tree
Hide file tree
Showing 196 changed files with 48,647 additions and 8,481 deletions.
20 changes: 20 additions & 0 deletions .changeset/wicked-keys-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@wdio/visual-reporter": minor
---

# 🚀 New Features `@wdio/visual-reporter`

- Created a new demo for developing the ` @wdio/visual-reporter`. Starting the dev-server automatically generates a new sample report project
- Added a resize of the Canvas after resizing the browser screen
- You can now close the overlay by pressing ESC
- Made it more clear in the overlay when there are no changes

# 💅 Polish `@wdio/visual-reporter`

- refactor of the assets generation to make it more robust for the demo and external collected files
- reduce package/bundle size
- updated to latest dependencies

# 🐛 Bugs fixed `@wdio/visual-reporter`

- Prevent the browser from going back in history when you press the browser back button when an overlay is opened. Now the overlay is closed.
11 changes: 3 additions & 8 deletions .github/workflows/deploy-visual-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Deploy Visual Reporter to GitHub Pages

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy'
required: true
default: 'main'

permissions:
contents: read
Expand All @@ -27,7 +22,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]

steps:
- name: ⬇️ Checkout Repository
uses: actions/checkout@v4
Expand All @@ -48,13 +43,13 @@ jobs:
pnpm build
pnpm script:prepare.report
env:
GITHUB_PAGES: 'true'
GITHUB_PAGES: "true"
- name: ⚙️ Setup Pages
uses: actions/configure-pages@v5
- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'build/client'
path: "packages/visual-reporter/build/client"
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"[javascript]": {
"editor.formatOnSave": false
},
Expand Down
19 changes: 10 additions & 9 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ module.exports = [
'**/lib/resemble/*',
'*/*.d.ts',
'**/dist/*',
'**/build/*',
'**/.next/*',
]
},
{
files: ['**/*.ts', '**/*.js'],
files: ['**/*.{ts,tsx,js,jsx,cjs,mjs}'],
languageOptions: {
parser: require('@typescript-eslint/parser'),
ecmaVersion: 2020,
Expand Down Expand Up @@ -44,7 +45,7 @@ module.exports = [
'require-atomic-updates': 'off',
'linebreak-style': ['error', 'unix'],
'unicorn/prefer-node-protocol': ['error'],
'import/extensions': ['error', 'ignorePackages'],
// 'import/extensions': ['error', 'ignorePackages'],
'no-restricted-syntax': ['error', 'IfStatement > ExpressionStatement > AssignmentExpression'],
'unicorn/prefer-ternary': 'error',

Expand All @@ -53,13 +54,13 @@ module.exports = [
'@typescript-eslint/no-unused-vars': [
'error',
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
'args': 'all',
'argsIgnorePattern': '^_',
'caughtErrors': 'all',
'caughtErrorsIgnorePattern': '^_',
'destructuredArrayIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'ignoreRestSiblings': true
}
],
'@typescript-eslint/consistent-type-imports': 'error',
Expand Down
26 changes: 12 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,19 @@
"@types/jsdom": "~21.1.7",
"@types/inquirer": "^9.0.7",
"@types/node": "^22",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/xml2js": "~0.4.14",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.1",
"@typescript-eslint/utils": "^8.8.1",
"@vitest/coverage-v8": "^2.1.2",
"@typescript-eslint/eslint-plugin": "^8.9.0",
"@typescript-eslint/parser": "^8.9.0",
"@typescript-eslint/utils": "^8.9.0",
"@vitest/coverage-v8": "^2.1.3",
"@wdio/appium-service": "^9.2.1",
"@wdio/cli": "^9.1.2",
"@wdio/globals": "^9.1.2",
"@wdio/local-runner": "^9.1.2",
"@wdio/mocha-framework": "^9.1.2",
"@wdio/sauce-service": "^9.1.2",
"@wdio/shared-store-service": "^9.1.2",
"@wdio/spec-reporter": "^9.1.2",
"@wdio/cli": "^9.2.1",
"@wdio/globals": "^9.2.1",
"@wdio/local-runner": "^9.2.1",
"@wdio/mocha-framework": "^9.1.3",
"@wdio/sauce-service": "^9.2.1",
"@wdio/shared-store-service": "^9.2.1",
"@wdio/spec-reporter": "^9.1.3",
"@wdio/types": "^9.1.3",
"eslint": "^9.12.0",
"eslint-plugin-import": "^2.31.0",
Expand All @@ -82,7 +80,7 @@
"saucelabs": "^8.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.6.3",
"vitest": "^2.1.2",
"vitest": "^2.1.3",
"webdriverio": "^9.2.1"
}
}
4 changes: 2 additions & 2 deletions packages/ocr-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"watch": "pnpm run build:tsc -w"
},
"dependencies": {
"@wdio/globals": "^9.1.2",
"@wdio/globals": "^9.2.1",
"@wdio/logger": "^9.1.3",
"@wdio/types": "^9.1.3",
"fuse.js": "^7.0.0",
"@inquirer/prompts": "6.0.1",
"@inquirer/prompts": "7.0.0",
"jimp": "^1.6.0",
"node-tesseract-ocr": "^2.2.1",
"tesseract.js": "^5.1.1",
Expand Down
84 changes: 84 additions & 0 deletions packages/visual-reporter/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/**
* This is intended to be a basic starting point for linting in your app.
* It relies on recommended configs out of the box for simplicity, but you can
* and should modify this configuration to best suit your team's needs.
*/

/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
commonjs: true,
es6: true,
},
ignorePatterns: ['!**/.server', '!**/.client'],

// Base config
extends: ['eslint:recommended'],

overrides: [
// React
{
files: ['**/*.{js,jsx,ts,tsx}'],
plugins: ['react', 'jsx-a11y'],
extends: [
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
],
settings: {
react: {
version: 'detect',
},
formComponents: ['Form'],
linkComponents: [
{ name: 'Link', linkAttribute: 'to' },
{ name: 'NavLink', linkAttribute: 'to' },
],
'import/resolver': {
typescript: {},
},
},
},

// Typescript
{
files: ['**/*.{ts,tsx}'],
plugins: ['@typescript-eslint', 'import'],
parser: '@typescript-eslint/parser',
settings: {
'import/internal-regex': '^~/',
'import/resolver': {
node: {
extensions: ['.ts', '.tsx'],
},
typescript: {
alwaysTryTypes: true,
},
},
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
},

// Node
{
files: ['.eslintrc.cjs'],
env: {
node: true,
},
},
],
}
3 changes: 0 additions & 3 deletions packages/visual-reporter/.eslintrc.json

This file was deleted.

16 changes: 6 additions & 10 deletions packages/visual-reporter/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
Expand All @@ -9,13 +7,15 @@
# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# public report data
public/static/report

# cache
/.cache

# misc
.DS_Store
*.pem
Expand All @@ -29,9 +29,5 @@ yarn-error.log*
# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
12 changes: 11 additions & 1 deletion packages/visual-reporter/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ coverage/
# Build and temporary directories
tmp/
temp/
# .next/
out/
public/
build/static/report/
demo/
app/
scripts/

# Configuration files and scripts
.env
Expand All @@ -21,6 +25,12 @@ out/
.github/
.vscode/
.DS_Store
.eslintrc.cjs
.gitignore
tsconfig.json
tsconfig.scripts.json
*.config.ts
*.config.js

*.mp4
*.tsbuildinfo
Loading

0 comments on commit 267c513

Please sign in to comment.