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

Convert to monorepo #831

Merged
merged 135 commits into from
Nov 11, 2022
Merged

Convert to monorepo #831

merged 135 commits into from
Nov 11, 2022

Commits on May 17, 2022

  1. POC - Start converting to monorepo

    Completed work:
    
    * Copy a few modules to `packages/`
    * Upgrade Yarn to v3
    * Add Yarn workspaces
    * Add Yarn constraints for `package.json` in root and package
    * Reconfigure TypeScript support new structure
    * Reconfigure Jest to support new structure
    
    Remaining work:
    
    * TypeDoc — it doesn't seem to support TypeScript project references, so
      we may have to generate docs for each package individually or figure
      out something else
    * ESLint — the `node` and `import` plugins are tripping up on imports
      which are aliases — we either need to disable the appropriate rules or
      get the plugins to recognize `tsconfig.json` appropriately
    mcmire committed May 17, 2022
    Configuration menu
    Copy the full SHA
    be212ce View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Migrate from Yarn v1 to Yarn v3

    The package manager used has been upgraded from Yarn v1 to Yarn v3. All
    of the steps in the migration guide [1] have been followed. Effectively
    everything should work the same way it did before.
    
    Closes #847
    
    [1]: https://yarnpkg.com/getting-started/migration
    Gudahtt committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    d4a7428 View commit details
    Browse the repository at this point in the history
  2. Replace setup script with new Yarn plugin

    The old `setup` script has been replaced with a Yarn v3 plugin that
    will automatically run `allow-scripts` after install. We can now use
    `yarn install` again as normal.
    
    This was done to address a problem that happened when running
    `yarn setup` for the first time. If Yarn 3 wasn't installed already, it
    would throw an error. Yarn 3 doesn't automatically install itself until
    you run the `install` command directly.
    
    The `setup` script has been left behind for now so that it still works
    if people run it accidentally. We can remove it later once we've become
    accustomed to this new workflow.
    Gudahtt committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    0da8306 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0164652 View commit details
    Browse the repository at this point in the history
  4. Fix typo

    Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
    Gudahtt and mcmire committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    36afcd4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d9c87b0 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Move remaining packages to packages/

    Other changes:
    
    * Remove overrides in `.eslintrc` for import/*` rules
    * gitignore `*.tsbuildinfo` files
    * Fix file name of `constraints.pro` so it actually takes effect
    * Get `yarn lint` working
    mcmire committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    30e86e2 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. Get all tests passing

    mcmire committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    6e4ea9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e2613a View commit details
    Browse the repository at this point in the history
  3. Simplify build:clean command

    mcmire committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    be2bbe1 View commit details
    Browse the repository at this point in the history
  4. Simplify globs in tsconfigs

    mcmire committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    25916fd View commit details
    Browse the repository at this point in the history
  5. Use __dirname in Jest config

    mcmire committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    8b8a688 View commit details
    Browse the repository at this point in the history
  6. Fix linting

    mcmire committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    97d5e3f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    826e62d View commit details
    Browse the repository at this point in the history
  8. Clean some things up

    mcmire committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    416f0ad View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Configuration menu
    Copy the full SHA
    ddab44d View commit details
    Browse the repository at this point in the history
  2. Fix lint issues

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    2b4345a View commit details
    Browse the repository at this point in the history
  3. Fix TypeDoc

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    8ed6e03 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6991d90 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f06ac0a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7395afc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c0ff9e2 View commit details
    Browse the repository at this point in the history
  8. Add 'yarn constraints' to CI

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    cff70d7 View commit details
    Browse the repository at this point in the history
  9. Oops, fix yarn.lock

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    059d330 View commit details
    Browse the repository at this point in the history
  10. Fix lint issues

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    00be2cd View commit details
    Browse the repository at this point in the history
  11. Put build and test after lint

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    7eb7e17 View commit details
    Browse the repository at this point in the history
  12. Add Yarn version plugin

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    4baf34f View commit details
    Browse the repository at this point in the history
  13. Add changesets

    mcmire committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ef9fdbd View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2022

  1. Make some quick tweaks

    mcmire committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    fc1c892 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38a72df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c24f6db View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2022

  1. Merge main

    * Fix tests
    * Replace isomorphic-fetch with cross-fetch (cross-fetch has better
      TypeScript types, and working with a non-global is generally a better
      experience)
    * Upgrade @ethereumjs/tx and @ethereumjs/common (for some reason the
      Common type wasn't the same between the two packages)
    * Move asset-related utils from controller-utils to assets-controllers
    mcmire committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    b61ac10 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c242b76 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3cd59d2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    07bab4b View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2022

  1. Configuration menu
    Copy the full SHA
    0c34e53 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. Configuration menu
    Copy the full SHA
    afecade View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b93feaa View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Configuration menu
    Copy the full SHA
    91de999 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0fa45f8 View commit details
    Browse the repository at this point in the history
  3. Update README

    mcmire committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    fbaffa9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0963bdd View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Fix constraints

    Confirm that all dependencies are synchronized using the same version
    and that no dependencies are listed multiple times in the same
    `package.json`.
    mcmire committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    5f6205c View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2022

  1. Configuration menu
    Copy the full SHA
    b7f8c6d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a824252 View commit details
    Browse the repository at this point in the history
  3. Fix lint issues

    mcmire committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    7d1532a View commit details
    Browse the repository at this point in the history
  4. Split apart more controllers

    * AddressBookController and PreferencesController from user-controllers
    * EnsController and PhishingController from third-party-controllers
    mcmire committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    90de519 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e0dfdf1 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2022

  1. Configuration menu
    Copy the full SHA
    7a568e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f98075 View commit details
    Browse the repository at this point in the history
  3. Regenerate yarn.lock

    mcmire committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    d294040 View commit details
    Browse the repository at this point in the history
  4. Clean up constraints.pro

    mcmire committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    045b4e3 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2022

  1. Don't export this file

    mcmire committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    26db827 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9537b08 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    16f425e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    99ed774 View commit details
    Browse the repository at this point in the history
  5. Remove the need for an extra tsconfig for tests

    Some of our dependencies use ESM and need transpiling in order to use
    properly. We previously solved this by creating a special
    `tsconfig.json` file for tests where we turned on `allowJs: true`, and
    then using the `ts-jest/presets/js-with-ts` Jest preset as well.
    
    We don't need to do this, however, because we can specify
    `customExportConditions` instead, which will tell Jest that when it is
    resolving imports to ignore `browser` entries in `exports` and choose
    `cjs` instead.
    mcmire committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    48fbdab View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fc07abc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    72d47b1 View commit details
    Browse the repository at this point in the history
  8. Add more constraints

    mcmire committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    7447865 View commit details
    Browse the repository at this point in the history
  9. Bump the version to the current version

    We can't start at 0.0.0 because this repo already has tags, so
    `create-release-branch` will fail to run because there's no v0.0.0 tag.
    So the monorepo will start at the currently release version of
    `@metamask/controllers`.
    mcmire committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    ccd2e83 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    190489d View commit details
    Browse the repository at this point in the history
  11. Fix tests

    mcmire committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    d9e2b7a View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Configuration menu
    Copy the full SHA
    843a5f5 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. Configuration menu
    Copy the full SHA
    d221d80 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2022

  1. Restore .editorconfig

    mcmire committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    b3eeefd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2c700e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e72cb39 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d501396 View commit details
    Browse the repository at this point in the history
  5. Restore isomorphic-fetch

    mcmire committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    9742ca7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    80f4ef7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d354a5f View commit details
    Browse the repository at this point in the history
  8. Remove the Yarn version plugin

    mcmire committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    296cced View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4271859 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8147c62 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0b7becf View commit details
    Browse the repository at this point in the history
  12. Don't need this

    mcmire committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    dd828dd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b567f43 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. Configuration menu
    Copy the full SHA
    65961a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32286dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a2819e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4be5e3a View commit details
    Browse the repository at this point in the history
  5. Fix test failures

    mcmire committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    4c6ed67 View commit details
    Browse the repository at this point in the history
  6. Use @types/uuid ^8.3.0

    mcmire committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    e792a1e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b23a926 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e04c6ec View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3916201 View commit details
    Browse the repository at this point in the history
  10. Make sure we ask people to submit a PR

    Co-authored-by: Mark Stacey <markjstacey@gmail.com>
    mcmire and Gudahtt committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    0b38110 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5589099 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6b35da7 View commit details
    Browse the repository at this point in the history
  13. Assign a return type to setTimeout that works in both Node and browse…

    …r envs
    
    In Node, `setTimeout` returns NodeJS.Timer, whereas in the browser,
    `setTimeout` returns a number. So we if assign a type of NodeJS.Timer to
    the variable here (see diff), `tsserver` will be cool with it, `tsc`
    will be cool with it, but Jest will not be cool with it (because we've
    instructed the `transaction-controller` tests to run within a jsdom
    environment, and so `@types/node` [somehow] does not apply in this
    case).
    
    Also ensure that when we use the Jest `jsdom` environment we clear out
    the existing options we'd set for the `node` environment, just so we
    know that Jest isn't trying to do something we don't expect it to.
    mcmire committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    25a7afa View commit details
    Browse the repository at this point in the history
  14. Fix these too

    mcmire committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    655d7a0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    41b1c56 View commit details
    Browse the repository at this point in the history
  16. Attempting to fix tests

    mcmire committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    113c7a0 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ac20a31 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    0476bfb View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    6c63a2a View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d1db12d View commit details
    Browse the repository at this point in the history
  21. add create-release-branch

    Gudahtt committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    6959246 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2022

  1. COLLECTIBLE -> NFT

    Co-authored-by: Mark Stacey <markjstacey@gmail.com>
    mcmire and Gudahtt committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    ee323bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b6d186d View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2022

  1. Merge remote-tracking branch 'origin/main' into monorepo-poc

    * origin/main:
      Use cached dependencies and immutable install during publish (#942)
      Add clear function for NotificationController (#943)
      Bump actions (#944)
    Gudahtt committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    5286350 View commit details
    Browse the repository at this point in the history
  2. Fix README lint error

    Gudahtt committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    2e36aa9 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Configuration menu
    Copy the full SHA
    839944e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77a4b24 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Configuration menu
    Copy the full SHA
    f3770ba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a08ab7e View commit details
    Browse the repository at this point in the history
  3. Bump action-publish-release

    mcmire committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    3de137d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a0d96c View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. Configuration menu
    Copy the full SHA
    3c824fd View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/main' into monorepo-poc

    * origin/main:
      Add subject type and method to get metadata by origin (#950)
    Gudahtt committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    6326c50 View commit details
    Browse the repository at this point in the history
  3. Update workflows

    * Add actionlint, which must pass before other jobs can run
    * Only run release workflow after lint/build/test passes
    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    cc9bdbb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6c2cad8 View commit details
    Browse the repository at this point in the history
  5. Fix main workflow

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    75cfcb4 View commit details
    Browse the repository at this point in the history
  6. Run tests in parallel

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    407a17f View commit details
    Browse the repository at this point in the history
  7. Clean up workflows still

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    e43457a View commit details
    Browse the repository at this point in the history
  8. Fix workflow

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    b65b4ae View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    eb2670e View commit details
    Browse the repository at this point in the history
  10. Fix workflow

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    259f7b1 View commit details
    Browse the repository at this point in the history
  11. Fix workflow

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    40a3e1e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    743f434 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c9f960a View commit details
    Browse the repository at this point in the history
  14. Add back all-jobs-pass

    mcmire committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    853e460 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2022

  1. Test on Node 18.x and 19.x

    mcmire committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    31cf514 View commit details
    Browse the repository at this point in the history
  2. Fix JSDoc for ContactEntry interface

    Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
    mcmire and Mrtenz committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    43ca97e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1b24bc7 View commit details
    Browse the repository at this point in the history
  4. Revert "Test on Node 18.x and 19.x"

    This reverts commit 31cf514.
    mcmire committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    4714429 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    750ac80 View commit details
    Browse the repository at this point in the history
  6. Use ES2017 instead of ES2020

    mcmire committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    0691206 View commit details
    Browse the repository at this point in the history
  7. Fix lint

    mcmire committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    ca16296 View commit details
    Browse the repository at this point in the history
  8. Remove doc:clean

    mcmire committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    a015279 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3bf6120 View commit details
    Browse the repository at this point in the history
  10. Fix lint

    mcmire committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    3a3b749 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0b957f8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b7c1fbe View commit details
    Browse the repository at this point in the history