Skip to content

Implement custom command decorator and deprecate multi-version init() - #1

Merged
stirante merged 2 commits into
Bedrock-OSS:mainfrom
r4isen1920:main
Sep 22, 2025
Merged

stirante merged 2 commits into
Bedrock-OSS:mainfrom
r4isen1920:main

Conversation

@r4isen1920

@r4isen1920 r4isen1920 commented Sep 21, 2025 •

Copy link
Copy Markdown
Contributor

e2ad30a

This commit aims to rectify the following issues:

  1. Test suite fails because initV1() and initV2() are no longer exported, and has been removed entirely. This commit aims to rectify this by changing the tests to use the unified init(), and;
  2. Docs were not updated to reflect the removal of initV1() and initV2().

With the deprecation and removal of these functions, the following has been done consequently in this commit:

  • removed initV1(), then;
  • initV2() has been renamed to init().
    In other words, in favor of new 2.X Scripts API version, initV1() has been removed entirely.

Moreover, the addition of event decorators in commit faec67b provided more requirement in pushing things to Script API v2.X.

b734363

Added the @CustomCmd decorator for registering custom commands.

This commit aims to rectify the following issues:
1. Test suite fails because `initV1()` and `initV2()` are no longer exported, and has been removed entirely. This commit aims to rectify this by changing the tests to use the unified `init()`, and;
2. Docs were not updated to reflect the removal of `initV1()` and `initV2()`.

With the deprecation and removal of these functions, the following has been done consequently in this commit:
- removed `initV1()`, then;
- `initV2()` has been renamed to `init()`.
In other words, in favor of new 2.X Scripts API version, `initV1()` has been removed entirely.

Moreover, the addition of event decorators in commit faec67b provided more requirement in pushing things to Script API v2.X.
@stirante
stirante merged commit 6ce7fe5 into Bedrock-OSS:main Sep 22, 2025
1 check passed
@stirante

Copy link
Copy Markdown
Member

Thanks! I should've ran the tests before release...

@stirante

Copy link
Copy Markdown
Member

Changes released in 0.0.3!

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.

2 participants