Skip to content

fix: remove stale compiled dataPaths.js artifact - #1541

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.7.0from
huzaifaalmesbah:fix/remove-stale-datapaths-js
Apr 24, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.7.0from
huzaifaalmesbah:fix/remove-stale-datapaths-js

Conversation

@huzaifaalmesbah

Copy link
Copy Markdown
Contributor

Summary

Fixes #1539

Removes src/lib/dataPaths.js — a compiled CJS artifact accidentally re-committed in 98c5b250 alongside the TypeScript source src/lib/dataPaths.ts.

Root Cause

The codebase migrated from JS to TypeScript in 9739f413, which renamed dataPaths.js → dataPaths.ts. A later refactor commit (98c5b250) re-added the compiled .js output by mistake.

With both files present:

  • Webpack resolves dataPaths.js (CJS) instead of dataPaths.ts
  • CJS named exports fail under webpack's ESM interop at runtime
  • resolveDataDir becomes undefined → fatal crash on dev server startup

Change

  • src/lib/dataPaths.js — deleted (1 file, 70 lines removed)

Test plan

  • npm run dev starts without resolveDataDir is not a function error
  • npm run test:unit passes (3238 tests)

🤖 Generated with Claude Code

Commit 98c5b25 accidentally re-added a compiled CJS output alongside
the TypeScript source after the JS→TS migration (9739f41). Webpack
resolved the .js file instead of .ts, and ESM interop failed to map
the CJS named exports at runtime — crashing the dev server with
"resolveDataDir is not a function".

Fixes diegosouzapw#1539

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deletes a utility module responsible for determining application data directories and performing path comparisons. I have no feedback to provide.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.7.0 April 24, 2026 11:11
@hmbashar

Copy link
Copy Markdown

Thank you for fixing this. Everything looks perfect!

@diegosouzapw
diegosouzapw merged commit 76e34f0 into diegosouzapw:release/v3.7.0 Apr 24, 2026
2 checks passed
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
Commit 98c5b25 accidentally re-added a compiled CJS output alongside
the TypeScript source after the JS→TS migration (9739f41). Webpack
resolved the .js file instead of .ts, and ESM interop failed to map
the CJS named exports at runtime — crashing the dev server with
"resolveDataDir is not a function".

Fixes diegosouzapw#1539

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Commit 8c14018 accidentally re-added a compiled CJS output alongside
the TypeScript source after the JS→TS migration (9739f41). Webpack
resolved the .js file instead of .ts, and ESM interop failed to map
the CJS named exports at runtime — crashing the dev server with
"resolveDataDir is not a function".

Fixes diegosouzapw#1539

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

[BUG] stale compiled dataPaths.js crashes dev server with 'resolveDataDir is not a function'

3 participants