[No QA] [TS migration] Migrate 'Config' files to TypeScript#37718
Conversation
|
@cead22 made updates! |
| info " • ENV file: $ENV_FILE" | ||
| info "" | ||
| npx webpack --config config/webpack/webpack.desktop.js --env envFile=$ENV_FILE | ||
| npx webpack --config config/webpack/webpack.desktop.ts --env file=$ENV_FILE |
There was a problem hiding this comment.
NAB, but should we consider updating ENV everywhere here to ENVIRONMENT?
There was a problem hiding this comment.
It's up to you, let me know what you'd like to do. I didn't think of it
There was a problem hiding this comment.
I think we should update it
| // eslint-disable-next-line @dword-design/import-alias/prefer-alias, import/no-relative-packages -- alias imports don't work for webpack | ||
| import {dependencies as desktopDependencies} from '../../desktop/package.json'; | ||
| import type Environment from './types'; | ||
| import getCommonConfig from './webpack.common'; |
There was a problem hiding this comment.
I'm going to change it, thanks
| import CustomVersionFilePlugin from './CustomVersionFilePlugin'; | ||
| import type Environment from './types'; | ||
|
|
||
| // require is necessary, there are no types for this package and the declaration file can't be seen by the build process which causes an error. |
| }; | ||
|
|
||
| function mapEnvToLogoSuffix(envFile) { | ||
| function mapEnvToLogoSuffix(envFile: string): string { |
There was a problem hiding this comment.
NAB but envFile => environmentFile. Let's do this for all the truncated variable names in these files (like env below too)
|
@cead22 made updates! |
cead22
left a comment
There was a problem hiding this comment.
2 more small changes and we can
envFile => environmentFile and the one in the review
| import type {Configuration as DevServerConfiguration} from 'webpack-dev-server'; | ||
| import {merge} from 'webpack-merge'; | ||
| import type Environment from './types'; | ||
| import getCommonConfig from './webpack.common'; |
There was a problem hiding this comment.
| import getCommonConfig from './webpack.common'; | |
| import getCommonConfiguration from './webpack.common'; |
|
@cead22 PR updated again! |
|
|
||
| /* eslint-disable no-param-reassign */ | ||
|
|
||
| /* eslint-disable @typescript-eslint/naming-convention */ |
There was a problem hiding this comment.
| const custom: CustomWebpackConfig = require('../config/webpack/webpack.common')({ | |
| const custom: CustomWebpackConfig = require('../config/webpack/webpack.common').default({ |
| rules: RuleSetRule[]; | ||
| }; | ||
| }; | ||
|
|
There was a problem hiding this comment.
Even if any of the config prop is not set we should still set our props.
| if (config.resolve && config.plugins && config.module) { | |
| if (!config.resolve) { | |
| config.resolve = {}; | |
| } | |
| if (!config.plugins) { | |
| config.plugins = []; | |
| } | |
| if (!config.module) { | |
| config.module = {}; | |
| } |
|
@s77rt done! |
|
@cead22 looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/cead22 in version: 1.4.59-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|


Details
Fixed Issues
$ #25331
PROPOSAL: N/A
Tests
--publish alwaysfrom the last line of build-desktop.shnpm run buildnpm run build-stagingnpm run build-adhocnpm run webnpm run desktop-buildnpm run desktopMake sure the app builds with no errors, check if both desktop and web app are running correctly.
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.