diff --git a/.buildkite/full/pipeline.full.yml b/.buildkite/full/pipeline.full.yml index 2c24cff1ce..101495bc79 100644 --- a/.buildkite/full/pipeline.full.yml +++ b/.buildkite/full/pipeline.full.yml @@ -25,8 +25,10 @@ steps: # # Trigger Expo pipelines + # TODO: Skip pending PLAT-11676 and PLAT-11745 # - label: "@bugsnag/expo latest" + skip: PLAT-11676 and PLAT-11745 depends_on: "publish-js" trigger: "bugsnag-expo" build: @@ -58,4 +60,4 @@ steps: BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" # a branch name that's safe to use as a docker cache identifier - BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" \ No newline at end of file + BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" diff --git a/.buildkite/full/react-native-cli-pipeline.full.yml b/.buildkite/full/react-native-cli-pipeline.full.yml index 10c0a64170..a4e7ab65aa 100644 --- a/.buildkite/full/react-native-cli-pipeline.full.yml +++ b/.buildkite/full/react-native-cli-pipeline.full.yml @@ -157,7 +157,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0_66.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_66 @@ -174,7 +174,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0_67.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_67 @@ -191,7 +191,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0_69.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_69 diff --git a/.buildkite/full/react-native-ios-pipeline.full.yml b/.buildkite/full/react-native-ios-pipeline.full.yml index 937b1f9522..d2b8d18844 100644 --- a/.buildkite/full/react-native-ios-pipeline.full.yml +++ b/.buildkite/full/react-native-ios-pipeline.full.yml @@ -14,7 +14,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.66 LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0.66.ipa commands: - npm run test:build-react-native-ios @@ -31,7 +31,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.67 LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0.67.ipa commands: - npm run test:build-react-native-ios @@ -48,7 +48,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.68-hermes LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0.68-hermes.ipa commands: - npm run test:build-react-native-ios @@ -65,7 +65,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.69 LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/rn0.69.ipa commands: - npm run test:build-react-native-ios @@ -122,7 +122,7 @@ steps: JS_SOURCE_DIR: "react_navigation_js" ARTEFACT_NAME: "r_navigation_0.69" LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/r_navigation_0.69.ipa commands: - npm run test:build-react-native-ios @@ -143,7 +143,7 @@ steps: JS_SOURCE_DIR: "react_native_navigation_js" ARTEFACT_NAME: "r_native_navigation_0.66" LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode13.app" + DEVELOPER_DIR: "/Applications/Xcode14.app" artifact_paths: build/r_native_navigation_0.66.ipa commands: - npm run test:build-react-native-ios diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 0068a76a59..dd68fdc2fb 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -7,8 +7,6 @@ steps: timeout_in_minutes: 20 agents: queue: macos-12-arm - env: - DEVELOPER_DIR: /Applications/Xcode13.4.app command: scripts/license_finder.sh # @@ -57,15 +55,16 @@ steps: - docker-compose#v4.12.0: run: minimal-packager artifact_paths: min_packages.tar - - label: ":docker: Build and publish JS packages" key: "publish-js" timeout_in_minutes: 30 agents: - queue: "macos-12-arm" + queue: "macos-14" env: - NODE_VERSION: "14" + NODE_VERSION: "18" + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" command: + - "bundle install" - "node scripts/publish.js $$PUBLISH_URL" retry: automatic: diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..521a9f7c07 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +legacy-peer-deps=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 61f0dcd467..c26e6905e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## v7.22.7 (2024-04-17) + +### Changed + +- (metadata-delegate) Preventing prototype pollution vulnerabilities [#2115](https://github.com/bugsnag/bugsnag-js/pull/2115) +- (plugin-interaction-breadcrumbs) Improved performance of click event breadcrumbs [#2094](https://github.com/bugsnag/bugsnag-js/pull/2094) +- (react-native) Rename Bugsnag.framework to BugsnagReactNative.framework [#2117](https://github.com/bugsnag/bugsnag-js/pull/2117) +- (browser) Export BrowserBugsnagStatic [#2112](https://github.com/bugsnag/bugsnag-js/pull/2112) + +### Fixed + +- (react-native) Move BugsnagReactNative from objective-c to objective c++ [#2113](https://github.com/bugsnag/bugsnag-js/pull/2113) + ## v7.22.6 (2024-03-05) ### Changed diff --git a/Gemfile b/Gemfile index 00a6b3f80e..4a3d1c21b0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'cocoapods' +gem 'cocoapods', '~> 1.14.3' diff --git a/Gemfile.lock b/Gemfile.lock index 0b55f642ce..3575697d3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,38 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.5) + CFPropertyList (3.0.7) + base64 + nkf rexml - activesupport (6.1.7) + activesupport (7.1.3.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.1) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) + base64 (0.2.0) + bigdecimal (3.1.7) claide (1.1.0) - cocoapods (1.11.3) + cocoapods (1.14.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.11.3) + cocoapods-core (= 1.14.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) @@ -32,10 +40,10 @@ GEM gh_inspector (~> 1.0) molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (>= 1.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.11.3) - activesupport (>= 5.0, < 7) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.14.3) + activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) @@ -45,7 +53,7 @@ GEM public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.1) @@ -54,44 +62,47 @@ GEM netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + drb (2.2.1) escape (0.0.4) - ethon (0.15.0) + ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.15.5) + ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.14.4) concurrent-ruby (~> 1.0) - json (2.6.2) - minitest (5.16.3) + json (2.7.1) + minitest (5.22.3) molinillo (0.8.0) + mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) + nkf (0.2.0) public_suffix (4.0.7) - rexml (3.2.5) + rexml (3.2.6) ruby-macho (2.5.1) - typhoeus (1.4.0) + typhoeus (1.4.1) ethon (>= 0.9.0) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.22.0) + xcodeproj (1.24.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.6.1) PLATFORMS ruby DEPENDENCIES - cocoapods + cocoapods (~> 1.14.3) BUNDLED WITH - 2.2.33 + 2.4.8 diff --git a/docker-compose.yml b/docker-compose.yml index ebfb1e91b5..e495642e4a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,7 @@ x-common-environment: &common-environment BROWSER_STACK_DEVICES_USERNAME: BROWSER_STACK_DEVICES_ACCESS_KEY: SKIP_NAVIGATION_SCENARIOS: + MAZE_SCENARIO_BUGSNAG_API_KEY: services: minimal-packager: diff --git a/packages/browser/types/bugsnag.d.ts b/packages/browser/types/bugsnag.d.ts index f9db2ea745..d198264fb7 100644 --- a/packages/browser/types/bugsnag.d.ts +++ b/packages/browser/types/bugsnag.d.ts @@ -7,7 +7,7 @@ interface BrowserConfig extends Config { trackInlineScripts?: boolean } -interface BrowserBugsnagStatic extends BugsnagStatic { +export interface BrowserBugsnagStatic extends BugsnagStatic { start(apiKeyOrOpts: string | BrowserConfig): Client createClient(apiKeyOrOpts: string | BrowserConfig): Client } diff --git a/packages/core/lib/metadata-delegate.js b/packages/core/lib/metadata-delegate.js index a5008edd4d..ae5db228a9 100644 --- a/packages/core/lib/metadata-delegate.js +++ b/packages/core/lib/metadata-delegate.js @@ -14,6 +14,11 @@ const add = (state, section, keyOrObj, maybeVal) => { // exit if we don't have an updates object at this point if (!updates) return + // preventing the __proto__ property from being used as a key + if (section === '__proto__' || section === 'constructor' || section === 'prototype') { + return + } + // ensure a section with this name exists if (!state[section]) state[section] = {} @@ -41,6 +46,11 @@ const clear = (state, section, key) => { return } + // preventing the __proto__ property from being used as a key + if (section === '__proto__' || section === 'constructor' || section === 'prototype') { + return + } + // clear a single value from a section if (state[section]) { delete state[section][key] diff --git a/packages/core/test/metadata-delegate.test.js b/packages/core/test/metadata-delegate.test.js new file mode 100644 index 0000000000..3dded77630 --- /dev/null +++ b/packages/core/test/metadata-delegate.test.js @@ -0,0 +1,58 @@ +import { add, clear } from '../lib/metadata-delegate' + +// it doesn't seem easy or even impossible to check whether __proto__ keys can be overwritten +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto +// so tests are only for prototype and constructor + +describe('metadata delegate', () => { + describe('add', () => { + it.each([ + { + key: 'constructor', + expected: {} + }, + { + key: 'prototype', + expected: {} + } + ])('should not add $key keys', ({ key, expected }) => { + const state = {} + add(state, key, 'foo', 'bar') + expect(state).toEqual(expected) + }) + }) + + describe('clear', () => { + it.each([ + { + key: 'constructor', + state: { + constructor: { + foo: 'bar' + } + }, + expected: { + constructor: { + foo: 'bar' + } + } + }, + { + key: 'prototype', + state: { + prototype: { + foo: 'bar' + } + }, + expected: { + prototype: { + foo: 'bar' + } + } + } + ])('should not overwrite $key keys', ({ key, state, expected }) => { + clear(state, key, 'foo') + expect(state).toEqual(expected) + }) + }) +}) diff --git a/packages/plugin-interaction-breadcrumbs/interaction-breadcrumbs.js b/packages/plugin-interaction-breadcrumbs/interaction-breadcrumbs.js index d1380813ca..86c7b03086 100644 --- a/packages/plugin-interaction-breadcrumbs/interaction-breadcrumbs.js +++ b/packages/plugin-interaction-breadcrumbs/interaction-breadcrumbs.js @@ -21,8 +21,7 @@ module.exports = (win = window) => ({ } }) -const trimStart = /^\s+/ -const trimEnd = /(^|[^\s])\s+$/ +const trim = /^\s*([^\s][\s\S]{0,139}[^\s])?\s*/ function getNodeText (el) { let text = el.textContent || el.innerText || '' @@ -31,7 +30,7 @@ function getNodeText (el) { text = el.value } - text = text.replace(trimStart, '').replace(trimEnd, '$1') + text = text.replace(trim, '$1') if (text.length > 140) { return text.slice(0, 135) + '(...)' diff --git a/packages/react-native/BugsnagReactNative.podspec b/packages/react-native/BugsnagReactNative.podspec index 13f16170e8..c8c660ab9b 100644 --- a/packages/react-native/BugsnagReactNative.podspec +++ b/packages/react-native/BugsnagReactNative.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.author = { "Bugsnag" => "platforms@bugsnag.com" } s.platform = :ios, "9.0" s.source = { :git => "https://github.com/bugsnag/bugsnag-js.git", :tag => "v#{s.version}" } - s.source_files = "ios/BugsnagReactNative/**/*.{h,m}", + s.source_files = "ios/BugsnagReactNative/**/*.{h,mm,m}", "ios/vendor/bugsnag-cocoa/**/*.{h,mm,m,cpp,c}", s.public_header_files = "ios/vendor/bugsnag-cocoa/{#{bugsnag_cocoa_public_header_files.join(',')}}" s.header_dir = 'Bugsnag' diff --git a/packages/react-native/ios/BugsnagReactNative.xcodeproj/project.pbxproj b/packages/react-native/ios/BugsnagReactNative.xcodeproj/project.pbxproj index 108ff5bcbf..45b4099ad0 100644 --- a/packages/react-native/ios/BugsnagReactNative.xcodeproj/project.pbxproj +++ b/packages/react-native/ios/BugsnagReactNative.xcodeproj/project.pbxproj @@ -327,9 +327,9 @@ E7462A782489461A00F92D67 /* Products */ = { isa = PBXGroup; children = ( - E7462A822489461A00F92D67 /* Bugsnag.framework */, - E7462A842489461A00F92D67 /* Bugsnag.framework */, - E7462A862489461A00F92D67 /* Bugsnag.framework */, + E7462A822489461A00F92D67 /* BugsnagReactNative.framework */, + E7462A842489461A00F92D67 /* BugsnagReactNative.framework */, + E7462A862489461A00F92D67 /* BugsnagReactNative.framework */, E7462A882489461A00F92D67 /* libBugsnagStatic.a */, E7462A8A2489461A00F92D67 /* Bugsnag-iOSTests.xctest */, E7462A8C2489461A00F92D67 /* Bugsnag-macOSTests.xctest */, @@ -514,24 +514,24 @@ remoteRef = E72B3248241FC479005FB2CA /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - E7462A822489461A00F92D67 /* Bugsnag.framework */ = { + E7462A822489461A00F92D67 /* BugsnagReactNative.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = Bugsnag.framework; + path = BugsnagReactNative.framework; remoteRef = E7462A812489461A00F92D67 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - E7462A842489461A00F92D67 /* Bugsnag.framework */ = { + E7462A842489461A00F92D67 /* BugsnagReactNative.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = Bugsnag.framework; + path = BugsnagReactNative.framework; remoteRef = E7462A832489461A00F92D67 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - E7462A862489461A00F92D67 /* Bugsnag.framework */ = { + E7462A862489461A00F92D67 /* BugsnagReactNative.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = Bugsnag.framework; + path = BugsnagReactNative.framework; remoteRef = E7462A852489461A00F92D67 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.h b/packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.h index 9f8195f449..e3c6a2930d 100644 --- a/packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.h +++ b/packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.h @@ -5,6 +5,8 @@ #ifdef RCT_NEW_ARCH_ENABLED #import + +#import "BugsnagReactNativeEmitter.h" #endif @class BugsnagConfiguration; diff --git a/packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.m b/packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.mm similarity index 100% rename from packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.m rename to packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.mm diff --git a/test/react-native-cli/features/fixtures/rn0_66/ios/Podfile b/test/react-native-cli/features/fixtures/rn0_66/ios/Podfile index a0238ea75d..fa69df7578 100644 --- a/test/react-native-cli/features/fixtures/rn0_66/ios/Podfile +++ b/test/react-native-cli/features/fixtures/rn0_66/ios/Podfile @@ -20,5 +20,13 @@ target 'rn0_66' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native-cli/features/fixtures/rn0_67/ios/Podfile b/test/react-native-cli/features/fixtures/rn0_67/ios/Podfile index b1660841b4..069c5a9c19 100644 --- a/test/react-native-cli/features/fixtures/rn0_67/ios/Podfile +++ b/test/react-native-cli/features/fixtures/rn0_67/ios/Podfile @@ -20,5 +20,13 @@ target 'rn0_67' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native-cli/features/fixtures/rn0_67_hermes/ios/Podfile b/test/react-native-cli/features/fixtures/rn0_67_hermes/ios/Podfile index dceb4d9132..0c323a8bf5 100644 --- a/test/react-native-cli/features/fixtures/rn0_67_hermes/ios/Podfile +++ b/test/react-native-cli/features/fixtures/rn0_67_hermes/ios/Podfile @@ -20,5 +20,13 @@ target 'rn0_67_hermes' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native-cli/features/fixtures/rn0_69/ios/Podfile b/test/react-native-cli/features/fixtures/rn0_69/ios/Podfile index 6a9228e99d..56b61705b9 100644 --- a/test/react-native-cli/features/fixtures/rn0_69/ios/Podfile +++ b/test/react-native-cli/features/fixtures/rn0_69/ios/Podfile @@ -27,5 +27,13 @@ target 'rn0_69' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native-cli/features/run-app-tests/run-and-notify.feature b/test/react-native-cli/features/run-app-tests/run-and-notify.feature index 816daeee56..88a3502e30 100644 --- a/test/react-native-cli/features/run-app-tests/run-and-notify.feature +++ b/test/react-native-cli/features/run-app-tests/run-and-notify.feature @@ -1,5 +1,6 @@ Feature: Tests for running a React Native app that was initialized using the Bugsnag React Native CLI +@ios_only # Skip this feature on Android until issue with Selenium and BitBar has been resolved PLAT-11897 Scenario: A built, CLI initialized, app sends JavaScript and Native handled errors When I wait to receive at least 1 session Then the session is valid for the session reporting API version "1.0" for the React Native notifier diff --git a/test/react-native-cli/features/support/env.rb b/test/react-native-cli/features/support/env.rb index 77fe07c2c3..e239bbde0f 100644 --- a/test/react-native-cli/features/support/env.rb +++ b/test/react-native-cli/features/support/env.rb @@ -4,3 +4,7 @@ # Build requests are JSON but do not have the integrity header by design Maze.config.enforce_bugsnag_integrity = false end + +Before('@ios_only') do |_scenario| + skip_this_scenario("Skipping scenario") unless Maze::Helper.get_current_platform == 'ios' +end diff --git a/test/react-native/features/fixtures/rn0.66/ios/Podfile b/test/react-native/features/fixtures/rn0.66/ios/Podfile index 78487cd490..2891e70f88 100644 --- a/test/react-native/features/fixtures/rn0.66/ios/Podfile +++ b/test/react-native/features/fixtures/rn0.66/ios/Podfile @@ -20,5 +20,13 @@ target 'reactnative' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native/features/fixtures/rn0.67/ios/Podfile b/test/react-native/features/fixtures/rn0.67/ios/Podfile index 78487cd490..2891e70f88 100644 --- a/test/react-native/features/fixtures/rn0.67/ios/Podfile +++ b/test/react-native/features/fixtures/rn0.67/ios/Podfile @@ -20,5 +20,13 @@ target 'reactnative' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native/features/fixtures/rn0.68-hermes/ios/Podfile b/test/react-native/features/fixtures/rn0.68-hermes/ios/Podfile index 716d34456d..bfa76d3507 100644 --- a/test/react-native/features/fixtures/rn0.68-hermes/ios/Podfile +++ b/test/react-native/features/fixtures/rn0.68-hermes/ios/Podfile @@ -27,5 +27,13 @@ target 'reactnative' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native/features/fixtures/rn0.69/ios/Podfile b/test/react-native/features/fixtures/rn0.69/ios/Podfile index dbb8c3a002..778d5a8a62 100644 --- a/test/react-native/features/fixtures/rn0.69/ios/Podfile +++ b/test/react-native/features/fixtures/rn0.69/ios/Podfile @@ -27,5 +27,13 @@ target 'reactnative' do post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['DEVELOPMENT_TEAM'] = '7W9PZ27Y5F' + end + end + end end end diff --git a/test/react-native/features/fixtures/rn0.72/Gemfile b/test/react-native/features/fixtures/rn0.72/Gemfile index 1fa2c2e1ab..b550fb64d2 100644 --- a/test/react-native/features/fixtures/rn0.72/Gemfile +++ b/test/react-native/features/fixtures/rn0.72/Gemfile @@ -3,4 +3,7 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.12' +# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper +# bound in the template on Cocoapods with next React Native release. +gem 'cocoapods', '>= 1.13', '< 1.15' +gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/test/react-native/features/fixtures/rn0.72/package.json b/test/react-native/features/fixtures/rn0.72/package.json index 76e12e3ac2..ba7e0655c0 100644 --- a/test/react-native/features/fixtures/rn0.72/package.json +++ b/test/react-native/features/fixtures/rn0.72/package.json @@ -11,21 +11,21 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.72.3" + "react-native": "0.72.12" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", - "@react-native/metro-config": "^0.72.9", + "@react-native/metro-config": "^0.72.12", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", - "metro-react-native-babel-preset": "0.76.7", + "metro-react-native-babel-preset": "^0.76.9", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "typescript": "4.8.4" diff --git a/test/react-native/features/fixtures/rn0.73/Gemfile b/test/react-native/features/fixtures/rn0.73/Gemfile index 6a7d5c7a49..b5ea506d70 100644 --- a/test/react-native/features/fixtures/rn0.73/Gemfile +++ b/test/react-native/features/fixtures/rn0.73/Gemfile @@ -3,5 +3,4 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.13' -gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' +gem 'cocoapods', '~> 1.14.3'