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

Move macOS JS module overrides to their own files #1961

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Oct 21, 2023

  1. [1/N] Sequence of changes to move macOS JS overrides to standalone files

    This is a sequence of changes to move macOS files to *.macos.js files, hopefully without losing history and to show that we're not making explicit changes to macOS files. It will use a diamond pattern, where any file that was forked for macOS will be moved from it's source file first and merged with a commit that moves a file back to it's original file location. Here are the steps:
    
    1. Move all forked JS files to *.macos.js
    2. Merge in a branch that moves the forked files to *.native.js files and then back to their original file
    rozele committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    85ed665 View commit details
    Browse the repository at this point in the history
  2. [2/N] Delete Image.macos.js to rename Image.ios.js

    We cannot convince git history to treat an overwrite of Image.macos.js with Image.ios.js unless the file is deleted first.
    rozele committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    3debeed View commit details
    Browse the repository at this point in the history
  3. [3/N] Move Image.ios.js to Image.macos.js

    In order to preserve history of Image.ios.js, we move the file to Image.macos.js, rather than just overwriting it in the first place.
    rozele committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    48c8565 View commit details
    Browse the repository at this point in the history
  4. [4/N] Rename original files to some unlikely to be used name

    We can retain the same history for both the original and the copied file if we copy it twice and merge the commits. This copies the files to a different location to copy them back.
    rozele committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    8906749 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5e4230f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f1228d9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6ec8318 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2023

  1. [8/N] Updates Jest snapshots to remove macOS overridden behavior

    Since the iOS code no longer has macOS specific logic in it, this is the result of running `yarn test-ci -u`.
    
    Additionally, because `@react-native/virtualized-lists` is not part of the react-native-macos monorepo, this change adds a line to jest.config.js to re-map imports to `@react-native-mac/virtualized-lists`.
    rozele committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    ba40337 View commit details
    Browse the repository at this point in the history