aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 11:20:24 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 11:20:24 +0900
commita8a4b54b90e6433cf4a25a88a4765243f831ebef (patch)
tree91cceee5d792c6973e7a053a36d60441ce30bf64 /crates/shirabe
parent6051927c8fa32cfffa102d2a170c5a6cf747a1b9 (diff)
downloadphp-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.tar.gz
php-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.tar.zst
php-shirabe-a8a4b54b90e6433cf4a25a88a4765243f831ebef.zip
refactor(seld-json-lint): extract seld/json_lint into the shirabe-seld-json-lint crate
Move `Seld\JsonLint` out of shirabe-external-packages and into its own crate, so the path is `shirabe_seld_json_lint::ParsingException` instead of `shirabe_external_packages::seld::json_lint::ParsingException`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe')
-rw-r--r--crates/shirabe/Cargo.toml1
-rw-r--r--crates/shirabe/src/console/application.rs2
-rw-r--r--crates/shirabe/src/installer.rs2
-rw-r--r--crates/shirabe/src/json/json_file.rs2
-rw-r--r--crates/shirabe/src/package/locker.rs2
-rw-r--r--crates/shirabe/tests/json/json_file_test.rs2
6 files changed, 6 insertions, 5 deletions
diff --git a/crates/shirabe/Cargo.toml b/crates/shirabe/Cargo.toml
index 6623ba80..35aa4737 100644
--- a/crates/shirabe/Cargo.toml
+++ b/crates/shirabe/Cargo.toml
@@ -10,6 +10,7 @@ shirabe-metadata-minifier.workspace = true
shirabe-pcre.workspace = true
shirabe-php-rpc.workspace = true
shirabe-php-shim.workspace = true
+shirabe-seld-json-lint.workspace = true
shirabe-semver.workspace = true
shirabe-spdx-licenses.workspace = true
shirabe-symfony-console.workspace = true
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs
index 2e93c33d..f5c953da 100644
--- a/crates/shirabe/src/console/application.rs
+++ b/crates/shirabe/src/console/application.rs
@@ -55,7 +55,6 @@ use crate::util::Platform;
use crate::util::Silencer;
use indexmap::IndexMap;
use shirabe_external_packages::composer::xdebug_handler::XdebugHandler;
-use shirabe_external_packages::seld::json_lint::ParsingException;
use shirabe_php_shim::Catch as _;
use shirabe_php_shim::{
LogicException as ShimLogicException, PHP_VERSION, PHP_VERSION_ID, PhpMixed, RuntimeException,
@@ -66,6 +65,7 @@ use shirabe_php_shim::{
php_uname, posix_getuid, random_bytes, realpath, restore_error_handler, round, str_contains,
str_replace, strpos, strtoupper, sys_get_temp_dir, time, unlink,
};
+use shirabe_seld_json_lint::ParsingException;
use shirabe_symfony_console::application::Application as BaseApplication;
use shirabe_symfony_console::command::Command as SymfonyCommand;
use shirabe_symfony_console::command::help_command::HelpCommand;
diff --git a/crates/shirabe/src/installer.rs b/crates/shirabe/src/installer.rs
index 22da3fff..4ff6af3d 100644
--- a/crates/shirabe/src/installer.rs
+++ b/crates/shirabe/src/installer.rs
@@ -34,11 +34,11 @@ pub use suggested_packages_reporter::*;
use crate::io::io_interface;
use indexmap::IndexMap;
-use shirabe_external_packages::seld::json_lint::ParsingException;
use shirabe_php_shim::{
PhpMixed, RuntimeException, array_map, array_unique, implode, intval, is_dir, is_numeric,
strcmp, strpos, strtolower, touch, usort,
};
+use shirabe_seld_json_lint::ParsingException;
use shirabe_semver;
use crate::advisory::AuditConfig;
diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs
index f506a831..b08a7a97 100644
--- a/crates/shirabe/src/json/json_file.rs
+++ b/crates/shirabe/src/json/json_file.rs
@@ -9,7 +9,6 @@ use crate::util::Filesystem;
use crate::util::HttpDownloader;
use crate::util::Silencer;
use indexmap::IndexMap;
-use shirabe_external_packages::seld::json_lint::{ParsingException, ParsingExceptionDetails};
use shirabe_pcre::{CaptureKey, Preg};
use shirabe_php_shim::Catch as _;
use shirabe_php_shim::{
@@ -18,6 +17,7 @@ use shirabe_php_shim::{
file_put_contents, is_dir, is_file, json_decode, json_encode_ex, mkdir, php_regex, realpath,
str_contains, str_ends_with, str_repeat, strlen, strpos, usleep,
};
+use shirabe_seld_json_lint::{ParsingException, ParsingExceptionDetails};
#[derive(Debug, Clone)]
pub struct JsonEncodeOptions {
diff --git a/crates/shirabe/src/package/locker.rs b/crates/shirabe/src/package/locker.rs
index 67b2d5b4..ccfb2ddf 100644
--- a/crates/shirabe/src/package/locker.rs
+++ b/crates/shirabe/src/package/locker.rs
@@ -24,7 +24,6 @@ use crate::repository::RootPackageRepository;
use crate::util::Git as GitUtil;
use crate::util::ProcessExecutor;
use indexmap::IndexMap;
-use shirabe_external_packages::seld::json_lint::ParsingException;
use shirabe_pcre::{CaptureKey, Preg};
use shirabe_php_shim::Catch as _;
use shirabe_php_shim::{
@@ -32,6 +31,7 @@ use shirabe_php_shim::{
array_map, array_merge, file_get_contents, filemtime, function_exists, hash, in_array_loose,
is_int, ksort, php_regex, realpath, strcmp, strtolower, touch2, trim, usort,
};
+use shirabe_seld_json_lint::ParsingException;
/// Reads/writes project lockfile (composer.lock).
#[derive(Debug)]
diff --git a/crates/shirabe/tests/json/json_file_test.rs b/crates/shirabe/tests/json/json_file_test.rs
index a20e7234..27b43a05 100644
--- a/crates/shirabe/tests/json/json_file_test.rs
+++ b/crates/shirabe/tests/json/json_file_test.rs
@@ -2,9 +2,9 @@
use indexmap::IndexMap;
use shirabe::json::{JsonEncodeOptions, JsonFile, JsonValidationException};
-use shirabe_external_packages::seld::json_lint::ParsingException;
use shirabe_php_shim::Catch as _;
use shirabe_php_shim::PhpMixed;
+use shirabe_seld_json_lint::ParsingException;
/// ref: JsonFileTest::expectParseException
fn expect_parse_exception(text: &str, json: &str) {