diff --git a/api/src/DataFixtures/Factory/BookFactory.php b/api/src/DataFixtures/Factory/BookFactory.php index e65dbf055..1fcf3de55 100644 --- a/api/src/DataFixtures/Factory/BookFactory.php +++ b/api/src/DataFixtures/Factory/BookFactory.php @@ -6,47 +6,51 @@ use App\Entity\Book; use App\Enum\BookCondition; -use Doctrine\ORM\EntityRepository; -use Zenstruck\Foundry\ModelFactory; -use Zenstruck\Foundry\Proxy; -use Zenstruck\Foundry\RepositoryProxy; +use App\Repository\BookRepository; +use Zenstruck\Foundry\FactoryCollection; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\Proxy; +use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator; /** - * @extends ModelFactory + * @method Book|Proxy create(array|callable $attributes = []) + * @method static Book|Proxy createOne(array $attributes = []) + * @method static Book|Proxy find(object|array|mixed $criteria) + * @method static Book|Proxy findOrCreate(array $attributes) + * @method static Book|Proxy first(string $sortedField = 'id') + * @method static Book|Proxy last(string $sortedField = 'id') + * @method static Book|Proxy random(array $attributes = []) + * @method static Book|Proxy randomOrCreate(array $attributes = []) + * @method static Book[]|Proxy[] all() + * @method static Book[]|Proxy[] createMany(int $number, array|callable $attributes = []) + * @method static Book[]|Proxy[] createSequence(iterable|callable $sequence) + * @method static Book[]|Proxy[] findBy(array $attributes) + * @method static Book[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) + * @method static Book[]|Proxy[] randomSet(int $number, array $attributes = []) + * @method FactoryCollection many(int $min, int|null $max = null) + * @method FactoryCollection sequence(iterable|callable $sequence) + * @method static ProxyRepositoryDecorator repository() * - * @method Book|Proxy create(array|callable $attributes = []) - * @method static Book|Proxy createOne(array $attributes = []) - * @method static Book|Proxy find(object|array|mixed $criteria) - * @method static Book|Proxy findOrCreate(array $attributes) - * @method static Book|Proxy first(string $sortedField = 'id') - * @method static Book|Proxy last(string $sortedField = 'id') - * @method static Book|Proxy random(array $attributes = []) - * @method static Book|Proxy randomOrCreate(array $attributes = []) - * @method static EntityRepository|RepositoryProxy repository() - * @method static Book[]|Proxy[] all() - * @method static Book[]|Proxy[] createMany(int $number, array|callable $attributes = []) - * @method static Book[]|Proxy[] createSequence(iterable|callable $sequence) - * @method static Book[]|Proxy[] findBy(array $attributes) - * @method static Book[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) - * @method static Book[]|Proxy[] randomSet(int $number, array $attributes = []) + * @phpstan-method Book&Proxy create(array|callable $attributes = []) + * @phpstan-method static Book&Proxy createOne(array $attributes = []) + * @phpstan-method static Book&Proxy find(object|array|mixed $criteria) + * @phpstan-method static Book&Proxy findOrCreate(array $attributes) + * @phpstan-method static Book&Proxy first(string $sortedField = 'id') + * @phpstan-method static Book&Proxy last(string $sortedField = 'id') + * @phpstan-method static Book&Proxy random(array $attributes = []) + * @phpstan-method static Book&Proxy randomOrCreate(array $attributes = []) + * @phpstan-method static list> all() + * @phpstan-method static list> createMany(int $number, array|callable $attributes = []) + * @phpstan-method static list> createSequence(iterable|callable $sequence) + * @phpstan-method static list> findBy(array $attributes) + * @phpstan-method static list> randomRange(int $min, int $max, array $attributes = []) + * @phpstan-method static list> randomSet(int $number, array $attributes = []) + * @phpstan-method FactoryCollection> many(int $min, int|null $max = null) + * @phpstan-method FactoryCollection> sequence(iterable|callable $sequence) * - * @psalm-method Proxy create(array|callable $attributes = []) - * @psalm-method static Proxy createOne(array $attributes = []) - * @psalm-method static Proxy find(object|array|mixed $criteria) - * @psalm-method static Proxy findOrCreate(array $attributes) - * @psalm-method static Proxy first(string $sortedField = 'id') - * @psalm-method static Proxy last(string $sortedField = 'id') - * @psalm-method static Proxy random(array $attributes = []) - * @psalm-method static Proxy randomOrCreate(array $attributes = []) - * @psalm-method static RepositoryProxy repository() - * @psalm-method static list> all() - * @psalm-method static list> createMany(int $number, array|callable $attributes = []) - * @psalm-method static list> createSequence(iterable|callable $sequence) - * @psalm-method static list> findBy(array $attributes) - * @psalm-method static list> randomRange(int $min, int $max, array $attributes = []) - * @psalm-method static list> randomSet(int $number, array $attributes = []) + * @extends PersistentProxyObjectFactory */ -final class BookFactory extends ModelFactory +final class BookFactory extends PersistentProxyObjectFactory { private array $data; @@ -64,7 +68,7 @@ public function __construct() /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#model-factories */ - protected function getDefaults(): array + protected function defaults(): array { return [ 'condition' => self::faker()->randomElement(BookCondition::getCases()), @@ -74,7 +78,7 @@ protected function getDefaults(): array /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization */ - protected function initialize(): self + protected function initialize(): static { return $this ->afterInstantiate(function (Book $book): void { @@ -110,7 +114,7 @@ protected function initialize(): self ; } - protected static function getClass(): string + public static function class(): string { return Book::class; } diff --git a/api/src/DataFixtures/Factory/BookmarkFactory.php b/api/src/DataFixtures/Factory/BookmarkFactory.php index efc712a84..5bdb27b06 100644 --- a/api/src/DataFixtures/Factory/BookmarkFactory.php +++ b/api/src/DataFixtures/Factory/BookmarkFactory.php @@ -5,62 +5,58 @@ namespace App\DataFixtures\Factory; use App\Entity\Bookmark; -use Doctrine\ORM\EntityRepository; -use Zenstruck\Foundry\ModelFactory; -use Zenstruck\Foundry\Proxy; -use Zenstruck\Foundry\RepositoryProxy; +use App\Repository\BookmarkRepository; +use Zenstruck\Foundry\FactoryCollection; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\Proxy; +use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator; use function Zenstruck\Foundry\lazy; /** - * @extends ModelFactory + * @method Bookmark|Proxy create(array|callable $attributes = []) + * @method static Bookmark|Proxy createOne(array $attributes = []) + * @method static Bookmark|Proxy find(object|array|mixed $criteria) + * @method static Bookmark|Proxy findOrCreate(array $attributes) + * @method static Bookmark|Proxy first(string $sortedField = 'id') + * @method static Bookmark|Proxy last(string $sortedField = 'id') + * @method static Bookmark|Proxy random(array $attributes = []) + * @method static Bookmark|Proxy randomOrCreate(array $attributes = []) + * @method static Bookmark[]|Proxy[] all() + * @method static Bookmark[]|Proxy[] createMany(int $number, array|callable $attributes = []) + * @method static Bookmark[]|Proxy[] createSequence(iterable|callable $sequence) + * @method static Bookmark[]|Proxy[] findBy(array $attributes) + * @method static Bookmark[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) + * @method static Bookmark[]|Proxy[] randomSet(int $number, array $attributes = []) + * @method FactoryCollection many(int $min, int|null $max = null) + * @method FactoryCollection sequence(iterable|callable $sequence) + * @method static ProxyRepositoryDecorator repository() * - * @method Bookmark|Proxy create(array|callable $attributes = []) - * @method static Bookmark|Proxy createOne(array $attributes = []) - * @method static Bookmark|Proxy find(object|array|mixed $criteria) - * @method static Bookmark|Proxy findOrCreate(array $attributes) - * @method static Bookmark|Proxy first(string $sortedField = 'id') - * @method static Bookmark|Proxy last(string $sortedField = 'id') - * @method static Bookmark|Proxy random(array $attributes = []) - * @method static Bookmark|Proxy randomOrCreate(array $attributes = []) - * @method static EntityRepository|RepositoryProxy repository() - * @method static Bookmark[]|Proxy[] all() - * @method static Bookmark[]|Proxy[] createMany(int $number, array|callable $attributes = []) - * @method static Bookmark[]|Proxy[] createSequence(iterable|callable $sequence) - * @method static Bookmark[]|Proxy[] findBy(array $attributes) - * @method static Bookmark[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) - * @method static Bookmark[]|Proxy[] randomSet(int $number, array $attributes = []) + * @phpstan-method Bookmark&Proxy create(array|callable $attributes = []) + * @phpstan-method static Bookmark&Proxy createOne(array $attributes = []) + * @phpstan-method static Bookmark&Proxy find(object|array|mixed $criteria) + * @phpstan-method static Bookmark&Proxy findOrCreate(array $attributes) + * @phpstan-method static Bookmark&Proxy first(string $sortedField = 'id') + * @phpstan-method static Bookmark&Proxy last(string $sortedField = 'id') + * @phpstan-method static Bookmark&Proxy random(array $attributes = []) + * @phpstan-method static Bookmark&Proxy randomOrCreate(array $attributes = []) + * @phpstan-method static list> all() + * @phpstan-method static list> createMany(int $number, array|callable $attributes = []) + * @phpstan-method static list> createSequence(iterable|callable $sequence) + * @phpstan-method static list> findBy(array $attributes) + * @phpstan-method static list> randomRange(int $min, int $max, array $attributes = []) + * @phpstan-method static list> randomSet(int $number, array $attributes = []) + * @phpstan-method FactoryCollection> many(int $min, int|null $max = null) + * @phpstan-method FactoryCollection> sequence(iterable|callable $sequence) * - * @psalm-method Proxy create(array|callable $attributes = []) - * @psalm-method static Proxy createOne(array $attributes = []) - * @psalm-method static Proxy find(object|array|mixed $criteria) - * @psalm-method static Proxy findOrCreate(array $attributes) - * @psalm-method static Proxy first(string $sortedField = 'id') - * @psalm-method static Proxy last(string $sortedField = 'id') - * @psalm-method static Proxy random(array $attributes = []) - * @psalm-method static Proxy randomOrCreate(array $attributes = []) - * @psalm-method static RepositoryProxy repository() - * @psalm-method static list> all() - * @psalm-method static list> createMany(int $number, array|callable $attributes = []) - * @psalm-method static list> createSequence(iterable|callable $sequence) - * @psalm-method static list> findBy(array $attributes) - * @psalm-method static list> randomRange(int $min, int $max, array $attributes = []) - * @psalm-method static list> randomSet(int $number, array $attributes = []) + * @extends PersistentProxyObjectFactory */ -final class BookmarkFactory extends ModelFactory +final class BookmarkFactory extends PersistentProxyObjectFactory { - /** - * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#factories-as-services - */ - public function __construct() - { - parent::__construct(); - } - /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#model-factories */ - protected function getDefaults(): array + protected function defaults(): array { return [ 'user' => lazy(static fn () => UserFactory::new()), @@ -69,16 +65,7 @@ protected function getDefaults(): array ]; } - /** - * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization - */ - protected function initialize(): self - { - return $this; - // ->afterInstantiate(function(Bookmark $bookmark): void {}) - } - - protected static function getClass(): string + public static function class(): string { return Bookmark::class; } diff --git a/api/src/DataFixtures/Factory/ReviewFactory.php b/api/src/DataFixtures/Factory/ReviewFactory.php index 4ee375c5b..6bd04826d 100644 --- a/api/src/DataFixtures/Factory/ReviewFactory.php +++ b/api/src/DataFixtures/Factory/ReviewFactory.php @@ -5,50 +5,54 @@ namespace App\DataFixtures\Factory; use App\Entity\Review; +use App\Repository\ReviewRepository; use App\Security\Http\Protection\ResourceHandlerInterface; -use Doctrine\ORM\EntityRepository; -use Zenstruck\Foundry\ModelFactory; -use Zenstruck\Foundry\Proxy; -use Zenstruck\Foundry\RepositoryProxy; +use Zenstruck\Foundry\FactoryCollection; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\Proxy; +use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator; use function Zenstruck\Foundry\lazy; /** - * @extends ModelFactory + * @method Review|Proxy create(array|callable $attributes = []) + * @method static Review|Proxy createOne(array $attributes = []) + * @method static Review|Proxy find(object|array|mixed $criteria) + * @method static Review|Proxy findOrCreate(array $attributes) + * @method static Review|Proxy first(string $sortedField = 'id') + * @method static Review|Proxy last(string $sortedField = 'id') + * @method static Review|Proxy random(array $attributes = []) + * @method static Review|Proxy randomOrCreate(array $attributes = []) + * @method static Review[]|Proxy[] all() + * @method static Review[]|Proxy[] createMany(int $number, array|callable $attributes = []) + * @method static Review[]|Proxy[] createSequence(iterable|callable $sequence) + * @method static Review[]|Proxy[] findBy(array $attributes) + * @method static Review[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) + * @method static Review[]|Proxy[] randomSet(int $number, array $attributes = []) + * @method FactoryCollection many(int $min, int|null $max = null) + * @method FactoryCollection sequence(iterable|callable $sequence) + * @method static ProxyRepositoryDecorator repository() * - * @method Review|Proxy create(array|callable $attributes = []) - * @method static Review|Proxy createOne(array $attributes = []) - * @method static Review|Proxy find(object|array|mixed $criteria) - * @method static Review|Proxy findOrCreate(array $attributes) - * @method static Review|Proxy first(string $sortedField = 'id') - * @method static Review|Proxy last(string $sortedField = 'id') - * @method static Review|Proxy random(array $attributes = []) - * @method static Review|Proxy randomOrCreate(array $attributes = []) - * @method static EntityRepository|RepositoryProxy repository() - * @method static Review[]|Proxy[] all() - * @method static Review[]|Proxy[] createMany(int $number, array|callable $attributes = []) - * @method static Review[]|Proxy[] createSequence(iterable|callable $sequence) - * @method static Review[]|Proxy[] findBy(array $attributes) - * @method static Review[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) - * @method static Review[]|Proxy[] randomSet(int $number, array $attributes = []) + * @phpstan-method Review&Proxy create(array|callable $attributes = []) + * @phpstan-method static Review&Proxy createOne(array $attributes = []) + * @phpstan-method static Review&Proxy find(object|array|mixed $criteria) + * @phpstan-method static Review&Proxy findOrCreate(array $attributes) + * @phpstan-method static Review&Proxy first(string $sortedField = 'id') + * @phpstan-method static Review&Proxy last(string $sortedField = 'id') + * @phpstan-method static Review&Proxy random(array $attributes = []) + * @phpstan-method static Review&Proxy randomOrCreate(array $attributes = []) + * @phpstan-method static list> all() + * @phpstan-method static list> createMany(int $number, array|callable $attributes = []) + * @phpstan-method static list> createSequence(iterable|callable $sequence) + * @phpstan-method static list> findBy(array $attributes) + * @phpstan-method static list> randomRange(int $min, int $max, array $attributes = []) + * @phpstan-method static list> randomSet(int $number, array $attributes = []) + * @phpstan-method FactoryCollection> many(int $min, int|null $max = null) + * @phpstan-method FactoryCollection> sequence(iterable|callable $sequence) * - * @psalm-method Proxy create(array|callable $attributes = []) - * @psalm-method static Proxy createOne(array $attributes = []) - * @psalm-method static Proxy find(object|array|mixed $criteria) - * @psalm-method static Proxy findOrCreate(array $attributes) - * @psalm-method static Proxy first(string $sortedField = 'id') - * @psalm-method static Proxy last(string $sortedField = 'id') - * @psalm-method static Proxy random(array $attributes = []) - * @psalm-method static Proxy randomOrCreate(array $attributes = []) - * @psalm-method static RepositoryProxy repository() - * @psalm-method static list> all() - * @psalm-method static list> createMany(int $number, array|callable $attributes = []) - * @psalm-method static list> createSequence(iterable|callable $sequence) - * @psalm-method static list> findBy(array $attributes) - * @psalm-method static list> randomRange(int $min, int $max, array $attributes = []) - * @psalm-method static list> randomSet(int $number, array $attributes = []) + * @extends PersistentProxyObjectFactory */ -final class ReviewFactory extends ModelFactory +final class ReviewFactory extends PersistentProxyObjectFactory { /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#factories-as-services @@ -62,7 +66,7 @@ public function __construct( /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#model-factories */ - protected function getDefaults(): array + protected function defaults(): array { return [ 'user' => lazy(static fn () => UserFactory::new()), @@ -76,7 +80,7 @@ protected function getDefaults(): array /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization */ - protected function initialize(): self + protected function initialize(): static { return $this // create the resource on the OIDC server @@ -93,10 +97,9 @@ protected function initialize(): self } }) ; - // ->afterInstantiate(function(Review $review): void {}) } - protected static function getClass(): string + public static function class(): string { return Review::class; } diff --git a/api/src/DataFixtures/Factory/UserFactory.php b/api/src/DataFixtures/Factory/UserFactory.php index 641114a55..afb10e3ce 100644 --- a/api/src/DataFixtures/Factory/UserFactory.php +++ b/api/src/DataFixtures/Factory/UserFactory.php @@ -5,56 +5,52 @@ namespace App\DataFixtures\Factory; use App\Entity\User; -use Doctrine\ORM\EntityRepository; -use Zenstruck\Foundry\ModelFactory; -use Zenstruck\Foundry\Proxy; -use Zenstruck\Foundry\RepositoryProxy; +use App\Repository\UserRepository; +use Zenstruck\Foundry\FactoryCollection; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\Proxy; +use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator; /** - * @extends ModelFactory + * @method User|Proxy create(array|callable $attributes = []) + * @method static User|Proxy createOne(array $attributes = []) + * @method static User|Proxy find(object|array|mixed $criteria) + * @method static User|Proxy findOrCreate(array $attributes) + * @method static User|Proxy first(string $sortedField = 'id') + * @method static User|Proxy last(string $sortedField = 'id') + * @method static User|Proxy random(array $attributes = []) + * @method static User|Proxy randomOrCreate(array $attributes = []) + * @method static User[]|Proxy[] all() + * @method static User[]|Proxy[] createMany(int $number, array|callable $attributes = []) + * @method static User[]|Proxy[] createSequence(iterable|callable $sequence) + * @method static User[]|Proxy[] findBy(array $attributes) + * @method static User[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) + * @method static User[]|Proxy[] randomSet(int $number, array $attributes = []) + * @method FactoryCollection many(int $min, int|null $max = null) + * @method FactoryCollection sequence(iterable|callable $sequence) + * @method static ProxyRepositoryDecorator repository() * - * @method User|Proxy create(array|callable $attributes = []) - * @method static User|Proxy createOne(array $attributes = []) - * @method static User|Proxy find(object|array|mixed $criteria) - * @method static User|Proxy findOrCreate(array $attributes) - * @method static User|Proxy first(string $sortedField = 'id') - * @method static User|Proxy last(string $sortedField = 'id') - * @method static User|Proxy random(array $attributes = []) - * @method static User|Proxy randomOrCreate(array $attributes = []) - * @method static EntityRepository|RepositoryProxy repository() - * @method static User[]|Proxy[] all() - * @method static User[]|Proxy[] createMany(int $number, array|callable $attributes = []) - * @method static User[]|Proxy[] createSequence(iterable|callable $sequence) - * @method static User[]|Proxy[] findBy(array $attributes) - * @method static User[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) - * @method static User[]|Proxy[] randomSet(int $number, array $attributes = []) + * @phpstan-method User&Proxy create(array|callable $attributes = []) + * @phpstan-method static User&Proxy createOne(array $attributes = []) + * @phpstan-method static User&Proxy find(object|array|mixed $criteria) + * @phpstan-method static User&Proxy findOrCreate(array $attributes) + * @phpstan-method static User&Proxy first(string $sortedField = 'id') + * @phpstan-method static User&Proxy last(string $sortedField = 'id') + * @phpstan-method static User&Proxy random(array $attributes = []) + * @phpstan-method static User&Proxy randomOrCreate(array $attributes = []) + * @phpstan-method static list> all() + * @phpstan-method static list> createMany(int $number, array|callable $attributes = []) + * @phpstan-method static list> createSequence(iterable|callable $sequence) + * @phpstan-method static list> findBy(array $attributes) + * @phpstan-method static list> randomRange(int $min, int $max, array $attributes = []) + * @phpstan-method static list> randomSet(int $number, array $attributes = []) + * @phpstan-method FactoryCollection> many(int $min, int|null $max = null) + * @phpstan-method FactoryCollection> sequence(iterable|callable $sequence) * - * @psalm-method Proxy create(array|callable $attributes = []) - * @psalm-method static Proxy createOne(array $attributes = []) - * @psalm-method static Proxy find(object|array|mixed $criteria) - * @psalm-method static Proxy findOrCreate(array $attributes) - * @psalm-method static Proxy first(string $sortedField = 'id') - * @psalm-method static Proxy last(string $sortedField = 'id') - * @psalm-method static Proxy random(array $attributes = []) - * @psalm-method static Proxy randomOrCreate(array $attributes = []) - * @psalm-method static RepositoryProxy repository() - * @psalm-method static list> all() - * @psalm-method static list> createMany(int $number, array|callable $attributes = []) - * @psalm-method static list> createSequence(iterable|callable $sequence) - * @psalm-method static list> findBy(array $attributes) - * @psalm-method static list> randomRange(int $min, int $max, array $attributes = []) - * @psalm-method static list> randomSet(int $number, array $attributes = []) + * @extends PersistentProxyObjectFactory */ -final class UserFactory extends ModelFactory +final class UserFactory extends PersistentProxyObjectFactory { - /** - * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#factories-as-services - */ - public function __construct() - { - parent::__construct(); - } - public static function createOneAdmin(array $attributes = []): Proxy|User { return self::new($attributes)->withAdmin()->create(); @@ -62,7 +58,7 @@ public static function createOneAdmin(array $attributes = []): Proxy|User public function withAdmin(): self { - return $this->addState([ + return $this->with([ 'email' => 'chuck.norris@example.com', 'firstName' => 'Chuck', 'lastName' => 'Norris', @@ -72,7 +68,7 @@ public function withAdmin(): self /** * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#model-factories */ - protected function getDefaults(): array + protected function defaults(): array { return [ 'email' => self::faker()->unique()->email(), @@ -81,16 +77,7 @@ protected function getDefaults(): array ]; } - /** - * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization - */ - protected function initialize(): self - { - return $this; - // ->afterInstantiate(function(User $user): void {}) - } - - protected static function getClass(): string + public static function class(): string { return User::class; } diff --git a/api/src/DataFixtures/Story/DefaultStory.php b/api/src/DataFixtures/Story/DefaultStory.php index c87bee9f7..345d9e72e 100644 --- a/api/src/DataFixtures/Story/DefaultStory.php +++ b/api/src/DataFixtures/Story/DefaultStory.php @@ -12,6 +12,8 @@ use Symfony\Component\Serializer\Encoder\DecoderInterface; use Zenstruck\Foundry\Story; +use function Zenstruck\Foundry\faker; + final class DefaultStory extends Story { public function __construct(private readonly DecoderInterface $decoder) @@ -31,7 +33,7 @@ public function build(): void // Default book has reviews (new users are created) ReviewFactory::createMany(30, [ 'book' => $defaultBook, - 'publishedAt' => \DateTimeImmutable::createFromMutable(ReviewFactory::faker()->dateTime('-1 week')), + 'publishedAt' => \DateTimeImmutable::createFromMutable(faker()->dateTime('-1 week')), ]); // Import books @@ -46,7 +48,7 @@ public function build(): void if ($number = random_int(0, 5)) { ReviewFactory::createMany($number, [ 'book' => $book, - 'publishedAt' => \DateTimeImmutable::createFromMutable(ReviewFactory::faker()->dateTime('-1 week')), + 'publishedAt' => \DateTimeImmutable::createFromMutable(faker()->dateTime('-1 week')), ]); } @@ -81,7 +83,7 @@ public function build(): void BookmarkFactory::createOne([ 'user' => $defaultUser, 'book' => $books[$key], - 'bookmarkedAt' => \DateTimeImmutable::createFromMutable(BookmarkFactory::faker()->dateTime('-1 week')), + 'bookmarkedAt' => \DateTimeImmutable::createFromMutable(faker()->dateTime('-1 week')), ]); } diff --git a/api/tests/Api/Admin/BookTest.php b/api/tests/Api/Admin/BookTest.php index 0bfb97edd..74a605a12 100644 --- a/api/tests/Api/Admin/BookTest.php +++ b/api/tests/Api/Admin/BookTest.php @@ -541,7 +541,7 @@ public function asAdminUserICanUpdateABook(): void new Update( topics: ['http://localhost/admin/books/' . $book->getId(), 'http://localhost/books/' . $book->getId()], data: self::serialize( - $book->object(), + $book->_real(), 'jsonld', self::getOperationNormalizationContext(Book::class, '/admin/books/{id}{._format}') ), diff --git a/api/tests/Api/Admin/ReviewTest.php b/api/tests/Api/Admin/ReviewTest.php index c4e8bc77b..b8b87ec3d 100644 --- a/api/tests/Api/Admin/ReviewTest.php +++ b/api/tests/Api/Admin/ReviewTest.php @@ -293,7 +293,7 @@ public function asAdminUserICanUpdateAReview(): void 'rating' => 5, ]); // ensure user hasn't changed - self::assertNotEquals($user, $review->object()->user); + self::assertNotEquals($user, $review->_real()->user); self::assertMatchesJsonSchema(file_get_contents(__DIR__ . '/schemas/Review/item.json')); self::assertCount(1, self::getMercureMessages()); self::assertEquals( @@ -305,7 +305,7 @@ public function asAdminUserICanUpdateAReview(): void 'http://localhost/books/' . $review->book->getId() . '/reviews', ], data: self::serialize( - $review->object(), + $review->_real(), 'jsonld', self::getOperationNormalizationContext(Review::class, '/admin/reviews/{id}{._format}') ), diff --git a/api/tests/Api/Admin/UserTest.php b/api/tests/Api/Admin/UserTest.php index eea4c1b13..cc5825d53 100644 --- a/api/tests/Api/Admin/UserTest.php +++ b/api/tests/Api/Admin/UserTest.php @@ -155,7 +155,7 @@ public function asAUserIAmUpdatedOnLogin(): void $user = UserFactory::createOne([ 'firstName' => 'John', 'lastName' => 'DOE', - ])->disableAutoRefresh(); + ])->_disableAutoRefresh(); $token = self::getContainer()->get(TokenGenerator::class)->generateToken([ 'email' => $user->email, diff --git a/api/tests/Api/ReviewTest.php b/api/tests/Api/ReviewTest.php index 0196481f5..100b4ea68 100644 --- a/api/tests/Api/ReviewTest.php +++ b/api/tests/Api/ReviewTest.php @@ -278,7 +278,7 @@ public function asAUserICanAddAReviewOnABook(): void ]); self::assertMatchesJsonSchema(file_get_contents(__DIR__ . '/schemas/Review/item.json')); // if I add a review on a book with reviews, it doesn't erase the existing reviews - $reviews = self::getContainer()->get(ReviewRepository::class)->findBy(['book' => $book->object()]); + $reviews = self::getContainer()->get(ReviewRepository::class)->findBy(['book' => $book->_real()]); self::assertCount(6, $reviews); $id = preg_replace('/^.*\/(.+)$/', '$1', $response->toArray()['@id']); /** @var Review $review */ diff --git a/pwa/package.json b/pwa/package.json index 6357d968e..e6ececa8b 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -47,7 +47,7 @@ "@types/node": "^20.14.2", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "eslint": "^9.5.0", + "eslint": "^8.57.0", "eslint-config-next": "^14.2.4", "typescript": "^5.4.5" }, diff --git a/pwa/pnpm-lock.yaml b/pwa/pnpm-lock.yaml index f58c3bcb3..192075b3a 100644 --- a/pwa/pnpm-lock.yaml +++ b/pwa/pnpm-lock.yaml @@ -115,11 +115,11 @@ importers: specifier: ^18.3.0 version: 18.3.0 eslint: - specifier: ^9.5.0 - version: 9.5.0 + specifier: ^8.57.0 + version: 8.57.0 eslint-config-next: specifier: ^14.2.4 - version: 14.2.4(eslint@9.5.0)(typescript@5.4.5) + version: 14.2.4(eslint@8.57.0)(typescript@5.4.5) typescript: specifier: ^5.4.5 version: 5.4.5 @@ -333,21 +333,13 @@ packages: resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.16.0': - resolution: {integrity: sha512-/jmuSd74i4Czf1XXn7wGRWZCuyaUZ330NH1Bek0Pplatt4Sy1S5haN21SCLLdbeKslQ+S0wEJ+++v5YibSi+Lg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.5.0': - resolution: {integrity: sha512-A7+AOT2ICkodvtsWnxZP4Xxk3NbZ3VMHd8oihydLRGrJgqqdEz1qSeEgXYyT/Cu8h1TWWsQRejIx48mtjZ5y1w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} @@ -371,13 +363,18 @@ packages: '@fontsource/poppins@5.0.14': resolution: {integrity: sha512-nmM1zpPo3Uh4JcGAVSQuWaZNYh2FbbwWhZ5t6hRaynmJaNTBW85d3nEh9zMmzI0HX7X5xqQVdRHeDatKpOGsnA==} + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@img/sharp-darwin-arm64@0.33.4': resolution: {integrity: sha512-p0suNqXufJs9t3RqLBO6vvrgr5OhgbWp76s5gTRvdmxmuv9E1rcaqGUsl3l4mKVmXPkTkTErXediAui4x+8PSA==} @@ -800,6 +797,9 @@ packages: resolution: {integrity: sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==} engines: {node: ^16.0.0 || >=18.0.0} + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -1142,6 +1142,10 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dom-helpers@5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} @@ -1281,26 +1285,22 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - eslint-scope@8.0.1: - resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.5.0: - resolution: {integrity: sha512-+NAOZFrW/jFTS3dASCGBxX1pkFD0/fsO+hfAkJ4TyYKwgsXZbqzrw+seCYFCcPCYXvnD67tAnglU7GQTz6kcVw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} esquery@1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} @@ -1345,9 +1345,9 @@ packages: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} file-selector@0.5.0: resolution: {integrity: sha512-s8KNnmIDTBoD0p9uJ9uD0XY38SCeBOtj0UMXyQSLg1Ypfrfj8+dAvwsLjYQkQ2GjhVtp2HrnF5cJzMhBjfD8HA==} @@ -1368,9 +1368,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1458,9 +1458,9 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} @@ -1476,6 +1476,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql@16.8.2: resolution: {integrity: sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} @@ -2509,6 +2512,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + type-fest@2.19.0: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} @@ -2914,27 +2921,19 @@ snapshots: '@emotion/weak-memoize@0.3.1': {} - '@eslint-community/eslint-utils@4.4.0(eslint@9.5.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: - eslint: 9.5.0 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.1': {} - '@eslint/config-array@0.16.0': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.5 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.5 - espree: 10.1.0 - globals: 14.0.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -2943,9 +2942,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.5.0': {} - - '@eslint/object-schema@2.1.4': {} + '@eslint/js@8.57.0': {} '@fastify/busboy@2.1.1': {} @@ -2968,9 +2965,17 @@ snapshots: '@fontsource/poppins@5.0.14': {} + '@humanwhocodes/config-array@0.11.14': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.5 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/object-schema@2.0.3': {} '@img/sharp-darwin-arm64@0.33.4': optionalDependencies: @@ -3291,14 +3296,14 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 - '@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@typescript-eslint/scope-manager': 7.2.0 '@typescript-eslint/types': 7.2.0 '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.5 - eslint: 9.5.0 + eslint: 8.57.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -3331,6 +3336,8 @@ snapshots: '@typescript-eslint/types': 7.2.0 eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -3703,6 +3710,10 @@ snapshots: dependencies: esutils: 2.0.3 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dom-helpers@5.2.1: dependencies: '@babel/runtime': 7.24.7 @@ -3827,18 +3838,18 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-next@14.2.4(eslint@9.5.0)(typescript@5.4.5): + eslint-config-next@14.2.4(eslint@8.57.0)(typescript@5.4.5): dependencies: '@next/eslint-plugin-next': 14.2.4 '@rushstack/eslint-patch': 1.10.3 - '@typescript-eslint/parser': 7.2.0(eslint@9.5.0)(typescript@5.4.5) - eslint: 9.5.0 + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@9.5.0))(eslint@9.5.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.5.0) - eslint-plugin-jsx-a11y: 6.8.0(eslint@9.5.0) - eslint-plugin-react: 7.34.2(eslint@9.5.0) - eslint-plugin-react-hooks: 4.6.2(eslint@9.5.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) + eslint-plugin-react: 7.34.2(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -3853,13 +3864,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@9.5.0))(eslint@9.5.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 4.3.5 enhanced-resolve: 5.17.0 - eslint: 9.5.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@9.5.0))(eslint@9.5.0))(eslint@9.5.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.5.0) + eslint: 8.57.0 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -3870,18 +3881,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@9.5.0))(eslint@9.5.0))(eslint@9.5.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@9.5.0)(typescript@5.4.5) - eslint: 9.5.0 + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@9.5.0))(eslint@9.5.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.5.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -3889,9 +3900,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.5.0 + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.5.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@9.5.0))(eslint@9.5.0))(eslint@9.5.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -3902,13 +3913,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.8.0(eslint@9.5.0): + eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.0): dependencies: '@babel/runtime': 7.24.7 aria-query: 5.3.0 @@ -3920,7 +3931,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.5.0 + eslint: 8.57.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -3928,11 +3939,11 @@ snapshots: object.entries: 1.1.8 object.fromentries: 2.0.8 - eslint-plugin-react-hooks@4.6.2(eslint@9.5.0): + eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): dependencies: - eslint: 9.5.0 + eslint: 8.57.0 - eslint-plugin-react@7.34.2(eslint@9.5.0): + eslint-plugin-react@7.34.2(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -3941,7 +3952,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.5.0 + eslint: 8.57.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -3954,43 +3965,45 @@ snapshots: semver: 6.3.1 string.prototype.matchall: 4.0.11 - eslint-scope@8.0.1: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} - - eslint@9.5.0: + eslint@8.57.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.10.1 - '@eslint/config-array': 0.16.0 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.5.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.5 + doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.1 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -4002,11 +4015,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@9.6.1: dependencies: acorn: 8.12.0 acorn-jsx: 5.3.2(acorn@8.12.0) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 3.4.3 esquery@1.5.0: dependencies: @@ -4047,9 +4060,9 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 - file-entry-cache@8.0.0: + file-entry-cache@6.0.1: dependencies: - flat-cache: 4.0.1 + flat-cache: 3.2.0 file-selector@0.5.0: dependencies: @@ -4068,10 +4081,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 + rimraf: 3.0.2 flatted@3.3.1: {} @@ -4176,7 +4190,9 @@ snapshots: globals@11.12.0: {} - globals@14.0.0: {} + globals@13.24.0: + dependencies: + type-fest: 0.20.2 globalthis@1.0.4: dependencies: @@ -4198,6 +4214,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + graphql@16.8.2: {} has-bigints@1.0.2: {} @@ -5283,6 +5301,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-fest@0.20.2: {} + type-fest@2.19.0: {} typed-array-buffer@1.0.2: