Skip to content

[SDESK-7925] Fix broken build because in superdesk repo#5196

Open
eos87 wants to merge 8 commits into
developfrom
hg/fix-build-extensions
Open

[SDESK-7925] Fix broken build because in superdesk repo#5196
eos87 wants to merge 8 commits into
developfrom
hg/fix-build-extensions

Conversation

@eos87
Copy link
Copy Markdown
Contributor

@eos87 eos87 commented May 29, 2026

Purpose

To fix the broken build because of the changes on #5177

What has changed

  • Type-checking for in-tree extensions moves out of the webpack dev server into a dedicated step.
  • A new npm run typecheck (tasks/typecheck.js, included in npm test and therefore CI) type-checks core plus every in-tree extension, each against its own tsconfig.
  • Fixes the pre-existing extension type errors this surfaced
  • sams is temporarily skipped until migrated

Belongs to: SDESK-7925

@eos87 eos87 changed the title Fix broken build because of #5177 [SDESK-7925] Fix broken build because of #5177 May 29, 2026
@eos87 eos87 changed the title [SDESK-7925] Fix broken build because of #5177 [SDESK-7925] Fix broken build because in superdesk repo May 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves TypeScript type-checking out of the webpack dev-server build and into a dedicated npm run typecheck step that runs in CI, unblocking builds that were failing after upstream extension build changes.

Changes:

  • Remove ForkTsCheckerWebpackPlugin-based type-checking from webpack.config.js.
  • Add tasks/typecheck.js and wire it into npm test; adjust lint to stop running tsc directly.
  • Fix surfaced TypeScript/style issues in a few in-tree extensions (e.g., date-fns import style and CSS logical properties).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
webpack.config.js Removes webpack-time type-checking configuration.
tasks/typecheck.js Adds a CI-run typecheck script covering core + in-tree extensions.
scripts/extensions/videoEditor/src/VideoTimeline/VideoTimeline.tsx Switches inline positioning styles to logical properties (insetInlineStart).
scripts/extensions/videoEditor/src/VideoTimeline/BarIcon.tsx Switches inline positioning style to logical property (insetBlockStart).
scripts/extensions/datetimeField/src/editor.tsx Consolidates date-fns imports to named exports from date-fns.
package.json Adds typecheck step into test and removes tsc from lint.
Gruntfile.js Converts some grunt task callbacks to arrow functions (no functional change intended).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tasks/typecheck.js
Comment on lines +50 to +57
const {status} = spawnSync(
process.execPath,
[TSC, '--project', tsconfig, '--noEmit', '--pretty'],
{cwd: ROOT, stdio: 'inherit'}
);

return status === 0;
}
Comment thread webpack.config.js
The "Install Playwright Browsers" step (npx playwright install
--with-deps) was hanging for hours on some shards. The --with-deps
part runs apt-get, and on ubuntu-latest (now 24.04) needrestart
throws an interactive prompt that blocks forever with no TTY.

Changes:
- Set DEBIAN_FRONTEND=noninteractive and NEEDRESTART_MODE=a so the apt
  step cannot block on a prompt.
- Add timeout-minutes: 15 so a stuck install fails fast instead of
  burning the full job budget.
- Install chromium only (the sole enabled project in
  playwright.config.ts) instead of all three browsers.
- Cache ~/.cache/ms-playwright keyed on the @playwright/test version,
  so browser binaries are downloaded only on a cache miss. On a hit we
  still run install-deps (OS libs are not cached) but skip the download.
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.

3 participants