Skip to content

Conversation

@7se7en72025
Copy link
Contributor

When a user used the mouse notes played block to query a specific turtle (e.g., targeting "Mr. Mouse"), the code would incorrectly pass a Turtle object into activity.turtles.ithTurtle(), which expects an integer index. This was a failure and a crash (Error: Turtle [object Object] not found).

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Inuth0603
Copy link
Contributor

Hi @7se7en72025, nice catch on the turtle indexing bug! 🚀

I noticed the checks are failing on the Lint step. This is likely because PR #5388 recently updated the project's formatting rules (Prettier v6). The CI is now enforcing the new style, which conflicts with the old formatting in this file.

If you run npm run lint:fix locally (or reformat the file using Prettier 2.8.8) and push the changes, the checks should turn green.

@7se7en72025
Copy link
Contributor Author

Hi @Inuth0603,
umm i did run, it was successfull and no changes later.
Any more suggestions ?

@Inuth0603
Copy link
Contributor

Ah, I see! This happens because your local node_modules likely still has the older version of the linter dependencies, so it thinks your code is "correct" based on the old rules.

Since PR #5388 merged recently, you need to refresh your environment to get the new Prettier v6 rules.

Try this:

  1. Delete your node_modules folder and package-lock.json.
  2. Run npm install (to fetch the new dependencies).
  3. Run npx prettier --write js/ensemble/ensembleblock.js (or whichever file you modified).

That should force the new formatting changes to appear! 🚀

@7se7en72025
Copy link
Contributor Author

sorry but i tried it, the result was same tho

@kartikktripathi
Copy link
Contributor

Hey @7se7en72025, this has happened to me as well. I have checked your ESLint Errors, and it seems like the error is because of 3 files you never touched. I suggest you run Prettier on them and commit. Try:
npx prettier --write js/__tests__/abc.test.js js/turtle.js script.js
and commit, this should help!

Simplified turtle object access in the arg method by using the already found turtle instead of re-fetching it. Also reformatted assignment for singer.turtleTime for better readability.

Refactor object keys and formatting in JS files

Updated test and code files to use numeric keys instead of string keys for object properties where appropriate. Improved code formatting for better readability in turtle.js and script.js.
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@7se7en72025
Copy link
Contributor Author

W @Inuth0603 @kartikktripathi
Thanks Guys !!

@kartikktripathi
Copy link
Contributor

No problem, cheers to open source!

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.

3 participants