Releases: Devtography/electron-react-typescript-webpack-boilerplate
v4.1.3
Added
- GitHub community standards & related workflows(#39)
- GitHub workflows for CI.
- Jest config for GitHub Actions -
jest.config.ci.mjs. - NPM scripts:
lintto run ESLint from CLI.jestto replace the originaltestscript with the following changes:- Removed
jest --clearCacheat the beginning as the updated Jest & ts-jest settings execute the dynamic import lines with no issue. - Disabled Node experimental warning message by setting
NODE_NO_WARNINGS=1.
- Removed
jest-cito run Jest with CI config -jest.config.ci.mjs.
Changed
- File extension of Jest & Webpack config files to
mjs. - Jest config to move
ts-jestconfig totransform(#40) - NPM
testscript to run scriptslintthenjest. - Rolled back the value of
moduleResolutionintsconfigtoNode(means.jsfile extension on relative imports is now OPTIONAL). - Enhanced function
pathsToESModuleNameMapperinjest.config.jsto return a less clumsy mapping object.
Updates on package dependencies
Update
- Major version updates:
- Minor & patch version updates:
@types/react-18.0.17->18.0.21(#44)@typescript-eslint/eslint-plugin&@typescript-eslint/parser-5.33.0->5.40.0(#44)electron-builder-23.3.3->23.6.0(#44)eslint-8.22.0->8.25.0(#44)eslint-import-resolver-typescript-3.4.1->3.5.1(#44)eslint-plugin-react-7.30.1->7.31.10(#44)ts-loader-9.3.1-> 9.4.1` (#44)typescript-4.7.4->4.8.4(#44)
Donation
If you've found this project useful, consider buy me a coffee via donations or PayPal. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕
v4.1.2
Added
- Function
pathsToESModuleNameMapperinjest.config.jsto create the module mappings with ESM relative import with file extension (.js) syntax support for Jest from the path aliases set intsconfig.
Changed
- Disable ESLint rule
import/no-extraneous-dependencieson unit test files. - NPM script
testnow clear the cache for Jest before running the test and execute Jest withNODE_OPTIONS=--experimental-vm-modulesflag to allow using dynamic import syntax.
Fixed
- Cannot find module issue reported by TypeScript server on relative imports in the unit test files after setting up native ES module support in [v4.1.0].
Updates on package dependencies
Updated
- Minor & patch version updates:
electron-20.0.1->20.0.2eslint-8.21.0->8.22.0eslint-import-resolver-typescript-3.4.0->3.4.1
Donation
If you've found this project useful, consider buy me a coffee via donations or PayPal. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕
v4.1.1
Fixed
- Cannot find module issue reported by TypeScript server on relative imports after the migration to ES modules.
Updates on package dependencies
Updated
- Minor & patch version updates:
@types/react-18.0.15->18.0.17@typescript-eslint/eslint-plugin&@typescript-eslint/parser-
5.32.0->5.33.0eslint-plugin-jest-26.7.0->26.8.2
Donation
If you've found this project useful, consider buy me a coffee via donations or PayPal. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕
v4.1.0
Added
tsconfig.eslint.jsonto avoid ESLint complains for file not being included in project provided.
Changed
- Migrated from deprecated
.eslintrc(ESLint config with no file extension) toCommonJSfile -.eslintrc.cjs, with the following changes on the configurations:- Different rules and plugins are now applied based on file types, allowing JavaScript files to be linted properly and only using plugins & rules needed on the targeted files.
- Separated config to 4 objects - naming as
baseConfig,tsConfig,jestConfig, andspecialConfigrespectively to maintain the readability on the pervious.eslintrc. eslint-plugin-importis now properly configured for both JavaScript and TypeScript files.jest.config.js&webpack.config.jsare no longer ignored by ESLint.
- Improved the readability of
webpack.config.jsby migrating towebpack-mergefrom usinglodash.deepClone()for merging configuration objects. - Configured Node to resolve JavaScript files as ES modules (
"type": "module"inpackage.json). - Refactored Jest and Webpack config files as ES modules.
Fixed
- Module import order warnings in most modules.
- ESLint warnings & errors on
jest.config.js&webpack.config.js.
Updates on package dependencies
Added
eslint-import-resolver-typescript- Enhanced TypeScript support for ESLintimportpluginwebpack-merge- Replaced the sections usinglodash.deepClone()inwebpack.config.js
Updated
- Major version updates:
electron-19.0.9->20.0.1tsconfig-paths-webpack-plugin-3.5.2->4.0.0
- Minor & patch version updates:
@typescript-eslint/eslint-plugin&@typescript-eslint/parser-5.30.7->5.32.0eslint-8.20.0->8.21.0eslint-plugin-jest-26.6.0->26.7.0electron-builder-23.1.0->23.3.3tsconfig-paths-4.0.0->4.1.0
Removed
eslint-import-resolver-webpack- Not being used in any part of the boilerplatelodash- Replaced bywebpack-mergefor its' usage inwebpack.config.js
Donation
If you've found this project useful, consider buy me a coffee via donations or PayPal. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕
v4.0.0
Added
- Jest as default unit testing framework, with sample test suite for
main. - Integrated Electron preload pattern.
- NPM scripts:
watch-testto run Jest in watch mode.next-rc,next-patch,next-minor&next-majorfor quick package version number advance.
Changed
- Webpack will now take the module path alias from
tsconfig.jsonand set it for you thanks totsconfig-paths-webpack-plugin. Manually set up in Webpack config is no longer needed. tsconfignow configured to useES2020features, with module resolution set toNode16to match the NodeJS version used by Electron.- Migrated to the new
createRootAPI introduced in Reactv18. - Some APIs changed in Electron
mainentry script:mainWindownow useloadFileAPI instead ofloadURL.- Replaced
app.on('ready')withapp.whenReady()to align with syntax from Electron official quick start guide.
electron-buildernow configured to builduniversaldmgfor mac, 32 & 64 bitexefor Windows.- Moved
electron-builder, Webpack & Webpack-related packages tooptionalDependencies. - Revamped
README. - Starting from this version, the maintenance schedule will be on a monthly update basis to keep the package dependencies up to date and keep the development going.
Fixed
- Allow to use
import defaultstatement on non ES modules (e.g. React, lodash) by enablingesModuleInteropintsconfig. #14
Removed
- Mocha in favour of Jest.
- Spectron as it has been deprecated. See - Spectron Deprecation Notice
Updates on package dependencies
Added
@types/jest,jest,ts-jest,eslint-plugin-jest- Jest supporteslint-config-airbnb-typescript- Enhance Airbnb's rules in TypeScriptts-config-paths-webpack-plugin- Loadtsconfigpath alias into Webpack config
Updated
- Major version updates:
react&react-dom-17.0.1->18.2.0@types/react-17.0.0->18.0.15@types/react-dom-17.0.0->18.0.6@typescript-eslint/eslint-plugin&@typescript-eslint/parser-
4.11.0->5.30.7electron-11.1.1->19.0.9eslint-config-airbnb-18.2.1->19.0.4copy-webpack-plugin-7.0.0->11.0.0css-loader-5.0.1->6.7.1electron-builder-22.9.1->23.1.0html-webpack-plugin-4.5.0->5.5.0style-loader-2.0.0->3.3.1ts-loader-8.0.12->9.3.1ts-config-paths-3.9.0->4.0.0
- Minor & patch version updates:
eslint-import-resolver-webpack-0.13.0->0.13.2eslint-plugin-import-2.22.1->2.26.0eslint-plugin-jsx-a11y-6.4.1->6.6.1eslint-plugin-react-7.21.5->7.30.1eslint-plugin-react-hoots-4.2.0->4.6.0lodash-4.17.20->4.17.21webpack-5.11.0->5.73.0webpack-cli-4.3.0->4.10.0
Removed
-
react-router,react-router-dom,@types/react-router,@types/react-router-dom- Not being used in any part of the boilerplate
-
@types/mocha,mocha,ts-node- Replaced by@types/jest,jest&ts-jest -
spectron- Deprecated package; No replacement
Donation
If you've found this project useful, consider buy me a coffee via donations or PayPal. 100% of your donation will fund my coffee buying budget for quality coffee beans from great roasters I know 😉 ☕
* Despite this release is published in late July, the next maintenance release v4.1.0 will be published on schedule in early August.
v3.0.0
3.0.0 - 2020-12-26
Added
- NPM packages
react-router&react-router-domto package dependencies. - NPM package
eslint-plugin-react-hookstodevDependenciesas required by the updated version ofeslint-config-airbnb. - NPM package
copy-webpack-plugintodevDependenciesas replacement ofcopy-pkg-json-webpack-plugin. - NPM packages
@typescript-eslint/eslint-plugin&@typescript-eslint/parsertodevDependenciesfor using ESLint to lint TypeScript.
Changed
- Project is now being developed based on Node.js
v14 (LTS). - Minor version upgrades on package dependencies:
eslint-import-resolver-webpack-0.11.1->0.13.0eslint-plugin-import-2.18.2->2.22.1eslint-plugin-jsx-a11y-6.2.3->6.4.1eslint-plugin-react-7.17.0-> ``7.21.5`lodash-4.17.15->4.17.20
- Major version upgrades on package dependencies:
react&react-dom-16.12.0->17.0.1cross-env-5.2.1->7.0.3css-loader-1.0.1->5.0.1electron-3.1.13->11.1.1electron-builder-20.44.4->22.9.1eslint-5.16.0->7.16.0eslint-config-airbnb-17.1.1->18.2.1file-loader-2.0.0->6.2.0html-webpack-plugin-3.2.0->4.5.0mocha-5.2.0->8.2.1rimraf-2.7.1->3.0.2source-map-loader-0.2.4->2.0.0spectron-5.0.0->13.0.0style-loader-0.23.1->2.0.0ts-loader-5.4.5->8.0.12ts-node-7.0.1->9.1.1typescript-3.7.2- >4.1.3webpack-4.41.2->5.11.0webpack-cli-3.3.10->4.3.0
- Moved
@typespackages fromdependenciestodevDependenciesas those have no need to be included in production builds. - Commands of NPM scripts
dev&prodto make them work with Webpack 5. - Migrated to ESLint from TSLint.
- Updated prefix of internal paths from
@to_to avoid confusions with scoped NPM packages. - Indentation for
.tsfiles is now set as2spaces instead of4. electron-buildersettings:win:- Enabled
asar. (turn it off if the executable built doesn't work) - Disabled one click installer.
- Allowed custom installation directory in the installer built.
- Enabled
mac:- Changed build target back to
dmg.
- Changed build target back to
buildVersionis now being used as build number instead of just another parameter for semantic version number.
- Updated section
Known issuesinREADME.
Fixed
- ESLint errors/warnings on
main.ts&renderer.tsx. electron-builderfails to builddmgonmacOS(issue electron-builder #3990)by upgrading the package version to> 21.2.0.
Removed
- NPM package
copy-pkg-json-webpack-pluginas it doesn't work with Webpack 5 and seems not very well maintained. - NPM packages
acorn&ajvfromdevDependenciesas they're not being used in this boilerplate. - NPM packages
tslint&tslint-microsoft-contribas TSLint is now deprecated.
v2.0.2
2.0.2 - 2019-12-02
v2.0.2 is a minor hotfix release fixed the documentation error and build
error on macOS Catalina(10.15+).
Added
- Extended README section
Getting startedwithnpm startcommand
description. - README section
Known issue.
Changed
- Minor version upgrades on package dependencies.
macOSbuild target topkgfrom defaultdmgdue to no 32-bit apps
support frommacOS Catalinathat causedelectron-builderfails to build
dmgimage onmacOSprior toelectron-builder@21.2.0.
pkgbuild is unaffected and is used as a workaround for the current version
prior to the major version upgrades on dependencies in next release.
Related issue: electron-builder #3990
Fixed
- [Issue #2] - incorrect command
npm run installtonpm installinREADME.
v2.0.1
v2.0.0
2.0.0 - 2019-02-04
v2.0.0 is a major release that most part of the boilerplate has been rewritten.
Added
- ESLint for code checking on Javascript files.
- Airbnb's extensible
.eslintrcpackage & its' peer dependencies. .eslintrcthat extends Airbnb's config and has customised rules configured.- Rule
no-default-exportis set for JavaScript files to align with
TypeScript.
- Rule
- ESLint plugin
eslint-import-resolver-webpackfor ESLint to resolve path
aliases set in Webpack config. - Webpack plugin
copy-pkg-json-webpack-pluginto generate apackage.json
file and pack into Webpack's bundled package for production. - Build commands
build:mac&build:winto package & build the installer of
your Electron app for macOS & Windows usingelectron-builder. - README section "Building the installer for your Electron app" & sub-section
"Extra options".
Changed
- Refactored Webpack config file to have
mainConfig&rendererConfig
cleaned up, and set mode by environment variable. .gitignoreto ignore folderout/which will be auto-generated during the
build process.- README section "How does it work?" is now renamed to "Getting started" &
completed the documentation of this section. - README section "Folder structure" to reflect the changes in
v2.0.0.
Fixed
- CSS files fail to inject into views issue by setting Webpack to use
style-loaderalongside withcss-loaderto bundle the files in Webpack
config file. baseUrlintsconfig.jsonpoints to root directory incorrectly issue.
Corrected to current directory so VSCode can resolves the path aliases
correctly.
Removed
- Redux & React-Redux related settings, including packages listed on
devDependencies, path aliases & folders listed in folder structure.- Since Electron's built-in IPC & basic React states should be enough to get
the works done, and most Electron apps which have their application logic
runs on Electron'smainprocess rather thenrendererprocess actually
don't need React-Redux,redux&react-reduxare no longer included in
this boilerplate. - Redux & React-Redux can still be used on this boilerplate by installing the
package yourself. For details, please refer to the corresponding library's
documents, there's no different than working on any other project which
isn't based on this boilerplate.
- Since Electron's built-in IPC & basic React states should be enough to get
- Separated Webpack config files for
development&productionmode.