wexample-filestate-javascript 6.0.30__tar.gz → 6.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/PKG-INFO +4 -4
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/README.md +2 -2
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/pyproject.toml +2 -2
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/option/javascript/abstract_javascript_file_content_option.py +3 -3
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/option/javascript/biome_option.py +21 -14
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/option/javascript_option.py +5 -3
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/config_option/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/config_option/biome_config_option.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/config_value/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/config_value/javascript_config_value.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/const/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/const/javascript_file.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/file/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/file/javascript_file.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/operation/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/operation/npm_package_lock_operation.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/option/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/option/javascript/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/option/javascript/npm_package_lock_option.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/options_provider/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/options_provider/javascript_options_provider.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/py.typed +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/resources/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/resources/docker/Dockerfile.javascript-option +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/resources/docker/__init__.py +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/src/wexample_filestate_javascript/resources/docker/biome.json +0 -0
- {wexample_filestate_javascript-6.0.30 → wexample_filestate_javascript-6.1.0}/tests/.gitkeep +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wexample-filestate-javascript
|
|
3
|
-
Version: 6.0
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Author-Email: weeger <contact@wexample.com>
|
|
5
5
|
License: MIT
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,7 +9,7 @@ Classifier: Operating System :: OS Independent
|
|
|
9
9
|
Requires-Python: >=3.10
|
|
10
10
|
Requires-Dist: attrs>=23.1.0
|
|
11
11
|
Requires-Dist: cattrs>=23.1.0
|
|
12
|
-
Requires-Dist: wexample-filestate>=
|
|
12
|
+
Requires-Dist: wexample-filestate>=9.0.0
|
|
13
13
|
Provides-Extra: dev
|
|
14
14
|
Requires-Dist: pytest; extra == "dev"
|
|
15
15
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
|
|
18
18
|
# filestate_javascript
|
|
19
19
|
|
|
20
|
-
Version: 6.0
|
|
20
|
+
Version: 6.1.0
|
|
21
21
|
|
|
22
22
|
## Table of Contents
|
|
23
23
|
|
|
@@ -97,7 +97,7 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
|
|
|
97
97
|
|
|
98
98
|
- attrs: >=23.1.0
|
|
99
99
|
- cattrs: >=23.1.0
|
|
100
|
-
- wexample-filestate: >=
|
|
100
|
+
- wexample-filestate: >=9.0.0
|
|
101
101
|
|
|
102
102
|
## Versioning & Compatibility Policy
|
|
103
103
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# filestate_javascript
|
|
2
2
|
|
|
3
|
-
Version: 6.0
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
|
|
|
80
80
|
|
|
81
81
|
- attrs: >=23.1.0
|
|
82
82
|
- cattrs: >=23.1.0
|
|
83
|
-
- wexample-filestate: >=
|
|
83
|
+
- wexample-filestate: >=9.0.0
|
|
84
84
|
|
|
85
85
|
## Versioning & Compatibility Policy
|
|
86
86
|
|
|
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "wexample-filestate-javascript"
|
|
9
|
-
version = "6.0
|
|
9
|
+
version = "6.1.0"
|
|
10
10
|
authors = [
|
|
11
11
|
{ name = "weeger", email = "contact@wexample.com" },
|
|
12
12
|
]
|
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
|
19
19
|
dependencies = [
|
|
20
20
|
"attrs>=23.1.0",
|
|
21
21
|
"cattrs>=23.1.0",
|
|
22
|
-
"wexample-filestate>=
|
|
22
|
+
"wexample-filestate>=9.0.0",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
[project.readme]
|
|
@@ -6,8 +6,8 @@ from typing import TYPE_CHECKING, ClassVar
|
|
|
6
6
|
from wexample_filestate.option.abstract_file_content_option import (
|
|
7
7
|
AbstractFileContentOption,
|
|
8
8
|
)
|
|
9
|
-
from wexample_filestate.option.mixin.
|
|
10
|
-
|
|
9
|
+
from wexample_filestate.option.mixin.with_batch_docker_option_mixin import (
|
|
10
|
+
WithBatchDockerOptionMixin,
|
|
11
11
|
)
|
|
12
12
|
from wexample_helpers.decorator.base_class import base_class
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
|
|
|
17
17
|
|
|
18
18
|
@base_class
|
|
19
19
|
class AbstractJavascriptFileContentOption(
|
|
20
|
-
|
|
20
|
+
WithBatchDockerOptionMixin, AbstractFileContentOption
|
|
21
21
|
):
|
|
22
22
|
DOCKER_IMAGE_NAME: ClassVar[str] = "javascript-option"
|
|
23
23
|
|
|
@@ -7,6 +7,8 @@ from wexample_helpers.decorator.base_class import base_class
|
|
|
7
7
|
from .abstract_javascript_file_content_option import AbstractJavascriptFileContentOption
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
10
12
|
from wexample_filestate.const.types_state_items import TargetFileOrDirectoryType
|
|
11
13
|
|
|
12
14
|
|
|
@@ -16,21 +18,26 @@ class BiomeOption(AbstractJavascriptFileContentOption):
|
|
|
16
18
|
return "Format and lint JavaScript/TypeScript code using Biome."
|
|
17
19
|
|
|
18
20
|
def _apply_content_change(self, target: TargetFileOrDirectoryType) -> str:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
cache = self._get_or_build_batch_cache(target)
|
|
22
|
+
path_key = str(target.get_path())
|
|
23
|
+
if path_key in cache:
|
|
24
|
+
return cache[path_key]
|
|
25
|
+
return target.read_text()
|
|
26
|
+
|
|
27
|
+
def _run_batch_on_paths(
|
|
28
|
+
self,
|
|
29
|
+
reference_target: TargetFileOrDirectoryType,
|
|
30
|
+
paths: list[Path],
|
|
31
|
+
) -> None:
|
|
32
|
+
self._ensure_docker_container(reference_target)
|
|
33
|
+
runner = self._get_or_create_runner(reference_target)
|
|
34
|
+
container_paths = [runner.rebase_path(p) for p in paths]
|
|
35
|
+
return runner.execute(
|
|
36
|
+
cmd=[
|
|
27
37
|
"biome",
|
|
28
|
-
"
|
|
38
|
+
"format",
|
|
29
39
|
"--write",
|
|
30
40
|
"--config-path=/tmp/biome.json",
|
|
31
|
-
|
|
32
|
-
]
|
|
41
|
+
*container_paths,
|
|
42
|
+
]
|
|
33
43
|
)
|
|
34
|
-
|
|
35
|
-
# Read the fixed content from the file (it was modified in place)
|
|
36
|
-
return target.read_text()
|
|
@@ -9,8 +9,8 @@ from wexample_config.config_option.abstract_nested_config_option import (
|
|
|
9
9
|
from wexample_filestate.enum.scopes import Scope
|
|
10
10
|
from wexample_filestate.operation.abstract_operation import AbstractOperation
|
|
11
11
|
from wexample_filestate.option.mixin.option_mixin import OptionMixin
|
|
12
|
-
from wexample_filestate.option.mixin.
|
|
13
|
-
|
|
12
|
+
from wexample_filestate.option.mixin.with_batch_docker_option_mixin import (
|
|
13
|
+
WithBatchDockerOptionMixin,
|
|
14
14
|
)
|
|
15
15
|
from wexample_helpers.decorator.base_class import base_class
|
|
16
16
|
|
|
@@ -19,7 +19,9 @@ if TYPE_CHECKING:
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
@base_class
|
|
22
|
-
class JavascriptOption(
|
|
22
|
+
class JavascriptOption(
|
|
23
|
+
OptionMixin, WithBatchDockerOptionMixin, AbstractNestedConfigOption
|
|
24
|
+
):
|
|
23
25
|
@classmethod
|
|
24
26
|
def get_scopes(cls) -> list[Scope]:
|
|
25
27
|
return [Scope.CONTENT]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|