Commit Graph

365 Commits

Author SHA1 Message Date
Sergey Penkovsky
7f5f5c4064 Merge pull request #21 from pese-git/website
Implement Website
2025-09-08 13:09:46 +03:00
Sergey Penkovsky
04ecb6d3a6 docs: update contributors list with GitHub links and add new contributor 2025-09-08 10:50:42 +03:00
Sergey Penkovsky
484061148d docs(binding,docs): clarify .singleton() with .toInstance() behavior in docs and API
- Add an explicit note and warning about the effect (or lack thereof) of calling `.singleton()` after `.toInstance()`:
  - in singleton() API doc-comment in binding.dart,
  - in README.md (after all binding usage patterns),
  - in full_tutorial_en.md and full_tutorial_ru.md.
- Explain that `.singleton()` has no effect on objects registered with `.toInstance()` — they are always single instance.
- Recommend `.singleton()` only for providers (toProvide/toProvideAsync), not direct instances.
- Improves clarity and prevents misuse/confusion for end users and future maintainers.
2025-09-08 10:46:20 +03:00
Sergey Penkovsky
b5b672765e docs(binding,docs): explain .singleton() + parametric provider behavior
- Add an explicit warning and usage examples for .singleton() combined with toProvideWithParams/toProvideAsyncWithParams:
  - in API doc-comment for singleton() in binding.dart,
  - in README.md and both full tutorials (EN/RU).
- Show correct and incorrect usage/pitfalls for parameterized providers and singleton.
- Help users avoid unintended singleton caching when using providers with parameters.
- Motivation: Prevent common confusion, make advanced DI scenarios safer and more obvious.
2025-09-08 10:18:19 +03:00
Sergey Penkovsky
482b7b0f5f docs(binding): clarify registration limitation in API doc
- Add an explicit warning and usage pattern examples to the toInstance() method doc-comment.
- Explain why resolving dependencies registered with toInstance inside the same Module.builder does not work.
- Reference safe and unsafe code samples for users navigating via IDE and API documentation.
2025-09-08 09:51:40 +03:00
Sergey Penkovsky
722a4d7980 docs(di): clarify 'toInstance' binding limitations in builder
- Add explicit note for users about the impossibility to use scope.resolve<T>() for just-to-be-registered types inside Module.builder when registering chained dependencies via toInstance.
- Show correct and incorrect usage patterns, functional and anti-pattern Dart examples in RU and EN full tutorials.
- Add the warning to the main README after core concept bindings block, improving discoverability for users starting with the library.
- Motivation: Prevent common misuse and hard-to-debug runtime errors for users who construct chains using toInstance/resolve inside the builder.
2025-09-08 09:23:00 +03:00
Sergey Penkovsky
16cd7199aa fix: fix examples 2025-09-05 09:37:24 +03:00
Sergey Penkovsky
1cbcce5b38 chore(release): publish packages
- cherrypick_annotations@1.1.2-dev.2
 - cherrypick_generator@2.0.0-dev.2
cherrypick_annotations-v1.1.2-dev.2 cherrypick_generator-v2.0.0-dev.2
2025-08-22 14:39:33 +03:00
Sergey Penkovsky
264c4bbb88 docs(annotations): improve API documentation and usage example
- Add detailed English doc comments for all main annotations (inject, injectable, instance, provide, scope, etc)
- Add fully documented example/example.dart illustrating real-world DI scenario
- Clarify stub sections (Module class, generated mixins)
- Aligns package with pub.dev quality and best practice requirements

No breaking changes.
2025-08-22 09:39:25 +03:00
Sergey Penkovsky
cbb5dcc3a0 docs(benchmark_di): update reports with extended analysis, peak memory and revised recommendations 2025-08-20 08:50:14 +03:00
Sergey Penkovsky
d281c18a75 feat(benchmark_di): add yx_scope DI adapter and CLI integration 2025-08-20 07:49:10 +03:00
Sergey Penkovsky
8ef12e990f chore(release): publish packages
- cherrypick@3.0.0-dev.12
 - cherrypick_flutter@1.1.3-dev.12
 - talker_cherrypick_logger@1.1.0-dev.7
