Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-596] webpack 5 upgrade #2772

Merged
merged 200 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
da81491
[DDW-732] - Update storybook
renanvalentin Nov 26, 2021
5cfa61f
[DDW-732] Remove depedencies from yarnlock
renanvalentin Nov 29, 2021
2a43c7e
[DDW-732] Downgrade storybook to 6.1.18
renanvalentin Nov 29, 2021
d80dfcc
[DDW-732] Update netfliy
renanvalentin Nov 29, 2021
3c858cd
[DDW-732] Remove deps
renanvalentin Nov 29, 2021
7806127
[DDW-596] enable build with webpack 5
DominikGuzei Nov 29, 2021
b696f1e
[DDW-732] Upgrade back to 6.3.12
renanvalentin Nov 29, 2021
62c6dd9
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
danielmain Dec 3, 2021
8986283
bump webpack-cli
danielmain Dec 3, 2021
cc37528
sovled merge issues
danielmain Dec 3, 2021
deae7cb
[DDW-596] Updated starting steps
danielmain Dec 3, 2021
2d47c10
[DDW-596] make yarn dev work like expected
DominikGuzei Dec 6, 2021
3f6b509
[DDW-596] Deactivate webpack cache
DominikGuzei Dec 6, 2021
b8909ad
[DDW-596] Use wepback default caching behavior
DominikGuzei Dec 6, 2021
cdcaab6
[DDW-821] Replace node-sass with sass (dart-sass)
przemyslaw-wlodek Dec 6, 2021
6f44932
[DDW-596] Fix yarn lockfile
DominikGuzei Dec 7, 2021
18aa558
[DDW-596] Improve electron process webpack plugin
DominikGuzei Dec 7, 2021
5bf23ae
[DDW-596] Cleanup gulpfile
DominikGuzei Dec 7, 2021
812b802
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Dec 7, 2021
0f46337
[DDW-821] Update styles to use new math.div API (dart-sass)
przemyslaw-wlodek Dec 7, 2021
6161e8f
[DDW-596] Fix tests
DominikGuzei Dec 8, 2021
9de9396
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Dec 8, 2021
dc8f225
[DDW-596] Replace deprecated @babel/polyfill pkg
DominikGuzei Dec 8, 2021
b620723
Merge branch 'chore/ddw-596-webpack-5-upgrade' of github.com:input-ou…
DominikGuzei Dec 8, 2021
2df34ec
[DDW-596] Fix lockfile
DominikGuzei Dec 8, 2021
4e10452
[DDW-596] Fix maintaining window size on reload
DominikGuzei Dec 9, 2021
6318737
[DDW-596] Remove electron-connect
DominikGuzei Dec 9, 2021
b84d24f
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Dec 9, 2021
497ca1d
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Dec 13, 2021
a110f28
[DDW-596] Upgrade to nodejs 16
danielmain Dec 21, 2021
4bd8f6b
[DDW-596] Fixed eslint issues
danielmain Dec 22, 2021
c8f4d03
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
danielmain Dec 22, 2021
ead2294
[DDW-596] Fixed new eslint issues
danielmain Dec 22, 2021
915842a
[DDW-596] Fixed prettier and eslint conflicts
danielmain Dec 22, 2021
9e408e6
[DDW-596] Faking cache of electron-packager. Removed unused dependencies
danielmain Dec 22, 2021
5474c9a
[DDW-596] Removed logs
danielmain Dec 23, 2021
fadfb7c
[DDW-596] Upgraded to storybook 6
danielmain Dec 23, 2021
b53b9d6
[DDW-596] Upgraded story files to storybook 6
danielmain Dec 24, 2021
d096de3
[DDW-596] Put back required gulptask
mchappell Dec 31, 2021
5b66cae
[DDW-596] Configuration steps
mchappell Jan 4, 2022
9ae097a
[DDW-596] Conversion steps
mchappell Jan 4, 2022
3e1730f
[DDW-596] Migration steps
mchappell Jan 4, 2022
acfcf12
[DDW-596] Cleanup steps
mchappell Jan 4, 2022
a766b16
[DDW-596] Resolve extensions in renderer
mchappell Jan 4, 2022
79c30d1
[DDW-596] Remove config files not needed
mchappell Jan 5, 2022
8bd9b20
[DDW-596] Use asset/source instead of svg-inline-loader
mchappell Jan 5, 2022
58553c6
[DDW-596] Updated packages
mchappell Jan 5, 2022
f38373c
[DDW-596] Fix lockfile
mchappell Jan 5, 2022
c9db715
[DDW-596] Use new story hierarchy separator for stories
mchappell Jan 5, 2022
37dc26a
[DDW-596] removed storybook addon-essentials
mchappell Jan 5, 2022
3b42e64
[DDW-596] Fixed storybook webpack configuration
mchappell Jan 5, 2022
912a0e7
[DDW-596] Update enum map declaration
mchappell Jan 5, 2022
d66e715
[DDW-596] Fix enumMap type
mchappell Jan 5, 2022
2cdccff
[DDW-596] Use unique babel for storybook only
renanvalentin Jan 5, 2022
845b418
[DDW-596] Add StoryProvider to broken stories
renanvalentin Jan 5, 2022
5b69c2f
[DDW-596] Fix spinner svg
renanvalentin Jan 5, 2022
4313a31
[DDW-596] Fixed issues with svgs in renderer and storybook
mchappell Jan 6, 2022
eea1174
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
mchappell Jan 6, 2022
272dc98
[DDDW-596] Merge develop and update ts
mchappell Jan 6, 2022
343ac9f
[DDW-596] Remove migration script from repository
mchappell Jan 6, 2022
539fce7
[DDW-596] revert enumMap casting as any
mchappell Jan 6, 2022
ba013d8
[DDW-596] Update babel-configuration
mchappell Jan 7, 2022
5e771d7
[DDW-596] Updated gulpfile to re-include e2e watch functionality
mchappell Jan 10, 2022
108349e
[DDW-596] Updated default messages
mchappell Jan 10, 2022
1b83add
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
mchappell Jan 10, 2022
a295f7d
[DDW-596] Updated yarn2nix.nix
mchappell Jan 10, 2022
2c5c6de
[DDW-596] Updated lockfile
mchappell Jan 10, 2022
d9c4dca
[DDW-596] Removed storybook/semver
mchappell Jan 10, 2022
a5b183c
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
mchappell Jan 10, 2022
634d369
[DDW-596] Merged develop branch with ts changes
mchappell Jan 10, 2022
c07514d
[DDW-596] Fixed some CI Issues
danielmain Jan 10, 2022
c53dc41
[DDW-596] Updated tsc nix check
mchappell Jan 11, 2022
89e6f15
[DDW-596] Updated nix and package to use node version 16
mchappell Jan 11, 2022
d8470a7
[DDW-596] Reverted use of node-sass in favour of sass
mchappell Jan 12, 2022
9b57757
[DDW-596] Put electron-chromedriver back
mchappell Jan 14, 2022
b3fdd60
[DDW-596] Removed electron-chromedriver
mchappell Jan 14, 2022
de37361
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
mchappell Jan 15, 2022
3cad476
[DDW-596] Continue develop merge
mchappell Jan 15, 2022
2448c0b
[DDW-596] used list to construct daedalus node module in yarn2nix
mchappell Jan 17, 2022
330cbd9
[DDW-596] processed environment variables correctly
mchappell Jan 17, 2022
6461e31
[DDW-596] updated yarn2nix to use for loop to prevent breaking window…
mchappell Jan 18, 2022
2d949a0
[DDW-596] applied prettier formatting
mchappell Jan 31, 2022
2df8fc7
[DDW-596] Applied prettier formatting
mchappell Jan 31, 2022
6beb2b8
Merge branch develop into chore/ddw-596-webpack-5-upgrade
DominikGuzei Mar 24, 2022
50810c4
[DDW-1037] Upgrade the merge-deep package
szymonmaslowski Mar 24, 2022
f7869f7
[DDW-1037] Upgrade the url-parse package
szymonmaslowski Mar 28, 2022
2ea7223
[DDW-1037] Upgrade the minimist package
szymonmaslowski Mar 28, 2022
8279898
Merge remote-tracking branch 'origin/develop' into chore/ddw-1037-vul…
szymonmaslowski Mar 28, 2022
1611436
[DDW-1037] Upgrade the lodash-es package
szymonmaslowski Mar 30, 2022
3af72db
[DDW-1037] Upgrade the webpack-hot-middleware package responsible for…
szymonmaslowski Mar 30, 2022
47ce9f1
[DDW-1037] Upgrade the simple-get package
szymonmaslowski Mar 31, 2022
948fb91
[DDW-1037] Upgrade the shelljs package
szymonmaslowski Mar 31, 2022
ce50448
[DDW-1037] Upgrade the marked package
szymonmaslowski Mar 31, 2022
6dd2ce9
Merge remote-tracking branch 'origin/develop' into chore/ddw-1037-vul…
szymonmaslowski Mar 31, 2022
69a25c2
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Mar 31, 2022
756cb85
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade-old
DominikGuzei Mar 31, 2022
7630ce8
[DDW-1037] Upgrade the copy-props package
szymonmaslowski Apr 1, 2022
0ca78e5
Revert "[DDW-1037] Upgrade the minimist package"
szymonmaslowski Apr 1, 2022
403378f
Merge remote-tracking branch 'origin/develop' into chore/ddw-1037-vul…
szymonmaslowski Apr 1, 2022
b25c9ba
[DDW-1037] Add changelog entry
szymonmaslowski Apr 1, 2022
8b58ef9
[DDW-1037] Fix prismjs version using resolutions
szymonmaslowski Apr 1, 2022
cb47a8c
[DDW-1037] Upgrade the plist package
szymonmaslowski Apr 2, 2022
16f263f
Merge branch 'develop' into chore/ddw-1037-vulnerabilities-pt1
szymonmaslowski Apr 4, 2022
44bfcd4
Merge branch 'chore/ddw-1037-vulnerabilities-pt1' into chore/ddw-1066…
szymonmaslowski Apr 4, 2022
8204bfc
Fix prettier formatting
DominikGuzei Apr 4, 2022
32d6f7b
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Apr 4, 2022
a5bef70
Merge remote-tracking branch 'origin/develop' into chore/ddw-1066-vul…
szymonmaslowski Apr 4, 2022
835652a
re-enable webpack dev main plugin
DominikGuzei Apr 4, 2022
1f112ca
Fix wrong window position/size on reload bug
DominikGuzei Apr 5, 2022
35d00e6
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Apr 5, 2022
ae10f8c
merge-in latest develop
DominikGuzei Apr 5, 2022
1cdb483
[DDW-1067] Upgrade the minimist package
szymonmaslowski Apr 6, 2022
1115f52
[DDW-1067] Upgrade the trim-newlines package
szymonmaslowski Apr 6, 2022
7d526ea
improve dev workflow with webpack + SWC
DominikGuzei Apr 7, 2022
7db439b
configure storybook to use SWC too
DominikGuzei Apr 7, 2022
ea71003
Merge remote-tracking branch 'origin/chore/ddw-596-webpack-5-upgrade'…
szymonmaslowski Apr 8, 2022
30d56e3
[DDW-596] Fix linting issues
szymonmaslowski Apr 11, 2022
da6a79b
[DDW-1067] Bump react-markdown version
szymonmaslowski Apr 11, 2022
46b00bd
[DDW-596] Fix part of TS inssues
szymonmaslowski Apr 11, 2022
e5aa7f3
Merge branch 'chore/ddw-1066-vulnerabilities-pt2' into chore/ddw-596-…
szymonmaslowski Apr 12, 2022
081bfac
Merge branch 'chore/ddw-1067-vulnerabilities-pt3' into chore/ddw-596-…
szymonmaslowski Apr 12, 2022
40d873b
Merge remote-tracking branch 'origin/develop' into chore/ddw-596-webp…
szymonmaslowski Apr 12, 2022
ac1aa5e
[DDW-1067] Upgrade the normalize-url package
szymonmaslowski Apr 12, 2022
4d8edf7
[DDW-1067] Upgrade the y18n package
szymonmaslowski Apr 12, 2022
3df29e7
[DDW-596] Fix terms of usage file loading error
szymonmaslowski Apr 12, 2022
bb42ee9
[DDW-596] Move ts-ignore for unfixable TS1320 error
DominikGuzei Apr 13, 2022
1da29f2
[DDW-596] Generate sass definitions in dev mode
DominikGuzei Apr 13, 2022
98ce8b0
[DDW-596] Use optional type instead of undefined
DominikGuzei Apr 13, 2022
ef1d4cb
[DDW-596] Cast partial wallet data to Wallet type in one of wallet ut…
szymonmaslowski Apr 14, 2022
8954307
[DDW-596] Remove unused i18n util object from e2e wallet specific tes…
szymonmaslowski Apr 14, 2022
2463bb4
[DDW-596] Remove object exported as a default from wallet e2e tests h…
szymonmaslowski Apr 14, 2022
2e10df3
[DDW-596] Remove unused objects from wallet e2e tests utils
szymonmaslowski Apr 14, 2022
e5ce1fe
[DDW-596] Remove unused objects from wallet e2e tests utils
szymonmaslowski Apr 14, 2022
276ec2a
[DDW-596] Supress no-this-alias errors in the wallet e2e tests helper…
szymonmaslowski Apr 14, 2022
a8c684f
[DDW-596] Remove unneded ts-ignore comments
szymonmaslowski Apr 14, 2022
68b9647
[DDW-596] Convert BigNumber object to string
szymonmaslowski Apr 14, 2022
861007e
[DDW-596] Add type for context object in the setup-e2e file, Install …
szymonmaslowski Apr 14, 2022
0851835
[DDW-596] Fix promise return type
DominikGuzei Apr 14, 2022
8fbe934
[DDW-596] Delete unused discreet mode story comp
DominikGuzei Apr 14, 2022
811a303
[DDW-596] Remove unused block replay channel
DominikGuzei Apr 14, 2022
1b2def3
[DDW-596] Fix invalid default arg
DominikGuzei Apr 14, 2022
1fc648b
[DDW-596] Fix various ts errors in e2e helpers
DominikGuzei Apr 14, 2022
82663af
[DDW-596] Add type for global.isFlight
DominikGuzei Apr 14, 2022
07d4c33
[DDW-596] map actual ipc renderer in preload
DominikGuzei Apr 14, 2022
6a91ff5
[DDW-596] Make isHidden optional of the termsOfUseHelpers.waitForVisi…
szymonmaslowski Apr 14, 2022
85e4db2
[DDW-596] Make isHidden optional of the migrationHelpers.waitForVisib…
szymonmaslowski Apr 14, 2022
6012c8a
[DDW-596] Make few arguments of few helper faunctions optional in the…
szymonmaslowski Apr 14, 2022
879b907
[DDW-596] Change callback from function style to arrow function
szymonmaslowski Apr 14, 2022
0524fd8
[DDW-596] Make one of arguments of a helper faunction optional in the…
szymonmaslowski Apr 14, 2022
ba56f58
[DDW-596] Remove bunch of redundat ts-ignore comments
szymonmaslowski Apr 14, 2022
a003526
[DDW-596] Make last three arguments of the generateAssetToken helper …
szymonmaslowski Apr 14, 2022
ddb65a2
[DDW-596] Remove redundant unit property of metadata argument of the …
szymonmaslowski Apr 14, 2022
b5d4114
[DDW-596] Pass correct default option for knob select for currencies
szymonmaslowski Apr 14, 2022
c6e868b
[DDW-596] Use select knob correctly in WalletSettingsScreen story
szymonmaslowski Apr 14, 2022
918629c
[DDW-596] Move ts-ignore to proper place
szymonmaslowski Apr 14, 2022
b21ee85
[DDW-596] Add declarations for global properties ipcRenderer, isFligh…
szymonmaslowski Apr 14, 2022
f24a6c4
Merge remote-tracking branch 'origin/chore/ddw-596-webpack-5-upgrade'…
DominikGuzei Apr 14, 2022
5f020d8
[DDW-596] disable eslint rules for e2e tests
DominikGuzei Apr 14, 2022
fb66463
[DDW-596] remove unused discreet mode component
DominikGuzei Apr 14, 2022
f46a22b
[DDW-596] fix ts errors in e2e setup
DominikGuzei Apr 14, 2022
d7d4dd2
Merge remote-tracking branch 'origin/develop' into chore/ddw-596-webp…
szymonmaslowski Apr 15, 2022
523a33d
[DDW-1047] Bump the version of the node-fetch
szymonmaslowski Apr 15, 2022
a63390e
Merge remote-tracking branch 'origin/chore/ddw-596-webpack-5-upgrade'…
DominikGuzei Apr 19, 2022
4aa0922
[DDW-596] remove some simple scripts from gulp
DominikGuzei Apr 19, 2022
889fbb6
[DDW-596] fix and improve i18n workflow
DominikGuzei Apr 21, 2022
e1a612b
[DDW-596] switch to SWC and latest eslint
DominikGuzei Apr 27, 2022
6cc778b
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Apr 27, 2022
d567319
[DDW-596] merge-in latest develop
DominikGuzei May 9, 2022
38726c8
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei May 9, 2022
e39a29c
[DDW-596] fix storybook
DominikGuzei May 10, 2022
392ea1e
[DDW-596] change netlify node version
DominikGuzei May 10, 2022
a9fc373
[DDW-596] fix lint errors
DominikGuzei May 10, 2022
008403d
[DDW-596] manage translations
DominikGuzei May 10, 2022
1b68f1c
[DDW-596] fix broken tests
DominikGuzei May 13, 2022
fb20d15
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei May 13, 2022
8072245
[DDW-596] fix merge conflicts
DominikGuzei May 13, 2022
0d1acb4
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei May 13, 2022
595a29f
[DDW-596] revert back to prettier 2.1.2
DominikGuzei May 16, 2022
2b8bb60
[DDW-596] Fix mobx errors reverting @swc/core version
szymonmaslowski May 17, 2022
c65462d
Merge remote-tracking branch 'origin/develop' into chore/ddw-596-webp…
szymonmaslowski May 20, 2022
8328898
[DDW-596] Try to fix the Linux build
michalrus May 25, 2022
9cef1a5
[DDW-596] Fix Linux and Darwin builds
michalrus May 27, 2022
1ed44ea
[DDW-596] Sort Darwin installer deps + add a comment to webpack config
michalrus May 30, 2022
1e2276e
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
michalrus May 30, 2022
15126d9
[DDW-596] Fix Windows build
michalrus May 30, 2022
b6450aa
[DDW-596] One moar Windows fix
michalrus May 30, 2022
786e1e5
[DDW-596] Fix `CHANGELOG.md`
michalrus May 31, 2022
9ff07b8
[DDW-596] Fix Darwin signature of new `*.node` paths
michalrus May 31, 2022
f6f565e
[DDW-596] Try putting _all_ native extensions under `node_modules/` f…
michalrus May 31, 2022
1890cd1
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
michalrus Jun 6, 2022
870ad0f
[DDW-1110] Turn off Boehm GC in Nix
michalrus Jun 13, 2022
b02eee9
[DDW-596] remove duplicated token files
DominikGuzei Jun 14, 2022
9d0a031
[DDW-596] remove duplicated wallet summary asset file
DominikGuzei Jun 14, 2022
d7d4a5d
[DDW-596] remove unused method instead of commenting it out
DominikGuzei Jun 14, 2022
d34c73f
[DDW-596] Substitute `detection.node` with the one with already chain…
michalrus Jun 15, 2022
e7e6c07
[DDW-596] update i18n messages
DominikGuzei Jun 16, 2022
e1f25c7
Merge remote-tracking branch 'origin/chore/ddw-596-webpack-5-upgrade'…
DominikGuzei Jun 16, 2022
112bd74
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
DominikGuzei Jun 20, 2022
bb335e2
[DDW-596] update to latest develop
DominikGuzei Jun 20, 2022
38e13cc
[DDW-596] Drop `minimize-runtime-dependencies` superseded by #2997
michalrus Jun 21, 2022
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
30 changes: 0 additions & 30 deletions .babelrc

