Skip to content
Snippets Groups Projects
  1. Apr 10, 2023
    • Alberto Gasparin's avatar
      Convert commonjs to esm (#877) · cd00da76
      Alberto Gasparin authored
      This PR converts everything (aside from electron) from CommonJS to ESM.
      It is needed to reduce the changes that will happen during the migration
      to Typescript (as TS does not play nice with CJS).
      
      Basically:
      - rewrite `require()` to `import`
      - rewrite `module.exports` to `exports`
      - introduce `ts-node` to run importers so we can convert them to TS too
      
      Lastly, sorry for this larg-ish PR, not my preference but when I tried
      to reduce its scope, I would end up with mixed commons/esm that was even
      more tricky to handle.
      Unverified
      cd00da76
  2. Apr 03, 2023
    • Alberto Gasparin's avatar
      Convert loot-core to TS p1 (#841) · 79ad04dd
      Alberto Gasparin authored
      Part 1 of the conversion. Mostly renaming js to ts and making sure
      things make still sense. Added also handy TS ESLint rules.
      
      In order to support the various .web/.electron/... I ended up adopting
      `index.d.ts` as pattern to share type definition. Let me know if that
      makes sense for you too. Right now the function type definition is
      duplicated, but the solution will be importing from `index.d.ts` and
      using `const fn: FnDef = () => ...` that way we can keep all variants in
      sync from a single type file.
      
      Such rewrite however is better done in another PR otherwise we risk
      confusing git and loosing history (rename + too many changes). Another
      thing that might do in the next PR is convert all files to ESModules, as
      things get confusing between CJS exports, ESM default/named and TS adds
      extra complains.
      Unverified
      79ad04dd
  3. Mar 28, 2023
  4. Mar 16, 2023
  5. Feb 28, 2023
  6. Feb 12, 2023
    • Jed Fox's avatar
      Updates to the template/goal feature (#588) · a8656162
      Jed Fox authored
      * Dedupe loot-core webpack configs
      
      * Swap to parsing using Peggy
      
      * Actually record syntax errors
      
      * Refactor template types
      
      * Add notifications after applying the templates
      
      * “Successfully”
      
      * Try a Nearley grammar
      
      * Revert "Try a Nearley grammar"
      
      This reverts commit 1e11c07b855a492b905f1291c3eadd93f78ac3de.
      
      Not going with this approach since the error messages are inscrutable.
      
      * switch to PEG.js which has slightly better tooling support
      
      * fix parser
      
      * Fix error reporting
      
      * Adjust grammar for better error messages
      
      Also allow spaces between currency symbol and number
      
      * Fix grammar
      
      * Make #template prefix case insensitive
      
      * Trailing commas
      
      * Remove patch-package from loot-core
      Unverified
      a8656162
  7. Aug 24, 2022
  8. Apr 29, 2022
Loading