* Ensure all packages remove a node_modules in their folder when cleaning * Upgrade typescript to 5.6.3 and move to root package.json Note that this currently fails to build the types package due to @types/node which I'm going to try to remove * Update @types/node to 20.11 to match .nvmrc * Upgrade zen-observable to 0.10.0 It looks like localforage-observable uses its own version of zen-observable because it hasn't been updated in years. This seems like something we probably should remove. * Update yargs to 17.7.2 * Update webpack-dev-server to 5.1.0 * Remove webpack-bundle-analyzer since we haven't used it in years * Update webpack to 5.95.0 * Update web-vitals to 4.2.4 * Update turndown to 7.2.0 * Update tinycolor2 to 1.6.0 * Update timezones.json to 1.7.0 * Update stylelint to 16.10.0, stylelint-config-recommended-scss to 14.1.0, and stylelint-scss to 6.8.1 * Update webpack-cli to 5.1.4 * Update style-loader to 4.0.0 * Change all Webpack scripts to be ES modules * Update strip-ansi to 7.1.0 This is a build script dependency * Update chalk to 5.3.0 This is a build script dependency * Update concurrently to 9.0.1 This is a build script dependency * Update smooth-scroll-into-view-if-needed to 2.0.2 * MM-48205 Update serialize-error to 11.0.3 We didn't update this before because it's an ES module which caused Jest to complain. We can fix that by making Jest transform the it * Update semver to 7.6.3 * Update types for semver, tinycolor2, turndown, and webpack * Fix type issues: change Props to a type * Fix type issues: invalid HTML attributes * Remove unneeded option from Webpack config
Mattermost Web App
This folder contains the client code for the Mattermost web app. It's broken up into multiple packages each of which either contains an area of the app (such as playbooks) or shared logic used across other packages (such as the packages located in the platform directory). For anyone who's used to working in the mattermost/mattermost-webapp repo, most of that is now located in channels.
npm Workspaces
To interact with a workspace using npm, such as to add a dependency or run a script, use the --workspace (or --workspaces) flag. This can be done when using built-in npm commands such as npm add or when running scripts. Those commands should be run from this directory.
# Add a dependency to a single package
npm add react --workspace=playbooks
# Build multiple packages
npm run build --workspace=platform/client --workspace=platform/components
# Test all workspaces
npm test --workspaces
# Clean all workspaces that have a clean script defined
npm run clean --workspaces --if-present
To install dependencies for a workspace, simply run npm install from this folder as you would do normally. Most packages' dependencies will be included in the root node_modules, and all packages' dependencies will appear in the package-lock.json. A node_modules will only be created inside a package if one of its dependencies conflicts with that of another package.
Useful Links
- Developer setup, now included with the Mattermost server developer setup
- Web app developer documentation