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: submodule #272

Merged
merged 14 commits into from
Sep 25, 2024
9 changes: 3 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
run: git submodule update --init --recursive

- run: curl -L https://install.dojoengine.org | bash
- run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.6
- run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.12
- run: |
cd examples/dojo/dojo-starter
cd worlds/dojo-starter
/home/runner/.config/.dojo/bin/sozo build
/home/runner/.config/.dojo/bin/sozo test
Expand All @@ -41,10 +41,7 @@ jobs:
run: pnpm run prettier --check .

- name: Build packages
run: pnpm run build && pnpm run build-examples

- name: Run tests
run: pnpm run test
run: pnpm run build

# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/release-minor.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-preminor.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-prepatch.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-prerelease.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
workflow_dispatch:
inputs:
release_type:
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
required: true
default: "patch"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: "Setup npm for npmjs"
run: |
npm config set registry https://registry.npmjs.org/
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install Protobuf Compiler
run: sudo apt-get install -y protobuf-compiler

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
run: |
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
- name: Generate Changelog
run: |
npx lerna-changelog > CHANGELOG.md
- name: Commit and Push Changelog
run: |
git add CHANGELOG.md
git commit -m "chore(release): update changelog [skip ci]"
git push origin HEAD:${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 0 additions & 36 deletions .github/workflows/release_patch.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "dojo-starter"]
path = examples/dojo-starter
path = worlds/dojo-starter
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Action Required: Update remaining references to the old submodule path.

The following files still reference examples/dojo-starter and should be updated to worlds/dojo-starter:

  • readme.md
    • Line with cd examples/dojo-starter
    • Another line with cd examples/dojo-starter
  • examples/example-nodejs-bot/tsconfig.json
    • "exclude": ["examples/dojo-starter/target/dev/manifest.json"]

Please ensure these paths are updated to reflect the new submodule location to maintain consistency across the project.

Analysis chain

LGTM! Verify consistency across the project.

The change to the submodule path from examples/dojo-starter to worlds/dojo-starter looks good. This appears to be a directory restructuring, which aligns with the PR title "fix: submodule".

To ensure consistency across the project, please run the following script to check for any references to the old path:

This script will help identify any potential inconsistencies or references that might need updating due to this path change.


LGTM! Verify no residual references to the old submodule path.

To ensure that there are no remaining references to examples/dojo-starter outside of .gitmodules, please run the following script:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for references to the old submodule path

# Search for references to the old path
echo "Searching for references to 'examples/dojo-starter':"
rg --type-not gitmodules "examples/dojo-starter"

# Check if the new directory structure exists
echo "Checking if the new directory structure exists:"
if [ -d "worlds/dojo-starter" ]; then
    echo "Directory 'worlds/dojo-starter' exists."
else
    echo "Warning: Directory 'worlds/dojo-starter' does not exist."
fi

# Verify submodule status
echo "Verifying submodule status:"
git submodule status

Length of output: 587


Script:

#!/bin/bash
# Description: Check for references to the old submodule path excluding .gitmodules

echo "Searching for references to 'examples/dojo-starter' excluding .gitmodules:"
rg "examples/dojo-starter" --glob '!**/.gitmodules'

Length of output: 394

url = https://github.com/dojoengine/dojo-starter
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ packages/torii-client/pkg
packages/torii-wasm/pkg/
packages/utils-wasm/pkg/

examples/dojo-starter
packages/create-dojo
worlds/dojo-starter

