Skip to content

Conversation

@jwalterss
Copy link
Contributor

@jwalterss jwalterss commented Oct 6, 2025

Goal

  • Ensure the Docker production build succeeds by updating build tooling and dependency handling.
  • Running npm ci before flipping NODE_ENV=production lets the Docker builder keep devDependencies (Jest, Testing
    Library, etc.) installed long enough for TypeScript to scan our test files; once they’re pruned the build proceeded
    exactly like CI, fixing the missing-module error.
    • Upgraded jest-watch-typeahead to the Jest 30-compatible v3.0.1 so npm ci resolves cleanly; regenerated the lockfile
      as part of the install.
  • Regenerated GraphQL types after pulling hasTrustedDomain into the shared fragment, removing as any casts in
    CorpusItemPage.
  • Swapped Sentry’s deprecated Integrations.BrowserTracing() for the new browserTracingIntegration() helper to stay
    current and type-safe.

Todos

  • Verify REACT_APP_ENV=development npm run build succeeds after the changes

Have you followed the guidelines in our Contributing document? Yes

Deployment

Standard deployment. After merging, trigger the usual CI/CD pipeline so the rebuilt image (with the
updated Dockerfile flow) is published.

Reference

Tickets:

Upgraded webpack, dev server, and test infrastructure to address compatibility issues.

Webpack configuration:
- Updated webpack-dev-server to v5 with complete API migration
- Migrated to new setupMiddlewares pattern from deprecated before/after hooks
- Updated static file serving configuration (contentBase → static)
- Fixed splitChunks configuration for webpack 5 compatibility
- Removed deprecated options (futureEmitAssets, requireEnsure parser)
- Updated PostCSS loader to use postcssOptions
- Fixed TerserPlugin configuration for webpack 5

Node.js polyfills:
- Added browser polyfills for process, Buffer, crypto, stream, and url
- Configured webpack ProvidePlugin for global availability
- Added TypeScript declarations for polyfilled globals

Jest updates:
- Migrated to Jest v30 with updated transformer API
- Updated file and CSS transformers to return code objects
- Fixed test matchers (toBeCalled → toHaveBeenCalled)
- Added jest-environment-jsdom for Jest 28+ compatibility
- Removed deprecated testRunner configuration

Dev server:
- Configured port 3000 as default
- Updated client configuration for WebSocket connections
- Migrated to new middleware registration pattern
@jwalterss jwalterss requested a review from a team as a code owner October 6, 2025 17:40
@jwalterss jwalterss requested a review from mmiermans October 6, 2025 17:44
Copy link
Contributor

@mmiermans mmiermans left a comment

Choose a reason for hiding this comment

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

Nice work! npm run build runs successfully for me locally.

Could you try to avoid the need for as any? It may hide type compatibility issues.

@jwalterss jwalterss requested a review from mmiermans October 7, 2025 14:47
Copy link
Contributor

@mmiermans mmiermans left a comment

Choose a reason for hiding this comment

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

🙇

@jwalterss jwalterss merged commit ed3265f into main Oct 7, 2025
6 checks passed
@jwalterss jwalterss deleted the HNT-1044-dependency-updates branch October 7, 2025 18:31
jwalterss added a commit that referenced this pull request Oct 8, 2025
* chore: update build dependencies and tooling

Upgraded webpack, dev server, and test infrastructure to address compatibility issues.

Webpack configuration:
- Updated webpack-dev-server to v5 with complete API migration
- Migrated to new setupMiddlewares pattern from deprecated before/after hooks
- Updated static file serving configuration (contentBase → static)
- Fixed splitChunks configuration for webpack 5 compatibility
- Removed deprecated options (futureEmitAssets, requireEnsure parser)
- Updated PostCSS loader to use postcssOptions
- Fixed TerserPlugin configuration for webpack 5

Node.js polyfills:
- Added browser polyfills for process, Buffer, crypto, stream, and url
- Configured webpack ProvidePlugin for global availability
- Added TypeScript declarations for polyfilled globals

Jest updates:
- Migrated to Jest v30 with updated transformer API
- Updated file and CSS transformers to return code objects
- Fixed test matchers (toBeCalled → toHaveBeenCalled)
- Added jest-environment-jsdom for Jest 28+ compatibility
- Removed deprecated testRunner configuration

Dev server:
- Configured port 3000 as default
- Updated client configuration for WebSocket connections
- Migrated to new middleware registration pattern

* fix: address PR feedback
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