v0.2.7
๐ adnbn v0.2.7 Hotfix
Compare: v0.2.6...v0.2.7
๐ ๏ธ Hotfix Summary
A hotfix release focused on stability, correct behavior, and small configuration tweaks. Includes path field renames and changes in the icons section.
โ Fixes
- ๐ฎ MessageManager: ensured the sendResponse fallback is called when no handler returns a result.
- ๐ useMessageHandler: stabilized subscription, proper unmount handling, and async support; eliminated redundant re-subscriptions.
- ๐งช Tests: stabilized scenarios for useMessageHandler (lifecycle, StrictMode).
- ๐งน Infrastructure: removed stray console.log/comments, aligned Jest patterns.
๐๏ธ Config Changes โ before vs after
1) Path renames (naming unification)
- Before (v0.2.6):
- inputDir, outputDir, sourceDir, appSourceDir
- After (v0.2.7):
- rootDir, outDir, srcDir, appSrcDir
2) Icons section: flattened and removed icon.name
- Before (v0.2.6):
export default { icon: { sourceDir: "icons", outputDir: "icons", name: "default", }, };
- After (v0.2.7):
export default { iconSrcDir: "icons", // previously icon.sourceDir iconOutDir: "icons", // previously icon.outputDir icon: "default" // previously icon.name };
Reasons: remove nesting, unify directory names with the rest of the paths, and move icon naming/group handling into the pipeline.
3) ENV: expanded declaration form
- Now
envsupports shortcuts:- string prefix: "PUBLIC_",
- predicate function:
(name) => boolean, - object:
{ filter?: string | fn, crypt?: boolean }.
4) New: artifactName
- Build artifact name template with placeholders:
[app]/[name],[mode],[browser],[mv].
๐ Breaking Changes
- Field renames:
- inputDir โ rootDir
- outputDir โ outDir
- sourceDir โ srcDir
- appSourceDir โ appSrcDir
- Icons section flattened:
- icon.sourceDir โ iconSrcDir
- icon.outputDir โ iconOutDir
- icon.name โ icon
๐ก Improvements
- ๐ ENV: value obfuscation utilities and concise filter forms.
- ๐งพ artifactName: clear and customizable artifact names for CI and multi-target builds.
๐งช Tests & Tooling
- โก Switched to @swc/jest for faster test runs.
- ๐งช Added/refined tests for dotenv filtering/obfuscation and the messaging hook.
๐งญ Migration Guide
- Update path field names:
- inputDir โ rootDir
- outputDir โ outDir
- sourceDir โ srcDir
- appSourceDir โ appSrcDir
- Move icon settings:
- icon.sourceDir โ iconSrcDir
- icon.outputDir โ iconOutDir
- icon.name โ icon
- Simplify ENV if desired:
env: "PUBLIC_"or a predicate function.
- If needed, set
artifactName, for example:artifactName: "[name]-[browser]-[mv]".
๐ Minimal config: before โ after
-
Before (v0.2.6):
export default { inputDir: ".", outputDir: "dist", sourceDir: "src", appSourceDir: ".", icon: { sourceDir: "icons", outputDir: "icons", name: "default" }, env: { filter: "PUBLIC_", crypt: false }, };
-
After (v0.2.7):
export default { rootDir: ".", outDir: "dist", srcDir: "src", appSrcDir: ".", iconSrcDir: "icons", iconOutDir: "icons", icon: "default", env: "PUBLIC_", // shortcut artifactName: "[name]-[browser]-[mv]", };