@vlynk-studios/nodulus-core 1.2.0 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.5] - 2026-04-11
9
+
10
+ ### Added
11
+ - **Configurable NITS Registry**: The NITS registry path is now configurable via `nits.registryPath` in `nodulus.config.ts` (defaults to `.nodulus/registry.json`).
12
+ - **Internal Compatibility Layer**: Prepared core structures for upcoming v1.3.0 and v2.0.0 features (Domains, Shared Layouts, and Submodules).
13
+ - **Public Registration Types**: Exported `ModuleRegistration` and `FeatureRegistration` types for enhanced framework integrations and tooling.
14
+ - **NITS Identity Tracking**: Nodulus 1.2.5+ includes the **NITS (Nodulus Integrated Tracking System)**, which assigns a stable, unique ID to every module.
15
+
16
+ ### Changed
17
+ - **Encapsulated Public API**: Refactored `src/index.ts` to use explicit named exports, hiding internal registry logic and internal types from the public surface.
18
+ - **Express v5 Alignment**: Updated `peerDependencies` to require `express >= 5.0.0`, enforcing compatibility with the project's native Express 5 types.
19
+ - **ESM Hook Cleanup**: Removed legacy `__filename` checks in the alias resolver, optimizing for a pure ESM environment.
20
+ - **CI/CD Stability**: Updated root `package.json` scripts (`build`, `test`, `typecheck`) with `--if-present` to prevent build failures when some workspaces lack these scripts.
21
+ - **CLI Robustness**: Centralized CLI error handling in `cli/index.ts`, removing direct `process.exit()` calls to improve testability and reliability.
22
+ - **Type Safety**: Eliminated `any` types in `ast-parser.ts` and `resolver.ts`, transitioning to strict `estree` and `node` types.
23
+ - **Async I/O Migration**: Refactored `sync-tsconfig` and identifier parsers to use asynchronous file operations for non-blocking execution.
24
+ - **ESM Hook Stability**: Implemented a singleton promise pattern in the ESM alias resolver to prevent race conditions during concurrent activations.
25
+
26
+ ### Fixed
27
+ - **Phantom Types Elimination**: Removed the legacy `types/` directory and corrected `tsconfig.json` to prevent re-generation of invalid type definitions.
28
+ - **Alias Resolution Consistency**: Resolved a major discrepancy where `@modules/*` aliases resolved differently in runtime vs `tsconfig.json`. Now both use consistent dual-mapping (index file + directory wildcard).
29
+ - **Custom Alias Precision**: Fixed a bug where wildcard suffixes (`/*`) were incorrectly forced on aliases pointing to single files instead of directories.
30
+ - **Unimplemented Feature Warnings**: Added helpful warnings when detected configuration keys (`domains`, `shared`) that are not yet natively supported in the v1.x branch.
31
+ - **CLI Precision**: Fixed a bug in the global error handler where exit code `0` was shadowed by `1`.
32
+ - **Parsing Resilience**: Resolved a syntax error in the `check` command that caused failures during bulk analysis.
33
+ - **Isolated Alias Logic**: Extracted tsconfig path generation into a pure utility function.
34
+
8
35
  ## [1.2.0] - 2026-04-09
9
36
 
10
37
  ### Added
package/README.md CHANGED
@@ -104,6 +104,8 @@ createApp(app: Application, options?: CreateAppOptions): Promise<NodulusApp>
104
104
  | Option | Type | Default | Description |
105
105
  |---|---|---|---|
106
106
  | `modules` | `string` | `'src/modules/*'` | Glob pointing to module folders |
107
+ | `domains` | `string` | `undefined` | Glob pointing to domain folders (v2.0.0+) |
108
+ | `shared` | `string` | `undefined` | Glob pointing to shared global folders (v2.0.0+) |
107
109
  | `prefix` | `string` | `''` | Global route prefix (e.g. `'/api/v1'`) |
108
110
  | `aliases` | `Record<string, string>` | `{}` | Folder aliases beyond the auto-generated `@modules/*` |
109
111
  | `strict` | `boolean` | `true` in dev | Enables circular-dependency detection and undeclared-import errors |
@@ -299,6 +301,9 @@ const config: NodulusConfig = {
299
301
  '@middleware': './src/middleware',
300
302
  '@shared': './src/shared',
301
303
  },
304
+ nits: {
305
+ registryPath: './.nodulus/registry.json'
306
+ }
302
307
  }
303
308
 
304
309
  export default config
@@ -385,6 +390,24 @@ Nodulus Architecture Analysis
385
390
 
386
391
  ---
387
392
 
393
+ ### NITS Identity Tracking
394
+
395
+ Nodulus 1.2.5+ includes the **NITS (Nodulus Integrated Tracking System)**, which assigns a stable, unique ID to every module.
396
+ This allows the framework to track modules even when they are renamed or moved across the filesystem, preventing identity loss during refactors.
397
+
398
+ NITS maintains a state file at `.nodulus/registry.json` in your project root. **This file should be committed to version control.**
399
+
400
+ #### Resolving Merge Conflicts
401
+
402
+ Because `registry.json` tracks project-level state, parallel branches might occasionally result in Git merge conflicts. To resolve them:
403
+
404
+ 1. **Accept either side** (or both) of the conflict to make the JSON valid again.
405
+ 2. Run `npx nodulus check`.
406
+ 3. The NITS reconciler will automatically detect duplicate IDs or path shifts, "heal" the registry, and save the corrected state.
407
+ 4. Commit the updated `.nodulus/registry.json`.
408
+
409
+ ---
410
+
388
411
  ## Logging
389
412
 
390
413
  Nodulus emits structured, color-coded log events throughout the bootstrap pipeline using [picocolors](https://github.com/alexeyraspopov/picocolors).
@@ -543,6 +566,8 @@ import type {
543
566
  RegisteredModule,
544
567
  MountedRoute,
545
568
  GetAliasesOptions,
569
+ ModuleRegistration,
570
+ FeatureRegistration,
546
571
  LogLevel,
547
572
  LogHandler,
548
573
  } from '@vlynk-studios/nodulus-core'