Skip to content

chore(samples): v1.x housekeeping (lint scope, webpack dev server, npm audit fix) - #302

Open
imdt-claudiop wants to merge 5 commits into
bigbluebutton:v1.xfrom
imdt-claudiop:chore/samples-housekeeping-v1x
Open

imdt-claudiop wants to merge 5 commits into
bigbluebutton:v1.xfrom
imdt-claudiop:chore/samples-housekeeping-v1x

Conversation

@imdt-claudiop

Copy link
Copy Markdown

What does this PR do?

Housekeeping for the sample plugins on the v1.x line:

  • Lints src recursively in all 23 samples and drops the broken build:watch script from the 4 samples that had it
  • Removes unused eslint-watch and lint-staged devDependencies from the samples that had them
  • Moves the dev-server manifest route from onBeforeSetupMiddleware (removed in webpack-dev-server 5) to setupMiddlewares in every sample's webpack.config.js
  • Allows require() in webpack.config.js under @typescript-eslint 8
  • Runs a forced npm audit fix across the samples, moving @typescript-eslint to 8, copy-webpack-plugin to 14 and webpack-dev-server to 5 (1202 -> 161 advisories, no downgrades, no rollbacks)

Closes Issue(s)

None.

Motivation

Follow-up housekeeping after the v1.x line opened; the samples carried stale lint scopes, webpack workarounds and vulnerable transitive dependencies.

More

  • Split out of chore: housekeeping for the v1.x line (cleanup, CI, tsconfig, samples lint) #300 (the SDK-half changes are in a separate PR).
  • Validation was done on Node v24.21.0 with the SDK built from v1.x: tsc and lint for all 23 samples via ./scripts/validate-samples-code.sh, plus npm run build-bundle in each of the 23 samples.
  • The npm audit fix result was verified per sample: npm ci, build, and a manual smoke of the plugins without automated tests (meeting as moderator, plugin loaded with empty loadFailureReason, no plugin errors in the console); about 9 of the 17 untested plugins were also inspected visually via screenshots.
  • The Playwright suites of the 6 samples that have them were not run here (they need a live BBB server).
  • Until the SDK housekeeping PR merges, this branch's CI runs on the base branch's Node version.

imdt-claudiop and others added 5 commits October 6, 2026 16:59
eslint ./src/* only reached nested files when the shell expanded the glob; when ESLint expands it (quoted, or a shell without globbing) it stops at the first level. eslint src always walks the whole tree.

build:watch in four samples deleted dist, where webpack writes the bundle, and then ran tsc in watch mode into dist-tsc, so it never produced a loadable plugin. Nothing calls it.

Co-Authored-By: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com>
Four samples (generic-content-sidekick, media-area, server-commands and user-list-dropdown) still declared eslint-watch and lint-staged, and no script in them calls either. They also block the audit fix: with them installed, npm audit fix --force downgrades eslint-watch from 8 to 3.1.3, a release that requires ESLint below 5. The root package dropped the same two dev dependencies earlier for the same reason.

Co-Authored-By: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com>
webpack-dev-server 5 removed onBeforeSetupMiddleware and refuses to start when the option is present, so npm start fails in every sample once the dev server moves to 5. setupMiddlewares has existed since 4.7, so the same route now works on the 4.15 the samples lock today and on 5.

Co-Authored-By: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com>
…t-eslint 8

The webpack configs are CommonJS and turn off @typescript-eslint/no-var-requires for that. @typescript-eslint 8 replaces that rule with no-require-imports in its recommended set, so once a sample installs version 8, npm run lint at the root fails on the six samples that have their own .eslintrc. Disabling both names keeps the configs clean under 6 and 8.

Co-Authored-By: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com>
One npm audit fix --force per sample, followed by a plain npm audit fix that only moved lockfile entries. The forced pass takes @typescript-eslint from 6 to 8, copy-webpack-plugin from 12 to 14 and webpack-dev-server from 4 to 5. It ran once on purpose: a second forced pass downgrades webpack-dev-server to 2.9.7 and raises the count instead of lowering it.

Two samples needed one more step to end in the same place as the rest. In generic-content-sidekick the forced pass left @typescript-eslint on 6.21, which is still affected, so it was raised to the same 8.71.1 by hand. In floating-window the fix moved styled-components to 6.5.3, whose types need TypeScript 5.4 and no longer pull in @types/stylis, so TypeScript and @types/node were refreshed within their declared ranges and @types/stylis became a direct dev dependency.

Every sample goes from 51 to 54 advisories down to 7. The 7 left all come from webpack-dev-server, a dev-only tool that is not part of the plugin bundle: braces has no patched release, uuid is pinned by sockjs, and npm can only clear them by downgrading webpack-dev-server to 2.9.7.

Co-Authored-By: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants