Skip to content

chore(deps-dev): Bump webpack-dev-server from 4.15.2 to 5.2.1 - #2622

Merged
ankita10119 merged 1 commit into
masterfrom
dependabot/npm_and_yarn/webpack-dev-server-5.2.1
Apr 2, 2026
Merged

ankita10119 merged 1 commit into
masterfrom
dependabot/npm_and_yarn/webpack-dev-server-5.2.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 5, 2025 •

Copy link
Copy Markdown
Contributor

Bumps webpack-dev-server from 4.15.2 to 5.2.1.

Release notes

Sourced from webpack-dev-server's releases.

v5.2.1

5.2.1 (2025-03-26)

Security

  • cross-origin requests are not allowed unless allowed by Access-Control-Allow-Origin header
  • requests with an IP addresses in the Origin header are not allowed to connect to WebSocket server unless configured by allowedHosts or it different from the Host header

The above changes may make the dev server not work if you relied on such behavior, but unfortunately they carry security risks, so they were considered as fixes.

Bug Fixes

  • prevent overlay for errors caught by React error boundaries (#5431) (8c1abc9)
  • take the first network found instead of the last one, this restores the same behavior as 5.0.4 (#5411) (ffd0b86)

v5.2.0

5.2.0 (2024-12-11)

Features

  • added getClientEntry and getClientHotEntry methods to get clients entries (dc642a8)

Bug Fixes

  • speed up initial client bundling (145b5d0)

v5.1.0

5.1.0 (2024-09-03)

Features

  • add visual progress indicators (a8f40b7)
  • added the app option to be Function (by default only with connect compatibility frameworks) (3096148)
  • allow the server option to be Function (#5275) (02a1c6d)
  • http2 support for connect and connect compatibility frameworks which support HTTP2 (#5267) (6509a3f)

Bug Fixes

v5.0.4

5.0.4 (2024-03-19)

... (truncated)

Changelog

Sourced from webpack-dev-server's changelog.

5.2.1 (2025-03-26)

Security

  • cross-origin requests are not allowed unless allowed by Access-Control-Allow-Origin header
  • requests with an IP addresses in the Origin header are not allowed to connect to WebSocket server unless configured by allowedHosts or it different from the Host header

The above changes may make the dev server not work if you relied on such behavior, but unfortunately they carry security risks, so they were considered as fixes.

Bug Fixes

  • prevent overlay for errors caught by React error boundaries (#5431) (8c1abc9)
  • take the first network found instead of the last one, this restores the same behavior as 5.0.4 (#5411) (ffd0b86)

5.2.0 (2024-12-11)

Features

  • added getClientEntry and getClientHotEntry methods to get clients entries (dc642a8)

Bug Fixes

  • speed up initial client bundling (145b5d0)

5.1.0 (2024-09-03)

Features

  • add visual progress indicators (a8f40b7)
  • added the app option to be Function (by default only with connect compatibility frameworks) (3096148)
  • allow the server option to be Function (#5275) (02a1c6d)
  • http2 support for connect and connect compatibility frameworks which support HTTP2 (#5267) (6509a3f)

Bug Fixes

5.0.4 (2024-03-19)

Bug Fixes

... (truncated)

Commits
  • 0d22a08 chore(release): 5.2.1
  • 6045b1e chore(deps): update (#5444)
  • ffd0b86 fix: take the first network found instead of the last one, this restores the ...
  • 9ea7b08 ci: update dependency-review-action (#5442)
  • 5c9378b Merge commit from fork
  • d2575ad Merge commit from fork
  • 8c1abc9 fix: prevent overlay for errors caught by React error boundaries (#5431)
  • 5a39c70 ci: update codecov/codecov-action to v5 (#5406)
  • 55220a8 chore(deps-dev): bump the dependencies group across 1 directory with 4 update...
  • 09f6f8e chore(deps): bump the dependencies group across 1 directory with 2 updates (#...
  • Additional commits viewable in compare view
Install script changes

This version modifies prepare script that runs during installation. Review the package contents before updating.


@dependabot dependabot Bot added dependencies One or more dependencies are being bumped javascript Pull requests that update Javascript code labels Jun 5, 2025
@dependabot
dependabot Bot requested a review from a team as a code owner June 5, 2025 02:23
@dependabot dependabot Bot added dependencies One or more dependencies are being bumped javascript Pull requests that update Javascript code labels Jun 5, 2025
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch 2 times, most recently from d79b697 to d95ad00 Compare June 13, 2025 08:00
@ankita10119

Copy link
Copy Markdown
Contributor

@dependabot rebase

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch from d95ad00 to f189106 Compare August 19, 2025 19:50
@ankita10119

Copy link
Copy Markdown
Contributor

@dependabot rebase

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch from f189106 to f35a27f Compare December 16, 2025 05:48
@ankita10119

Copy link
Copy Markdown
Contributor

@claude

@github-actions

github-actions Bot commented Dec 16, 2025 •

Copy link
Copy Markdown

Claude finished @ankita10119's task —— View job


Overall Assessment

❌ This PR introduces breaking changes that require configuration updates before it can be safely merged.


Critical Issues Found

1. Breaking Configuration Change in Example Code

File: examples/bundling/webpack/webpack.config.js:9
Issue: The contentBase option was removed in webpack-dev-server v5. The example webpack configuration uses the deprecated property which will cause the dev server to fail.

Required Fix:

// BEFORE (v4)
devServer: {
  contentBase: './',
  https: true,
  port: 3000
}

// AFTER (v5)
devServer: {
  static: './',  // Changed from contentBase
  https: true,
  port: 3000
}

2. Security Changes May Affect Development Workflow

The v5.2.1 release includes important security fixes that may impact the development server:

  • Cross-origin requests are now blocked unless explicitly allowed via Access-Control-Allow-Origin headers
  • Requests with IP addresses in the Origin header are restricted unless configured in allowedHosts

Impact: If developers rely on cross-origin requests during development, the dev server may reject these requests after this upgrade.

Recommended Action: Add explicit CORS configuration if needed:

devServer: {
  headers: {
    'Access-Control-Allow-Origin': '*',
    'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
    'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
  }
}

Additional Breaking Changes to Verify

The main webpack.config.js:44-52 appears compatible (uses static property correctly), but the following should be tested:

  1. Node.js Version: webpack-dev-server v5 requires Node.js ≥ 18.12.0 (up from ≥ 12.13.0 in v4)
  2. webpack-dev-middleware: Upgraded from v5 to v7 (major version change with its own breaking changes)
  3. Dependency updates: Multiple major version bumps in transitive dependencies:
    • open: v8 → v10
    • memfs: v3 → v4
    • p-retry: v4 → v6
    • is-wsl: v2 → v3
    • is-docker: v2 → v3

Required Actions Before Merge

  1. ✅ Update the example webpack config to replace contentBase with static
  2. ✅ Verify Node.js version meets the ≥18.12.0 requirement in CI/CD
  3. ✅ Test the dev server locally to ensure it starts without errors
  4. ✅ Test cross-origin scenarios if the application makes cross-origin requests during development
  5. ✅ Update documentation if developers need to configure allowedHosts or CORS headers

Recommendation

Do not merge until the breaking configuration change is fixed. The example webpack configuration must be updated to use webpack-dev-server v5 syntax, otherwise the example will be broken for users.


@ankita10119

Copy link
Copy Markdown
Contributor

@dependabot rebase

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch from f35a27f to 30b4cbf Compare January 20, 2026 17:31
@ankita10119

Copy link
Copy Markdown
Contributor

@dependabot recreate

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch from 30b4cbf to ecc1f4e Compare February 13, 2026 09:34
@ankita10119

Copy link
Copy Markdown
Contributor

@dependabot recreate

Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.15.2 to 5.2.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](webpack/webpack-dev-server@v4.15.2...v5.2.1)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-version: 5.2.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch from ecc1f4e to 18a0a9a Compare April 1, 2026 11:37
@ankita10119
ankita10119 merged commit aee5361 into master Apr 2, 2026
4 of 5 checks passed
@ankita10119
ankita10119 deleted the dependabot/npm_and_yarn/webpack-dev-server-5.2.1 branch April 2, 2026 08:11
ankita10119 added a commit that referenced this pull request Apr 6, 2026
…s to 3.1.0, and fix dev setup (#2771)

### Changes

This PR consolidates three related dependency upgrades and fixes the
local development setup that had been broken since PR #2622 . It
supersedes #2769 (which will be closed).

1. **webpack-dev-server** `v4 `→ `v5` (`package.json`,
`webpack.config.js`)

PR #2622 bumped **webpack-dev-server** from `4.15.2` to `5.2.1`. This
was a breaking change that went unnoticed because CI only runs tests, it
never starts the dev server. Running npm start after that bump resulted
in:

_ValidationError: Invalid options object. Dev Server has been
initialized using
  an options object that does not match the API schema.
  - options has an unknown property 'https'._

**Root cause**: webpack-dev-server v5 removed the https shorthand option
that existed in v4. The replacement is the server object API.

Fix in `webpack.config.js`:

// Before (v4 API — broken in v5)
  `https: getDevCerts() || true`

// After (v5 API)
  ```
server: {
    type: 'https',
    options: getDevCerts() || {}
  }
```

`package.json`: Version constraint updated from ^4.15.2 back to ^5.2.1 (resolves to 5.2.3, also covering PR #2767's bump).

2. Fix 403 Forbidden when loading bundle from Auth0 hosted pages (webpack.config.js)

After fixing the startup crash, a second issue surfaced when testing against a custom hosted login page on manage.auth0.com: the browser reported Auth0Lock is not defined.Inspecting the Network tab showed the bundle request returning 403 Forbidden.

**Root cause**: webpack-dev-server v5 introduced a security middleware (cross-origin-header-check) that blocks any request where both of these are true:
  - `sec-fetch-mode: no-cors` — always set by <script> tags
  - `sec-fetch-site: cross-site` — always set when an external origin (e.g. manage.auth0.com) loads a resource from localhost:3000

The combination of these two headers causes webpack-dev-server to return 403 before the bundle is served.

**Fix**:

 ` allowedHosts: 'all'`

This disables the cross-origin host check. It is safe for a local dev server — it has no effect on production builds and only applies when npm start is running. The original v4 server had no such restriction.

3. **auth0-password-policies** `1.0.2` → `3.1.0` and password-sheriff `1.1.1` → `2.0.0` (`package.json`, `webpack.config.js`)

`[email protected]` was published in November 2018. After 7 years of inactivity, versions 1.1.0 through 3.1.0 were released between August 2025 and February 2026.Dependabot opened PR #2705 targeting 1.1.1 (the first post-gap release), but that PR failed CI and was superseded by two further major versions before it could be merged. This PR
jumps directly to the current latest (3.1.0).

**Why password-sheriff is also bumped**:
`[email protected]` declares `password-sheriff@^2.0.0` as a peer/dependency. Lock also uses password-sheriff directly in src/field/password.js and `src/ui/input/password/password_strength.jsx `via `password-sheriff/lib/policy`. The `lib/policy.js` API is identical between `v1` and `v2` , the only additions are two new built-in rule types (sequentialChars, maxLength) which Lock does not use. Bumping Lock's direct constraint to ^2.0.0 avoids having two copies of password-sheriff in the install tree.

**Why webpack.config.js needed a new babel-loader rule**:
`[email protected]` ships its source with ES2020 syntax (optional chaining ?.). The project runs es-check es2017 against the built bundle as a CI gate. The existing webpack babel rule has `exclude: node_modules`, so third-party packages are bundled as-is. For most packages this is fine since they ship pre-built ES5, but auth0-password-policies does not.

A dedicated babel-loader rule for `auth0-password-policies` is added before the main rule. There is one non-obvious subtlety: Babel 7's `.babelrc` is file-relative, it only applies to files within the same package root and is silently ignored when Babel processes files in a different package under node_modules. This means Babel would run but apply no transforms, leaving ?. in the output. The fix is to pass presets explicitly in the rule's options alongside configFile: false and `babelrc: false`, so Babel uses exactly those presets regardless of config file boundaries:

```
  {
    test: /\.js$/,
include: path.join(__dirname, 'node_modules',
'auth0-password-policies'),
    loader: 'babel-loader',
    options: {
presets: [['@babel/preset-env', { useBuiltIns: 'entry', corejs: '3.26.1'
}]],
      configFile: false,
      babelrc: false
    }
  }
```
  
4. Fix webpack 5 compilation warning for CordovaAuth0Plugin (`src/core/web_api/p2_api.js`)

After the auth0-js bump in PR #2766 (9.30.1 → 9.32.0), webpack emitted two warnings on every build:

  ```
WARNING in ./src/core/web_api/p2_api.js
  export 'default' (imported as 'CordovaAuth0Plugin') was not found in
  'auth0-js/dist/cordova-auth0-plugin.min.js' (module has no exports)
```

**Root cause**: `cordova-auth0-plugin.min.js` uses a UMD format
(module.exports = factory()). Webpack 5's static analysis cannot resolve
a default export from a module.exports assignment inside a UMD IIFE, so
it warns when the file is imported with ES module import default syntax.

**Fix**: Replace the ES module import with require(), which webpack
handles correctly for CommonJS/UMD modules:

// Before
`import CordovaAuth0Plugin from
'auth0-js/dist/cordova-auth0-plugin.min.js';`

// After
`const CordovaAuth0Plugin =
require('auth0-js/dist/cordova-auth0-plugin.min.js');`

Runtime behaviour is unchanged, the `typeof CordovaAuth0Plugin ===
'function'` guard already in place handles the case where the plugin is
unavailable.

### References

  - Supersedes #2769
  - Supersedes #2705
  - Fixes dev setup broken by #2622
- Related to #2767 (webpack-dev-server 5.2.1 → 5.2.3, covered by ^5.2.1
range)
- Related to #2766 (auth0-js 9.30.1 → 9.32.0, source of the
CordovaAuth0Plugin warning)

### Testing

Tested with local development setup.

* [ ] This change adds unit test coverage
* [ ] This change adds integration test coverage
* [ ] This change has been tested on the latest version of the
platform/language

### Checklist

* [ ] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
* [ ] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
* [ ] All code quality tools/guidelines have been run/followed
* [ ] All relevant assets have been compiled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies One or more dependencies are being bumped javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant