Skip to content

Conversation

luxass
Copy link
Member

@luxass luxass commented Oct 14, 2025

🔗 Linked issue

📚 Description

Copy link

changeset-bot bot commented Oct 14, 2025

🦋 Changeset detected

Latest commit: 9074046

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ucdjs/test-utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch overhaul-store

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the pkg: ucd-store Changes related to the UCD Store package. label Oct 14, 2025
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 0% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/ucd-store/src/v2/store.ts 0.00% 31 Missing and 5 partials ⚠️
packages/ucd-store/src/v2/manifest.ts 0.00% 15 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

github-actions bot commented Oct 14, 2025

🌏 Preview Deployments

Application Status Preview URL
API ⏭️ Skipped N/A
Website ✅ Deployed View Preview
Documentation ✅ Deployed View Preview

Built from commit: 1fed3445866937c8812873384b329bd1f7f213fe


🤖 This comment will be updated automatically when you push new commits to this PR.

- Implement `createInternalContext` to initialize the internal store context.
- Implement `createPublicContext` to expose public-facing properties from the internal context.
- Enhance type definitions in `types.ts` for better clarity and structure.
* Refactored `writeManifest` and `readManifest` to accept `FileSystemBridge` and `manifestPath` as parameters instead of a context object.
* Improved debug logging for better traceability during manifest operations.
* Enhanced error handling for empty or invalid manifest data.
- Implemented `bootstrap` function to initialize the store by validating versions and creating the manifest.
- Added `verify` function to check the availability of versions in the manifest against the API.
- Introduced error handling for API fetch failures and version validation.
…prehensive tests

- Added tests for writing manifests with multiple versions, valid JSON formatting, and handling of empty arrays.
- Implemented error handling for scenarios where the file system bridge lacks write/read capabilities.
- Enhanced integration tests to ensure correct round-trip functionality for writing and reading manifests.
* Added @luxass/msw-utils as a dependency in both shared and test-utils packages.
* Updated the version from 0.2.0 to 0.3.0 to ensure compatibility and access to new features.
* Adjusted retry logic in fetch to handle MSW errors appropriately.
- Implement tests for `createInternalContext` and `createPublicContext`.
- Validate context creation with required properties and input preservation.
- Ensure mutable and frozen versions behavior is correctly handled.
- Test for readonly properties in public context.
* Introduced `createMemoryMockFS` for testing with an in-memory file system.
* Updated `package.json` to include new exports for `fs-bridges`.
* Modified `tsdown.config.ts` to reference the new `fs-bridges` module.
* Updated tests to utilize the new in-memory file system bridge.
* Removed `assertCapability` calls for `exists` and `read` in `bootstrap` and `readManifest` functions.
* Updated `fs.exists` usage to eliminate non-null assertion in `createUCDStore`.
* These changes streamline the code and improve readability.
* Ensure the `#test-utils` alias is defined correctly after its dependencies.
* This change maintains the integrity of the alias mapping for test utilities.
* Eliminated the test case that checked for read capability on a write-only file system bridge.
* This change simplifies the test suite by removing unnecessary complexity.
* Made the `handleVersionConflict` function publicly accessible.
* This change allows external modules to utilize the version conflict handling logic.
* Implement tests for strict, merge, and overwrite strategies.
* Validate behavior for matching, differing, and empty version arrays.
* Ensure error handling for version mismatches is correctly tested.
- Implement tests to ensure correct behavior when all manifest versions exist in the API.
- Validate inclusion of extra versions available in the API but not in the manifest.
- Check for invalid results when the manifest contains versions not present in the API.
- List missing versions when they don't exist in the API.
- Handle scenarios for empty manifests and API request failures.
- Implement tests for creating a manifest with valid versions.
- Verify base directory creation when it doesn't exist.
- Ensure no directory is created if the base path already exists.
- Handle scenarios for empty versions array and API request failures.
- Validate correct structure of the generated manifest.
- Test error handling for unsupported filesystem capabilities.
…lity

* Implement tests for bootstrapping a new store without a manifest.
* Validate version handling during bootstrap and error scenarios.
* Ensure correct manifest creation and version loading from existing manifests.
* Test configuration handling, including default and custom base URLs.
* Verify endpoint configuration discovery and usage.
…ties

- Introduced `hasCapability` function to check if a file system bridge supports specified capabilities.
- Enhances type safety by narrowing bridge type based on capabilities.
- Includes runtime checks and debugging information for capability validation.
- Added `getFileTree`, `getFilePaths`, and `getFile` methods for retrieving file data from the API.
- Introduced `StoreMethodOptions` and `GetFileOptions` interfaces to support filtering and caching options.
- Updated `UCDStoreV2` to include the new retrieval methods.
The new store is not fully implemented, hence the errors in all the files.
…o use debugger

* Deleted `__utils.ts` which contained the `createLogger` function.
* Updated `http-playground.ts` to use `createDebugger` instead of the removed logger.
* Removed unused playground files: `memory-playground.ts` and `node-playground.ts`.
…operations

- Added detailed debug messages for file retrieval methods.
- Implemented error handling for invalid version requests and filtered file access.
- Improved logging for successful operations and file content details.
- Updated the return types of `createNodeUCDStore` and `createHTTPUCDStore` to use `UCDStore`.
- Adjusted the type definition in `types.ts` to reflect the new naming convention.
- Ensured consistency across the UCD store implementation.
…agement

- Implement `bootstrap` function to initialize the store and create the manifest.
- Implement `verify` function to check the validity of manifest versions against the API.
- Add corresponding test cases for both functions to ensure correct functionality.
- Remove unused shared test utility file.
* Changed import paths for `StoreError` and `UCDStoreGenericError` to use relative paths.
* Improved code organization and consistency across modules.
* Added the `unbundle` option to the configuration for clarity.
* This change maintains consistency in the configuration setup.
- Replaced `getFilePaths`, `getFileTree`, and `getFile` methods with a new `files` namespace containing `list`, `tree`, and `get` methods.
- Implemented `getExpectedFilePaths` to fetch expected file paths for a specific Unicode version.
- Created `analyze`, `mirror`, and `sync` operations for enhanced store functionality.
- Removed deprecated `retrieval.ts` file and integrated its functionality into the new structure.
- Updated types and interfaces to reflect the new operations and file handling methods.
- Adjusted tests to validate the new operations and ensure proper functionality.
* Changed `initialState` to a local variable `callCount` to prevent side-effects.
* Updated expectations to reflect the new state management approach.
* Ensured that state updates do not affect the outer `callCount` variable.
* Added `rolldown: 1.0.0-beta.42` to the `catalogs` section.
* Changed `rolldown` override to `catalog:dev`.
* Added `rolldown` as a dependency in `package.json`.
* Updated `pnpm-lock.yaml` to include `rolldown` version 1.0.0-beta.42.
* Removed the declaration of `__UCD_ENDPOINT_DEFAULT_CONFIG__` from the function scope.
* Updated `getDefaultUCDEndpointConfig` to use `globalThis.__UCD_ENDPOINT_DEFAULT_CONFIG__`.
* Added comments to clarify the reason for the change and the handling of TypeScript expectations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: ucd-store Changes related to the UCD Store package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant