Skip to content

fix: remove whitespace before semicolon in browser.js and fix CITGM packaging issues - #1058

Open
abhayagarwal-dev wants to merge 1 commit into
debug-js:masterfrom
abhayagarwal-dev:fix/semi-spacing-browser
Open

abhayagarwal-dev wants to merge 1 commit into
debug-js:masterfrom
abhayagarwal-dev:fix/semi-spacing-browser

Conversation

@abhayagarwal-dev

@abhayagarwal-dev abhayagarwal-dev commented Sep 17, 2026

Copy link
Copy Markdown

Issue

A stray space before the semicolon at src/browser.js:222 causes a semi-spacing lint error, making npm run lint exit non-zero and failing CITGM runs on s390x (Node.js v20.11.0).

src/browser.js:197:4                                                               
error:                     | ⚠  197:4   Missing JSDoc parameter description for namespaces.  valid-jsdoc        
error:                     | ⚠  209:3   Unexpected xxx comment.                              no-warning-comments
error:                     | ⚠  225:3   Unexpected xxx comment.                              no-warning-comments
error:                     | ⚠  254:3   Unexpected xxx comment.                              no-warning-comments
error:                     | ✖  222:76  Unexpected whitespace before semicolon.              semi-spacing       
error:                     |                                                                                    
error:                     | 16 warnings                                                                        
error:                     | 1 error       

Fixes

  • src/browser.js:222 : Remove stray space before semicolon to fix the semi-spacing lint error
  • package.json (files) : test.js and test.node.js were not included in the published tarball; CITGM installs from the tarball so mocha had no test files to run, causing an immediate failure
  • package.json (test script) : test:browser requires a Chrome binary; on headless environments like s390x, karma launches and hangs indefinitely waiting for a browser connection. Browser tests remain available via npm run test:browser

Testing

> debug@4.4.3 test
> npm run test:node && npm run lint


> debug@4.4.3 test:node
> mocha test.js test.node.js



  debug
    ✓ passes a basic sanity check
    ✓ allows namespaces to be a non-string value
    ✓ honors global debug namespace enable calls
    ✓ uses custom log function
    extend namespace
      ✓ should extend namespace
      ✓ should extend namespace with custom delimiter
      ✓ should extend namespace with empty delimiter
      ✓ should keep the log function between extensions
    rebuild namespaces string (disable)
      ✓ handle names, skips, and wildcards
      ✓ handles empty
      ✓ handles all
      ✓ handles skip all
      ✓ names+skips same with new string
      ✓ handles re-enabling existing instances

  debug node
    formatting options
      ✓ calls util.formatWithOptions
      ✓ calls util.formatWithOptions with inspectOpts


  16 passing (8ms)


> debug@4.4.3 lint
> xo
  • npm run lint : 0 errors
  • npm test : 16/16 passing
  • npm run test:browser : 14/14 passing
  • CITGM on s390x (Node.js v20.11.0) : passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant