-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(blocks): support _ in block names and deprecate v1 #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(blocks): support _ in block names and deprecate v1 #249
Conversation
Deprecates V1 blocks by way of a persistent log message any time a v1 block is read from disk. Adds support for `_` in block names.
Deploying stencil with
|
Latest commit: |
1811cd0
|
Status: | ✅ Deploy successful! |
Preview URL: | https://3d4b3283.stencil-1wj.pages.dev |
Branch Preview URL: | https://jaredallard-feat-support-und.stencil-1wj.pages.dev |
FYI @malept |
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds support for underscores in block names and deprecates V1 blocks with a persistent warning message when a V1 block is read from disk. Key changes include:
- Updating tool versions in .mise.toml and commenting out the old golangci-lint configuration.
- Modifying the linters workflow to retrieve the new golangci-lint version.
- Adding a deprecation warning for V1 blocks and updating block version handling and tests accordingly.
Reviewed Changes
File | Description |
---|---|
.mise.toml | Updated golang tool versions and replaced the old golangci-lint entry |
.github/workflows/linters.yaml | Changed the command to retrieve golangci-lint version, potentially affecting shell quoting |
internal/codegen/file.go | Added a deprecation warning for V1 blocks |
internal/codegen/blocks.go | Introduced BlockVersion type and updated regex to support "_" in block names |
internal/codegen/blocks_test.go | Updated test helpers to use a test logger and pass in the testing context |
internal/codegen/template_test.go | Updated usage of fakeBlocksTemplate to use the new signature |
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Deprecates V1 blocks by way of a persistent log message any time a v1
block is read from disk.
Adds support for
_
in block names.