Repository navigation
2026-10-10
susee v3.0.0 is driven by the core bundler upgrade — @suseejs/susee_bundler from ^0.2.4 to ^0.3.0 (released today as v0.3.0 in the susee_bundler repository). Most of the changes below live in the core bundler; this repo bumps the dependency, adjusts package metadata, and updates documentation.
⚠️ Breaking / behavioral changes
- Duplicate declarations are now auto-renamed instead of failing the build. The core bundler's new
duplicate_handlerproactively renames cross-file duplicate top-level declarations (functions, classes, variables, type aliases, interfaces, enums) to unique names (_uhelper$1,_uhelper$2, …) during bundling. Builds that previously exited with a "duplicate declaration" error now succeed with renamed declarations. Entry files and exported declarations are never touched, so the public API surface stays intact. If you relied on the build failing to catch duplicates, runsusee lint(the duplicate check is still reported there). - Stricter npm dependency checks (core bundler, applies to
susee buildandsusee lint):- Every imported npm package must now be explicitly declared in
package.json(dependenciesordevDependencies). Transitive packages that merely exist innode_modules/because another package pulled them in are no longer accepted — the build errors withnpm-not-declared. - Every declared package must be actually installed in
node_modules/(symlink-aware, so pnpm's symlinked layout works correctly).
- Every imported npm package must now be explicitly declared in
- Bundling checks moved to lint-only (core bundler): the duplicates / undefined-usage checks and the opt-in
checkDefaultExports/checkAnonymouschecks no longer run during the bundling tree stage — they are surfaced throughsusee lintinstead. The corresponding handlers (default-export naming, anonymous naming) still run during bundling.
Added
export * from "…"support in entry files (core bundler). Entry-file star re-exports of local modules are now expanded into explicit named exports (export { a, b as c }) before import stripping. Previously the star statement survived into the flat bundle pointing at an inlined module path, breaking the public API at runtime. Chained stars are followed recursively,export type *expands to type-only exports, and ES-spec ambiguity rules are honored (ambiguous names are excluded;export * as nsis kept unchanged with a warning). Addstests/bundler_star_test.rsandexamples/star_demo.rsin the core bundler repo.- Agent skills (this repo):
susee-build,susee-troubleshooting, andsusee-contributionskills — installable vianpx skills add phothinmg/susee— plus a README section documenting them.
Fixed
- Blank lines inside multi-line template literals are no longer stripped (core bundler; BUGS.md bug #1). All line-filtering steps in the bundler pipeline (dependency merging, CJS/CTS conversion) are now template-literal-aware: blank/
;-only lines are dropped only outside template literals, while blank lines inside backtick template literals are preserved verbatim. The<!--BLANK-->placeholder workaround documented in BUGS.md is no longer needed.
Changed
- Package exports (this repo):
typesnow points todist/index.d.mts(wasdist/index.d.cts).- The
./clisubpath export no longer offers arequire(CommonJS) condition — the CLI is importable via ESM only.
- Core bundler is now dual-format: the
@suseejs/susee_bundlerpackage ships an ESM entry (index.mjs) alongsideindex.cjswith a properexportsmap (types/import/require). - Docs (this repo): README reworked (oxc badge,
create-suseescaffolding guide, wording), CLI reference code fences annotated, and BUGS.md added documenting known-bug status since v2.3.0.
Migration notes
- If your build previously failed on duplicate top-level declarations across files, it will now build — declarations are renamed with a
_u<name>$<n>sigil. Runnpx susee lintto see duplicate diagnostics. - Make sure every npm package you import is listed in
package.json, then runnpm install/pnpm install— the new check rejects undeclared (merely hoisted) dependencies. - Remove any
<!--BLANK-->placeholder workarounds for template literals; blank lines are preserved now.