Closed ZenVoich closed 2 months ago
The changes encompass updates across various files in the CLI application, introducing new functionalities, enhancing configuration management, and refining type handling. Key modifications include the addition of a Replica
class for canister management, updates to testing commands, and improvements in the handling of configuration files. Additionally, several cosmetic changes enhance code readability, while version updates reflect the adoption of newer dependencies.
File(s) | Change Summary |
---|---|
cli/api/actors.ts |
Minor formatting changes to variable and parameter declarations for improved readability. |
cli/cli.ts |
Introduced mopsReplicaTestRunning , updated test command options to include --replica and --mode , and added configuration checks for robustness. |
cli/commands/bench-replica.ts |
Enhanced BenchReplica class with PocketIcServer integration, updated toolchain version check, and modified initialization and teardown processes. |
cli/commands/bench.ts |
Updated logic for handling configuration and cleanup processes, including commenting out directory removal. |
cli/commands/publish.ts |
Modified testWithReporter invocation to include additional parameters for enhanced context. |
cli/commands/replica.ts |
New Replica class added for managing canisters in dfx and pocket-ic environments, with methods for starting, stopping, and deploying canisters. |
cli/commands/test/mmf1.ts |
Corrected spelling of srategy to strategy in the MMF1 class. |
cli/commands/test/reporters/*.ts |
Updated addRun method signatures in various reporter classes to replace wasiMode with mode of type TestMode , enhancing type safety and clarity. |
cli/commands/test/test.ts |
Introduced ReplicaName and TestOptions types, updated test and runAll function signatures for flexible configuration handling. |
cli/mops.ts |
Added exit parameter to checkConfigFile function to control termination behavior based on config file presence. |
cli/package.json |
Updated pic-ic package version from 0.3.3 to 0.5.1 . |
cli/types.ts |
Added new exported type TestMode for better handling of testing modes. |
mops.toml |
Updated pocket-ic dependency version from 1.0.0 to 4.0.0 . |
test/*.test.mo |
Introduced multiple test files for storage canister, validating upload and download processes with comprehensive test cases. |
sequenceDiagram
participant User
participant CLI
participant Replica
participant Canister
User->>CLI: Run test command
CLI->>Replica: Check configuration
Replica->>Canister: Start canister
Canister-->>Replica: Canister started
CLI->>Canister: Execute tests
Canister-->>CLI: Return test results
CLI-->>User: Display results
🐇 "In the code where changes bloom,
A rabbit hops, dispelling gloom.
New features sprout, like springtime's cheer,
With every line, we hold them dear.
In tests and types, we find our way,
Hooray for code! Let's leap and play!" 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Replica
class for managing and deploying canisters indfx
andpocket-ic
environments.replica
testing mode in the CLI, enhancing testing flexibility.Bug Fixes
srategy
tostrategy
in theMMF1
class.Documentation
Chores
pic-ic
andpocket-ic
to newer versions.Tests