Skip to content

Conversation

@tadjik1
Copy link
Contributor

@tadjik1 tadjik1 commented Oct 29, 2025

Description

Summary of Changes

Adds a build step for the local Webpack bundling test.

In the current setup, the build folder is not included in the tarball created by npm pack (as npm ignores it by default). Consequently, the prebuild-install step fails to find a prebuilt binary, and the package must be built from source after installation. This PR adds the explicit npm rebuild step to the test script.

As a result, the Webpack build now succeeds but still shows a warning:

➜  webpack git:(main) ✗ npm run build
...
WARNING in ./node_modules/kerberos/lib/util.js 11:13-52
Module not found: Error: Can't resolve '../build/Debug/kerberos.node' in '/Users/sergey.zelenov/code/kerberos/test/bundling/webpack/node_modules/kerberos/lib'
 @ ./node_modules/kerberos/lib/index.js 4:25-42
 @ ./src/index.js 2:17-36
...
webpack 5.97.1 compiled with 1 warning in 140 ms

This remaining warning is expected. It is due to Webpack's static analysis of the util.js file, which includes a fallback require for a Debug build (which does not exist in our production build).

Notes for Reviewers

Reviewers can follow the instructions inside test/bundling/webpack folder and then run node dist/main.js to see kerberos working:

➜  webpack git:(main) ✗ node dist/main.js
{
  ...
  version: '3.0.0-alpha',
}

What is the motivation for this change?

During a routine update of the dependencies, I discovered this test was broken.

Release Highlight

Release notes highlight

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@tadjik1 tadjik1 marked this pull request as ready for review October 29, 2025 10:56
@tadjik1 tadjik1 requested a review from a team as a code owner October 29, 2025 10:56
@durran durran merged commit 6e4930c into main Oct 29, 2025
18 checks passed
@durran durran deleted the update-installation-instructions branch October 29, 2025 11:13
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