mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
pre-commit updates and fix prettier entrypoint
https://nodejs.org/en/download https://www.npmjs.com/package/prettier prettier fix ups
This commit is contained in:
@@ -4,8 +4,8 @@ default_stages: [pre-commit, pre-push]
|
||||
default_language_version:
|
||||
# force all unspecified Python hooks to run python3
|
||||
python: python3
|
||||
# force all unspecified Node hooks to run Node.js v22.15.0 LTS
|
||||
node: 22.15.0
|
||||
# force all unspecified Node hooks to run Node.js v22.16.0 LTS
|
||||
node: 22.16.0
|
||||
minimum_pre_commit_version: "3.2.0"
|
||||
exclude: "^tools/lrama/"
|
||||
repos:
|
||||
@@ -22,12 +22,12 @@ repos:
|
||||
- id: prettier
|
||||
name: run prettier
|
||||
description: format files with prettier
|
||||
entry: prettier --write .
|
||||
entry: prettier --write '**/*.json' '**/*.md' '**/*.yaml' '**/*.yml'
|
||||
files: \.(json|md|ya?ml)$
|
||||
language: node
|
||||
additional_dependencies: ["prettier@3.5.3"]
|
||||
additional_dependencies: ["prettier@3.6.0"]
|
||||
- repo: https://github.com/gitleaks/gitleaks
|
||||
rev: v8.25.1
|
||||
rev: v8.27.2
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
name: run gitleaks
|
||||
@@ -98,7 +98,7 @@ repos:
|
||||
description: local policy is to exclude extension from all shell files
|
||||
types: [shell]
|
||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||
rev: v0.44.0
|
||||
rev: v0.45.0
|
||||
hooks:
|
||||
- id: markdownlint
|
||||
name: run markdownlint
|
||||
@@ -122,7 +122,7 @@ repos:
|
||||
name: run shellcheck
|
||||
description: check shell scripts with a static analysis tool
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.37.0
|
||||
rev: v1.37.1
|
||||
hooks:
|
||||
- id: yamllint
|
||||
name: run yamllint
|
||||
|
||||
@@ -50,7 +50,6 @@ Implement mrb_basic_alloc_func() in your code, and mruby will invoke it for ever
|
||||
If you are moving from the old API:
|
||||
|
||||
1. **Removal of `mrb_open_allocf()`**
|
||||
|
||||
- \_Old:
|
||||
|
||||
```c
|
||||
@@ -65,11 +64,9 @@ If you are moving from the old API:
|
||||
```
|
||||
|
||||
2. **`mrb_open_core()` takes no arguments**
|
||||
|
||||
- Simply drop any allocf or user-data arguments, and redefine `mrb_basic_alloc_func` as you need.
|
||||
|
||||
3. **No more `mrb_allocf` type**
|
||||
|
||||
- Definitions using the `mrb_allocf` typedef can be removed; implement `mrb_basic_alloc_func()` with the signature below:
|
||||
|
||||
```c
|
||||
@@ -77,7 +74,6 @@ If you are moving from the old API:
|
||||
```
|
||||
|
||||
4. **`mrb_basic_alloc_func` signature change**
|
||||
|
||||
- _Old:_
|
||||
|
||||
```c
|
||||
|
||||
@@ -75,7 +75,6 @@ Once you have a `Time` object, you can extract its components:
|
||||
```
|
||||
|
||||
- **Subtraction (`-`)**:
|
||||
|
||||
- Subtracting a duration (in seconds) from a `Time` object returns a new `Time` object.
|
||||
- Subtracting another `Time` object returns the difference in seconds as a Float.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user