Skip to content

Commit

Permalink
Upgrade to 0.62 (#4587)
Browse files Browse the repository at this point in the history
* Upgrade to 0.62

* Update the issue number in a few override entries

* Image.ios -> Image.windows

* Update override-tools UT to Expect Override File as a validation error for baseFileNotFound

Co-authored-by: Andrew Coates (REDMOND) <acoates@microsoft.com>
  • Loading branch information
NickGerleman and acoates-ms authored Apr 14, 2020
1 parent ce6a537 commit ae37f8e
Show file tree
Hide file tree
Showing 298 changed files with 10,695 additions and 7,582 deletions.
2 changes: 1 addition & 1 deletion .ado/windows-vs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variables:
- template: variables/msbuild.yml
- template: variables/vs2019.yml
- name: reactNativeVersion
value: 0.61.5
value: 0.62.2

jobs:
- job: Setup
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Upgrade to React Native 0.62",
"packageName": "@office-iss/react-native-win32",
"email": "ngerlem@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-04-14T12:18:41.888Z"
}
8 changes: 8 additions & 0 deletions change/react-native-windows-2020-04-14-05-18-46-62.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Upgrade to React Native 0.62",
"packageName": "react-native-windows",
"email": "ngerlem@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-04-14T12:18:46.280Z"
}
2 changes: 1 addition & 1 deletion docs/api/react-native-windows.apptheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
AppTheme: AppThemeModule
AppTheme: AppThemeModule | MissingNativeAppThemeShim
```
10 changes: 8 additions & 2 deletions packages/E2ETest/app/TreeDumpControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@
* Licensed under the MIT License.
*/

import { requireNativeComponent } from 'react-native';
export const TreeDumpControl = requireNativeComponent('TreeDumpControl');
import { requireNativeComponent, ViewStyle } from 'react-native';
export const TreeDumpControl = requireNativeComponent<{
style: ViewStyle;
dumpID: string;
uiaID: string;
testID: string;
additionalProperties?: string[];
}>('TreeDumpControl');
4 changes: 2 additions & 2 deletions packages/E2ETest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5",
"react-native": "0.62.2",
"react-native-windows": "0.0.0-master.34",
"rnpm-plugin-windows": "^0.6.1"
},
Expand All @@ -33,7 +33,7 @@
"@types/jasmine": "2.8.7",
"@types/node": "^10.14.8",
"@types/react": "16.9.0",
"@types/react-native": "~0.61.5",
"@types/react-native": "^0.62.2",
"@wdio/appium-service": "5.12.1",
"@wdio/cli": "5.12.1",
"@wdio/dot-reporter": "5.12.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/microsoft-reactnative-sampleapps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5",
"react-native": "0.62.2",
"react-native-windows": "0.0.0-master.34",
"rnpm-plugin-windows": "^0.6.1"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@types/react": "16.9.0",
"@types/react-native": "~0.61.5",
"@types/react-native": "^0.62.2",
"just-scripts": "^0.36.1",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0"
Expand Down
10 changes: 4 additions & 6 deletions packages/override-tools/src/Cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ async function addOverride(overridePath: string) {
* Remove an override from the manifest
*/
async function removeOverride(overridePath: string) {
await checkFileExists('override', overridePath);

const manifestPath = await FileSearch.findManifest(overridePath);
const manifestDir = path.dirname(manifestPath);

Expand Down Expand Up @@ -330,31 +328,31 @@ function printValidationErrors(errors: Array<ValidationError>) {

if (filesMissing.length > 0) {
const errorMessage =
"Found override files that aren't listed in the manifest. Overrides can be added to the manifest by using 'yarn override add <override>':";
"Found override files that aren't listed in the manifest. Overrides can be added to the manifest by using 'yarn override add <override>' (where override is package relative):";
console.error(chalk.red(errorMessage));
filesMissing.forEach(err => console.error(` - ${err.file}`));
console.error();
}

if (overridesMissing.length > 0) {
const errorMessage =
"Found overrides in the manifest that don't exist on disk. Remove existing overrides using 'yarn override remove <override>':";
"Found overrides in the manifest that don't exist on disk. Remove existing overrides using 'yarn override remove <override>' (where override is package relative):";
console.error(chalk.red(errorMessage));
overridesMissing.forEach(err => console.error(` - ${err.file}`));
console.error();
}

if (baseFilesNotFound.length > 0) {
const errorMessage =
"Found overrides whose original files do not exist. Remove existing overrides using 'yarn override remove <override>':";
"Found overrides whose original files do not exist. Remove existing overrides using 'yarn override remove <override>' (where override is package relative):";
console.error(chalk.red(errorMessage));
baseFilesNotFound.forEach(err => console.error(` - ${err.file}`));
console.error();
}

if (outOfDateFiles.length > 0) {
const errorMessage =
"Found overrides whose original files have changed. Upgrade overrides using 'yarn override auto-upgrade <override>' and 'yarn override manual-upgrade <override>':";
"Found overrides whose original files have changed. Upgrade overrides using 'yarn override auto-upgrade <manifest>' and 'yarn override manual-upgrade <manifest>' (where manifest is package relative):";
console.error(chalk.red(errorMessage));
outOfDateFiles.forEach(err => console.error(` - ${err.file}`));
console.error();
Expand Down
2 changes: 1 addition & 1 deletion packages/override-tools/src/Manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class Manifest {
const baseFile = override.baseFile;
const baseContent = await this.reactRepo.getFileContents(baseFile);
if (baseContent === null) {
errors.push({type: 'baseFileNotFound', file: override.baseFile});
errors.push({type: 'baseFileNotFound', file: override.file});
return;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/override-tools/src/test/Manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ test('BaseFileNotFound', async () => {

const expectedError: ValidationError = {
type: 'baseFileNotFound',
file: 'foo\\bar.js',
file: 'aaa\\aaa.windows.js',
};

const testManifest = new Manifest(ourManifestData, ovrRepo, reactRepo);
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5",
"react-native": "0.62.2",
"react-native-windows": "0.0.0-master.34"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@types/react": "16.9.0",
"@types/react-native": "~0.61.5",
"@types/react-native": "^0.62.2",
"just-scripts": "^0.36.1",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0",
Expand Down
60 changes: 20 additions & 40 deletions packages/react-native-win32/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,30 @@
; initRNLibraries build step
<PROJECT_ROOT>/Libraries/Alert/Alert.js
<PROJECT_ROOT>/Libraries/Animated/src/nodes/AnimatedInterpolation.js
<PROJECT_ROOT>/Libraries/Color/normalizeColor.js
<PROJECT_ROOT>/Libraries/Color/normalizeColorObject.js
<PROJECT_ROOT>/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js
<PROJECT_ROOT>/Libraries/Components/Picker/Picker.js
<PROJECT_ROOT>/Libraries/Components/SafeAreaView/SafeAreaView.js
<PROJECT_ROOT>/Libraries/Components/StatusBar/StatusBar.js
<PROJECT_ROOT>/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js
<PROJECT_ROOT>/Libraries/Components/TextInput/TextInput.js
<PROJECT_ROOT>/Libraries/Components/TextInput/TextInputState.js
<PROJECT_ROOT>/Libraries/Components/Touchable/TouchableBounce.js
<PROJECT_ROOT>/Libraries/Components/Touchable/TouchableHighlight.js
<PROJECT_ROOT>/Libraries/Components/Touchable/TouchableNativeFeedback.js
<PROJECT_ROOT>/Libraries/Components/Touchable/TouchableOpacity.js
<PROJECT_ROOT>/Libraries/Components/Touchable/TouchableWithoutFeedback.js
<PROJECT_ROOT>/Libraries/Components/View/ReactNativeViewAttributes.js
<PROJECT_ROOT>/Libraries/Components/View/ReactNativeViewViewConfig.js
<PROJECT_ROOT>/Libraries/Core/setUpDeveloperTools.js
<PROJECT_ROOT>/Libraries/Core/setUpReactDevTools.js
<PROJECT_ROOT>/Libraries/Image/Image.js
<PROJECT_ROOT>/Libraries/Image/ImageViewNativeComponent.js
<PROJECT_ROOT>/Libraries/Inspector/Inspector.js
<PROJECT_ROOT>/Libraries/Inspector/InspectorOverlay.js
<PROJECT_ROOT>/Libraries/Network/RCTNetworking.js
<PROJECT_ROOT>/Libraries/Pressability/PressabilityDebug.js
<PROJECT_ROOT>/Libraries/ReactNative/getNativeComponentAttributes.js
<PROJECT_ROOT>/Libraries/StyleSheet/normalizeColor.js
<PROJECT_ROOT>/Libraries/StyleSheet/normalizeColorObject.js
<PROJECT_ROOT>/Libraries/StyleSheet/processColor.js
<PROJECT_ROOT>/Libraries/StyleSheet/processColorArray.js
<PROJECT_ROOT>/Libraries/StyleSheet/StyleSheet.js
Expand All @@ -39,10 +46,6 @@
<PROJECT_ROOT>/RNTester/js/components/ListExampleShared.js
<PROJECT_ROOT>/RNTester/js/components/RNTesterExampleFilter.js

; These examples currently uses mac dynamic colors
<PROJECT_ROOT>/RNTester/js/ActivityIndicatorExample.js
<PROJECT_ROOT>/RNTester/js/DarkModeExample.js

; Schema files are used for turbo-module code generation, but are not bundled.
; We don't yet have the react-native-codegen package they rely on, so supress
; checks for now.
Expand Down Expand Up @@ -72,11 +75,6 @@
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
.*/node_modules/warning/.*
Expand All @@ -102,7 +100,7 @@
../../node_modules/

[libs]
Libraries/react-native/react-native-interface.js
interface.js
flow/

[options]
Expand All @@ -115,34 +113,10 @@ module.file_ext=.js
module.file_ext=.json
module.file_ext=.win32.js

module.system=haste
module.system.haste.use_name_reducers=true
# keep the following in sync with server/haste/hasteImpl.js
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.macos$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.win32$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.windesktop$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=<PROJECT_ROOT>/src/.*
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/react-native/react-native-implementation.js
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Image/resolveAssetSource.js

munge_underscores=true

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\)$' -> 'RelativeImageStub'
module.name_mapper='react-native$' -> '<PROJECT_ROOT>/Libraries/react-native/react-native-implementation.js'
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\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
module.name_mapper='react-native$' -> '<PROJECT_ROOT>/index.js'
module.name_mapper='react-native/\(.*\)' -> '<PROJECT_ROOT>/\1'

suppress_type=$FlowIssue
Expand All @@ -153,8 +127,14 @@ suppress_type=$FlowFixMeEmpty

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_android\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_android\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

experimental.well_formed_exports=true
experimental.types_first=true
experimental.abstract_locations=true

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
Expand All @@ -178,4 +158,4 @@ untyped-import
untyped-type-import

[version]
^0.105.0
^0.113.0
4 changes: 2 additions & 2 deletions packages/react-native-win32/.gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/dist
/flow
/flow-typed
/index.*
/interface.*
/IntegrationTests
/jest
/lib
/Libraries
/RNTester
/RNTester.*
/temp
/WorkingHeaders
/typings-index.*
2 changes: 1 addition & 1 deletion packages/react-native-win32/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./Libraries/react-native/typings-main.d.ts",
"mainEntryPointFilePath": "./typings-index.d.ts",
"docModel": {
"enabled": true
},
Expand Down
16 changes: 8 additions & 8 deletions packages/react-native-win32/etc/react-native-win32.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type BasePropsWin32 = {
accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>;
};

// Warning: (ae-forgotten-export) The symbol "IButtonWin32State" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "IButtonWin32State" needs to be exported by the entry point typings-index.d.ts
//
// @public
export class ButtonWin32 extends React_2.Component<IButtonWin32Props, IButtonWin32State> {
Expand Down Expand Up @@ -89,7 +89,7 @@ export interface IButtonWin32Props extends RN.ButtonProps {
style?: RN.StyleProp<IButtonWin32Style>;
}

// Warning: (ae-forgotten-export) The symbol "Omit" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "Omit" needs to be exported by the entry point typings-index.d.ts
//
// @public (undocumented)
export interface IButtonWin32Style extends Omit_4<RN.TextStyle, ButtonWin32OmitStyles> {
Expand All @@ -106,7 +106,7 @@ export interface IDimensions {
width: number;
}

// Warning: (ae-forgotten-export) The symbol "PartiallyRequired" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "PartiallyRequired" needs to be exported by the entry point typings-index.d.ts
//
// @public (undocumented)
export type IHandledKeyboardEvent = PartiallyRequired<INativeKeyboardEvent, 'key'>;
Expand Down Expand Up @@ -152,7 +152,7 @@ export interface IPersonaCoinProps extends ViewProps {
presence: PersonaCoinPresence;
// (undocumented)
size: PersonaCoinSize;
// Warning: (ae-forgotten-export) The symbol "IImageSourceProps" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "IImageSourceProps" needs to be exported by the entry point typings-index.d.ts
//
// (undocumented)
source?: string | IImageSourceProps;
Expand Down Expand Up @@ -220,7 +220,7 @@ export type IStateConditions = {
[P in IState]: boolean;
};

// Warning: (ae-forgotten-export) The symbol "Omit" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "Omit" needs to be exported by the entry point typings-index.d.ts
//
// @public (undocumented)
export interface ITextWin32Props extends Omit_3<RN.TextProps, TextWin32OmitTypes>, BasePropsWin32 {
Expand Down Expand Up @@ -302,7 +302,7 @@ export interface ITouchInfo {
touchActive: boolean;
}

// Warning: (ae-forgotten-export) The symbol "ISignalTransitions" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "ISignalTransitions" needs to be exported by the entry point typings-index.d.ts
//
// @public
export type ITransitions = {
Expand All @@ -315,7 +315,7 @@ export interface IViewWin32 {
focus: () => void;
}

// Warning: (ae-forgotten-export) The symbol "Omit" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "Omit" needs to be exported by the entry point typings-index.d.ts
//
// @public
export interface IViewWin32Props extends Omit_2<RN.ViewProps, ViewWin32OmitTypes>, BasePropsWin32 {
Expand Down Expand Up @@ -425,7 +425,7 @@ export class TextWin32 extends React_2.Component<ITextWin32Props, {}> {
// @public (undocumented)
export type TextWin32OmitTypes = RN.TextPropsAndroid & RN.TextPropsIOS & RN.AccessibilityPropsAndroid & Omit_3<RN.AccessibilityPropsIOS, SharedAccessibilityPropsIOSandWin32> & OmittedAccessibilityPropsWin32;

// Warning: (ae-forgotten-export) The symbol "IInternalTouchableWin32State" needs to be exported by the entry point typings-main.d.ts
// Warning: (ae-forgotten-export) The symbol "IInternalTouchableWin32State" needs to be exported by the entry point typings-index.d.ts
//
// @public
export class TouchableWin32 extends React_2.Component<ITouchableWin32Props, IInternalTouchableWin32State> {
Expand Down
Loading

0 comments on commit ae37f8e

Please sign in to comment.