Skip to content

Commit e6343b9

Browse files
fix(ios): make Podfile.lock SPEC CHECKSUMS deterministic across machines
Two sources of non-determinism cause Podfile.lock to differ between machines, breaking `pod install --deployment` in CI: 1. Yoga.podspec: Dir.glob returns files in filesystem-dependent order. Add .sort to ensure consistent ordering regardless of OS/filesystem. 2. hermes-engine.podspec: require.resolve with __dir__ produces an absolute path containing the user's home directory. Replace with a $(PODS_ROOT)-relative path that resolves at build time instead. Fixes #56975 Co-authored-by: Cursor <cursoragent@cursor.com>
0 parents  commit e6343b9

7,897 files changed

Lines changed: 1295583 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": [
3+
"module:@react-native/babel-preset"
4+
],
5+
"plugins": [
6+
"babel-plugin-transform-flow-enums"
7+
]
8+
}

.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

.clang-format

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
AccessModifierOffset: -1
3+
AlignAfterOpenBracket: AlwaysBreak
4+
AlignConsecutiveAssignments: false
5+
AlignConsecutiveDeclarations: false
6+
AlignEscapedNewlinesLeft: true
7+
AlignOperands: false
8+
AlignTrailingComments: false
9+
AllowAllParametersOfDeclarationOnNextLine: false
10+
AllowShortBlocksOnASingleLine: false
11+
AllowShortCaseLabelsOnASingleLine: false
12+
AllowShortFunctionsOnASingleLine: Empty
13+
AllowShortIfStatementsOnASingleLine: false
14+
AllowShortLoopsOnASingleLine: false
15+
AlwaysBreakAfterReturnType: None
16+
AlwaysBreakBeforeMultilineStrings: true
17+
AlwaysBreakTemplateDeclarations: true
18+
BinPackArguments: false
19+
BinPackParameters: false
20+
BraceWrapping:
21+
AfterClass: false
22+
AfterControlStatement: false
23+
AfterEnum: false
24+
AfterFunction: false
25+
AfterNamespace: false
26+
AfterObjCDeclaration: false
27+
AfterStruct: false
28+
AfterUnion: false
29+
BeforeCatch: false
30+
BeforeElse: false
31+
IndentBraces: false
32+
BreakBeforeBinaryOperators: None
33+
BreakBeforeBraces: Attach
34+
BreakBeforeTernaryOperators: true
35+
BreakConstructorInitializersBeforeComma: false
36+
BreakAfterJavaFieldAnnotations: false
37+
BreakStringLiterals: false
38+
ColumnLimit: 80
39+
CommentPragmas: '^ IWYU pragma:'
40+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
41+
ConstructorInitializerIndentWidth: 4
42+
ContinuationIndentWidth: 4
43+
Cpp11BracedListStyle: true
44+
DerivePointerAlignment: false
45+
DisableFormat: false
46+
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
47+
IncludeCategories:
48+
- Regex: '^<.*\.h(pp)?>'
49+
Priority: 1
50+
- Regex: '^<.*'
51+
Priority: 2
52+
- Regex: '.*'
53+
Priority: 3
54+
IndentCaseLabels: true
55+
IndentWidth: 2
56+
IndentWrappedFunctionNames: false
57+
KeepEmptyLinesAtTheStartOfBlocks: false
58+
MacroBlockBegin: ''
59+
MacroBlockEnd: ''
60+
MaxEmptyLinesToKeep: 1
61+
NamespaceIndentation: None
62+
ObjCBlockIndentWidth: 2
63+
ObjCSpaceAfterProperty: true
64+
ObjCSpaceBeforeProtocolList: true
65+
PenaltyBreakBeforeFirstCallParameter: 1
66+
PenaltyBreakComment: 300
67+
PenaltyBreakFirstLessLess: 120
68+
PenaltyBreakString: 1000
69+
PenaltyExcessCharacter: 1000000
70+
PenaltyReturnTypeOnItsOwnLine: 200
71+
PointerAlignment: Left
72+
ReflowComments: true
73+
SortIncludes: true
74+
SpaceAfterCStyleCast: false
75+
SpaceBeforeAssignmentOperators: true
76+
SpaceBeforeParens: ControlStatements
77+
SpaceInEmptyParentheses: false
78+
SpacesBeforeTrailingComments: 1
79+
SpacesInAngles: false
80+
SpacesInContainerLiterals: true
81+
SpacesInCStyleCastParentheses: false
82+
SpacesInParentheses: false
83+
SpacesInSquareBrackets: false
84+
Standard: Cpp11
85+
TabWidth: 8
86+
UseTab: Never
87+
QualifierAlignment: Left
88+
---
89+
Language: ObjC
90+
ColumnLimit: 120
91+
BreakBeforeBraces: WebKit
92+
PointerAlignment: Right
93+
...

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 2

.eslintignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
**/main.js
2+
**/staticBundle.js
3+
docs/generatedComponentApiDocs.js
4+
packages/react-native/flow/
5+
packages/react-native/sdks/
6+
packages/react-native/ReactAndroid/build
7+
packages/react-native/ReactAndroid/hermes-engine/build/
8+
packages/react-native/Libraries/Renderer/*
9+
packages/react-native/Libraries/vendor/**/*
10+
node_modules/
11+
packages/*/node_modules
12+
packages/*/dist
13+
packages/*/types_generated
14+
packages/debugger-frontend/dist/**/*
15+
packages/react-native-codegen/lib
16+
private/react-native-codegen-typescript-test/lib/**/*
17+
**/Pods/*
18+
**/*.macos.js
19+
**/*.windows.js
20+
**/__fixtures__/**

.eslintrc.js

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
8+
* @format
9+
*/
10+
11+
'use strict';
12+
13+
module.exports = {
14+
root: true,
15+
16+
extends: ['@react-native'],
17+
18+
plugins: ['@react-native/monorepo', '@react-native/specs'],
19+
20+
overrides: [
21+
// overriding the JS config from @react-native/eslint-config to ensure
22+
// that we use hermes-eslint for all js files
23+
{
24+
files: ['*.js', '*.js.flow', '*.jsx'],
25+
parser: 'hermes-eslint',
26+
rules: {
27+
'@react-native/monorepo/sort-imports': 'warn',
28+
'eslint-comments/no-unlimited-disable': 'off',
29+
'ft-flow/require-valid-file-annotation': ['error', 'always'],
30+
'no-extra-boolean-cast': 'off',
31+
'no-void': 'off',
32+
// These rules are not required with hermes-eslint
33+
'ft-flow/define-flow-type': 'off',
34+
'ft-flow/use-flow-type': 'off',
35+
// Flow handles these checks for us, so they aren't required
36+
'no-undef': 'off',
37+
'no-unreachable': 'off',
38+
// Throwing from function or rejecting promises with non-error values could result in unclear error stack traces and lead to harder debugging
39+
'prefer-promise-reject-errors': 'error',
40+
'no-throw-literal': 'error',
41+
},
42+
},
43+
{
44+
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
45+
rules: {
46+
'@react-native/no-deep-imports': 'off',
47+
},
48+
},
49+
{
50+
files: [
51+
'./packages/react-native/Libraries/**/*.{js,flow}',
52+
'./packages/react-native/src/**/*.{js,flow}',
53+
'./packages/assets-registry/registry.js',
54+
],
55+
parser: 'hermes-eslint',
56+
rules: {
57+
'@react-native/monorepo/no-commonjs-exports': 'warn',
58+
},
59+
},
60+
{
61+
files: ['package.json'],
62+
parser: 'jsonc-eslint-parser',
63+
},
64+
{
65+
files: ['package.json'],
66+
rules: {
67+
'@react-native/monorepo/react-native-manifest': 'error',
68+
},
69+
},
70+
{
71+
files: ['flow-typed/**/*.js', 'packages/react-native/flow/**/*'],
72+
rules: {
73+
'@react-native/monorepo/valid-flow-typed-signature': 'error',
74+
'ft-flow/require-valid-file-annotation': 'off',
75+
'no-shadow': 'off',
76+
'no-unused-vars': 'off',
77+
quotes: 'off',
78+
},
79+
},
80+
{
81+
files: [
82+
'packages/react-native/Libraries/**/*.js',
83+
'packages/react-native/src/**/*.js',
84+
],
85+
rules: {
86+
'@react-native/monorepo/no-haste-imports': 'error',
87+
'@react-native/monorepo/no-react-default-imports': 'error',
88+
'@react-native/monorepo/no-react-named-type-imports': 'error',
89+
'@react-native/monorepo/no-react-native-imports': 'error',
90+
'@react-native/monorepo/no-react-node-imports': 'error',
91+
'@react-native/monorepo/require-extends-error': 'error',
92+
'@react-native/platform-colors': 'error',
93+
'@react-native/specs/react-native-modules': 'error',
94+
},
95+
},
96+
{
97+
files: [
98+
'**/__fixtures__/**/*.js',
99+
'**/__mocks__/**/*.js',
100+
'**/__tests__/**/*.js',
101+
'packages/jest-preset/jest/**/*.js',
102+
'packages/rn-tester/**/*.js',
103+
],
104+
globals: {
105+
// Expose some Jest globals for test helpers
106+
afterAll: true,
107+
afterEach: true,
108+
beforeAll: true,
109+
beforeEach: true,
110+
expect: true,
111+
jest: true,
112+
},
113+
},
114+
{
115+
files: ['**/__tests__/**/*-test.js'],
116+
env: {
117+
jasmine: true,
118+
jest: true,
119+
},
120+
},
121+
{
122+
files: ['**/*.{ts,tsx}'],
123+
parser: '@typescript-eslint/parser',
124+
plugins: ['@typescript-eslint/eslint-plugin'],
125+
rules: {
126+
'@typescript-eslint/no-unused-vars': 'off',
127+
'react-native/no-inline-styles': 'off',
128+
'@typescript-eslint/no-shadow': 'off',
129+
'no-self-compare': 'off',
130+
'react/self-closing-comp': 'off',
131+
},
132+
},
133+
{
134+
files: ['**/*.d.ts'],
135+
plugins: ['redundant-undefined'],
136+
rules: {
137+
'no-dupe-class-members': 'off',
138+
'redundant-undefined/redundant-undefined': [
139+
'error',
140+
{followExactOptionalPropertyTypes: true},
141+
],
142+
},
143+
},
144+
{
145+
files: ['**/__tests__/**'],
146+
rules: {
147+
'@react-native/monorepo/no-react-native-imports': 'off',
148+
},
149+
},
150+
],
151+
};

