- Add assertion utils separately for main and renderer
For electron main process, it's better to use node assertion module, the only customized assertion util is
assertIsNever
- Add application logger
AppLogger
, logs will be stored in<userData>/logs
folder inapp-<time>.log
file format - Use
esbuild
to transpile app-main code
- No customized window id
- Add
lint:fix
NPM script - Import router stuff directly from
react-router-dom
- Make
@ter/scripts
a pure-esm package - Upgrade Electron to v26.0.0
- Apply stricter tsconfig on vite.config.ts, do typecheck for it
- Add
@types/lodash
v4.14.197dayjs
v1.11.9esbuild-loader
v4.0.2lodash
v4.17.21winston
v3.10.0
- Upgrade
concurrently
v7.6.0 -> v8.2.1electron
v24.5.0 -> v26.0.0rimraf
v3.0.2 -> v5.0.1
- Remove
babel-loader
v9.1.3react-router
v6.13.0terser-webpack-plugin
v5.3.9
Compile renderer process code via vite
It seems that create-react-app
(CRA
) is no longer maintained (at least not active). It's no longer recommended by React
either, instead React
recommends some frameworks. For more information, see discussion and issue.
Continuing to use CRA
will cause us some problems:
- It's difficult to keep up with the latest versions of so many tools if
CRA
can't keep up. CRA
is slow.SSR
is not supported (I don't know ifSSR
is suitable for desktop applications, but there's a tool nextron that makesSSR
work withelectron
).
So I decided to migrate to compiling renderer process code via vite
.
For main process code and preload script code, it's not able to compile them via vite
, the reasons are:
vite
only runs onerollup
instance in avite
configuration.- We can only have one
vite
configuration to compile main process code and preload script code, or we cannot supporthot-relaoding-electron
feature. rollup
always chunks shared dependencies between multiple inputs, we cannot getrollup
to generate standalone js files (see issue).
Upgrade React to v18
Upgrade React to v18 as it no longer depends on react-scripts
.
- Run release dry-run workflow for PRs
- Don't use
web-vitals
deprecated fns - Set electron renderer content-security-policy
- Prettify webpack stats output
- Allow TypeScript
declare
syntax in app-main code
- New
@babel/preset-typescript
v7.22.5@jest/transform
v29.5.0@types/babel__core
v7.20.1@types/semver
v7.5.0@vitejs/plugin-react
v4.0.1babel-loader
v9.1.3babel-preset-react-app
v10.0.1react-app-polyfill
v3.0.0radash
v11.0.0semver
v7.5.4source-map-loader
v4.0.1vite
v4.4.0vite-plugin-checker
v0.6.1vite-tsconfig-paths
v4.2.0webpack-cli
v4.10.0
- Upgrade
@testing-library/dom
v8.20.0 -> v9.3.1@testing-library/react
v12.1.5 -> v14.0.0@types/react
v17.0.62 -> v18.2.15@types/react-dom
v17.0.20 -> v18.2.7@types/react-test-renderer
v17.0.2 -> v18.0.0fork-ts-checker-webpack-plugin
v6.5.3 -> v8.0.0react
v17.0.2 -> v18.2.0react-dom
v17.0.2 -> v18.2.0react-test-renderer
v17.0.2 -> v18.2.0webpack
v5.87.0 -> v5.88.1
- Remove
@babel/plugin-syntax-flow
v7.22.5@babel/plugin-transform-react-jsx
v7.22.5@testing-library/react-hooks
v8.0.1@types/case-sensitive-paths-webpack-plugin
v2.1.6@types/lodash
v4.14.195lodash
v4.17.21react-app-rewired
v2.1.9react-scripts
v5.0.1
- Rename project to
template-electron-react
(ter
)
- Stop using
React.FC
, see - Instead of invoking electron api to get window type, pass window type via additional arguments
- Improve api-builder types to accept function types
- [
Lint
] Extends@typescript-eslint/recommended
and@typescript-eslint/recommended-requiring-type-checking
to get stricter limits
- Rename
@tecra/electron-common
->@ter/app-common
@tecra/electron-main
->@ter/app-main
@tecra/electron-renderer
->@ter/app-renderer
@tecra/eslint-config
->@ter/eslint-config
@tecra/scripts
->@ter/scripts
@tecra/tsconfigs
->@ter/tsconfigs
- New
@typescript-eslint/eslint-plugin
v5.59.11@typescript-eslint/parse
v5.59.11@types/yargs-parser
v21.0.0yargs-parser
v21.1.1
- Remove
eslint-config-airbnb-typescript
v17.0.0
- Support saving/remember window states
- [
Typescript
] fix typescript-plugin-css-modules load paths to resolve imports based on baseUrl
I previously put collected utilities into this project. In this version, I removed them because I already had another project for them.
- Remove all unused/useless/unnecessary util functions.
- Refactor packages structure. Now we only have 6 packages:
@tecra/electron-common
@tecra/electron-main
@tecra/electron-renderer
@tecra/eslint-config
@tecra/scripts
@tecra/tsconfigs
- [
Electron
] For security reasons, enablecontextIsolation
and disablenodeIntegration
, use preload scripts
- [
Lint
] Enable ESLint ruleno-param-reassign
- [
Lint
] Disable ESLint ruleno-await-in-loop
- [
Lint
] Disable StyleLint rulemax-nesting-depth
- [
Hooks
] Delete useless hookuseConstFn
- [
Types
] Split global-types entries into@tecra-config/global-types/types/index.node
@tecra-config/global-types/types/index.react
- New
electron-store
v8.1.0
- Upgrade
@babel/core
v7.19.6 -> v7.22.5@babel/plugin-syntax-flow
v7.18.6 -> v7.22.5@babel/plugin-transform-react-jsx
v7.19.0 -> v7.22.5@reduxjs/toolkit
v1.8.6 -> v1.9.5@testing-library/dom
v8.19.0 -> v8.20.0@types/jest
v29.2.3 -> v29.5.2@types/lodash
v4.14.189 -> v4.14.195@types/node
v16.11.68 -> v18.16.18@types/react
v17.0.50 -> v17.0.62@types/react-dom
v17.0.17 -> v17.0.20@types/testing-library__jest-dom
v5.14.5 -> v5.14.6browserslist
v4.21.4 -> v4.21.9concurrently
v7.4.0 -> v7.6.0electron
v19.0.11 -> v24.5.0electron-builder
v23.6.0 -> v24.4.0eslint
v8.24.0 -> v8.42.0eslint-config-prettier
v8.5.0 -> v8.8.0eslint-plugin-import
v2.26.0 -> v2.27.5eslint-plugin-jest
v27.1.3 -> v27.2.1eslint-plugin-jsx-a11y
v6.6.1 -> v6.7.1eslint-plugin-react
v7.31.10 -> v7.32.2fork-ts-checker-webpack-plugin
v6.5.2 -> v6.5.3huksy
v8.0.1 -> v8.0.3immer
v9.0.15 -> v9.0.21lint-staged
v13.0.3 -> v13.2.2postcss
v8.4.18 -> v8.4.24prettier
v2.7.1 -> v2.8.8react-redux
v8.0.4 -> v8.1.0react-router
v6.4.2 -> v6.13.0react-router-dom
v6.4.2 -> v6.13.0sass
v1.55.0 -> v1.63.4stylelint
v14.14.0 -> v14.16.1stylelint-cofnig-recess-order
v3.0.0 -> v3.1.0terser-webpack-plugin
v5.3.6 -> v5.3.9type-fest
v3.2.0 -> v3.12.0typescript
v4.8.4 -> v5.1.3typescript-plugin-css-modules
v3.4.0 -> v5.0.1web-vitals
v3.0.4 -> v3.3.2webpack
v5.74.0 -> v5.87.0
- [
Build
] Speed up compilation with parallel builds - [
Build
] SetwebpackChunkName
- [
Build
] Use babel to compile electron main process code - [
Build
] Turn oninlineSources
for debugging - [
Build
] Make webpack supportdeclare
syntax - [
CI/CD
] Runtest
on multiple os - [
NPM
] Add new NPM scripttypecheck
- [
Test
] Store jest caches inside this project - [
Test
] Change the scope of collecting coverage files - [
Lint
] Enable rulesimport/order
,@typescript-eslint/require-await
- [
Lint
] Disable rulereact/require-default-props
- [
Lint
] Enable rule@typescript-eslint/consistent-type-exports
,@typescript-eslint/consistent-type-imports
- [
Lint
] Sort imports incase-insensitive
mode - [
Lint
] Enable rule@typescript-eslint/no-empty-interface
- [
Lint
] Allow private/protected/index-signature property access in test files - [
Lint
] Change naming convention configurations - [
Lint
] Enable rule@typescript-eslint/no-floating-promises
,@typescript-eslint/no-misused-promises
- [
Hooks
] Fix return type ofuseDelayFn
-
Use
pnpm
instead ofnpm
as the package manager -
[
Lint
] Change enum member naming convention toUPPER_CASE
-
[
Hooks
] ChangeuseIsMounted
to return a function to get the state -
[
NPM
] Rename npm scripttest-coverage
totest-full
-
[
TS
] Enable ruleuseDefineForClassFields
-
[
TS
] DisablednamedExports
of plugintypescript-plugin-css-modules
-
[
Types
] Change type utils for picking keys and propsPickNullableKeys
PickNonNullableKeys
PickUndefinableKeys
PickNonUndefinableKeys
PickNullishKeys
PickNonNullishKeys
PickNullableProps
OmitNullableProps
PickNonNullableProps
OmitNonNullableProps
PickUndefinableProps
OmitUndefinableProps
PickNonUndefinableProps
OmitNonUndefinableProps
PickNullishProps
OmitNullishProps
PickNonNullishProps
OmitNonNullishProps
-
[
Types
] Move some global types into@tecra-pkg/utils-type
-
[
Utils/React
] DeleteReactImmerReducer
- New
@tecra-pkg/utils
@tecra-pkg/utils-react-router
- Rename
@tecra/assets
->@tecra-pkg/assets
@tecra/electron-common
->@tecra-pkg/electron-common
@tecra/electron-main
(packages/electron-main) ->@tecra-app/electron-main
(app/electron-main)@tecra/electron-renderer
(packages/electron-renderer) ->@tecra-app/electron-renderer
(app/electron-renderer)@tecra/eslint-config
(packages/eslint-config) ->@tecra-config/eslint-config
(configs/eslint-config)@tecra/global-types
(packages/global-types) ->@tecra-config/global-types
(configs/global-types)@tecra/hooks
->@tecra-pkg/hooks
@tecra/scripts
(packages/scripts) ->@tecra-config/scripts
(configs/scripts)@tecra/stylelint-config
(packages/stylelint-config) ->@tecra-config/stylelint-config
(configs/stylelint-config)@tecra/tsconfigs
(packages/tsconfigs) ->@tecra-config/tsconfigs
(configs/tsconfigs)@tecra/utils-react
->@tecra-pkg/utils-react
@tecra/utils-redux
->@tecra-pkg/utils-redux
@tecra/utils-test
->@tecra-pkg/utils-test
@tecra/utils-type
->@tecra-pkg/utils-type
- Remove
@tecra/utils-fluentui
- New
@babel/core
v7.22.5@babel/plugin-syntax-flow
v7.18.6@babel/plugin-transform-react-jsx
v7.19.0@testing-library/dom
v8.19.0@types/testing-library__jest-dom
v5.14.5@typescript-eslint/utils
v5.40.1fork-ts-checker-webpack-plugin
v6.5.2identity-obj-proxy
v3.0.0jest-environment-jsdom
v29.5.0jest-resolve
v29.5.0postcss
v8.4.18terser-webpack-plugin
v5.3.6type-fest
v3.2.0webpack
v5.74.0
- Upgrade
@jest/types
v27.5.1 -> v29.5.0@reduxjs/toolkit
v1.6.1 -> v1.8.6@testing-library/jest-dom
v5.14.1 -> v5.16.5@testing-library/react
v12.1.1 -> v12.1.5@testing-library/react-host
v7.0.2 -> v8.0.1@testing-library/user-event
v13.2.1 -> v14.4.3@types/electron-devtools-installer
v2.2.1 -> v2.2.2@types/jest
v27.0.2 -> v29.5.2@types/node
v16.10.2 -> v16.11.68@types/react
v17.0.26 -> v17.0.50@types/react-dom
v17.0.9 -> v17.0.17@types/react-test-renderer
v17.0.1 -> v17.0.2@typescript-eslint/eslint-plugin
v5.4.0 -> v5.40.1@typescript-eslint/experimental-utils
v5.4.0 -> v5.40.1@typescript-eslint/parser
v5.4.0 -> v5.40.1@typescript-eslint/scope-manager
v5.4.0 -> v5.40.1@typescript-eslint/types
v5.4.0 -> v5.40.1@typescript-eslint/typescript-estree
v5.4.0 -> v5.40.1@typescript-eslint/visitor-keys
v5.4.0 -> v5.40.1babel-jest
v27.2.4 -> v29.5.0browserslist
v4.17.2 -> v4.21.4clsx
v1.1.1 -> v1.2.1concurrently
v6.2.2 -> v7.4.0error-oop
v0.4.0 -> v0.6.0electron
v16.0.6 -> v19.0.11electron-builder
v22.11.7 -> v23.6.0eslint
v8.2.0 -> v8.25.0eslint-config-airbnb
v19.0.0 -> v19.0.4eslint-config-airbnb-typescript
v16.1.0 -> v17.0.0eslint-config-prettier
v8.3.0 -> v8.5.0eslint-plugin-import
v2.25.3 -> v2.26.0eslint-plugin-jest
v25.2.4 -> v27.1.3eslint-plugin-jsx-a11y
v6.5.1 -> v6.6.1eslint-plugin-prettier
v4.0.0 -> v4.2.1eslint-plugin-react
v7.27.0 -> v7.31.10eslint-plugin-react-hooks
v4.3.0 -> v4.6.0husky
v7.0.4 -> v8.0.1immer
v9.0.6 -> v9.0.15jest
v27.2.4 -> v29.5.0jest-watch-typeahead
v1.0.0 -> v2.2.2lint-staged
v11.1.2 -> v13.0.3prettier
v2.4.1 -> v2.7.1react-app-rewired
v2.1.8 -> v2.1.9react-redux
v7.2.5 -> v8.0.4react-router
v6.0.1 -> v6.4.2react-router-dom
v6.0.1 -> v6.4.2react-scripts
v4.0.3 -> v5.0.1sass
v1.42.1 -> v1.55.0stylelint
v14.1.0 -> v14.14.0ts-loader
v8.3.0 -> v9.2.6typescript
v4.4.2 -> v4.8.4use-immer
v0.6.0 -> v0.7.0web-vitals
v2.1.0 -> v3.0.4webpack-cli
v4.8.0 -> v4.10.0
- Remove
@fluentui/react
v8.36.0@types/lodash
v4.14.175@types/react-redux
v7.1.21error-oop
v0.6.0jest-circus
v27.2.4lodash
v4.17.21react-scrollbars-custom
v4.0.27ts-essentials
v9.0.0
- Support to open links in external default browser
- [Github] Use cache in CI
- [Hooks] Add parameter
initialValue
intousePrevious
, parameterinitialValue
ofuseBoolean
now is optional - [Hooks] Add new hooks
useIsMounted
andusePersistFn
- [Hooks] Improve
usePrevious
, only re-run effect when value changes - [Hooks] Improve
useCountdown
to avoid unnecessary re-renders - [Hooks] Add tests for hooks
useCountdown
,useInterval
,useSimpleInterval
,useSimpleTimeout
,useTimeout
anduseWhyDidYouUpdate
- [IPC] Add
IpcServer
andIpcClient
- [Lint] When in stage
pre-commit
only lint changed files - [Lint] Use
stylelint-config-recess-order
to lint css properties order - [Lint] Disable stylelint rule
selector-max-id
- [NPM] Add
--if-present
in npm scripts - [NPM] Add npm script
dev
in not-react packages - [Renderer] Display app details in the Introduction UI
- [Renderer] Use
react-router
to route urls - [Test] Support package own
setup.test.ts
- [Test] Support to pass
--verbose
when do unit test - [Types] Add global types
PickProp
,AnyFn
,UnknownFn
andVoidReturn
- [Utils/React] Add utils for callback prop
onRenderXXX
:defaultOnRender
andrenderFactory
- [Utils/React] Add type
ReactImmerReducer
- [Utils/Test] Add
mockLocalStorage
andmockSessionStorage
to help mock local storage and session storage - [Utils/Test] Add test utils:
expectElementSnapshot
,expectSnapshot
,mockConsoleToMatchSnapshot
- [Utils/Type] Add base type utilities:
LowerAlpha
,UpperAlpha
,Alpha
,Digit
andHexDigit
- [Utils/Type] Add type utilities for hex color:
IsHexColor
andMakeHexColor
- [Utils/Type] Add type utilities:
OmitNonNullableProps
OmitNullableProps
OmitUndefinableProps
PickNonNullableKeys
PickNonNullableProps
PickNullableKeys
PickNullableProps
PickUndefinableKeys
PickUndefinableProps
- Change local webpack server port to
4321
- [Git] Use
husky
to execute pre-commit scripts - [Hooks] Simplify
useConstFn
, useuseConstFn
to create updater actions - [Test] Fix mocks setup in test for local storage and session storage
- [Test] Set jest environment to
jest-environment-jsdom
- [Utils/FluenUI] Fix
FluentuiProvider
css class
- [Hooks] Clear timeout when unmount in
useDelayFn
-
[Hooks] Rename
useSimpleInterval
touseSingleInterval
, renameuseSimpleTimeout
touseSingleTimeout
-
[Hooks]
useKey
is longer supported -
[IPC]
IpcMainWrapper
andIpcRendererWrapper
are no longer supported -
[Renderer]
KeyboardCaptor
is longer supported -
[Types] Delete type
IChildrenElementProps
-
[Utils/Redux]
createTypedSelector
is no longer supported, usereact-redux
TypedUseSelectorHook
instead. -
[Utils/Redux]
WritableDraft
won't be re-exported fromimmer
-
[Uitls/Type] Move some global types into
@tecra/utils-type
:Contain
Contained
ExcludeFunction
ExcludeUnderscorePrefix
ExtractFunction
OmitUnderscorePrefix
-
Rename type declarations, here only list the (maybe) important changes
- [Hooks]
IUseBooleanUpdaters
->UseBooleanActions
ISetCountdownUpdater
->SetCountdown
IUseIntervalUpdaters
->UseIntervalActions
IUseSimpleIntervalUpdaters
->UseSingleIntervalActions
IUseSimpleTimeoutUpdaters
->UseSingleTimeoutActions
IUseTimeoutUpdaters
->UseTimeoutActions
IUseToggleUpdaters
->UseToggleActions
- [Types]
IChildrenProps
->ReactChildrenProps
IClientAreaSize
->ClientAreaSize
- [Utils/Redux]
IActions
->ReduxActions
IDispatchingActions
->DispatchingActions
IDispatchingThunks
->DispatchingThunks
IReducer
->ReduxReducer
IThunks
->ReduxThunks
IThunk
->ThunkFn
IThunkAction
->ThunkAction
IThunkActionWithArgs
-> deleted
- [Hooks]
- New
@tecra/utils-react
@tecra/utils-test
- New
babel-jest
v27.2.4eslint
v8.2.0husky
v7.0.4immer
v9.0.6jest
v27.2.4jest-circus
v27.2.4jest-watch-typeahead
v1.0.0react-router
v6.0.1react-router-dom
v6.0.1stylelint-config-recess-order
v2.5.0ts-essentials
v9.0.0use-immer
v0.6.0
- Upgrade
@fluentui/react
v8.28.2 -> v8.36.0@testing-library/react
v12.0.0 -> v12.1.1@testing-library/react-hooks
v7.0.1 -> v7.0.2@types/jest
v26.0.24 -> v27.0.2@types/lodash
v4.14.172 -> v4.14.175@types/node
v14.17.9 -> v16.10.2@types/react
v17.0.18 -> v17.0.26@typescript-eslint/eslint-plugin
v4.30.0 -> v5.4.0@typescript-eslint/experimental-utils
v4.30.0 -> v5.4.0@typescript-eslint/parser
v4.30.0 -> v5.4.0@typescript-eslint/scope-manager
v4.30.0 -> v5.4.0@typescript-eslint/types
v4.30.0 -> v5.4.0@typescript-eslint/typescript-estree
v4.30.0 -> v5.4.0@typescript-eslint/visitor-keys
v4.30.0 -> v5.4.0browserslist
v4.16.7 -> v4.17.2concurrently
v6.2.1 -> v6.2.2electron
v13.1.7 -> v15.0.0eslint-config-airbnb
v18.2.1 -> v19.0.0eslint-config-airbnb-typescript
v14.0.0 -> v16.1.0eslint-plugin-import
v2.24.2 -> v2.25.3eslint-plugin-jest
v24.5.0 -> v25.2.4eslint-plugin-jsx-a11y
v6.4.1 -> v6.5.1eslint-plugin-prettier
v3.4.1 -> v4.0.0eslint-plugin-react
v7.26.1 -> v7.27.0eslint-plugin-react-hooks
v4.2.0 -> v4.3.0prettier
v2.3.2 -> v2.4.1react-redux
v7.2.4 -> v7.2.5sass
v1.38.0 -> v1.42.1stylelint
v13.13.1 -> v14.1.0stylelint-config-recess-order
v2.5.0 -> v3.0.0stylelint-config-sass-guidelines
v8.0.0 -> v9.0.1
- Remove
eslint-plugin-deprecation
v1.2.1
- [Code] Add class
SessionStorage
- [Git] Lint code before git commit (in git pre-commit stage)
- [Github] Add issue templates
- [Fluentui] Add
FluentuiProvider
and use it inWindow
- [Workspaces] Use NPM workspaces to manage source code
- [Test] Use custom jest configurations to do unit test
- [Code] Remove premature performance optimization
- [ESlint] Add new extended configuration
airbnb/hooks
- [ESlint] Add rule
@typescript-eslint/no-empty-function
- [ESlint] Only enable object variable declarator
- [ESlint] Change rule
@typescript-eslint/naming-convening
- [ESlint] Disable rule
react/destructuring-assignment
- [ESlint] Disable rule
react/jsx-props-no-spreading
- [Github] Use action
setup-node@v2
- [Types] These type declarations are moved into global declaration
ReactStyleFunc
IClientAreaSize
IElementPositionSize
IElementSize
- Rename root project name to
tecra
- [Deps] Bump lock file to v2
- [Webpack] Delete support for custom path alias (use NPM workspaces instead).
- [Workspaces] Use NPM workspaces to manage source code
- New
@tecra/assets
@tecra/electron-common
@tecra/electron-main
@tecra/electron-renderer
@tecra/eslint-config
@tecra/hooks
@tecra/global-types
@tecra/scripts
@tecra/stylelint-config
@tecra/tsconfigs
@tecra/utils-fluentui
@tecra/utils-redux
- New
error-oop
v0.4.0eslint-config-airbnb
v18.2.1lint-staged
v11.1.2stylelint
v13.13.1stylelint-config-sass-guidelines
v8.0.0typescript-plugin-css-modules
v3.4.0
- Upgrade
@fluentui/react
v8.21.1 -> v8.28.2@reduxjs/toolkit
v1.6.0 -> v1.6.1@testing-library/user-event
v13.1.9 -> v13.2.1@types/jest
v26.0.23 -> v26.0.24@types/lodash
v4.14.170 -> v4.14.172@types/node
v14.17.4 -> v14.17.9@types/react
v17.0.11 -> v17.0.18@types/react-dom
v17.0.8 -> v17.0.9@types/react-redux
v7.1.16 -> v7.1.18@typescript-eslint/eslint-plugin
v4.28.1 -> v4.30.0@typescript-eslint/experimental-utils
v4.28.1 -> v4.30.0@typescript-eslint/parser
v4.28.1 -> v4.30.0@typescript-eslint/scope-manager
v4.28.1 -> v4.30.0@typescript-eslint/types
v4.28.1 -> v4.30.0@typescript-eslint/typescript-estree
v4.28.1 -> v4.30.0@typescript-eslint/visitor-keys
v4.28.1 -> v4.30.0browserslist
v4.16.6 -> v4.16.7chalk
v4.1.1 -> v4.1.2concurrently
v6.2.0 -> v6.2.1eslint-config-airbnb-typescript
v12.3.1 -> v14.0.0eslint-plugin-import
v2.23.4 -> v2.24.2eslint-plugin-jest
v24.3.6 -> v24.4.0eslint-plugin-prettier
v3.4.0 -> v3.4.1eslint-plugin-react
v7.24.0 -> v7.25.1react-scrollbars-custom
v4.0.25 -> v4.0.27sass
v1.35.1 -> v1.38.0typescript
v4.3.5 -> v4.4.2web-vitals
v2.0.1 -> v2.1.0webpack-cli
v4.7.2 -> v4.8.0
- Remove
@types/speed-measure-webpack-plugin
v1.3.3node-errors-pro
v0.2.0speed-measure-webpack-plugin
v1.5.0typed-css-modules
v0.6.8
- [Common]
- Add new type
Optional<T>
- Add util
wait
to wait for some time - Add declaration file
common.d.ts
- Add new type
- [Build]
- Add internal npm scripts
_cra-build
,_cra-dev
,_cra-test
,_main-build
and_main-dev
- Add new npm script
run-unpacked
to execute the unpacked electron application built byelectron-builder
- Add internal npm scripts
- [Github-Actions]
- Build windows installer and publish it if need
- Do coverage tests
- [IPC] Add new IPC wrapper
IpcMainWrapper
andIpcRendererWrapper
- [RUtils] - DOM
- Improve the performance of
CanvasUtils
- Add new methods in
CanvasUtils
:createLinePainter
,createRectPainter
- Improve the performance of
- [RUtils/React]
- New React Hooks with tests
useBoolean
useConst
useConstFn
useDelayFn
useDoubleTrigger
useForceUpdate
useImmediateFocus
useInterval
useIsFocused
useIsHovered
useMount
usePrevious
useSimpleInterval
useSimpleTimeout
useTimeout
useToggle
useUnmount
useWhyDidYouUpdate
- Add interface
ReactChildrenProp
- New React Hooks with tests
- [RUtils/Fluentui]
- Add namespaces
FluentuiEvents
andFluentuiStyles
- Add namespaces
FluentuiStyleFunctions
,FluentuiTokens
andFluentuiTokenFunctions
- Add namespaces
- [RUtils/Redux]
- Add
thunkCreattorFactory
to create thunks
- Add
- [UI] - Main Window
- Add tests for react components
- Add tests for redux reducers
- Add css properties
overflow
anduser-select
into containerClientArea
- Add
AppInfo
to collect applicatio infomation - Add declaration file
renderer.d.ts
- [Build] Create folder
working
beforebuild
ordev
- [Build] Only do incremental building for scripts
- [Build] Change
browserslist
to 'last 9 chrome versions' - [Build] Typescript: do not skip lib check
- [Eslint] Set rule
@typescript-eslint/no-explicit-any
to warn level in order to enable stricter type limitation - [Eslint] Set rule
prefer-destructuring
to disable the prefer of array destructuring - [Redux] Fix
useDispatchingThunks
not correctly pass arguments - [Test] Fix test for react
- [Test] Ignore messages we output
- [Test] Rename setupTest.ts to
test.setup.ts
, rename reportWebVitals.ts toreport-web-vitals.ts
- [UI] Improve ui performance, rename
InfoDisplay
toIntroduction
which will be displayed only after prepared - [UI] Change
LocalStorage
to be a class
- [Common] Rename 'src/shared' to 'src/common', change import path aliases
- [Public] Change public assets, add
icon.ico
- [RUtils] Delete
options
argument in oldCanvasUtils
methods - [RUtils] Delete
IStrictStyle
andmergeStrictStyles
, move fluentui default theme intoRUtils/Fluentui
- New
@testing-library/react-hooks
v7.0.1@types/react-test-renderer
v17.0.1@typescript-eslint/experimental-utils
v4.28.1@typescript-eslint/scope-manager
v4.28.1@typescript-eslint/types
v4.28.1@typescript-eslint/typescript-estree
v4.28.1@typescript-eslint/visitor-keys
v4.28.1eslint-plugin-deprecation
v1.2.1react-test-renderer
v17.0.2
- Upgrade
@fluentui/react
v8.14.13 -> v8.21.1@reduxjs/toolkit
v1.5.0 -> v1.6.1@testing-library/jest-dom
v5.11.4 -> v5.14.1@testing-library/react
v11.1.0 -> v12.0.0@testing-library/user-event
v12.1.10 -> v13.1.9@types/jest
v26.0.21 -> v26.0.23@types/lodash
v4.14.169 -> v4.14.170@types/node
v14.17.3 -> v14.17.4@types/react-dom
v17.0.7 -> v17.0.8@typescript-eslint/eslint-plugin
v4.24.0 -> v4.28.1@typescript-eslint/parser
v4.24.0 -> v4.28.1concurrently
v6.1.0 -> v6.2.0electron
v13.1.1 -> v13.1.7electron-builder
v22.10.5 -> v22.11.7eslint-plugin-import
v2.23.3 -> v2.23.4eslint-plugin-react
v7.23.2 -> v7.24.0prettier
v2.3.1 -> v2.3.2react-redux
v7.2.3 -> v7.2.4sass
v1.34.0 -> v1.35.1ts-jest
v26.5.4 -> v26.5.6ts-loader
v8.0.18 -> v8.3.0typed-css-modules
v0.6.5 -> v0.6.8typescript
v4.3.3 -> v4.3.5webpack-cli
v4.5.0 -> v4.7.2
- Remove
ts-jest
v26.5.6
- Main Process
- Add
AppPaths
to get appPath and srcPath
- Add
- Main Window
- Add
prepared
property into main redux store and itsusePrepared
hook - Dispatch
prepare
thunk when the app start - Delete serviceWorker, add reportWebVitals to use
web-vitals
- Add
- Shared
- Add
Timer
- Improve type util
DeepReadonly
to support making more structures deep readonly - Add type util
ExcludeUnderscorePrefix
- Add type util
OmitUnderscorePrefix
- Add
- Redux
- Add
IThunk
andIAsyncThunk
type definitions - Re-export
WritableDraft
fromimmer/dist/types/types-external
- Add
- Utils
- Add
IMargin
andIMarginInfo
, and their transformer, addmergeToGridTemplate
- Add
- Compile
- Make typescript more strict
- Rename npm script
build-profile
tobuild:profile
- Enable typescript incremental compilation
- Move webpack plugins into scripts, rename them and use typescript to code them
- Set SMP's format to
human
- Fix npm script
build:profile
to enable profiling in the production build - Fix aliases of renderer webpack
- Delete
custom-gitconfig.ts
- Move webpack configs into scripts, and use typescript to code them
- Move typescript configs into scripts
- Change electron-builder configs to build smaller installer
- Main Window
- Change redux store structure
- Simplify the exports from redux
- Rename
MainPromiseThunk
toMainAsyncThunk
- Eslint
- Allow enum member to be PascalCase style
- Add rule
@typescript-eslint/return-await
atin-try-catch
- Add rule
import/no-default-export
aterror
- Add rule
import/no-deprecated
atwarn
- Set rule
import/no-cycle
toerror
- Move
IDotPosition
andIRectPosition
into Utils/DOM - Use typescript to write scripts, compile them before build or dev
- Redux
- Delete
ReduxHooksFactory
, usecreateTypedSelector
,useDispatchingActions
anduseDispatchingThunks
instead - Support to only export non-internal actions out of redux
- Delete
- Delete
windowIpc
, usemainIpc
andrendererIpc
instead
- Use
lodash
rather thanlodash-es
- New
@typescript-eslint/parser
v4.24.0web-vitals
v2.0.1@types/speed-measure-webpack-plugin
v1.3.3
- Upgrade
@fluentui/react
from v8.8.0 to v8.14.13@reduxjs/toolkit
from v1.5.0 to v1.5.1@testing-library/jest-dom
from v4.2.4 to v5.11.4@testing-library/react
from v9.3.2 to v11.1.0@testing-library/user-event
from v7.1.2 to v12.1.10@typescript-eslint/eslint-plugin
from v4.19.0 to v4.24.0@types/node
from v14.14.32 to v14.17.3@types/react
from v17.0.3 to v17.0.11@types/react-dom
from v17.0.3 to v17.0.7chalk
from v4.1.0 to v4.1.1concurrently
from v6.0.0 to v6.1.0electron
from v12.0.5 to v13.1.1electron-devtools-installer
from v3.1.1 to v3.2.0eslint-config-prettier
from v8.1.0 to v8.3.0eslint-plugin-import
from v2.22.1 to v2.23.3eslint-plugin-jest
from v24.3.2 to v24.3.6eslint-plugin-prettier
from v3.3.1 to v3.4.0eslint-plugin-react
from v7.23.1 to v7.23.2prettier
from v2.2.1 to v2.3.1sass
from v1.32.8 to v1.34.0speed-measure-webpack-plugin
from v1.4.2 to v1.5.0
- Remove
immer
v9.0.1
- Move dependency
react-scripts
to be a dev dependency
- NPM
- Add npm script
pretty
to use prettier to format all code
- Add npm script
- Redux
- Add
useReduxDispatchedActions
anduseReduxDispatchedThunks
hooks, the dispatched actions and dispatched thunks will be cached inReduxHooksFactory
- Add
Components
andContainers
folders - Add
MainPromiseThunk
type - Add support to infer the return type of async thunks while using
useReduxDispatchedThunks
- Add
- Types
- Add new types utils
Object
,ObjectStr
andObjectNum
- Add new types for renderer
IClientAreaSize
IDotPosition
IElementPosition
IElementSize
IOffset
IRectPosition
- Add new types utils
- Frameless Window
- Now only provide an initial
FramelessWindow
andTitleBar
, the client area size will be provided fromTitleBar
- Now only provide an initial
- Fluent UI
- Add event type alias for the following components, see
src/renderer/Utils/Fluentui/EventsInProps.ts
:- ChoiceGroup
- ComboBox
- ContextualMenu
- Dropdown
- List
- Pivot
- TextField
- Toggle
- Add event type alias for the following components, see
- Hooks
- New hooks:
useClientAreaSize
useCountdown
- New hooks:
- DOM
- Add
CanvasUtils
to operate canvas dom, it contains the following methods:drawLines
drawLinesOffset
fillRects
fillRectsOffset
- Add
- Git
- Ignore *.cjs, *.js and *.mjs in src
- Compilation
- Disable
eslint-webpack-plugin
completely
- Disable
- Eslint
- Disable
no-bitwise
rule - Disable
no-constant-condition
rule
- Disable
- Redux
- Rename type
Reducer
toMainReducer
- Rename type
Thunk
toMainThunk
- Disable
immutableCheck
andserializableCheck
when in development
- Rename type
- Move
ColorTransformer
,npm2px
andnpm2pt
into#RUtils/Theme
- Move
WindowIpc
into#MUtils/Ipc
- Rename
src/renderer/Main
tosrc/renderer/MainWindow
- Rename
src/renderer/MainWindow/redux
tosrc/renderer/MainWindow/Redux
- Delete interface
ClientAreaSize
- Delete
AbstractClientArea
, now your own client-area containers should not be inherited fromAbstractClientArea
- Delete custom hook
useReduxDispatch
, please useuseReduxDispatchedActions
oruseReduxDispatchedThunks
instead - Delete
mapMainDispatchToProps
- Upgrade
- Update 'electron' from v12.0.0 to v12.0.5
- Compilation
- Add new NPM script
build-profile
to enable profiling in production build
- Add new NPM script
- React
- Set environment variable
INLINE_RUNTIME_CHUNK
asfalse
to disable the runtime chunk inlining - Set environment variable
PUBLIC_URL
as./
to avoid react loading thehomepage
value of package.json while compiling
- Set environment variable
- Redux
- Add
configureGlobalStore
util function to help creating a global store
- Add
- Eslint
- Add
eslint-plugin-node
into eslint configs - Set
root
totrue
- Add
- Add css id
ThemeProvider
for fluentui's ThemeProvider - Add
Contain
andContained
type util definitions - Use SCSS instead of fluentui css-in-js to apply CSS styles
- Git
- Update .gitattributes
- Compilation
- Refactor base webpack configs
- Stop hacking eslint configs in renderer webpack configs
- Update typescript configs
- Use npm instead of yarn to manage repository
- Change user name from 'YSoftwareTech' to 'YSoftwareRepo'
- New
- Add 'eslint-config-prettier' v8.1.0
- Add 'prettier' v2.2.1
- Add 'sass' v1.32.8
- Add 'typed-css-modules' v0.6.5
- Upgrade
- Update '@fluentui/react' from v8.0.0-beta.49 to v8.8.0
- Update '@types/jest' from v24.0.0 to v26.0.21
- Update '@types/node' from v12.19.9 to v14.14.32
- Update '@types/react' from v17.0.0 to v17.0.3
- Update '@types/react-dom' from v17.0.0 to v17.0.3
- Update '@types/react-redux' from v7.1.15 to v7.1.16
- Update '@typescript-eslint/eslint-plugin' from v4.14.1 to v4.19.0
- Update 'concurrently' from v5.3.0 to v6.0.0
- Update 'electron' from v11.2.1 to v12.0.0
- Update 'electron-builder' from v22.9.1 to v22.10.5
- Update 'eslint-plugin-jest' from v24.1.3 to v24.3.2
- Update 'eslint-plugin-prettier' from v3.3.0 to v3.3.1
- Update 'eslint-plugin-react' from v7.21.5 to v7.23.1
- Update 'immer' from v8.0.0 to v9.0.1
- Update 'react' from v17.0.1 to v17.0.2
- Update 'react-app-rewired' from v2.1.6 to v2.1.8
- Update 'react-dom' from v17.0.1 to v17.0.2
- Update 'react-redux' from v7.2.2 to v7.2.3
- Update 'react-scripts' from v4.0.1 to v4.0.3
- Update 'speed-measure-webpack-plugin' from v1.3.3 to v1.4.2
- Update 'ts-jest' from v26.1.3 to v26.5.4
- Update 'ts-loader' from v8.0.1 to v8.0.18
- Update 'typescript' from v4.1.5 to v4.2.3
- Update 'webpack-cli' from v3.3.12 to v4.5.0
- Compilation
- Add source map when compiling main code by webpack
- Add npm scripts hooks
prebuild
andpredev
, to edit git configs to only permit fast-forward pull - Add
electron-devtools-installer
to install extensions in development mode
- Environment
- Add dependency
node-errors-pro
to support more kinds of errors
- Add dependency
- Redux
- Add
global-state
to improving the performance of redux - Add
createGlobalEntityAdapter
to use adapters in global state, the adapters created bycreateEntityAdapter
(provided by@reduxjs/toolkit
) cannot be used out of redux store - Add
ReduxHooksFactory
, it returnsuseReduxDispatch
anduseReduxSelector
useReduxDispatch
an custom hook to use dispatch in functional containers, pass actions and thunks as the second parameteruseReduxSelector
an custom hook to use the global state in functional containers
- Add
IExactlyActionsDestructuring
andIExactlyThunksDestructuring
to do a strict type check formapMainDispatchToProps
anduseReduxDispatch
- Add
- Fluentui
- Add
IStrictStyle
to do a strict type check for styles - Add
mergeStrictStyles
to useIStrictStyle
- Use
ThemeProvider
to provide theme
- Add
- Transformer
- Add
num2px
andnum2pt
utils
- Add
- WindowManager
- Add
WindowManager
to manage multi windows - Delete the old window managing solution
- Add
- Ipc
- Delete all ipc wrappers
- Environment
- Restructure project, change path aliases
- Update dependency
@fluentui/react
from v7.157.1 to v8.0.0-beta.49 - Update dev dependency
eslint-config-airbnb-typescript
from v12.0.0 to v12.3.1 - Change line length limit, from 100 to 120
- Fluentui
- Update fluentui styles and render utils
- Redux
- Rename
IMapActionsToProps
toIActionsDestructuring
- Rename
IMapThunksToProps
toIThunksDestructuring
- Rename
- Eslint
- Allow 'PascalCase' naming for variable
- Disable
prefer-arrow-callback
- Enable
react-hooks/rules-of-hooks
andreact-hooks/exhaustive-deps
- Scripts
- Delete 'utils.mjs', move the util functions into 'app.mjs'
- dependencies
- @fluentui/react: ^8.0.0-beta.49
- @reduxjs/toolkit: ^1.5.0
- immer: ^8.0.0
- node-errors-pro: ^0.2.0
- react: ^17.0.1
- react-dom: ^17.0.1
- react-redux: ^7.2.2
- react-scripts: 4.0.1
- react-scrollbars-custom: ^4.0.25
- dev dependencies
- @testing-library/jest-dom: ^4.2.4
- @testing-library/react: ^9.3.2
- @testing-library/user-event: ^7.1.2
- @types/electron-devtools-installer: ^2.2.0
- @types/jest: ^24.0.0
- @types/lodash-es: ^4.17.4
- @types/node: ^12.19.9
- @types/react: ^17.0.0
- @types/react-dom: ^17.0.0
- @types/react-redux: ^7.1.15
- @typescript-eslint/eslint-plugin: ^4.14.1
- chalk: ^4.1.0
- concurrently: ^5.3.0
- electron: 11.2.1
- electron-builder: ^22.9.1
- electron-devtols-installer: ^3.1.1
- eslint-config-airbnb-typescript: ^12.3.1
- eslint-plugin-import: ^2.22.1
- eslint-plugin-jest: ^24.1.3
- eslint-plugin-jsx-a11y: ^6.4.1
- eslint-plugin-node: ^11.1.0
- eslint-plugin-prettier: ^3.3.0
- eslint-plugin-react: ^7.21.5
- eslint-plugin-react-hooks: ^4.2.0
- lodash-es: ^4.17.20
- react-app-rewired: ^2.1.6
- rimraf: ^3.0.2
- speed-measure-webpack-plugin: ^1.3.3
- ts-jest: ^26.1.3
- ts-loader: ^8.0.1
- typescript: ^4.1.3
- webpack-cli: ^3.3.12
- create-react-app@4.0.1
- electron@11.1.0
- fluentui@7.155.3
- react@^17.0.1
- typescript@^4.1.3
- custom eslint configurations
- custom webpack features
- concurrently build main process code and renderer process code in development compiling mode
- build main process code firstly and build renderer process code secondly in production compiling mode
- support automatically reloading electron process in development compiling mode
- support path alias in both in main process code and renderer process code
- support compiling common code when compiling main process code or renderer process code, the common code should be placed in
src/shared
- use
speed-measure-webpack-plugin
to show the timecost info in production compiling mode
- custom webpack plugins
- [webpack-electron-reload]
Automatically restart electron process after updating code, and set the cwd to the
working
folder - [webpack-mkdir] Automatically create working directory before starting electron process
- [webpack-electron-reload]
Automatically restart electron process after updating code, and set the cwd to the
- custom type definitions
- ReactStyleFunc
- IReducer, IMapActionsToProps and IMapThunkToProps
- type definitions for fluentui props and fluentui styles
- create-react-app@4.0.1
- electron@11.1.0
- react@^17.0.1
- typescript@^4.1.3
- custom eslint configurations
- custom webpack features
- concurrently build main process code and renderer process code in development compiling mode
- build main process code firstly and build renderer process code secondly in production compiling mode
- support automatically reloading electron process in development compiling mode
- support path alias in both in main process code and renderer process code
- support compiling common code when compiling main process code or renderer process code, the common code should be placed in
src/shared
- use
speed-measure-webpack-plugin
to show the timecost info in production compiling mode
- custom webpack plugins
- [webpack-electron-reload]
Automatically restart electron process after updating code, and set the cwd to the
working
folder - [webpack-mkdir] Automatically create working directory before starting electron process
- [webpack-electron-reload]
Automatically restart electron process after updating code, and set the cwd to the
- custom type definitions
- ReactStyleFunc
- IReducer, IMapActionsToProps and IMapThunkToProps