Skip to content

export HalModuleParser to use it directly#98

Merged
hugomontero merged 2 commits intomasterfrom
feature/sc-139125/get-flash-offsets-from-binaries
Apr 14, 2026
Merged

export HalModuleParser to use it directly#98
hugomontero merged 2 commits intomasterfrom
feature/sc-139125/get-flash-offsets-from-binaries

Conversation

@hugomontero
Copy link
Copy Markdown
Contributor

Export HalModuleParser to easily import it in projects.

@hugomontero hugomontero requested a review from monkbroc April 14, 2026 20:03
Comment thread package.json Outdated
".": "./main.js",
"./HalModuleParser": "./lib/HalModuleParser.js",
"./ModuleInfo": "./lib/ModuleInfo.js",
"./lib/*": "./lib/*"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this one for? This seems too much for a public interface for a library.
Maybe instead of 3 new exports, we can have a "./limited": "./limited.js" that exports only a restricted set of classes that are browser-safe (HalModuleParser, ModuleInfo).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! like a main but browser-safe one.
The './lib/*' was in order to keep the compatibility to use `import library from 'binary-version-reader/lib/library.js' I'll remove it in case we don't want it. And add a new file just for those we want to expose for browser

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed here! 9bd2e3e

@hugomontero hugomontero merged commit f192ed9 into master Apr 14, 2026
3 checks passed
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.

2 participants