This file was deleted.

8 changes: 4 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ env:
ARTIFACT_BUCKET: s3://ci-output-sink
steps:
- label: 'daedalus-x86_64-darwin'
command: 'scripts/build-installer-unix.sh--nix-2.5 --build-id $BUILDKITE_BUILD_NUMBER'
command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
env:
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
agents:
queue: daedalus
system: x86_64-darwin
- label: 'daedalus-aarch64-darwin'
command: 'scripts/build-installer-unix.sh--nix-2.5 --build-id $BUILDKITE_BUILD_NUMBER'
command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
env:
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
UPLOAD_DIR_OVERRIDE: UNSAFE-internal-build
agents:
queue: daedalus
system: aarch64-darwin
- label: 'daedalus-x86_64-linux-nix'
command: 'scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER'
command: 'scripts/with-nix-2.5.sh scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER'
agents:
system: x86_64-linux
- label: 'daedalus-x86_64-windows-nix'
command: 'scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER'
command: 'scripts/with-nix-2.5.sh scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER'
agents:
system: x86_64-linux

Expand Down
18 changes: 12 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"prettier/babel",
"prettier/@typescript-eslint",
"prettier/react",
"plugin:jest/recommended"
],
"env": {
Expand All @@ -22,9 +19,11 @@
"jest": true
},
"rules": {
"arrow-body-style": 0,
"class-methods-use-this": 0,
"consistent-return": "warn",
"@typescript-eslint/generic-spacing": 0,
"@typescript-eslint/space-after-type-colon": 0,
"jsx-a11y/alt-text": 0,
"lines-between-class-members": 0,
"global-require": 0,
Expand Down Expand Up @@ -60,6 +59,7 @@
"react/destructuring-assignment": 0,
"react/display-name": 0,
"react/jsx-curly-brace-presence": 0,
"react/jsx-curly-newline": 0,
"react/jsx-filename-extension": 0,
"react/jsx-fragments": 0,
"react/jsx-no-bind": "warn",
Expand All @@ -76,22 +76,28 @@
"@typescript-eslint/no-empty-function": 1,
"@typescript-eslint/ban-types": 1,
"import/no-unresolved": 1,
"@typescript-eslint/no-var-requires": 1,
"@typescript-eslint/no-var-requires": 0,
"camelcase": 1,
"no-empty": 1,
"@typescript-eslint/no-explicit-any": 1,
"no-shadow": 1,
"react/no-did-update-set-state": 1,
"react/sort-comp": 0,
"react/state-in-constructor": 0,
"react/static-property-placement": 0
"react/static-property-placement": 0,
"react/jsx-no-useless-fragment": 0,
"prefer-regex-literals": 0,
"no-unused-vars": "warn",
"react/no-unused-class-component-methods": "warn",
"react/no-unstable-nested-components": "warn",
"no-promise-executor-return": "warn",
"default-param-last": "warn"
},
"plugins": ["@typescript-eslint", "import", "promise", "react", "jest"],
"globals": {
"API": true,
"API_VERSION": true,
"NETWORK": true,
"MOBX_DEV_TOOLS": true,
"BUILD_NUMBER": true,
"Process": true // TODO: remove after fix
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
node-version: "16"
- name: Install dependencies
run: yarn
- name: Publish to Chromatic
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
/node_modules.*

# OSX
.DS_Store
Expand All @@ -46,6 +47,9 @@ installers/config.yaml
installers/icons/electron.icns
installers/installer-config.json
installers/topology.yaml
installers/csl-daedalus/
installers/delegation.cert
installers/signing.key

# temporary certs for daedalus dev
tls/client
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
!features/
!storybook/
!hardware-wallet-tests/
!tests/

# Now we ignore all files
*.*
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

### Chores

- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
- Bumped vulnerable dependencies versions ([PR 2943](https://github.com/input-output-hk/daedalus/pull/2943))
- Added support for Trezor firmware 2.5.1 ([PR 2991](https://github.com/input-output-hk/daedalus/pull/2991))
- Added steps on how to link with `react-polymorph` and other external UI libraries ([PR 2948](https://github.com/input-output-hk/daedalus/pull/2948))
- Published selfnode installers for all 3 platforms ([PR 2971](https://github.com/input-output-hk/daedalus/pull/2971))
Expand Down
25 changes: 25 additions & 0 deletions declaration.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import { IpcRenderer } from 'electron';
import type { request as httpRequest } from 'http';
import type { request as httpsRequest, globalAgent } from 'https';
import { Environment } from './source/common/types/environment.types';

declare module '*.svg' {
const content: any;
export default content;
Expand All @@ -22,6 +27,15 @@ type Daedalus = {
};
};

interface Http {
request: httpRequest;
}

interface Https {
request: httpsRequest;
Agent: globalAgent;
}

export type $ElementType<
T extends { [P in K & any]: any },
K extends keyof T | number
Expand All @@ -39,7 +53,18 @@ declare global {
WALLET_COUNT: number;
}
}
/* eslint-disable no-var, vars-on-top */
var daedalus: Daedalus;
var environment: Environment;
var http: Http;
var https: Https;
var legacyStateDir: string;
var isFlight: boolean;
var ipcRenderer: Pick<
IpcRenderer,
'on' | 'once' | 'send' | 'removeListener' | 'removeAllListeners'
>;
/* eslint-enable no-var, vars-on-top */
}

export {};
164 changes: 3 additions & 161 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,123 +1,5 @@
const gulp = require('gulp');
const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const shell = require('gulp-shell');
const electronConnect = require('electron-connect');
const mainWebpackConfig = require('./source/main/webpack.config');
const rendererWebpackConfig = require('./source/renderer/webpack.config');

// Setup electron-connect server to start the app in development mode
let electronServer;
const electronServerAgs = ['--inspect=9229'];
// Gulp input sources for main and renderer compilation
const mainInputSource = () => gulp.src('source/main/index.ts');
const rendererInputSource = () => gulp.src('source/renderer/index.ts');
// Webpack watch configs
const mainWebpackWatchConfig = Object.assign({}, mainWebpackConfig, {
watch: true,
});
const rendererWebpackWatchConfig = Object.assign({}, rendererWebpackConfig, {
watch: true,
});
// Gulp output destinations for main and renderer compilation
const mainOutputDestination = () => gulp.dest('dist/main');
const rendererOutputDestination = () => gulp.dest('dist/renderer');

/**
* Creates an electron-connect server instance that enables
* us to control our app (restarting / reloading)
* @param env - electron app environment
* @param args - additional spawn options
*/
const createElectronServer = (env, args = []) => {
electronServer = electronConnect.server.create({
spawnOpt: {
env: Object.assign({}, process.env, env),
args,
},
});
};

const buildMain = () => () =>
mainInputSource()
.pipe(webpackStream(mainWebpackConfig, webpack))
.pipe(mainOutputDestination());

const buildMainWatch = () => (done) =>
mainInputSource()
.pipe(
webpackStream(mainWebpackWatchConfig, webpack, () => {
// Restart app every time after main script has been re-compiled
electronServer.restart(electronServerAgs);
done();
})
)
.pipe(mainOutputDestination());

const buildRenderer = () => () =>
rendererInputSource()
.pipe(webpackStream(rendererWebpackConfig, webpack))
.pipe(rendererOutputDestination());

const buildRendererWatch = () => (done) =>
rendererInputSource()
.pipe(
webpackStream(rendererWebpackWatchConfig, webpack, () => {
if (electronServer) {
// Reload app every time after renderer script has been re-compiled
electronServer.reload();
}
done();
})
)
.pipe(rendererOutputDestination());

gulp.task(
'clear:cache',
shell.task('rimraf ./node_modules/.cache && rimraf .cache-loader')
);

gulp.task('clean:dist', shell.task('rimraf ./dist'));

gulp.task('server:start', (done) => {
electronServer.start(electronServerAgs);
done();
});

gulp.task('server:create:dev', (done) => {
createElectronServer({
NODE_ENV: process.env.NODE_ENV,
XCURSOR_PATH: '/usr/share/icons' || 'development',
});
done();
});

gulp.task('server:create:debug', (done) => {
createElectronServer({
NODE_ENV: process.env.NODE_ENV,
XCURSOR_PATH: '/usr/share/icons' || 'development',
});
done();
});

gulp.task('build:main', buildMain());

gulp.task('build:main:watch', buildMainWatch());

gulp.task('build:renderer:html', () =>
gulp.src('source/renderer/index.html').pipe(gulp.dest('dist/renderer/'))
);

gulp.task('build:renderer:assets', buildRenderer());

gulp.task(
'build:renderer',
gulp.series('build:renderer:html', 'build:renderer:assets')
);

gulp.task('build:renderer:watch', buildRendererWatch());

gulp.task('build', gulp.series('clean:dist', 'build:main', 'build:renderer'));

gulp.task('prepare:themes:utils', () =>
gulp
Expand Down Expand Up @@ -169,20 +51,7 @@ gulp.task(
)
);

gulp.task('typedef:sass', shell.task('yarn typedef:sass --watch'));

gulp.task(
'build:watch',
gulp.series(
'clean:dist',
'server:create:dev',
'build:renderer:html',
process.argv.includes('--disable-electron-reload')
? 'build:main'
: 'build:main:watch',
'build:renderer:watch'
)
);
gulp.task('clean:dist', shell.task('rimraf ./dist'));

gulp.task('build:themes', gulp.series('clean:dist', 'prepare:themes'));

Expand All @@ -193,33 +62,6 @@ gulp.task(
)
);

gulp.task('test:e2e:watch', gulp.series('build:watch', 'test:e2e:nodemon'));

gulp.task('purge:translations', shell.task('rimraf ./translations/messages'));

gulp.task('electron:inspector', shell.task('yarn electron:inspector'));

gulp.task(
'start',
shell.task(
`cross-env NODE_ENV=${process.env.NODE_ENV || 'production'} electron ./`
)
);

gulp.task(
'dev',
gulp.parallel(
gulp.series('server:create:dev', 'build:watch', 'server:start'),
gulp.series('typedef:sass')
)
);
gulp.task('e2e:watch', gulp.series('clean:dist', shell.task('yarn dev')));

gulp.task(
'debug',
gulp.series(
'server:create:debug',
'build:watch',
'server:start',
'electron:inspector'
)
);
gulp.task('test:e2e:watch', gulp.series('e2e:watch', 'test:e2e:nodemon'));
Loading