cherrypick-v3.0.0-dev.12 cherrypick_flutter-v1.1.3-dev.12 talker_cherrypick_logger-v1.1.0-dev.7
2025-08-19 10:48:20 +03:00
Sergey Penkovsky
5c57370755 fix(benchmark) - hide warning 2025-08-19 10:47:53 +03:00
Sergey Penkovsky
8711dc83d0 docs(benchmark_di): update benchmark results and add test parameters for all DI in REPORT.md/RU.md 2025-08-19 10:29:53 +03:00
Sergey Penkovsky
043737e2c9 fix(scope): prevent concurrent modification in dispose()
- Create defensive copies of _scopeMap and _disposables
- Remove redundant try-catch blocks
- Improve memory safety during teardown
2025-08-19 09:57:02 +03:00
Sergey Penkovsky
ed65e3c23d fix(benchmark): improve CherryPickAdapter teardown reliability
- Add error handling for scope disposal
- Add null check for _scope variable
- Prevent concurrent modification exceptions
2025-08-19 09:22:45 +03:00
Sergey Penkovsky
a897c1b31b feat(benchmark_di): add Kiwi DI adapter and CLI integration 2025-08-18 18:40:07 +03:00
Sergey Penkovsky
dd9c3faa62 fix(binding): fix unterminated string literal and syntax issues in binding.dart 2025-08-18 18:35:41 +03:00
Sergey Penkovsky
846d55b124 feat(i18n): localize main page and enable i18n for homepage texts
- Updated index.tsx to use <Translate> and translate() for all main texts (title, subtitle, CTA, description) — now fully i18n-ready.
- Added new translation files (code.json, navbar.json, footer.json, etc.) to support Russian language for homepage and UI.
- Enables seamless language switching and correct translations of homepage elements.
2025-08-15 15:09:55 +03:00
Sergey Penkovsky
4f91d442af feat(i18n): localize FeatureList on homepage with <Translate> component
- Updated HomepageFeatures/index.tsx to use Docusaurus <Translate> component and unique ids for each feature title and description.
- Enables full i18n support for FeatureList (English & Russian).
- All feature texts are now ready for integration with Docusaurus translation workflow.
2025-08-15 14:40:33 +03:00
Sergey Penkovsky
d0c3870af6 feat(i18n): add Russian translation for docs intro page
- Added the initial Russian localizable version for the documentation introduction section ().
- Makes the first step of the CherryPick documentation available to Russian-speaking users.
- Ensures the /ru/docs/intro route is available and translated.
2025-08-15 10:10:37 +03:00
Sergey Penkovsky
c8292035b6 chore(docs): update editUrl for docs to project repository
- Changed docs.editUrl in docusaurus.config.ts to point to the actual GitHub repository (https://github.com/pese-git/cherrypick/tree/website/website).
- Allows users to edit documentation directly in this project's repo via the 'Edit this page' links.
2025-08-15 09:28:37 +03:00
Sergey Penkovsky
63ee3a9966 chore(config): remove blog preset block from docusaurus.config.ts
- Deleted all blog-related configuration from docusaurus.config.ts
- Intended for disabling or cleaning up unused blog features
2025-08-15 09:24:46 +03:00
Sergey Penkovsky
a4c5fd922e chore(release): publish packages
- cherrypick@3.0.0-dev.10
 - cherrypick_annotations@1.1.2-dev.1
 - cherrypick_flutter@1.1.3-dev.10
 - cherrypick_generator@2.0.0-dev.1
 - talker_cherrypick_logger@1.1.0-dev.5
cherrypick_annotations-v1.1.2-dev.1 cherrypick_flutter-v1.1.3-dev.10 cherrypick_generator-v2.0.0-dev.1 talker_cherrypick_logger-v1.1.0-dev.5 cherrypick-v3.0.0-dev.10
2025-08-15 09:06:46 +03:00
Sergey Penkovsky
8870b8ce54 docs(pub): update homepage and documentation URLs in pubspec.yaml to new official site 2025-08-15 09:04:39 +03:00
Sergey Penkovsky
1f7e1d120d fix: update logo icon 2025-08-15 08:58:08 +03:00
Sergey Penkovsky
bcc5278c83 Fix Netlify SPA routing 2025-08-14 17:34:18 +03:00
Sergey Penkovsky
8863b10cbe feat: update dns 2025-08-14 16:57:25 +03:00
Sergey Penkovsky
e0a5ae66f6 fix(docs): comment out all broken links to allow successful Docusaurus build
- Commented out references to non-existent files and examples in both English and Russian documentation:
  - circular-dependency-detection.md
  - logging.md
  - documentation-links.md
  - using-annotations.md
- This fix prevents build failures caused by unresolved links in Docusaurus for both locales.
- All offending links are now non-blocking comments, allowing the site to build and deploy successfully until the related pages are added.
2025-08-14 16:24:57 +03:00
Sergey Penkovsky
9fee26c524 feat(i18n): add initial Russian localization for documentation and site config
- Added full Russian translations for all main documentation sections () into .
- Sections translated include: key features, installation, getting started, all core concepts, advanced features, API reference, FAQ, links, additional modules, contributing, and license.
- Updated  to ensure language switching is available and Russian locale is active.
- Each Russian file preserves the structure and formatting of the original Markdown, with machine-aided draft translation for immediate use.
- Lays the groundwork for UI language switching (en/ru) and enables further manual translation refinement and review.
2025-08-14 15:46:53 +03:00
Sergey Penkovsky
248bf4c8c5 feat(website): update home page to showcase CherryPick DI documentation
- Replaced the main action button text with 'Explore CherryPick Documentation 🍒' instead of 'Docusaurus Tutorial'.
- Updated the button link to target /docs/intro (main docs entry point).
- Changed <Layout> props:
  - Page title now uses project title only (siteConfig.title)
  - Added a CherryPick-related site description for better SEO and context.
- The homepage is now tailored to reflect CherryPick's purpose as a Dart & Flutter DI library instead of Docusaurus boilerplate.
2025-08-14 13:41:54 +03:00
Sergey Penkovsky
f4c4fe49a0 init: docusaurus website project 2025-08-13 18:19:25 +03:00
Sergey Penkovsky
298cb65ac8 chore(release): publish packages
- talker_cherrypick_logger@1.1.0-dev.4
talker_cherrypick_logger-v1.1.0-dev.4
2025-08-13 15:58:08 +03:00
Sergey Penkovsky
1b9db31c13 docs(readme): update install instructions to use pub.dev as default method and remove obsolete git example
The main installation guide now recommends pub.dev with ^latest tags. Removed the outdated GitHub install block for clarity and simplicity. No functional code changes.
2025-08-13 15:57:28 +03:00
Sergey Penkovsky
ca3cd2c8fd Merge pull request #20 from pese-git/code-format
style: reformat codebase using melos format
2025-08-13 15:46:05 +03:00
Sergey Penkovsky
c91e15319b style: reformat codebase using melos format
Applied consistent code formatting across all packages using \$ melos format
  └> dart format .
     └> RUNNING (in 8 packages)

--------------------------------------------------------------------------------
benchmark_di:
Formatted 18 files (0 changed) in 0.30 seconds.
benchmark_di: SUCCESS
--------------------------------------------------------------------------------
cherrypick:
Formatted 24 files (0 changed) in 0.34 seconds.
cherrypick: SUCCESS
--------------------------------------------------------------------------------
cherrypick_annotations:
Formatted 11 files (0 changed) in 0.14 seconds.
cherrypick_annotations: SUCCESS
--------------------------------------------------------------------------------
cherrypick_flutter:
Formatted 3 files (0 changed) in 0.15 seconds.
cherrypick_flutter: SUCCESS
--------------------------------------------------------------------------------
cherrypick_generator:
Formatted 17 files (0 changed) in 0.27 seconds.
cherrypick_generator: SUCCESS
--------------------------------------------------------------------------------
client_app:
Formatted 4 files (0 changed) in 0.14 seconds.
client_app: SUCCESS
--------------------------------------------------------------------------------
postly:
Formatted lib/router/app_router.gr.dart
Formatted 23 files (1 changed) in 0.33 seconds.
postly: SUCCESS
--------------------------------------------------------------------------------
talker_cherrypick_logger:
Formatted 4 files (0 changed) in 0.18 seconds.
talker_cherrypick_logger: SUCCESS
--------------------------------------------------------------------------------

$ melos format
  └> dart format .
     └> SUCCESS. No functional or logic changes included.
2025-08-13 15:38:44 +03:00
Sergey Penkovsky
99e662124f chore(release): publish packages
- talker_cherrypick_logger@1.1.0-dev.3
talker_cherrypick_logger-v1.1.0-dev.3
2025-08-13 15:27:51 +03:00
Sergey Penkovsky
03f54981f3 chore(talker_cherrypick_logger): update package description in pubspec.yaml 2025-08-13 15:26:53 +03:00
Sergey Penkovsky
349efe6ba6 chore(release): publish packages
- talker_cherrypick_logger@1.1.0-dev.2
talker_cherrypick_logger-v1.1.0-dev.2
2025-08-13 15:23:21 +03:00
Sergey Penkovsky
c2f0e027b6 fix(gitignore) - update gitignore 2025-08-13 15:18:39 +03:00
Sergey Penkovsky
f85036d20f chore(release): publish packages
- cherrypick@3.0.0-dev.9
 - cherrypick_annotations@1.1.2-dev.0
 - cherrypick_flutter@1.1.3-dev.9
 - cherrypick_generator@2.0.0-dev.0
 - talker_cherrypick_logger@1.1.0-dev.0
cherrypick-v3.0.0-dev.9 cherrypick_annotations-v1.1.2-dev.0 cherrypick_flutter-v1.1.3-dev.9 cherrypick_generator-v2.0.0-dev.0 talker_cherrypick_logger-v1.1.0-dev.0
2025-08-13 15:11:23 +03:00
Sergey Penkovsky
db4d128d04 docs(readme): add talker_cherrypick_logger to Additional Modules section
Added information about the talker_cherrypick_logger official module in the Additional Modules table in README. This module provides seamless DI event logging integration with the Talker logging framework.
2025-08-13 15:07:12 +03:00
Sergey Penkovsky
2c4e2ed251 chore(pubspec): update metadata with homepage, docs, repository and topics
Added homepage URL, documentation, repository, issue tracker, and topics to pubspec.yaml for better package metadata. Removed 'publish_to: none' and outdated repository comment.
2025-08-13 14:56:10 +03:00
Sergey Penkovsky
7b4642f407 doc(readme): update readme 2025-08-13 09:11:06 +03:00
Sergey Penkovsky
7d45d00d6a docs(generator): improve and unify English documentation and examples for all DI source files
- Added comprehensive English documentation for all DI generator and support files:
  * inject_generator.dart — full class/method doc-comments, usage samples
  * module_generator.dart — doc-comments, feature explanation, complete example
  * src/annotation_validator.dart — class and detailed static method descriptions
  * src/type_parser.dart — doc, example for ParsedType and TypeParser, specific codegen notes
  * src/bind_spec.dart — interface, static factory, and codegen docs with DI scenarios
  * src/bind_parameters_spec.dart — details and samples for code generation logic
  * src/metadata_utils.dart — full doc and examples for annotation utilities
  * src/exceptions.dart — user- and contributor-friendly errors, structured output, category explanations
  * src/generated_class.dart — usage-centric doc-comments, example of resulting generated DI class
- Removed Russian/duplicate comments for full clarity and maintainability
- Ensured that new and existing contributors can easily extend and maintain DI code generation logic

BREAKING CHANGE: All documentation now English-only; comments include usage examples for each principal structure or routine

See #docs, #generator, #cherrypick
2025-08-13 08:57:06 +03:00
Sergey Penkovsky
884df50a34 docs(annotations): unify and improve English DartDoc for all DI annotations
- Updated all annotation files with complete English DartDoc, field/class/method usage, practical code samples
- Unified documentation style for @inject, @injectable, @instance, @singleton, @named, @scope, @params, @provide, @module
- Removed Russian comments for clarity and consistency
- Improved discoverability and IDE/autocomplete experience for CherryPick DI users
- No functional or API changes; documentation/dev experience only
2025-08-12 16:18:53 +03:00
Sergey Penkovsky
5710af2f9b docs(provider): add detailed English API documentation for CherryPickProvider Flutter integration
- Replaced all comments with complete DartDoc in English for CherryPickProvider
- Documented all methods (constructor, of, openRootScope, openSubScope, updateShouldNotify)
- Added code samples for typical Flutter+CherryPick integration, root and subscope usage
- Makes Flutter DI integration intuitive for new users and improves IDE support
- No logic or API changes, documentation only
2025-08-12 15:46:14 +03:00
Sergey Penkovsky
9312ef46ea docs(api): improve all DI core code documentation with English dartdoc and examples
- Full English API/class/method documentation for core CherryPick classes:
  * Binding<T>
  * BindingResolver<T>
  * CycleDetector and CycleDetectionMixin
  * GlobalCycleDetector and GlobalCycleDetectionMixin
  * Factory<T>
  * Module
  * Scope
- Each public and private method is now documented in clear DartDoc style with usages
- Added code samples for modules, scope, subscopes, DI resolve/async, cycle detection
- Russian comments completely replaced with English for consistency
- NO logic or API changes, documentation and devex improvement only

Also updated: pubspec.lock for workspace/example folders (auto by dependency changes)
2025-08-12 15:38:15 +03:00
Sergey Penkovsky
900cd68663 chore(release): publish packages
- cherrypick@3.0.0-dev.8
 - cherrypick_flutter@1.1.3-dev.8
cherrypick-v3.0.0-dev.8 cherrypick_flutter-v1.1.3-dev.8
2025-08-12 11:33:42 +03:00
Sergey Penkovsky
57e4196b95 Merge pull request #19 from pese-git/talker
Talker
2025-08-12 11:31:20 +03:00