# ignore lock files
**/*-lock.yaml
Expand Down
28 changes: 14 additions & 14 deletions examples/example-nodejs-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
"type": "module",
"main": "dist/src/server.js",
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-graphql-request": "^6.0.0",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@types/express": "^4.17.17",
"@types/node": "^20.11.10",
"@types/node-cron": "^3.0.10",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typescript": "^4.0.9",
"@graphql-codegen/typescript-graphql-request": "^6.2.0",
"@graphql-codegen/typescript-operations": "^4.2.3",
"@types/express": "^4.17.21",
"@types/node": "^20.16.6",
"@types/node-cron": "^3.0.11",
"bun-types": "latest",
"graphql": "^16.8.1",
"graphql": "^16.9.0",
"graphql-request": "^6.1.0"
},
"dependencies": {
"@dojoengine/core": "workspace:*",
"@pinecone-database/pinecone": "^1.1.2",
"@pinecone-database/pinecone": "^1.1.3",
"@sapphire/decorators": "^6.1.0",
"@sapphire/framework": "^5.2.1",
"discord.js": "^14.16.2",
"express": "^4.18.2",
"express": "^4.21.0",
"graphql-tag": "^2.12.6",
"langchain": "^0.0.200",
"node-cron": "^3.0.2",
"openai": "^4.20.1",
"twitter-api-v2": "^1.15.2",
"typescript": "^5.2.2"
"node-cron": "^3.0.3",
"openai": "^4.63.0",
"twitter-api-v2": "^1.17.2",
"typescript": "^5.6.2"
},
"scripts": {
"build": "tsc",
Expand Down
8 changes: 4 additions & 4 deletions examples/example-vanillajs-phaser-recs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"preview": "vite preview"
},
"devDependencies": {
"typescript": "^5.5.4",
"vite": "^5.3.5",
"vite-plugin-top-level-await": "^1.4.2",
"typescript": "^5.6.2",
"vite": "^5.4.7",
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-wasm": "^3.3.0"
},
"dependencies": {
Expand All @@ -21,7 +21,7 @@
"@dojoengine/state": "workspace:*",
"@dojoengine/torii-client": "workspace:*",
"@dojoengine/utils": "workspace:*",
"@latticexyz/utils": "^2.0.12",
"@latticexyz/utils": "^2.2.8",
"noise": "^0.0.0",
"phaser": "3.60.0-beta.14",
"starknet": "6.11.0"
Expand Down
36 changes: 18 additions & 18 deletions examples/example-vite-react-app-recs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
"@dojoengine/state": "workspace:*",
"@dojoengine/torii-client": "workspace:*",
"@dojoengine/utils": "workspace:*",
"@latticexyz/react": "^2.0.12",
"@latticexyz/utils": "^2.0.12",
"@latticexyz/react": "^2.2.8",
"@latticexyz/utils": "^2.2.8",
"ethers": "^5.7.2",
"mobx": "^6.9.0",
"mobx": "^6.13.2",
"proxy-deep": "^3.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rxjs": "^7.8.1",
"starknet": "6.11.0",
"vite-plugin-top-level-await": "^1.3.1",
"vite-plugin-wasm": "^3.2.2"
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-wasm": "^3.3.0"
},
"devDependencies": {
"@types/node": "^20.4.8",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"typescript": "^5.5.4",
"vite": "^4.3.9"
"@types/node": "^20.16.6",
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.3.5",
"typescript": "^5.6.2",
"vite": "^4.5.5"
Comment on lines +33 to +43
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Missing Essential devDependencies Detected

The current devDependencies in package.json are missing several essential packages that are critical for your development environment and build process:

  • @types/node
  • @types/react
  • @types/react-dom
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • @vitejs/plugin-react
  • eslint
  • eslint-plugin-react-hooks
  • eslint-plugin-react-refresh
  • typescript
  • vite
Analysis chain

Verify development environment compatibility with updated devDependencies.

The devDependencies have been updated to newer versions. These updates may affect your development environment and build process. Key changes include:

  1. TypeScript updated to 5.6.2: This may introduce new language features or type checking improvements.
  2. ESLint and related plugins updated: This might introduce new linting rules or changes in existing ones.
  3. Vite updated to 4.5.5: This could affect your build process or development server behavior.

To ensure these updates don't negatively impact your development workflow, run the following script:

After running these checks, manually verify that your development workflow (hot reloading, build process, etc.) still functions as expected.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of updated devDependencies

# Test: Check if TypeScript compilation works without errors
npx tsc --noEmit

# Test: Run ESLint to check for any new linting issues
npx eslint .

# Test: Verify Vite build process
npm run build

echo "Please review the output of these commands for any unexpected errors or warnings."

Length of output: 436


Script:

#!/bin/bash
# Description: Extract and display devDependencies from package.json

if command -v jq >/dev/null 2>&1; then
  jq '.devDependencies' package.json
else
  echo "jq is not installed. Please install jq to parse JSON files."
fi

Length of output: 241

}
}
Loading
Loading