Skip to content

Breaking changes in 3.0 #1600

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

Merged
merged 9 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/actions/init-test-app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,3 @@ runs:
fi
shell: bash
working-directory: template-example
- name: Workaround for 'Verification checksum was incorrect' (iOS)
if: ${{ runner.os == 'macOS' }}
run: |
if [[ ${{ inputs.platform }} != "macos" ]]; then
cd react-native
patch < ../../../.yarn/patches/react-native-npm-0.72.8-5af30d9693.patch
fi
shell: bash
working-directory: template-example/node_modules
- name: Workaround for 'Verification checksum was incorrect' (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
if [[ ${{ inputs.platform }} != "ios" ]]; then
cd react-native-macos
patch < ../../../.yarn/patches/react-native-macos-npm-0.72.12-61bf1f8441.patch
fi
shell: bash
working-directory: template-example/node_modules
5 changes: 5 additions & 0 deletions .github/semantic-release.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"name": "trunk",
"channel": "latest"
},
{
"name": "releases/2.x",
"range": "2.x",
"channel": "release-2.x"
},
{
"name": "releases/1.x",
"range": "1.x",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
- name: Install Pods
if: ${{ steps.affected.outputs.ios != '' }}
run: |
USE_FLIPPER=0 pod install --project-directory=${{ steps.configure.outputs.project-directory }}
pod install --project-directory=${{ steps.configure.outputs.project-directory }}
working-directory: template-example
- name: Build
if: ${{ steps.affected.outputs.ios != '' }}
Expand Down
13 changes: 0 additions & 13 deletions .yarn/patches/react-native-macos-npm-0.72.12-61bf1f8441.patch

This file was deleted.

29 changes: 0 additions & 29 deletions .yarn/patches/react-native-npm-0.72.8-5af30d9693.patch

This file was deleted.

65 changes: 65 additions & 0 deletions .yarn/plugins/boost-workaround.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// @ts-check
/**
* @typedef {{ values: Map<string, unknown>; }} Configuration
* @typedef {{ cwd: string; }} Workspace
* @typedef {{ configuration: Configuration; cwd: string; workspaces: Workspace[]; }} Project
* @typedef {{ mode?: "skip-build" | "update-lockfile"; }} InstallOptions
*
* @type {{ name: string; factory: (require: NodeRequire) => unknown; }}
*/
module.exports = {
name: "plugin-boost-workaround",
factory: (_require) => ({
hooks: {
/** @type {(project: Project, options: InstallOptions) => void} */
afterAllInstalled(project, options) {
// This mode is typically used by tools like Renovate or Dependabot to
// keep a lockfile up-to-date without incurring the full install cost.
if (options.mode === "update-lockfile") {
return;
}

// Download Boost directly from boost.io instead of JFrog.
// See https://github.com/facebook/react-native/issues/42180
if (project.configuration.values.get("nodeLinker") !== "node-modules") {
return;
}

const fs = require("node:fs");
const path = require("node:path");

const boostPodspecs = [
"node_modules/react-native/third-party-podspecs/boost.podspec",
"node_modules/react-native-macos/third-party-podspecs/boost.podspec",
];

/**
* @param {string} p
* @returns {string}
*/
function normalize(p) {
// On Windows, paths are prefixed with `/`
return p.replace(/^[/\\]([^/\\]+:[/\\])/, "$1");
}

for (const ws of project.workspaces) {
for (const boostPodspec of boostPodspecs) {
const podspecPath = path.join(normalize(ws.cwd), boostPodspec);
if (!fs.existsSync(podspecPath)) {
continue;
}

const podspec = fs.readFileSync(podspecPath, { encoding: "utf-8" });
const patched = podspec.replace(
"https://boostorg.jfrog.io/artifactory/main/release",
"https://archives.boost.io/release"
);
if (patched !== podspec) {
fs.writeFileSync(boostPodspec, patched);
}
}
}
},
},
}),
};
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ plugins:
spec: "@yarnpkg/plugin-compat"
- path: .yarn/plugins/clean.cjs
- path: .yarn/plugins/link-project.cjs
- path: .yarn/plugins/boost-workaround.cjs
tsEnableAutoTypes: false
yarnPath: .yarn/releases/yarn-4.0.2.cjs
4 changes: 2 additions & 2 deletions ReactTestApp-DevSupport.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
version = package['version']

Pod::Spec.new do |s|
s.name = 'ReactTestApp-DevSupport'
s.name = File.basename(__FILE__, '.podspec')
s.version = version
s.author = { package['author']['name'] => package['author']['email'] }
s.license = package['license']
Expand All @@ -34,7 +34,7 @@ Pod::Spec.new do |s|
s.dependency 'React-jsi'

s.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20',
'DEFINES_MODULE' => 'YES',
}

Expand Down
Loading