Skip to content

Conversation

@JustAzul
Copy link
Owner

@JustAzul JustAzul commented Jun 10, 2025

User description

Summary

  • rename project files using kebab-case
  • update all require paths

Testing

  • npm test (fails: Missing script)

https://chatgpt.com/codex/tasks/task_e_6848bd0ed7448333bbc0d9ea21938c27


PR Type

Enhancement


Description

  • Rename project files to kebab-case

  • Update require/import paths accordingly

  • Lowercase config filenames and exports

  • Adjust main index and generator imports


Changes walkthrough 📝

Relevant files
Enhancement
1 files
fetch.js
Implement and rename fetch module to kebab-case                   
[link]   
Configuration changes
6 files
generators.js
Update generator imports to kebab-case                                     
+2/-2     
utils.js
Adjust utils imports to kebab-case                                             
+2/-2     
cards.js
Export cards configuration in lowercase file                         
[link]   
currency-cards.js
Export currency-cards configuration file                                 
[link]   
fetch-list.js
Provide fetch-list in kebab-case file                                       
[link]   
index.js
Update index imports to kebab-case                                             
+2/-2     

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @JustAzul JustAzul merged commit 6b9a014 into master Jun 10, 2025
    2 checks passed
    @JustAzul JustAzul deleted the codex/rename-project-files-to-kebab-case branch June 10, 2025 23:21
    @github-actions
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Unlimited retries

    Recursive retry logic in error handlers lacks a max retry limit, which may lead to potential stack overflows or infinite loops on persistent failures.

    } catch (err) {
      console.error(err);
      await sleep(moment.duration(2, 'second'));
      return RequestItemOverview(League, Type);
    }
    Inconsistent duration units

    Uses both 'second' and 'seconds' when creating durations, which may cause confusion or errors in delay logic; standardize on one unit.

        await sleep(moment.duration(2, 'second'));
        return RequestItemOverview(League, Type);
      }
    }
    
    async function RequestCurrencyOverview(League) {
      const o = {
        url: 'https://poe.ninja/api/data/currencyoverview',
        searchParams: {
          league: League,
          type: 'Currency',
        },
        responseType: 'json',
      };
    
      try {
        const { body } = await got(o);
    
        const { lines: CurrencyOverview/* , currencyDetails: CurrencyDetails */ } = body;
    
        /* const Response = {
          Overview: CurrencyOverview,
          Details: CurrencyDetails,
        }; */
    
        return CurrencyOverview;
      } catch (err) {
        console.error(err);
        await sleep(moment.duration(2, 'seconds'));
    Missing error handling

    RequestLeaguesOverview does not wrap external API call in try/catch, so failures will bubble up without recovery logic.

    async function RequestLeaguesOverview() {
      const RemoveUnusedLeagues = (data) => data
        .filter(({ id }) => id.indexOf('SSF') === -1) // Removing SSF Leagues
        .filter(({ event }) => !event) // Removing event leagues
        .filter(({ realm }) => realm === 'pc') // Picking pc leagues
      // .filter(({ id }) => id !== 'Standard') // Removing STD League
        .filter(({ id }) => id !== 'Hardcore'); // Removing Hardcore league
    
      const o = {
        url: 'https://api.pathofexile.com/leagues',
        searchParams: {
          type: 'main',
          compact: 0,
        },
        responseType: 'json',
      };
    
      const { body } = await got(o);
    
      const LeaguesData = RemoveUnusedLeagues(body);
      const Leagues = {};
    
      for (let i = 0; i < LeaguesData.length; i += 1) {
        const { id, url } = LeaguesData[i];
    
        const LeagueObject = {
          leagueName: id,
          ladder: url,
        };
    
        Leagues[LeagueObject.leagueName] = LeagueObject;
      }
    
      return Leagues;
    }

    @github-actions
    Copy link

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants