Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: infinitered/reactotron
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: reactotron-react-native-mmkv@0.2.7
Choose a base ref
...
head repository: infinitered/reactotron
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 26, 2024

  1. Copy the full SHA
    0781cac View commit details
  2. Copy the full SHA
    fcf0b85 View commit details
  3. Copy the full SHA
    4e3eeef View commit details
  4. Copy the full SHA
    ca510b6 View commit details
  5. Copy the full SHA
    d8f4512 View commit details
  6. Copy the full SHA
    018b2e2 View commit details
  7. Copy the full SHA
    bb59b32 View commit details

Commits on Oct 4, 2024

  1. fix(example-app): remove react-native-reanimated (#1509 by @frankcalise)

    [skip ci]
    
    ## Describe your PR
    - Removes `react-native-reanimated` dependency from the Example App
    - Simplifies the Example App for easier contributions (in the terms of,
    it's less of a headache to build, see Why)
    - Tested building Android, switching between old and new arch without
    any hiccups or patching that @morganick has begun to push upstream
    
    ## Why
    - It's been trouble in a monorepo setting
    - We don't use it in the example app, it was just from Ignite spin up
    frankcalise authored Oct 4, 2024
    Copy the full SHA
    1f05c7c View commit details
  2. fix(reactotron-react-native): new arch support (#1508 by @frankcalise)

    ## Describe your PR
    - Closes #1486 
    - `NativeModules` aren't available in bridgeless, so we utilize the
    `TurboModuleRegistry` to dig up the same calls we were using (this is
    backwards compatible)
    - [ ] Maybe want to do better TSing over `eslint-disable` but I'll leave
    that up to @morganick's review 😅
    
    > [!WARNING]  
    > The `DevMenu` change is not Expo Go compatible. This will never work
    in Expo Go as documented in
    infinitered/ignite#2678. This would only
    impact the client devtools code, which they could remove the custom
    command from the Reactotron configuration (in this repo, it's just in
    the example app, hence the CNG change)
    
    
    ```bash
    ERROR  Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevMenu' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false.
    
    Modules loaded: {"NativeModules":["PlatformConstants","LogBox","BlobModule","PlatformConstants","SourceCode","PlatformConstants","DeviceInfo"],"TurboModules":[],"NotFound":["DevMenu"]}, js engine: hermes
    ```
    frankcalise authored Oct 4, 2024
    Copy the full SHA
    c114e09 View commit details
  3. Copy the full SHA
    db2e5ec View commit details

Commits on Oct 17, 2024

  1. fix(reactotron-app): proper separators in view menu (#1492 by @DIntri…

    …glia)
    
    ## Please verify the following:
    
    - [X] `yarn build-and-test:local` passes
    - [X] I have added tests for any new features, if relevant
    - [X] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    This updates the menu to use a type of separator instead of the
    whitespace at the bottom of the View menu. It is also updated for
    developer mode to not have a space at the bottom when not developer
    mode.
    
    Co-authored-by: Dakotah Intriglia <dakotah.intriglia@evernorth.com>
    DIntriglia and Dakotah Intriglia authored Oct 17, 2024
    Copy the full SHA
    39893d8 View commit details
  2. fix(reactotron-app): Timeline empty state improvements (#1395 by @car…

    …linisaacson)
    
    #1359
    
    - Timeline empty state improvements
      - Adds a button for the quick start guide
      - Adds a random developer joke
    
    Contributors: @carlinisaacson @trevor-coleman @darinwilson 
    
    
    ![DD321274-A94C-42AF-BCAF-AB9A6996B126](https://github.com/infinitered/reactotron/assets/1761434/d1c2d3fb-38b2-4f0a-96f4-e021fc41fb46)
    
    ---------
    
    Co-authored-by: Frank Calise <fcalise@gmail.com>
    carlinisaacson and frankcalise authored Oct 17, 2024
    Copy the full SHA
    f1472d7 View commit details
  3. Copy the full SHA
    9a6b6fc View commit details
  4. Copy the full SHA
    5caef27 View commit details

Commits on Oct 18, 2024

  1. fix(.circleci): electronuserland/builder:20-wine (#1514)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [x] I have added tests for any new features, if relevant
    - [x] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    This PR to fix this [CircleCI
    failure](https://app.circleci.com/pipelines/github/infinitered/reactotron/2478/workflows/f652a467-1905-4cce-b184-35ade28a2c01/jobs/3326)
    by updating the docker image to a [more recent
    tag](https://hub.docker.com/r/electronuserland/builder/tags).
    
    The reason why it was failing is that the docker image
    [electronuserland/builder:16-wine](https://hub.docker.com/layers/electronuserland/builder/16-wine/images/sha256-87efa4ff09eabc913094942a4f48d02ff6f27597155adef3f23fcc948106541b?context=explore)
    uses node 16, which yarn 4 is no longer compatable.
    
    Bumping the docker image to
    [electronuserland/builder:20-wine](https://hub.docker.com/layers/electronuserland/builder/20-wine/images/sha256-d33a2fd3b3a86c773fec534df9cf215038180779303c6019a2964650e27e58d7?context=explore)
    makes use of Node 20.
    
    This separate docker image is needed to compile the Reactotron Electron
    app on Windows. The default node orb appears to use [lts by
    default](https://circleci.com/developer/orbs/orb/circleci/node?version=5.2.0#executors-default),
    so that is likely why it hasn't been failing since it isn't pinned.
    joshuayoes authored Oct 18, 2024
    Copy the full SHA
    9312864 View commit details

Commits on Oct 28, 2024

  1. ci: add scripts for trusting PRs from forks to allow CI to run (#1512)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [x] I have added tests for any new features, if relevant
    - [x] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    
    ### Summary
    * adds the `ci:trust` script and  related docs. to the local repo
    * CircleCI Changes:
    * add the "trust-check" step, to ensure CI doesn't run on untrusted
    forks
    * Adds github workflows to:
    * push PR changes to a trusted branch then clean up automatically after
    2h
        * delete all temp trusted branches with matching branch names 
    
    ### Notes:
    
    * Based on [this
    article](https://circleci.com/blog/triggering-trusted-ci-jobs-on-untrusted-forks/),
    this config prevents the build-docs action from running on untrusted
    forks.
    * CI will check if a branch is trusted before running CI 
    * Once a branch is trusted, then CI will run
    * The github workflow to create a temp branch will automatically clean
    up the branch after a couple hours, and a separate action is provided to
    manually delete all temp branches in case any get left behind.
    * the `ci:trust` script will need to be cleaned up manually for now --
    can maybe automate that with a cron job in github workflows
    
    ---------
    
    Co-authored-by: Joshua Yoes <37849890+joshuayoes@users.noreply.github.com>
    trevor-coleman and joshuayoes authored Oct 28, 2024
    Copy the full SHA
    b5fbdb6 View commit details
  2. docs: resolve image and warning formating (#1518)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [x] I have added tests for any new features, if relevant
    - [x] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    This PR resolves some image formatting issues in the Reactotron docs:
    https://docs.infinite.red/reactotron/contributing/architecture/
    
    ### Before
    <img width="1362" alt="Screenshot 2024-10-28 at 11 35 43 AM"
    src="https://github.com/user-attachments/assets/ed98c989-2d89-4f7c-99cd-2c978eb7bd6b">
    
    <img width="1359" alt="Screenshot 2024-10-28 at 11 34 09 AM"
    src="https://github.com/user-attachments/assets/951ccf46-ccca-44f5-9cf6-d62fb318b2f1">
    
    ### After
    <img width="1355" alt="Screenshot 2024-10-28 at 11 34 54 AM"
    src="https://github.com/user-attachments/assets/e7c49a04-73dd-4372-a836-ef20ce803888">
    
    <img width="1529" alt="Screenshot 2024-10-28 at 11 35 30 AM"
    src="https://github.com/user-attachments/assets/266ccb12-bbff-4453-9f9b-e0c52fb19b24">
    joshuayoes authored Oct 28, 2024
    Copy the full SHA
    4ed6195 View commit details

Commits on Oct 29, 2024

  1. fix: enable strict mode for TS types (#1466)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [x] I have added tests for any new features, if relevant
    - [x] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    
    This PR enables strict mode for the `reactotron-core-client` codebase to
    fix issues documented here:
    
    #1430
    crutchcorn authored Oct 29, 2024
    Copy the full SHA
    fd8cf47 View commit details
  2. Copy the full SHA
    73bc5bc View commit details

Commits on Oct 30, 2024

  1. fix: BigInts on hermes android were crashing during serialization for…

    … reactotron (#1498 by @markrickert)
    
    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [x] I have added tests for any new features, if relevant
    - [x] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    
    I though I had fixed this but we got more reports from the community
    that it was still broken on android.
    
    I added a few new buttons to the example app and was able to reproduce
    the crash on my android emulator on expo 50 / rn 0.73.6.
    
    With these changes, bigints show up properly in the reactotron app.
    Closes #1436
    
    
    ![33A78A6F-C83B-4CA6-BDA2-8F3F6E1A5B16-75409-00059A133DB30F84](https://github.com/user-attachments/assets/43fc45a2-4194-4567-9d5d-8cb92ff0d2bf)
    
    Co-authored-by: Frank Calise <fcalise@gmail.com>
    markrickert and frankcalise authored Oct 30, 2024
    Copy the full SHA
    3b64afb View commit details
  2. Copy the full SHA
    3dd49e2 View commit details

Commits on Nov 4, 2024

  1. Fix: Handling console.log(null) (#1520)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [ ] ~I have added tests for any new features, if relevant!~
    - [ ] ~`README.md` (or relevant documentation) has been updated with
    your changes~
    
    ## Describe your PR
    
    Fixes #1517 where calling `console.log` with `null` resulted in a blank
    screen. Now the comments around the function say that it only handles
    `string`, `object`, `number`, and `boolean`; however, the function takes
    a `message` of type `any`. Seems like we could narrow that down a bit.
    I've checked with all of the possible return values for `typeof` and
    documented that in the code.
    
    The reason the bug existed is because `typeof null` results in `object`.
    The code -- nor many people-- were expecting that. Here's the reference
    to the docs as to why:
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#typeof_null
    
    It appears that we do some things to not return functions as strings and
    we don't handle `Symbol`. Not sure if that's a requirement based on what
    the comments around the function say that it should accept as a message
    type.
    
    ⚠️ I'm not sure why the `getPreview` function returned just the raw
    message if we didn't discern what type it was. That seems like a bug. If
    someone has context as to why that was the case, I'd love to understand
    why.
    
    ## Screenshot
    This is what it looks like now:
    
    <img width="598" alt="image"
    src="https://github.com/user-attachments/assets/93c937eb-04bb-47c1-a219-1c751379924f">
    
    Here's another case where we didn't handle `null` correctly and now we
    do:
    
    <img width="775" alt="image"
    src="https://github.com/user-attachments/assets/83184221-0a79-407d-80cf-2aaefa7d5e55">
    
    Happy Debugging 😎
    morganick authored Nov 4, 2024
    Copy the full SHA
    98e4805 View commit details
  2. Copy the full SHA
    2786c0b View commit details

Commits on Nov 14, 2024

  1. fix: Removing react-native-flipper (#1524)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [ ] I have added tests for any new features, if relevant
    - [ ] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    
    Removing Flipper support.
    
    Fixes #1333
    morganick authored Nov 14, 2024
    Copy the full SHA
    b1e7022 View commit details
  2. Copy the full SHA
    e8ea385 View commit details
  3. Copy the full SHA
    ed7c16e View commit details

Commits on Dec 23, 2024

  1. fix(reactotron-react-native): only set DevMenu when in __DEV__ (#1527

    …by @frankcalise and @joshuayoes)
    
    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    - [ ] I have added tests for any new features, if relevant
    - [ ] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    - Closes #1513 
    - Before we improperly included the DevMenu module in both debug and
    release builds, this checks the `__DEV__` flag
    - Now we access the module using `TurboModuleRegistry.get` instead of
    `TurboModuleRegistry.getEnforcing` to avoid throwing a top level JS
    error when it does not exist
    
    ---------
    
    Co-authored-by: Joshua Yoes <37849890+joshuayoes@users.noreply.github.com>
    frankcalise and joshuayoes authored Dec 23, 2024
    Copy the full SHA
    5f692ac View commit details
  2. Copy the full SHA
    7e8fe92 View commit details

Commits on Jan 7, 2025

  1. Copy the full SHA
    47be69f View commit details
  2. Copy the full SHA
    8236bee View commit details
  3. Copy the full SHA
    a6d7810 View commit details
  4. Copy the full SHA
    b9eb17d View commit details
  5. Copy the full SHA
    68d3214 View commit details
  6. Copy the full SHA
    192d5ce View commit details
  7. Copy the full SHA
    03710f7 View commit details
  8. Copy the full SHA
    ed994d5 View commit details
  9. Copy the full SHA
    37be71f View commit details
  10. Copy the full SHA
    a1481a2 View commit details
  11. Copy the full SHA
    307fab1 View commit details
  12. Copy the full SHA
    fe623a6 View commit details

Commits on Jan 28, 2025

  1. feat: show graphql operation name for graphql requests (#1521 by @yur…

    …ik256)
    
    ## Please verify the following:
    - [x] `yarn build-and-test:local` passes
    - [x] I have added tests for any new features, if relevant
    - [x] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    On the react native project I'm working on, we are extensively using
    graphql.
    Current implement of timeline plugin, makes it hard to differentiate
    graphql requests, as they are all shown as `POST /graphql` in the
    timeline
    
    This PR improves this by adding the following
    * show operation name for graphql requests
    * This is implemented by parsing `request.operationName` field, which is
    automatically added for all graphql requests made by `@apollo/client`
    * Ability to filter requests by request data
    
    **Screenshots**
    
    Show operation name
    ![Screenshot 2024-11-08 at 10 41
    40 AM](https://github.com/user-attachments/assets/bc74fd3c-c776-417a-a588-55ed812e9e05)
    
    Ability to search by request data ( in this case, operation name ) 
    ![Screenshot 2024-11-08 at 10 41
    59 AM](https://github.com/user-attachments/assets/e2ea74c1-8e6e-4088-913c-8a6ca6240c6d)
    
    ---------
    
    Co-authored-by: Nick Morgan <morganick@users.noreply.github.com>
    yurik256 and morganick authored Jan 28, 2025
    Copy the full SHA
    21b9759 View commit details
  2. Copy the full SHA
    9df3cb1 View commit details

Commits on Feb 3, 2025

  1. chore(reactotron-app): refactor electron-store to match docs (#1536)

    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    
    ## Describe your PR
    
    This PR does a minor refactor to our electron-store usage to trigger a
    release for reactotron-app, to release this PR
    #1521
    joshuayoes authored Feb 3, 2025
    Copy the full SHA
    cac1f29 View commit details
  2. Copy the full SHA
    3a59950 View commit details

Commits on Feb 7, 2025

  1. docs(redux): update enhancers with proper example code (#1511 by @fra…

    …nkcalise)
    
    ## Please verify the following:
    
    - [ ] `yarn build-and-test:local` passes
    - [ ] I have added tests for any new features, if relevant
    - [ ] `README.md` (or relevant documentation) has been updated with your
    changes
    
    ## Describe your PR
    - Closes #1450 with updated documentation
    - Updates docs with the redux code we provide in the `example-app`
    frankcalise authored Feb 7, 2025
    Copy the full SHA
    8ec0e10 View commit details

Commits on Feb 12, 2025

  1. chore(.circleci/config.yml): electronuserland/builder:20-wine-07.24 (#…

    …1540)
    
    ## Please verify the following:
    
    - [x] `yarn build-and-test:local` passes
    
    ## Describe your PR
    
    [This job passed with the same docker image
    tag](https://app.circleci.com/pipelines/github/infinitered/reactotron/2519/workflows/437dbf3c-a838-49b1-b7a9-59e7df52137d/jobs/3423)
    a few months ago. It appears the
    [electron-builder](https://www.electron.build/multi-platform-build.html#provided-docker-images)
    docs encourage pinning specific versions for this situation, because it
    appears the [image tag has changed in the latest run that
    failed](https://app.circleci.com/pipelines/github/infinitered/reactotron/2558/workflows/5c710dfe-c28b-47f9-b693-f5c59a6327c0/jobs/3499).
    
    This PR attempt to address this by [pinning the docker image tag to a
    timestamped
    one](https://hubgw.docker.com/layers/electronuserland/builder/20-wine-07.24/images/sha256-d33a2fd3b3a86c773fec534df9cf215038180779303c6019a2964650e27e58d7)
    that will never change.
    
    I confirmed that this is a CI issue by trying to do the build on my
    local windows machine and it passed.
    joshuayoes authored Feb 12, 2025
    Copy the full SHA
    eed7097 View commit details
  2. Copy the full SHA
    6838133 View commit details

Commits on Mar 1, 2025

  1. chore(scripts): add release notes (#1543 by @joshuayoes)

    This PR modifies the `release.artifacts.mjs` release scripts to parse
    the local `CHANGELOG.md` files changes, if they are relevant to a
    release
    
    ---------
    
    Co-authored-by: Jamon Holmgren <code@jamon.dev>
    joshuayoes and jamonholmgren authored Mar 1, 2025
    Copy the full SHA
    8cbac0b View commit details
  2. Copy the full SHA
    debb6b9 View commit details
  3. Copy the full SHA
    9d60052 View commit details
Showing with 2,242 additions and 806 deletions.
  1. +48 −14 .circleci/config.yml
  2. +2 −1 .eslintrc.js
  3. +40 −0 .github/workflows/cleanup-all-temp-trusted-branches.yml
  4. +37 −0 .github/workflows/trust-fork-pr-cleanup.yml
  5. +75 −0 .github/workflows/trust-fork-pr.yml
  6. +21 −0 LICENSE
  7. +19 −11 apps/example-app/app/devtools/ReactotronConfig.ts
  8. +25 −0 apps/example-app/app/screens/LoggingScreen.tsx
  9. +3 −7 apps/example-app/babel.config.js
  10. +6 −7 apps/example-app/package.json
  11. +30 −0 apps/reactotron-app/CHANGELOG.md
  12. +1 −1 apps/reactotron-app/package.json
  13. +93 −4 apps/reactotron-app/scripts/release.artifacts.js
  14. +12 −10 apps/reactotron-app/src/main/menu.ts
  15. +0 −1 apps/reactotron-app/src/renderer/App.tsx
  16. +1 −1 apps/reactotron-app/src/renderer/components/Footer/Stateless.tsx
  17. +20 −15 apps/reactotron-app/src/renderer/config.ts
  18. +16 −6 apps/reactotron-app/src/renderer/contexts/Standalone/useStandalone.ts
  19. +42 −5 apps/reactotron-app/src/renderer/pages/timeline/index.tsx
  20. +2 −2 docs/contributing/architecture.md
  21. +46 −0 docs/contributing/ci.md
  22. BIN docs/contributing/images/ci-copy-fork-branch.png
  23. BIN docs/contributing/images/ci-tests-running.png
  24. +13 −4 docs/plugins/redux.md
  25. +2 −0 docs/quick-start/getting-started.md
  26. +11 −0 lib/eslint-plugin-reactotron/CHANGELOG.md
  27. +1 −2 lib/eslint-plugin-reactotron/package.json
  28. +1 −1 lib/eslint-plugin-reactotron/src/index.ts
  29. +9 −0 lib/reactotron-apisauce/CHANGELOG.md
  30. +1 −2 lib/reactotron-apisauce/package.json
  31. +21 −0 lib/reactotron-core-client/CHANGELOG.md
  32. +2 −3 lib/reactotron-core-client/package.json
  33. +5 −5 lib/reactotron-core-client/src/client-options.ts
  34. +1 −1 lib/reactotron-core-client/src/plugins/benchmark.ts
  35. +23 −20 lib/reactotron-core-client/src/reactotron-core-client.ts
  36. +14 −8 lib/reactotron-core-client/src/serialize.ts
  37. +5 −4 lib/reactotron-core-client/src/validate.ts
  38. +1 −1 lib/reactotron-core-client/test/configure.test.ts
  39. +2 −2 lib/reactotron-core-client/test/plugin-clear.test.ts
  40. +2 −2 lib/reactotron-core-client/test/plugin-logger.test.ts
  41. +1 −0 lib/reactotron-core-client/tsconfig.json
  42. +14 −0 lib/reactotron-core-contract/CHANGELOG.md
  43. +1 −2 lib/reactotron-core-contract/package.json
  44. +1 −0 lib/reactotron-core-contract/src/command.ts
  45. +17 −0 lib/reactotron-core-contract/src/diff.ts
  46. +1 −0 lib/reactotron-core-contract/src/reactotron-core-contract.ts
  47. +14 −0 lib/reactotron-core-server/CHANGELOG.md
  48. +1 −2 lib/reactotron-core-server/package.json
  49. +3 −1 lib/reactotron-core-server/src/reactotron-core-server.ts
  50. +49 −0 lib/reactotron-core-ui/CHANGELOG.md
  51. +1 −2 lib/reactotron-core-ui/package.json
  52. +73 −0 lib/reactotron-core-ui/src/components/RandomJoke/RandomJoke.tsx
  53. +3 −0 lib/reactotron-core-ui/src/components/RandomJoke/index.ts
  54. +5 −2 lib/reactotron-core-ui/src/components/ReactotronAppProvider/index.tsx
  55. +1 −0 lib/reactotron-core-ui/src/components/Tooltip/index.tsx
  56. +7 −4 lib/reactotron-core-ui/src/components/TreeView/index.tsx
  57. +96 −0 lib/reactotron-core-ui/src/components/TreeViewDiff/index.tsx
  58. +90 −0 lib/reactotron-core-ui/src/hooks/useColorScheme.test.tsx
  59. +32 −0 lib/reactotron-core-ui/src/hooks/useColorScheme.tsx
  60. +26 −22 lib/reactotron-core-ui/src/index.ts
  61. +0 −30 lib/reactotron-core-ui/src/theme.ts
  62. +99 −0 lib/reactotron-core-ui/src/themes.ts
  63. +14 −1 lib/reactotron-core-ui/src/timelineCommands/ApiResponseCommand/index.tsx
  64. +34 −29 lib/reactotron-core-ui/src/timelineCommands/LogCommand/index.tsx
  65. +43 −2 lib/reactotron-core-ui/src/timelineCommands/StateActionCompleteCommand/index.tsx
  66. +19 −0 lib/reactotron-core-ui/src/utils/escape-regex.test.ts
  67. +11 −0 lib/reactotron-core-ui/src/utils/escape-regex.ts
  68. +75 −0 lib/reactotron-core-ui/src/utils/filterCommands/filterCommands.test.ts
  69. +4 −2 lib/reactotron-core-ui/src/utils/filterCommands/index.ts
  70. +9 −0 lib/reactotron-mst/CHANGELOG.md
  71. +1 −2 lib/reactotron-mst/package.json
  72. +9 −0 lib/reactotron-react-js/CHANGELOG.md
  73. +1 −2 lib/reactotron-react-js/package.json
  74. +7 −0 lib/reactotron-react-native-mmkv/CHANGELOG.md
  75. +1 −2 lib/reactotron-react-native-mmkv/package.json
  76. +30 −0 lib/reactotron-react-native/CHANGELOG.md
  77. +1 −6 lib/reactotron-react-native/package.json
  78. +0 −10 lib/reactotron-react-native/rollup.config.js
  79. +0 −25 lib/reactotron-react-native/src/connection-manager.ts
  80. +0 −80 lib/reactotron-react-native/src/flipper-connection-manager.ts
  81. +48 −0 lib/reactotron-react-native/src/helpers/getReactNativePlatformConstants.ts
  82. +2 −10 lib/reactotron-react-native/src/helpers/getReactNativeVersion.test.ts
  83. +2 −2 lib/reactotron-react-native/src/helpers/getReactNativeVersion.ts
  84. +7 −7 lib/reactotron-react-native/src/helpers/getReactNativeVersionWithModules.ts
  85. +53 −3 lib/reactotron-react-native/src/plugins/devTools.ts
  86. +24 −23 lib/reactotron-react-native/src/reactotron-react-native.ts
  87. +16 −0 lib/reactotron-redux/CHANGELOG.md
  88. +4 −2 lib/reactotron-redux/package.json
  89. +1 −1 lib/reactotron-redux/rollup.config.js
  90. +30 −6 lib/reactotron-redux/src/customDispatch.test.ts
  91. +8 −3 lib/reactotron-redux/src/customDispatch.ts
  92. +2 −2 lib/reactotron-redux/src/sendAction.ts
  93. +2 −1 package.json
  94. +48 −0 scripts/git-clone-fork-to-trusted-branch.sh
  95. +85 −132 scripts/package.validate.mjs
  96. +134 −56 scripts/release.artifacts.mjs
  97. +0 −1 scripts/template/package.json
  98. +17 −0 types/react-native/Libraries/NativeModules/specs/NativeDevMenu.d.ts
  99. +312 −191 yarn.lock
62 changes: 48 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,11 @@ parameters:
# Anchors define reusable sections of YAML
# See: https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
anchors:
# Defaults passed to all jobs
### Executors
node_executor: &node_executor
name: node/default
resource_class: large
# Default Settings
defaults: &defaults
working_directory: ~/repo
# Branch names used to trigger releases
@@ -40,7 +44,6 @@ anchors:
target_repo: git@github.com:infinitered/ir-docs.git
target_repo_directory: ir-docs


orbs:
node: circleci/node@5.2.0
publish-docs: infinitered/publish-docs@0.4
@@ -198,9 +201,7 @@ commands:
jobs:
build_and_test:
<<: *defaults
executor: &node_executor
name: node/default
resource_class: large
executor: *node_executor
steps:
- checkout
- install-packages
@@ -222,6 +223,24 @@ jobs:
- run:
name: Typecheck
command: yarn typecheck
trust_check:
executor: *node_executor
steps:
- run:
name: Check if branch is trusted
command: |
if [ -n "$CIRCLE_PR_NUMBER" ]; then
if [[ $CIRCLE_BRANCH == temp-ci-trusted-fork-* ]]; then
echo "Branch is trusted"
exit 0
else
echo "Branch is not trusted. Please use the trust process before merging."
exit 1
fi
else
echo "Not a PR from a fork, skipping trust check"
exit 0
fi
release_tags:
<<: *defaults
@@ -259,9 +278,11 @@ jobs:
yarn release:artifacts $CIRCLE_TAG
build_app_windows:
executor: *node_executor
<<: *defaults
docker:
- image: electronuserland/builder:16-wine
- image: electronuserland/builder:20-wine-07.24
resource_class: large
environment:
BUILD_TARGET: windows
steps:
@@ -328,24 +349,30 @@ jobs:
command: yarn workspace reactotron-app release:artifacts $CIRCLE_TAG

workflows:
pull_request:
# prevents the workflow from running when `force-publish-docs` is true
pull_request: # prevents the workflow from running when `force-publish-docs` is true
when:
and:
- not: << pipeline.parameters.force-publish-docs >>
- true # Placeholder for correct YAML structure
- true # Placeholder for correct YAML structure
jobs:
- trust_check:
filters:
branches:
ignore: *release_branch_names
- build_and_test:
requires:
- trust_check
filters:
branches:
ignore: *release_branch_names
- publish-docs/build_docs:
requires:
- trust_check
<<: *ir_docs_config
filters:
branches:
ignore: *release_branch_names


# Allows for manual publishing of docs independent of deployment
# Use the 'trigger pipeline' button in circle ci and set 'force-publish-docs' to 'true'
force_publish_docs:
@@ -354,12 +381,11 @@ workflows:
- publish-docs/publish_docs:
<<: *ir_docs_config

release:
# prevents the workflow from running when `force-publish-docs` is true
release: # prevents the workflow from running when `force-publish-docs` is true
when:
and:
- not: << pipeline.parameters.force-publish-docs >>
- true # Placeholder for correct YAML structure
- true # Placeholder for correct YAML structure
jobs:
- build_and_test:
filters:
@@ -373,11 +399,19 @@ workflows:
only: *release_branch_names
requires:
- build_and_test
- publish-docs/build_docs:
<<: *ir_docs_config
filters:
branches:
only:
- beta
- alpha
- publish-docs/publish_docs:
<<: *ir_docs_config
filters:
branches:
only: *release_branch_names
only:
- master
- release_package:
context:
- infinitered-npm-package
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ module.exports = {
"react-native/Libraries/LogBox/Data/parseLogBoxLog.js",
"react-native/Libraries/LogBox/LogBox.js",
"react-native/Libraries/Core/NativeExceptionsManager.js",
"react-native/Libraries/NativeModules/specs/NativeDevMenu.js",
],
},
rules: {
@@ -57,4 +58,4 @@ module.exports = {
"scripts",
"**/CHANGELOG.md",
],
};
}
40 changes: 40 additions & 0 deletions .github/workflows/cleanup-all-temp-trusted-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Cleanup All Temp Trusted Branches

on:
workflow_dispatch:

jobs:
delete-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Find branches to delete
run: |
# Fetch all branches
git fetch --all
# Find branches starting with 'temp-ci-trusted-fork-'
branches_to_delete=$(git branch -r | grep 'origin/temp-ci-trusted-fork-' | sed 's|origin/||')
if [ -z "$branches_to_delete" ]; then
echo "No branches found to delete."
exit 0
fi
echo "Branches to delete:"
echo "$branches_to_delete"
# Delete each branch
for branch in $branches_to_delete; do
echo "Deleting branch: $branch"
git push origin --delete "$branch"
done
37 changes: 37 additions & 0 deletions .github/workflows/trust-fork-pr-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Cleanup Trusted Branch

on:
workflow_dispatch:
inputs:
branch_to_delete:
description: 'Branch to delete'
required: true
delete_after:
description: 'Delete after (ISO 8601 date)'
required: true

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check if it's time to delete
id: check_time
run: |
current_time=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
if [[ "$current_time" > "${{ github.event.inputs.delete_after }}" ]]; then
echo "::set-output name=should_delete::true"
else
echo "::set-output name=should_delete::false"
fi
- name: Delete branch
if: steps.check_time.outputs.should_delete == 'true'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'heads/${{ github.event.inputs.branch_to_delete }}'
});
75 changes: 75 additions & 0 deletions .github/workflows/trust-fork-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Trust Fork PR

on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to trust'
required: true

jobs:
trust-fork:
runs-on: ubuntu-latest
steps:
- name: Generate unique identifier
id: gen_uid
run: echo "::set-output name=uid::$(date +%s)-${{ github.run_id }}"

- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Fetch PR details
id: pr
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: parseInt(context.payload.inputs.pr_number)
});
core.setOutput('head_repo', pr.data.head.repo.full_name);
core.setOutput('head_branch', pr.data.head.ref);
- name: Fetch and push to trusted branch
env:
FORK_REPO: ${{ steps.pr.outputs.head_repo }}
FORK_BRANCH: ${{ steps.pr.outputs.head_branch }}
UNIQUE_ID: ${{ steps.gen_uid.outputs.uid }}
run: |
git remote add fork https://github.com/${FORK_REPO}.git
git fetch fork ${FORK_BRANCH}
git push origin fork/${FORK_BRANCH}:temp-ci-trusted-fork-${UNIQUE_ID} --force
- name: Cleanup
if: always()
run: |
git remote remove fork
- name: Schedule branch deletion
if: success()
env:
UNIQUE_ID: ${{ steps.gen_uid.outputs.uid }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const deleteDate = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(); // 24 hours from now
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'trust-fork-pr-cleanup.yml',
ref: 'main',
inputs: {
branch_to_delete: `temp-ci-trusted-fork-${process.env.UNIQUE_ID}`,
delete_after: deleteDate
}
});
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 - 3016 Infinite Red LLC.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 19 additions & 11 deletions apps/example-app/app/devtools/ReactotronConfig.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
* free desktop app for inspecting and debugging your React Native app.
* @see https://github.com/infinitered/reactotron
*/
import { Platform, NativeModules } from "react-native"
import { Platform, TurboModuleRegistry } from "react-native"

import AsyncStorage from "@react-native-async-storage/async-storage"
import { ArgType } from "reactotron-core-client"
@@ -29,7 +29,7 @@ const reactotron = Reactotron.configure({
mst({
/** ignore some chatty `mobx-state-tree` actions */
filter: (event) => /postProcessSnapshot|@APPLY_SNAPSHOT/.test(event.name) === false,
}),
})
)

if (Platform.OS !== "web") {
@@ -53,15 +53,23 @@ if (Platform.OS !== "web") {
* NOTE: If you edit this file while running the app, you will need to do a full refresh
* or else your custom commands won't be registered correctly.
*/
reactotron.onCustomCommand({
title: "Show Dev Menu",
description: "Opens the React Native dev menu",
command: "showDevMenu",
handler: () => {
Reactotron.log("Showing React Native dev menu")
NativeModules.DevMenu.show()
},
})

/**
* This Platform.OS iOS restriction can be lifted in React Native 0.77
* The `DevMenu` module was missing in Android for the New Architecture
* See this PR for more details: https://github.com/facebook/react-native/pull/46723
*/
if (Platform.OS === "ios") {
reactotron.onCustomCommand({
title: "Show Dev Menu",
description: "Opens the React Native dev menu",
command: "showDevMenu",
handler: () => {
Reactotron.log("Showing React Native dev menu")
TurboModuleRegistry.get<{ show: () => void; getConstants: () => {} }>("DevMenu")?.show()
},
})
}

reactotron.onCustomCommand({
title: "Reset Root Store",
Loading