.flowconfig

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
[ignore]
2+
; Ignore build cache folder
3+
<PROJECT_ROOT>/packages/react-native/sdks/.*
4+
5+
; Ignore fb_internal modules
6+
<PROJECT_ROOT>/packages/react-native/src/fb_internal/.*
7+
8+
; Ignore the codegen e2e tests
9+
<PROJECT_ROOT>/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
10+
11+
; Ignore "BUCK" generated dirs
12+
<PROJECT_ROOT>/\.buckd/
13+
14+
; Ignore other platform suffixes
15+
.*\.macos\.js$
16+
.*\.windows\.js$
17+
18+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
19+
20+
; Checked-in build output
21+
<PROJECT_ROOT>/packages/debugger-frontend/dist/
22+
23+
; Generated build output
24+
<PROJECT_ROOT>/packages/.*/dist
25+
26+
; helloworld
27+
<PROJECT_ROOT>/private/helloworld/ios/Pods/
28+
29+
; Ignore rn-tester Pods
30+
<PROJECT_ROOT>/packages/rn-tester/Pods/
31+
32+
[untyped]
33+
.*/node_modules/@react-native-community/cli/.*/.*
34+
35+
[include]
36+
37+
[declarations]
38+
.*/node_modules/.*
39+
40+
[libs]
41+
flow-typed/
42+
packages/react-native/interface.js
43+
packages/react-native/flow/
44+
45+
[options]
46+
enums=true
47+
experimental.pattern_matching=true
48+
experimental.allow_variance_keywords=true
49+
casting_syntax=both
50+
component_syntax=true
51+
52+
emoji=true
53+
54+
exact_by_default=true
55+
56+
format.bracket_spacing=false
57+
58+
module.file_ext=.js
59+
module.file_ext=.json
60+
61+
experimental.multi_platform=true
62+
experimental.multi_platform.extensions=.ios
63+
experimental.multi_platform.extensions=.android
64+
65+
munge_underscores=true
66+
67+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
68+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
69+
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
70+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\|heic\|heif\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
71+
72+
module.system.haste.module_ref_prefix=m#
73+
74+
react.runtime=automatic
75+
76+
ban_spread_key_props=true
77+
78+
[lints]
79+
sketchy-null-number=warn
80+
sketchy-null-mixed=warn
81+
sketchy-number=warn
82+
untyped-type-import=warn
83+
nonstrict-import=warn
84+
deprecated-type=error
85+
unsafe-getters-setters=warn
86+
unnecessary-invariant=warn
87+
unused-promise=error
88+
89+
[strict]
90+
deprecated-type
91+
nonstrict-import
92+
sketchy-null
93+
unclear-type
94+
unsafe-getters-setters
95+
untyped-import
96+
untyped-type-import
97+
98+
[version]
99+
^0.314.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.js.flow linguist-language=JavaScript

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
✋ To keep the backlog clean and actionable, issues will be
2+
🚫 closed if they do not follow one of the issue templates:
3+
👉 https://github.com/facebook/react-native/issues/new/choose
4+

0 commit comments

Comments
 (0)