Skip to content

refactor: major overhaul of project structure and entry points#296

Open
Tony133 wants to merge 1 commit into
mainfrom
refactor/project-restructuring
Open

refactor: major overhaul of project structure and entry points#296
Tony133 wants to merge 1 commit into
mainfrom
refactor/project-restructuring

Conversation

@Tony133
Copy link
Copy Markdown
Member

@Tony133 Tony133 commented May 11, 2026

Proposal:

This PR represents a significant refactoring of the project structure to align with modern standards and improve maintainability.

Structural Changes:

  • Moved core logic from src/ to a more standard lib/ directory.
  • Decoupled tests from the source files by moving them from src/*.test.js to a dedicated top-level test/ directory.
  • Created a root index.js to serve as the official entry point, replacing the internal references to src/.
  • Extracted src/example.js into a proper examples/ directory.
  • Standardized TypeScript definitions into types/index.d.ts and types/index.tst.ts.

Improvements:

  • Better separation between library logic, tests, and documentation/examples.
  • Simplified the package distribution by having clear, standard entry points.
  • Developer Experience: Improved the ease of navigation within the repository.

Note:

  • New project structure:
fluent-json-schema/
├── examples/              
│   └── examples.js
├── lib/                   
│   ├── ArraySchema.js
│   ├── BaseSchema.js
│   ├── BooleanSchema.js
│   ├── FluentJSONSchema.js
│   ├── IntegerSchema.js
│   ├── MixedSchema.js
│   ├── NullSchema.js
│   ├── NumberSchema.js
│   ├── ObjectSchema.js
│   ├── RawSchema.js
│   ├── StringSchema.js
│   ├── utils.js
│   └── schemas/
│       └── basic.json
├── test/                  
│   ├── ArraySchema.test.js
│   ├── BaseSchema.test.js
│   ├── ...
│   ├── FluentSchema.integration.test.js
│   └── utils.test.js
├── types/                
│   ├── index.d.ts        
│   └── index.tst.ts     
├── index.js               
├── package.json         
├── tsconfig.json        
└── README.md

- migrate core logic from src directory to lib directory
- centralize entry point to root index.js
- decouple tests from source files into a dedicated test/ directory
- extract examples to examples directory
- standardize TypeScript definitions in types directory
@Tony133 Tony133 marked this pull request as ready for review May 11, 2026 07:25
@Tony133 Tony133 requested a review from a team May 11, 2026 07:25
@Fdawgs Fdawgs requested a review from aboutlo May 13, 2026 14:54
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.

1 participant