Skip to content
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

fix game build #2623

Merged
merged 17 commits into from
Jan 7, 2025
Merged

fix game build #2623

merged 17 commits into from
Jan 7, 2025

Conversation

aymericdelab
Copy link
Collaborator

@aymericdelab aymericdelab commented Jan 7, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added guild management functionality in Settings
      • Users can now select and manage whitelisted guilds
      • Option to clear guild selections
      • Visual indication of selected guilds
  • Improvements

    • Enhanced settings interface with guild selection capabilities
    • Persistent guild whitelist storage
  • Chores

    • Updated import paths for manifest files in configuration
    • Restructured project dependencies across multiple package.json files
    • Introduced new scripts for linting and improved project organization in package.json files
    • Added new packages to pnpm workspace configuration
    • Updated project name and version in the main package.json file

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eternum ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 9:59am
eternum-docs ❌ Failed (Inspect) Jan 7, 2025 9:59am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
eternum-landing ⬜️ Ignored (Inspect) Visit Preview Jan 7, 2025 9:59am

Copy link
Contributor

coderabbitai bot commented Jan 7, 2025

Warning

Rate limit exceeded

@aymericdelab has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 31 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3c62671 and d87e002.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json (1 hunks)

Walkthrough

The pull request introduces multiple changes across various files in the project. Key updates include modifying import paths for manifest JSON files in dojoConfig.ts, transitioning from a contracts directory to a common manifests directory. Additionally, the Settings.tsx component gains new guild management functionality, allowing users to select and manage whitelisted guilds through a UI section and local storage. Several package.json files across different applications see modifications in dependencies, scripts, and project metadata, reflecting a restructuring of the project.

Changes

File Change Summary
client/apps/game/dojoConfig.ts Updated import paths for manifest JSON files from ../contracts/ to ../../common/manifests/
client/apps/game/src/ui/modules/settings/Settings.tsx Added guild management functionality with a new hook, state management, and UI components for selecting and clearing guild whitelist
client/apps/balancing/package.json Removed multiple dependencies and devDependencies, including React and related packages
client/apps/game/package.json Updated project name and version, added new linting scripts, modified dependencies and devDependencies significantly
client/apps/landing/package.json Removed numerous dependencies, added back vite-plugin-vercel and @tanstack/router-plugin
client/config/package.json Renamed package to eternum-config, added new scripts, and updated dependencies
client/package.json Changed project name, restructured scripts, and updated dependencies and devDependencies
client/sdk/packages/eternum/package.json Added linting scripts, reorganized dependencies and peerDependencies
contracts/package.json Introduced new package.json for scripts module with dependencies
contracts/season_pass/scripts/deployment/package.json Removed all dependencies and devDependencies sections
contracts/season_resources/scripts/deployment/package.json Removed several dependencies and the entire devDependencies section
package.json Created new project file with scripts for development and linting, specified dependencies and package manager
pnpm-workspace.yaml Added client and contracts directories as packages in the workspace

Sequence Diagram

sequenceDiagram
    participant User
    participant SettingsUI
    participant LocalStorage
    participant GuildsHook

    User->>SettingsUI: Open Settings
    SettingsUI->>GuildsHook: Fetch Guilds
    GuildsHook-->>SettingsUI: Return Guild List
    User->>SettingsUI: Select/Deselect Guilds
    SettingsUI->>LocalStorage: Update Whitelisted Guilds
    SettingsUI->>User: Show Toast Notification
Loading

Poem

🐰 Hop, hop, through settings we go,
Guilds dancing in a digital row!
Select and clear with rabbit's might,
Whitelist gleaming, oh so bright!
A config dance, both smooth and light! 🎮


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@mentatbot mentatbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good overall. The manifest files have been moved to a more logical location under common/manifests and the imports have been updated accordingly. The useGuilds import that initially appeared unused is actually being used in the component. No issues found with the changes.

Thanks for using MentatBot. Give comments a 👍 or 👎 to help me improve!

@@ -105,7 +106,7 @@ export const SettingsWindow = () => {
return newFlatMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useGuilds import is used in the component (on line 77), so it's correctly imported.

Copy link

github-actions bot commented Jan 7, 2025

Failed to generate code suggestions for PR

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🔭 Outside diff range comments (3)
client/apps/game/src/ui/modules/settings/Settings.tsx (3)

Line range hint 82-87: Add error handling for localStorage operations

The localStorage operations should be wrapped in try-catch blocks to handle potential errors (e.g., when localStorage is full or disabled).

 const [selectedGuilds, setSelectedGuilds] = useState<string[]>(() => {
-  const savedGuilds = localStorage.getItem("WHITELIST");
-  return savedGuilds ? savedGuilds.split(",") : [];
+  try {
+    const savedGuilds = localStorage.getItem("WHITELIST");
+    return savedGuilds ? savedGuilds.split(",") : [];
+  } catch (error) {
+    console.error("Failed to load guild whitelist:", error);
+    return [];
+  }
 });

Line range hint 89-103: Add error handling for localStorage operations in handlers

Both handlers should handle potential localStorage failures gracefully.

 const handleGuildSelect = (guildId: string) => {
   setSelectedGuilds((prev) => {
     const newGuilds = prev.includes(guildId) ? prev.filter((id) => id !== guildId) : [...prev, guildId];
-    localStorage.setItem("WHITELIST", newGuilds.join(","));
-    toast(prev.includes(guildId) ? "Guild removed from whitelist!" : "Guild added to whitelist!");
+    try {
+      localStorage.setItem("WHITELIST", newGuilds.join(","));
+      toast(prev.includes(guildId) ? "Guild removed from whitelist!" : "Guild added to whitelist!");
+    } catch (error) {
+      toast.error("Failed to save guild selection");
+      console.error("Failed to save guild whitelist:", error);
+    }
     return newGuilds;
   });
 };

 const handleClearGuilds = () => {
   setSelectedGuilds([]);
-  localStorage.removeItem("WHITELIST");
-  toast("Guild whitelist cleared!");
+  try {
+    localStorage.removeItem("WHITELIST");
+    toast("Guild whitelist cleared!");
+  } catch (error) {
+    toast.error("Failed to clear guild whitelist");
+    console.error("Failed to clear guild whitelist:", error);
+  }
 };

Line range hint 171-186: Enhance accessibility and loading state handling

The guild management UI needs improvements in accessibility and loading state handling:

  1. Add ARIA labels for better screen reader support
  2. Handle loading and error states for guild data
 <div className="flex flex-col gap-2">
-  <h5>Whitelist guilds</h5>
+  <h5 id="whitelist-heading">Whitelist guilds</h5>
-  <div className="flex flex-wrap gap-2">
+  <div 
+    className="flex flex-wrap gap-2"
+    role="group" 
+    aria-labelledby="whitelist-heading"
+  >
+    {!guilds ? (
+      <div>Loading guilds...</div>
+    ) : guilds.length === 0 ? (
+      <div>No guilds available</div>
+    ) : (
     {guilds.map((guild) => (
       <Button
         size="xs"
         key={guild.entityId}
         variant={selectedGuilds.includes(guild.entityId.toString()) ? "success" : "outline"}
         onClick={() => handleGuildSelect(guild.entityId.toString())}
+        aria-pressed={selectedGuilds.includes(guild.entityId.toString())}
       >
         {guild.name}
       </Button>
     ))}
+    )}
   </div>
   {selectedGuilds.length > 0 && (
     <Button size="xs" variant="danger" onClick={handleClearGuilds} className="self-start">
       Clear All
     </Button>
   )}
 </div>
🧹 Nitpick comments (1)
client/apps/game/src/ui/modules/settings/Settings.tsx (1)

Line range hint 82-87: Consider using a more specific localStorage key name

The key "WHITELIST" is too generic and could potentially conflict with other features. Consider using a more specific key like "GUILD_WHITELIST" or "SETTINGS_GUILD_WHITELIST".

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 875083a and 0a0c843.

📒 Files selected for processing (2)
  • client/apps/game/dojoConfig.ts (1 hunks)
  • client/apps/game/src/ui/modules/settings/Settings.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • client/apps/game/dojoConfig.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Run pr agent on every pull request, respond to user comments
🔇 Additional comments (1)
client/apps/game/src/ui/modules/settings/Settings.tsx (1)

9-9: LGTM!

The import statement follows the project's import organization pattern.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
client/apps/game/package.json (1)

49-51: Consider using a version range for starknet peer dependency

The starknet peer dependency is pinned to an exact version (6.11.0). Consider using a version range (e.g., "^6.11.0") to allow for compatible updates while avoiding breaking changes.

-    "starknet": "6.11.0"
+    "starknet": "^6.11.0"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a0c843 and 915f8c9.

⛔ Files ignored due to path filters (3)
  • client/apps/balancing/public/vite.svg is excluded by !**/*.svg
  • client/apps/balancing/src/assets/react.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • client/apps/balancing/package.json (1 hunks)
  • client/apps/game/package.json (2 hunks)
  • client/apps/landing/package.json (2 hunks)
  • client/config/package.json (1 hunks)
  • client/package.json (1 hunks)
  • client/sdk/packages/eternum/package.json (2 hunks)
  • contracts/package.json (1 hunks)
  • contracts/season_pass/scripts/deployment/package.json (1 hunks)
  • contracts/season_resources/scripts/deployment/package.json (0 hunks)
  • package.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
💤 Files with no reviewable changes (1)
  • contracts/season_resources/scripts/deployment/package.json
✅ Files skipped from review due to trivial changes (2)
  • contracts/package.json
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms (14)
  • GitHub Check: test-various (test_ownership_systems)
  • GitHub Check: test-various (transport_test)
  • GitHub Check: test-various (guild_test)
  • GitHub Check: test-various (realm_test)
  • GitHub Check: test-various (trade_test)
  • GitHub Check: test-various (resource_bridge_test)
  • GitHub Check: test-various (map_test)
  • GitHub Check: test-various (bank_test)
  • GitHub Check: test-various (hyperstructure_test)
  • GitHub Check: test-various (config_test)
  • GitHub Check: test-various (resources_test)
  • GitHub Check: test-various (owner_test)
  • GitHub Check: test-various (combat_test)
  • GitHub Check: test-various (season_test)
🔇 Additional comments (6)
contracts/season_pass/scripts/deployment/package.json (1)

Line range hint 7-11: Verify deployment script dependencies

The scripts reference bun and environment files, but all dependencies (colors, dotenv, starknet) have been removed. This could break the deployment process.

Run this script to check if dependencies are defined at workspace root:

client/config/package.json (1)

2-2: Verify package rename impact

The package has been renamed from "config" to "eternum-config". Ensure all imports and dependencies across the workspace are updated accordingly.

Run this script to check for potential broken imports:

✅ Verification successful

Package rename is safe

The package rename from "config" to "eternum-config" has no impact on the codebase. All existing config imports are relative paths to local configuration files, and no workspace packages depend on either the old or new package name.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for references to the old package name
echo "Searching for 'config' package references:"
rg -l '"config"' -g 'package.json'

echo -e "\nSearching for config imports:"
rg -l 'from ["'\'']config[/"'\'']'

Length of output: 247


Script:

#!/bin/bash
# Search for both old and new package names in package.json files
echo "Searching package.json files for package references:"
rg -l '"dependencies"|"devDependencies"|"peerDependencies"' -g 'package.json' | xargs cat | grep -E '"(config|eternum-config)":'

echo -e "\nSearching for imports (TypeScript/JavaScript):"
rg -l -t ts -t js -t tsx -t jsx "from ['\"].*config.*['\"]"

echo -e "\nSearching for require statements:"
rg -l -t ts -t js -t tsx -t jsx "require\(['\"].*config.*['\"]\)"

echo -e "\nChecking workspace dependencies:"
find . -name "package.json" -exec grep -l "workspace:" {} \;

Length of output: 845


Script:

#!/bin/bash
# Check workspace package.json contents
echo "Contents of workspace package.json files:"
echo -e "\nclient/apps/game/package.json:"
cat client/apps/game/package.json
echo -e "\ncontracts/formula/battles/package.json:"
cat contracts/formula/battles/package.json

echo -e "\nSearching for config imports (fixed pattern):"
rg -l "from.*config" --type-add 'ts:*.{ts,tsx}' --type-add 'js:*.{js,jsx}' -t ts -t js

echo -e "\nSearching for relative path imports:"
rg -l "\.\./config|\./config" --type-add 'ts:*.{ts,tsx}' --type-add 'js:*.{js,jsx}' -t ts -t js

Length of output: 5228


Script:

#!/bin/bash
echo "Checking content of files with relative config imports:"
echo -e "\nclient/sdk/packages/eternum/src/index.ts:"
cat client/sdk/packages/eternum/src/index.ts

echo -e "\nclient/apps/game/src/ui/layouts/World.tsx:"
cat client/apps/game/src/ui/layouts/World.tsx

echo -e "\nclient/apps/game/src/ui/elements/HintModalButton.tsx:"
cat client/apps/game/src/ui/elements/HintModalButton.tsx

Length of output: 14423

client/sdk/packages/eternum/package.json (1)

9-10: LGTM! Improved dependency organization

Good improvements:

  1. Added lint scripts for consistency
  2. Correctly moved type definitions to devDependencies
  3. Properly specified starknet as a peer dependency

Also applies to: 28-36

client/apps/game/package.json (1)

19-35: Verify Three.js version and check for breaking changes

The Three.js version (0.166.0) is not the latest available. Consider upgrading to the latest stable version for potential bug fixes and performance improvements.

Run this script to check for breaking changes:

✅ Verification successful

Three.js version 0.166.0 is appropriate for this project

The current version is stable and shows full compatibility with other dependencies, particularly three-stdlib. The extensive usage across the codebase shows no signs of version-specific issues that would require an immediate upgrade.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Three.js changelog for breaking changes between versions
curl -s https://raw.githubusercontent.com/mrdoob/three.js/dev/CHANGELOG.md | grep -A 10 "r167"

Length of output: 94


Script:

#!/bin/bash
# Check Three.js usage patterns and imports
echo "=== Three.js imports ==="
rg "from 'three'" -A 2
rg "from \"three\"" -A 2

echo -e "\n=== three-stdlib imports ==="
rg "from 'three-stdlib'" -A 2
rg "from \"three-stdlib\"" -A 2

echo -e "\n=== Package versions ==="
fd package.json --exec grep -l "three\|three-stdlib" {} \; --exec cat {}

Length of output: 12834

client/apps/landing/package.json (1)

44-44: Verify dependency versions for security and compatibility

The newly added dependencies should be verified:

  1. [email protected]
  2. @tanstack/[email protected]

Run this script to check for known vulnerabilities and latest versions:

Also applies to: 63-63

✅ Verification successful

Dependencies are secure but updates are available

  • Current version of vite-plugin-vercel (9.0.3) is secure but can be updated to 9.0.4 for latest patches
  • @tanstack/router-plugin (1.73.1) is secure but a significant update (1.95.1) is available - recommend planning the upgrade separately due to potential breaking changes
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for vulnerabilities and latest versions
echo "Checking vite-plugin-vercel..."
curl -s https://registry.npmjs.org/vite-plugin-vercel | jq '.versions | keys[-1]'

echo "Checking @tanstack/router-plugin..."
curl -s https://registry.npmjs.org/@tanstack/router-plugin | jq '.versions | keys[-1]'

# Check for known vulnerabilities
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: NPM, package: "vite-plugin-vercel") {
    nodes {
      advisory {
        summary
        severity
      }
      vulnerableVersionRange
    }
  }
}'

Length of output: 618


Script:

#!/bin/bash
# Check for known vulnerabilities in @tanstack/router-plugin
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: NPM, package: "@tanstack/router-plugin") {
    nodes {
      advisory {
        summary
        severity
      }
      vulnerableVersionRange
    }
  }
}'

# Check changelog or release notes for breaking changes
curl -s https://raw.githubusercontent.com/TanStack/router/main/CHANGELOG.md || curl -s https://raw.githubusercontent.com/TanStack/router/master/CHANGELOG.md

Length of output: 373

client/package.json (1)

6-18: Well-organized workspace scripts structure

The script organization using --filter for different apps is a good practice for monorepo management. This makes it clear which commands apply to which packages.

Comment on lines +3 to +7
- "client"
- "client/apps/*"
- "client/config"
- "client/balancing"
- "contracts"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Workspace entries are too broad and may expose unintended packages

The broad entries "client" and "contracts" will expose several packages that might need isolation:

  • In client: SDK packages under client/sdk/packages/
  • In contracts: Deployment script packages under contracts/*/scripts/deployment/

Consider using specific entries like "contracts/formula/battles" instead of the broad "contracts" directory.

🔗 Analysis chain

Verify the scope of newly added workspace packages

The addition of broad package entries "client" and "contracts" includes entire directories in the workspace. This could potentially expose unintended modules to other packages.

Run this script to analyze the package structure:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# List all package.json files in client and contracts directories
echo "Package.json files in client directory:"
fd package.json client/

echo -e "\nPackage.json files in contracts directory:"
fd package.json contracts/

Length of output: 605

@@ -1,12 +1,17 @@
{
"name": "config",
"name": "eternum-config",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix incorrect ESLint version

The specified ESLint version ^9.9.0 appears incorrect as the current stable version is in the 8.x range.

Update the ESLint version to the latest stable:

-    "eslint": "^9.9.0"
+    "eslint": "^8.57.0"

Also applies to: 11-11

Comment on lines 11 to +26
},
"dependencies": {
"@bibliothecadao/eternum": "workspace:^",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-tabs": "^1.1.0",
"@tanstack/react-table": "^8.20.5",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1",
"lucide-react": "^0.365.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/node": "^20.11.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.18",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
"typescript-eslint": "^8.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical dependencies missing for React application

Several essential dependencies have been removed:

  1. Core React packages (react, react-dom)
  2. Type definitions (@types/react, @types/react-dom)
  3. Build tooling (@vitejs/plugin-react)
  4. ESLint but plugins remain

This will break the application build and development workflow.

Restore the necessary dependencies:

 "dependencies": {
   "@radix-ui/react-icons": "^1.3.0",
   "@tanstack/react-table": "^8.20.5",
   "class-variance-authority": "^0.7.0",
+  "react": "^18.3.1",
+  "react-dom": "^18.3.1",
   "tailwindcss-animate": "^1.0.7"
 },
 "devDependencies": {
   "@eslint/js": "^9.9.0",
+  "@types/react": "^18.3.3",
+  "@types/react-dom": "^18.3.0",
+  "@vitejs/plugin-react": "^4.3.1",
+  "eslint": "^8.57.0",
   "autoprefixer": "^10.4.18",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
},
"dependencies": {
"@bibliothecadao/eternum": "workspace:^",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-tabs": "^1.1.0",
"@tanstack/react-table": "^8.20.5",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1",
"lucide-react": "^0.365.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/node": "^20.11.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.18",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
"typescript-eslint": "^8.0.1"
},
"dependencies": {
"@radix-ui/react-icons": "^1.3.0",
"@tanstack/react-table": "^8.20.5",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"autoprefixer": "^10.4.18",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"typescript-eslint": "^8.0.1"

"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"eslint": "^9.9.0",
"typescript": "^5.5.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix invalid TypeScript version

The specified TypeScript version (^5.5.3) doesn't exist yet. The latest stable version is 5.3.3.

-    "typescript": "^5.5.3",
+    "typescript": "^5.3.3"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"typescript": "^5.5.3",
"typescript": "^5.3.3",

Comment on lines +23 to +29
"@dojoengine/core": "1.0.4-alpha.3.1.0",
"@dojoengine/create-burner": "1.0.4-alpha.3.1.0",
"@dojoengine/react": "1.0.4-alpha.3.1.0",
"@dojoengine/recs": "^2.0.13",
"@dojoengine/state": "1.0.4-alpha.3.1.0",
"@dojoengine/torii-client": "1.0.4-alpha.3.1.0",
"@dojoengine/utils": "1.0.4-alpha.3.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Upgrade @dojoengine packages to latest stable version 1.0.8

The current alpha versions (1.0.4-alpha.3.1.0) are significantly behind the latest stable releases. Upgrading to version 1.0.8 will provide:

  • Improved stability and reliability
  • Latest bug fixes and security patches
  • Better compatibility guarantees

Ensure all packages (except @dojoengine/recs) are upgraded together to maintain version consistency, and thoroughly test the application after the upgrade.

🔗 Analysis chain

Review alpha versions of @dojoengine packages

Multiple @dojoengine packages are using alpha versions (1.0.4-alpha.3.1.0). Consider the stability implications and ensure proper testing before deployment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for latest stable versions of @dojoengine packages
echo "Checking @dojoengine versions..."
for pkg in core create-burner react state torii-client utils; do
  echo "@dojoengine/$pkg:"
  curl -s "https://registry.npmjs.org/@dojoengine/$pkg" | jq -r '.["dist-tags"].latest'
done

Length of output: 1322

@aymericdelab aymericdelab merged commit e789617 into next Jan 7, 2025
18 of 29 checks passed
@aymericdelab aymericdelab deleted the fix-build-raschel branch January 7, 2025 10:00
This was referenced Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants