docstring_tokens
stringlengths 18
16.9k
| code_tokens
stringlengths 75
1.81M
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|
keep keep keep keep replace replace keep keep replace replace replace keep keep keep keep
|
<mask> protected float relativeOnHeight(String length) {
<mask> return PropHelper.fromPercentageToFloat(length, getCanvasHeight(), 0, mScale);
<mask> }
<mask>
<mask> protected float getCanvasWidth() {
<mask> return getSvgShadowNode().getCanvasBounds().width();
<mask> }
<mask>
<mask> protected float getCanvasHeight() {
<mask> return getSvgShadowNode().getCanvasBounds().height();
<mask> }
<mask>
<mask> protected float getCanvasLeft() {
<mask> return getSvgShadowNode().getCanvasBounds().left;
<mask> }
</s> Update RN SVG to 6.2.1
fbshipit-source-id: 4406670 </s> remove protected float relativeOnHeight(String length) {
return PropHelper.fromPercentageToFloat(length, getCanvasHeight(), 0, mScale);
</s> add double relativeOnHeight(String length) {
return PropHelper.fromRelative(length, getCanvasHeight(), 0, mScale, getFontSizeFromContext()); </s> remove protected float relativeOnWidth(String length) {
return PropHelper.fromPercentageToFloat(length, getCanvasWidth(), 0, mScale);
</s> add double relativeOnWidth(String length) {
return PropHelper.fromRelative(length, getCanvasWidth(), 0, mScale, getFontSizeFromContext()); </s> remove protected float getCanvasLeft() {
return getSvgShadowNode().getCanvasBounds().left;
</s> add return canvasWidth; </s> remove protected float getCanvasTop() {
return getSvgShadowNode().getCanvasBounds().top;
</s> add private float getCanvasHeight() {
if (canvasHeight != -1) {
return canvasHeight;
}
GroupShadowNode root = getTextRoot();
if (root == null) {
canvasHeight = getSvgShadowNode().getCanvasBounds().height();
} else {
canvasHeight = root.getGlyphContext().getHeight();
}
return canvasHeight; </s> remove protected void saveDefinition() {
</s> add void saveDefinition() {
|
https://github.com/expo/expo/commit/3883eaa2c47978aa5e899da543ae5f308cacd090
|
android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/svg/VirtualNode.java
|
keep keep replace replace keep keep replace replace keep
|
<mask> }
<mask>
<mask> protected float getCanvasLeft() {
<mask> return getSvgShadowNode().getCanvasBounds().left;
<mask> }
<mask>
<mask> protected float getCanvasTop() {
<mask> return getSvgShadowNode().getCanvasBounds().top;
<mask> }
</s> Update RN SVG to 6.2.1
fbshipit-source-id: 4406670 </s> remove protected void saveDefinition() {
</s> add void saveDefinition() { </s> remove protected float getCanvasHeight() {
return getSvgShadowNode().getCanvasBounds().height();
}
</s> add private float getCanvasWidth() {
if (canvasWidth != -1) {
return canvasWidth;
}
GroupShadowNode root = getTextRoot();
if (root == null) {
canvasWidth = getSvgShadowNode().getCanvasBounds().width();
} else {
canvasWidth = root.getGlyphContext().getWidth();
} </s> remove protected float relativeOnHeight(String length) {
return PropHelper.fromPercentageToFloat(length, getCanvasHeight(), 0, mScale);
</s> add double relativeOnHeight(String length) {
return PropHelper.fromRelative(length, getCanvasHeight(), 0, mScale, getFontSizeFromContext()); </s> remove protected float relativeOnWidth(String length) {
return PropHelper.fromPercentageToFloat(length, getCanvasWidth(), 0, mScale);
</s> add double relativeOnWidth(String length) {
return PropHelper.fromRelative(length, getCanvasWidth(), 0, mScale, getFontSizeFromContext()); </s> remove protected float getCanvasWidth() {
return getSvgShadowNode().getCanvasBounds().width();
</s> add double relativeOnOther(String length) {
double powX = Math.pow((getCanvasWidth()), 2);
double powY = Math.pow((getCanvasHeight()), 2);
double r = Math.sqrt(powX + powY) * M_SQRT1_2l;
return PropHelper.fromRelative(length, r, 0, mScale, getFontSizeFromContext());
|
https://github.com/expo/expo/commit/3883eaa2c47978aa5e899da543ae5f308cacd090
|
android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/svg/VirtualNode.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> protected float getCanvasTop() {
<mask> return getSvgShadowNode().getCanvasBounds().top;
<mask> }
<mask>
<mask> protected void saveDefinition() {
<mask> if (mName != null) {
<mask> getSvgShadowNode().defineTemplate(this, mName);
<mask> }
<mask> }
<mask>
</s> Update RN SVG to 6.2.1
fbshipit-source-id: 4406670 </s> remove protected float getCanvasTop() {
return getSvgShadowNode().getCanvasBounds().top;
</s> add private float getCanvasHeight() {
if (canvasHeight != -1) {
return canvasHeight;
}
GroupShadowNode root = getTextRoot();
if (root == null) {
canvasHeight = getSvgShadowNode().getCanvasBounds().height();
} else {
canvasHeight = root.getGlyphContext().getHeight();
}
return canvasHeight; </s> remove protected void saveDefinition() {
</s> add void saveDefinition() { </s> remove protected float getCanvasLeft() {
return getSvgShadowNode().getCanvasBounds().left;
</s> add return canvasWidth; </s> remove protected interface NodeRunnable {
boolean run(VirtualNode node);
</s> add interface NodeRunnable {
void run(VirtualNode node); </s> remove protected float getCanvasHeight() {
return getSvgShadowNode().getCanvasBounds().height();
}
</s> add private float getCanvasWidth() {
if (canvasWidth != -1) {
return canvasWidth;
}
GroupShadowNode root = getTextRoot();
if (root == null) {
canvasWidth = getSvgShadowNode().getCanvasBounds().width();
} else {
canvasWidth = root.getGlyphContext().getWidth();
} </s> remove public boolean run(VirtualNode node) {
</s> add public void run(VirtualNode node) {
|
https://github.com/expo/expo/commit/3883eaa2c47978aa5e899da543ae5f308cacd090
|
android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/svg/VirtualNode.java
|
keep replace replace keep keep replace keep keep keep
|
<mask>
<mask> protected interface NodeRunnable {
<mask> boolean run(VirtualNode node);
<mask> }
<mask>
<mask> protected void traverseChildren(NodeRunnable runner) {
<mask> for (int i = 0; i < getChildCount(); i++) {
<mask> ReactShadowNode child = getChildAt(i);
<mask> if (!(child instanceof VirtualNode)) {
</s> Update RN SVG to 6.2.1
fbshipit-source-id: 4406670 </s> add void traverseChildren(VirtualNode.NodeRunnable runner) {
for (int i = 0; i < getChildCount(); i++) {
ReactShadowNode child = getChildAt(i);
if (!(child instanceof VirtualNode)) {
continue;
}
runner.run((VirtualNode) child);
}
} </s> remove
mStrokeDasharray = PropHelper.toFloatArray(strokeDasharray);
if (mStrokeDasharray != null && mStrokeDasharray.length > 0) {
for (int i = 0; i < mStrokeDasharray.length; i++) {
mStrokeDasharray[i] = mStrokeDasharray[i] * mScale;
</s> add if (strokeDasharray != null) {
int fromSize = strokeDasharray.size();
mStrokeDasharray = new String[fromSize];
for (int i = 0; i < fromSize; i++) {
mStrokeDasharray[i] = strokeDasharray.getString(i); </s> remove private ArrayList<Float> getFloatArrayListFromReadableArray(ReadableArray readableArray) {
ArrayList<Float> arrayList = new ArrayList<>();
</s> add double nextDeltaY() {
incrementIndices(mDYIndices, mDYsIndex); </s> remove return value.size();
</s> add </s> remove if (readableArray != null) {
for (int i = 0; i < readableArray.size(); i++) {
arrayList.add((float)readableArray.getDouble(i));
}
</s> add int nextIndex = mDYIndex + 1;
if (nextIndex < mDYs.length) {
mDYIndex = nextIndex;
String string = mDYs[nextIndex];
double val = PropHelper.fromRelative(string, mHeight, 0, mScale, mFontSize);
mDY += val;
|
https://github.com/expo/expo/commit/3883eaa2c47978aa5e899da543ae5f308cacd090
|
android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/svg/VirtualNode.java
|
keep keep keep keep replace replace replace keep keep keep
|
<mask> if (!(child instanceof VirtualNode)) {
<mask> continue;
<mask> }
<mask>
<mask> if (!runner.run((VirtualNode) child)) {
<mask> break;
<mask> }
<mask> }
<mask> }
<mask> }
</s> Update RN SVG to 6.2.1
fbshipit-source-id: 4406670 </s> add void traverseChildren(VirtualNode.NodeRunnable runner) {
for (int i = 0; i < getChildCount(); i++) {
ReactShadowNode child = getChildAt(i);
if (!(child instanceof VirtualNode)) {
continue;
}
runner.run((VirtualNode) child);
}
} </s> remove protected void traverseChildren(NodeRunnable runner) {
</s> add void traverseChildren(NodeRunnable runner) { </s> remove return anchor;
}
private TextShadowNode getTextRoot() {
if (mTextRoot == null) {
mTextRoot = this;
while (mTextRoot != null) {
if (mTextRoot.getClass() == TextShadowNode.class) {
break;
}
ReactShadowNode parent = mTextRoot.getParent();
if (!(parent instanceof TextShadowNode)) {
//todo: throw exception here
mTextRoot = null;
} else {
mTextRoot = (TextShadowNode)parent;
</s> add if (mAlignmentBaseline == null) {
mAlignmentBaseline = AlignmentBaseline.baseline;
}
return mAlignmentBaseline;
}
String getBaselineShift() {
if (mBaselineShift == null) {
ReactShadowNode parent = this.getParent();
while (parent != null) {
if (parent instanceof TextShadowNode) {
TextShadowNode node = (TextShadowNode)parent;
final String baselineShift = node.mBaselineShift;
if (baselineShift != null) {
mBaselineShift = baselineShift;
return baselineShift;
} </s> remove TextPathShadowNode textPath = (TextPathShadowNode)parent;
mBezierTransformer = textPath.getBezierTransformer();
</s> add textPath = (TextPathShadowNode) parent; </s> remove if (textPathHasReachedEnd()) {
</s> add case center:
// Align the center of the aligned subtree with the center of the line box.
baselineShift = totalHeight / 2; </s> remove return true;
</s> add
|
https://github.com/expo/expo/commit/3883eaa2c47978aa5e899da543ae5f308cacd090
|
android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/svg/VirtualNode.java
|
keep keep replace keep keep keep keep keep
|
<mask> import { LinearGradient } from 'expo';
<mask> import React from 'react';
<mask> import { Text, ScrollView, View, Image } from 'react-native';
<mask>
<mask> function incrementColor(color, step) {
<mask> const intColor = parseInt(color.substr(1), 16);
<mask> const newIntColor = (intColor + step).toString(16);
<mask> return `#${'0'.repeat(6 - newIntColor.length)}${newIntColor}`;
</s> Update LinearGradientScreen.js (#3964)
* Removed unusable test on web
* Updated UI </s> remove return (
<View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ width: 200, height: 200 }}
/>
{[startInfo, endInfo].map((pointInfo, index) => (
<Text style={{}} key={'--' + index}>
{pointInfo}
</Text>
))}
</View>
);
};
const ColorsTest = ({ colors }) => {
return (
<View>
<LinearGradient colors={colors} style={{ width: 200, height: 200 }} />
{colors.map((color, index) => (
<Text style={{ color }} key={'color-' + index}>
{color}
</Text>
))}
</View>
);
};
</s> add class LocationsTest extends React.Component {
render() {
const { locations } = this.props;
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<Container title="Locations">
<MonoText style={{}}>{`locations={[${locationsInfo}]}`}</MonoText>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove const ControlPointTest = ({ start = [0.5, 0], end = [0, 1] }) => {
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
</s> add class ColorsTest extends React.Component {
render() {
const { colors } = this.props;
const info = colors.map(value => `"${value}"`).join(', ');
return (
<Container title="Colors">
<MonoText style={{}}>{`colors={[${info}]}`}</MonoText>
<LinearGradient colors={colors} style={{ flex: 1, height: 200 }} />
</Container>
);
}
} </s> remove const SnapshotTest = () => (
<View>
<View style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</View>
);
</s> add class Container extends React.Component {
render() {
const { title, children } = this.props;
return (
<View style={styles.container}>
<Text style={styles.containerTitle}>{title}</Text>
{children}
</View>
);
}
}
class SnapshotTest extends React.Component {
render() {
return (
<Container title="Snapshot">
<View
style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</Container>
);
}
}
class ControlPointTest extends React.Component {
render() {
const { start = [0.5, 0], end = [0, 1] } = this.props;
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
return (
<Container title="Control Points">
<View>
{[startInfo, endInfo].map((pointInfo, index) => (
<MonoText style={{}} key={'--' + index}>
{pointInfo}
</MonoText>
))}
</View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove const LocationsTest = ({ locations }) => {
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<View>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ width: 200, height: 200 }}
/>
<Text style={{}}>{`locations={[${locationsInfo}]}`}</Text>
</View>
);
};
</s> add const styles = StyleSheet.create({
container: {
padding: 8,
},
containerTitle: {
fontSize: 14,
fontWeight: '600',
textAlign: 'center',
marginBottom: 8,
},
}); </s> remove <SnapshotTest />
</s> add {Platform.OS !== 'web' && <SnapshotTest />} </s> remove alignItems: 'center',
</s> add alignItems: 'stretch',
|
https://github.com/expo/expo/commit/3bc828834161c05a8bf38128360f624c1124b018
|
apps/native-component-list/screens/LinearGradientScreen.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return (
<mask> <ScrollView
<mask> style={{ flex: 1 }}
<mask> contentContainerStyle={{
<mask> alignItems: 'center',
<mask> paddingVertical: 10,
<mask> }}>
<mask> <ColorsTest colors={[this.state.colorTop, this.state.colorBottom]} />
<mask> <LocationsTest locations={[location, 1.0 - location]} />
<mask> <ControlPointTest start={[position, 0]} />
</s> Update LinearGradientScreen.js (#3964)
* Removed unusable test on web
* Updated UI </s> remove <SnapshotTest />
</s> add {Platform.OS !== 'web' && <SnapshotTest />} </s> remove const LocationsTest = ({ locations }) => {
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<View>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ width: 200, height: 200 }}
/>
<Text style={{}}>{`locations={[${locationsInfo}]}`}</Text>
</View>
);
};
</s> add const styles = StyleSheet.create({
container: {
padding: 8,
},
containerTitle: {
fontSize: 14,
fontWeight: '600',
textAlign: 'center',
marginBottom: 8,
},
}); </s> remove const SnapshotTest = () => (
<View>
<View style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</View>
);
</s> add class Container extends React.Component {
render() {
const { title, children } = this.props;
return (
<View style={styles.container}>
<Text style={styles.containerTitle}>{title}</Text>
{children}
</View>
);
}
}
class SnapshotTest extends React.Component {
render() {
return (
<Container title="Snapshot">
<View
style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</Container>
);
}
}
class ControlPointTest extends React.Component {
render() {
const { start = [0.5, 0], end = [0, 1] } = this.props;
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
return (
<Container title="Control Points">
<View>
{[startInfo, endInfo].map((pointInfo, index) => (
<MonoText style={{}} key={'--' + index}>
{pointInfo}
</MonoText>
))}
</View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove return (
<View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ width: 200, height: 200 }}
/>
{[startInfo, endInfo].map((pointInfo, index) => (
<Text style={{}} key={'--' + index}>
{pointInfo}
</Text>
))}
</View>
);
};
const ColorsTest = ({ colors }) => {
return (
<View>
<LinearGradient colors={colors} style={{ width: 200, height: 200 }} />
{colors.map((color, index) => (
<Text style={{ color }} key={'color-' + index}>
{color}
</Text>
))}
</View>
);
};
</s> add class LocationsTest extends React.Component {
render() {
const { locations } = this.props;
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<Container title="Locations">
<MonoText style={{}}>{`locations={[${locationsInfo}]}`}</MonoText>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove const ControlPointTest = ({ start = [0.5, 0], end = [0, 1] }) => {
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
</s> add class ColorsTest extends React.Component {
render() {
const { colors } = this.props;
const info = colors.map(value => `"${value}"`).join(', ');
return (
<Container title="Colors">
<MonoText style={{}}>{`colors={[${info}]}`}</MonoText>
<LinearGradient colors={colors} style={{ flex: 1, height: 200 }} />
</Container>
);
}
} </s> remove import { Text, ScrollView, View, Image } from 'react-native';
</s> add import { Image, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
import MonoText from '../components/MonoText';
|
https://github.com/expo/expo/commit/3bc828834161c05a8bf38128360f624c1124b018
|
apps/native-component-list/screens/LinearGradientScreen.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }}>
<mask> <ColorsTest colors={[this.state.colorTop, this.state.colorBottom]} />
<mask> <LocationsTest locations={[location, 1.0 - location]} />
<mask> <ControlPointTest start={[position, 0]} />
<mask> <SnapshotTest />
<mask> </ScrollView>
<mask> );
<mask> }
<mask> }
<mask>
</s> Update LinearGradientScreen.js (#3964)
* Removed unusable test on web
* Updated UI </s> remove alignItems: 'center',
</s> add alignItems: 'stretch', </s> remove const SnapshotTest = () => (
<View>
<View style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</View>
);
</s> add class Container extends React.Component {
render() {
const { title, children } = this.props;
return (
<View style={styles.container}>
<Text style={styles.containerTitle}>{title}</Text>
{children}
</View>
);
}
}
class SnapshotTest extends React.Component {
render() {
return (
<Container title="Snapshot">
<View
style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</Container>
);
}
}
class ControlPointTest extends React.Component {
render() {
const { start = [0.5, 0], end = [0, 1] } = this.props;
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
return (
<Container title="Control Points">
<View>
{[startInfo, endInfo].map((pointInfo, index) => (
<MonoText style={{}} key={'--' + index}>
{pointInfo}
</MonoText>
))}
</View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove return (
<View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ width: 200, height: 200 }}
/>
{[startInfo, endInfo].map((pointInfo, index) => (
<Text style={{}} key={'--' + index}>
{pointInfo}
</Text>
))}
</View>
);
};
const ColorsTest = ({ colors }) => {
return (
<View>
<LinearGradient colors={colors} style={{ width: 200, height: 200 }} />
{colors.map((color, index) => (
<Text style={{ color }} key={'color-' + index}>
{color}
</Text>
))}
</View>
);
};
</s> add class LocationsTest extends React.Component {
render() {
const { locations } = this.props;
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<Container title="Locations">
<MonoText style={{}}>{`locations={[${locationsInfo}]}`}</MonoText>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove const ControlPointTest = ({ start = [0.5, 0], end = [0, 1] }) => {
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
</s> add class ColorsTest extends React.Component {
render() {
const { colors } = this.props;
const info = colors.map(value => `"${value}"`).join(', ');
return (
<Container title="Colors">
<MonoText style={{}}>{`colors={[${info}]}`}</MonoText>
<LinearGradient colors={colors} style={{ flex: 1, height: 200 }} />
</Container>
);
}
} </s> remove const LocationsTest = ({ locations }) => {
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<View>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ width: 200, height: 200 }}
/>
<Text style={{}}>{`locations={[${locationsInfo}]}`}</Text>
</View>
);
};
</s> add const styles = StyleSheet.create({
container: {
padding: 8,
},
containerTitle: {
fontSize: 14,
fontWeight: '600',
textAlign: 'center',
marginBottom: 8,
},
}); </s> remove import { Text, ScrollView, View, Image } from 'react-native';
</s> add import { Image, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
import MonoText from '../components/MonoText';
|
https://github.com/expo/expo/commit/3bc828834161c05a8bf38128360f624c1124b018
|
apps/native-component-list/screens/LinearGradientScreen.js
|
keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace replace replace keep keep keep
|
<mask> }
<mask> }
<mask>
<mask> const SnapshotTest = () => (
<mask> <View>
<mask> <View style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<mask> <LinearGradient
<mask> colors={['white', 'red']}
<mask> start={[0.5, 0.5]}
<mask> end={[1, 1]}
<mask> style={{
<mask> width: 100,
<mask> height: 200,
<mask> borderWidth: 1,
<mask> marginVertical: 20,
<mask> borderColor: 'black',
<mask> }}
<mask> />
<mask> <Image
<mask> source={require('../assets/images/confusing_gradient.png')}
<mask> style={{ width: 100, height: 200, marginVertical: 20 }}
<mask> />
<mask> </View>
<mask> <Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
<mask> </View>
<mask> );
<mask>
<mask> const ControlPointTest = ({ start = [0.5, 0], end = [0, 1] }) => {
<mask> const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
<mask> const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
<mask>
<mask> return (
<mask> <View>
</s> Update LinearGradientScreen.js (#3964)
* Removed unusable test on web
* Updated UI </s> remove return (
<View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ width: 200, height: 200 }}
/>
{[startInfo, endInfo].map((pointInfo, index) => (
<Text style={{}} key={'--' + index}>
{pointInfo}
</Text>
))}
</View>
);
};
const ColorsTest = ({ colors }) => {
return (
<View>
<LinearGradient colors={colors} style={{ width: 200, height: 200 }} />
{colors.map((color, index) => (
<Text style={{ color }} key={'color-' + index}>
{color}
</Text>
))}
</View>
);
};
</s> add class LocationsTest extends React.Component {
render() {
const { locations } = this.props;
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<Container title="Locations">
<MonoText style={{}}>{`locations={[${locationsInfo}]}`}</MonoText>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove const LocationsTest = ({ locations }) => {
const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
return (
<View>
<LinearGradient
colors={['red', 'blue']}
locations={locations}
style={{ width: 200, height: 200 }}
/>
<Text style={{}}>{`locations={[${locationsInfo}]}`}</Text>
</View>
);
};
</s> add const styles = StyleSheet.create({
container: {
padding: 8,
},
containerTitle: {
fontSize: 14,
fontWeight: '600',
textAlign: 'center',
marginBottom: 8,
},
}); </s> remove alignItems: 'center',
</s> add alignItems: 'stretch', </s> remove import { Text, ScrollView, View, Image } from 'react-native';
</s> add import { Image, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
import MonoText from '../components/MonoText'; </s> remove <SnapshotTest />
</s> add {Platform.OS !== 'web' && <SnapshotTest />}
|
https://github.com/expo/expo/commit/3bc828834161c05a8bf38128360f624c1124b018
|
apps/native-component-list/screens/LinearGradientScreen.js
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace replace replace replace replace replace replace replace replace replace replace replace replace
|
<mask> const ControlPointTest = ({ start = [0.5, 0], end = [0, 1] }) => {
<mask> const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
<mask> const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
<mask>
<mask> return (
<mask> <View>
<mask> <LinearGradient
<mask> start={start}
<mask> end={end}
<mask> locations={[0.5, 0.5]}
<mask> colors={['blue', 'lime']}
<mask> style={{ width: 200, height: 200 }}
<mask> />
<mask> {[startInfo, endInfo].map((pointInfo, index) => (
<mask> <Text style={{}} key={'--' + index}>
<mask> {pointInfo}
<mask> </Text>
<mask> ))}
<mask> </View>
<mask> );
<mask> };
<mask> const ColorsTest = ({ colors }) => {
<mask> return (
<mask> <View>
<mask> <LinearGradient colors={colors} style={{ width: 200, height: 200 }} />
<mask> {colors.map((color, index) => (
<mask> <Text style={{ color }} key={'color-' + index}>
<mask> {color}
<mask> </Text>
<mask> ))}
<mask> </View>
<mask> );
<mask> };
<mask>
<mask> const LocationsTest = ({ locations }) => {
<mask> const locationsInfo = locations.map(location => +location.toFixed(2)).join(', ');
<mask> return (
<mask> <View>
<mask> <LinearGradient
<mask> colors={['red', 'blue']}
<mask> locations={locations}
<mask> style={{ width: 200, height: 200 }}
<mask> />
<mask> <Text style={{}}>{`locations={[${locationsInfo}]}`}</Text>
<mask> </View>
<mask> );
<mask> };
</s> Update LinearGradientScreen.js (#3964)
* Removed unusable test on web
* Updated UI </s> remove const SnapshotTest = () => (
<View>
<View style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</View>
);
</s> add class Container extends React.Component {
render() {
const { title, children } = this.props;
return (
<View style={styles.container}>
<Text style={styles.containerTitle}>{title}</Text>
{children}
</View>
);
}
}
class SnapshotTest extends React.Component {
render() {
return (
<Container title="Snapshot">
<View
style={{ flexDirection: 'row', alignSelf: 'stretch', justifyContent: 'space-evenly' }}>
<LinearGradient
colors={['white', 'red']}
start={[0.5, 0.5]}
end={[1, 1]}
style={{
width: 100,
height: 200,
borderWidth: 1,
marginVertical: 20,
borderColor: 'black',
}}
/>
<Image
source={require('../assets/images/confusing_gradient.png')}
style={{ width: 100, height: 200, marginVertical: 20 }}
/>
</View>
<Text style={{ marginHorizontal: 20 }}>The gradients above should look the same.</Text>
</Container>
);
}
}
class ControlPointTest extends React.Component {
render() {
const { start = [0.5, 0], end = [0, 1] } = this.props;
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
return (
<Container title="Control Points">
<View>
{[startInfo, endInfo].map((pointInfo, index) => (
<MonoText style={{}} key={'--' + index}>
{pointInfo}
</MonoText>
))}
</View>
<LinearGradient
start={start}
end={end}
locations={[0.5, 0.5]}
colors={['blue', 'lime']}
style={{ flex: 1, height: 200 }}
/>
</Container>
);
}
} </s> remove const ControlPointTest = ({ start = [0.5, 0], end = [0, 1] }) => {
const startInfo = `start={[${start.map(point => +point.toFixed(2)).join(', ')}]}`;
const endInfo = `end={[${end.map(point => +point.toFixed(2)).join(', ')}]}`;
</s> add class ColorsTest extends React.Component {
render() {
const { colors } = this.props;
const info = colors.map(value => `"${value}"`).join(', ');
return (
<Container title="Colors">
<MonoText style={{}}>{`colors={[${info}]}`}</MonoText>
<LinearGradient colors={colors} style={{ flex: 1, height: 200 }} />
</Container>
);
}
} </s> remove import { Text, ScrollView, View, Image } from 'react-native';
</s> add import { Image, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
import MonoText from '../components/MonoText'; </s> remove alignItems: 'center',
</s> add alignItems: 'stretch', </s> remove <SnapshotTest />
</s> add {Platform.OS !== 'web' && <SnapshotTest />}
|
https://github.com/expo/expo/commit/3bc828834161c05a8bf38128360f624c1124b018
|
apps/native-component-list/screens/LinearGradientScreen.js
|
keep keep keep keep replace replace keep keep keep keep
|
<mask> #import "EXScreenOrientation.h"
<mask>
<mask> @interface EXScreenOrientationManager : NSObject <EXScreenOrientationScopedModuleDelegate>
<mask>
<mask> - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations
<mask> forExperienceId:(NSString *)experienceId;
<mask>
<mask> @property (nonatomic, assign) UIInterfaceOrientationMask supportedInterfaceOrientationsForVisibleApp;
<mask>
<mask> @end
</s> [sdk] screen orientation ios (#3104)
* [sdk] screen orientation ios
* [ios]
* [ios]
* [ios] pr feedback </s> add - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations forExperienceId:(NSString *)experienceId;
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
- (UITraitCollection *)getTraitCollection;
</s> remove @interface EXScreenOrientation : EXScopedBridgeModule
</s> add @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection; </s> remove #import "EXScopedBridgeModule.h"
</s> add #import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import "EXScopedEventEmitter.h"
typedef NS_ENUM(NSInteger, EXOrientation) {
EXOrientationPortrait,
EXOrientationPortraitUp,
EXOrientationPortraitDown,
EXOrientationLandscape,
EXOrientationLandscapeLeft,
EXOrientationLandscapeRight,
EXOrientationUnknown
};
typedef NS_ENUM(NSInteger, EXOrientationLock) {
EXOrientationDefaultLock,
EXOrientationAllLock,
EXOrientationPortraitLock,
EXOrientationPortraitUpLock,
EXOrientationPortraitDownLock,
EXOrientationLandscapeLock,
EXOrientationLandscapeLeftLock,
EXOrientationLandscapeRightLock,
EXOrientationOtherLock,
EXOrientationAllButUpsideDownLock // deprecated
};
@interface RCTConvert (OrientationLock)
+ (EXOrientationLock)EXOrientationLock:(id)json;
@end </s> add + (NSDictionary *)getStringToOrientationLockJSDict; </s> add - (UIInterfaceOrientationMask)supportedInterfaceOrientationsForVisibleApp;
- (void)removeOrientationChangeListener:(NSString *)experienceId;
- (void)addOrientationChangeListener:(NSString *)experienceId subscriberModule:(id)subscriberModule;
- (UITraitCollection *)getTraitCollection;
|
https://github.com/expo/expo/commit/3da4a97b939e552072110531fa4eb0febc146bdc
|
ios/Exponent/Kernel/Services/EXScreenOrientationManager.h
|
keep keep add keep
|
<mask>
<mask> @property (nonatomic, assign) UIInterfaceOrientationMask supportedInterfaceOrientationsForVisibleApp;
<mask>
<mask> @end
</s> [sdk] screen orientation ios (#3104)
* [sdk] screen orientation ios
* [ios]
* [ios]
* [ios] pr feedback </s> remove - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations
forExperienceId:(NSString *)experienceId;
</s> add @property (nonatomic, strong) NSMapTable<NSString *, id> *subscribedModules; </s> remove @interface EXScreenOrientation : EXScopedBridgeModule
</s> add @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection; </s> add + (NSDictionary *)getStringToOrientationLockJSDict; </s> add - (UIInterfaceOrientationMask)supportedInterfaceOrientationsForVisibleApp;
- (void)removeOrientationChangeListener:(NSString *)experienceId;
- (void)addOrientationChangeListener:(NSString *)experienceId subscriberModule:(id)subscriberModule;
- (UITraitCollection *)getTraitCollection;
</s> remove #import "EXScopedBridgeModule.h"
</s> add #import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import "EXScopedEventEmitter.h"
typedef NS_ENUM(NSInteger, EXOrientation) {
EXOrientationPortrait,
EXOrientationPortraitUp,
EXOrientationPortraitDown,
EXOrientationLandscape,
EXOrientationLandscapeLeft,
EXOrientationLandscapeRight,
EXOrientationUnknown
};
typedef NS_ENUM(NSInteger, EXOrientationLock) {
EXOrientationDefaultLock,
EXOrientationAllLock,
EXOrientationPortraitLock,
EXOrientationPortraitUpLock,
EXOrientationPortraitDownLock,
EXOrientationLandscapeLock,
EXOrientationLandscapeLeftLock,
EXOrientationLandscapeRightLock,
EXOrientationOtherLock,
EXOrientationAllButUpsideDownLock // deprecated
};
@interface RCTConvert (OrientationLock)
+ (EXOrientationLock)EXOrientationLock:(id)json;
@end
|
https://github.com/expo/expo/commit/3da4a97b939e552072110531fa4eb0febc146bdc
|
ios/Exponent/Kernel/Services/EXScreenOrientationManager.h
|
keep keep replace keep keep keep keep keep
|
<mask> // Copyright 2015-present 650 Industries. All rights reserved.
<mask>
<mask> #import "EXScopedBridgeModule.h"
<mask>
<mask> @protocol EXScreenOrientationScopedModuleDelegate
<mask>
<mask> - (void)screenOrientationModule:(id)scopedOrientationModule
<mask> didChangeSupportedInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations;
</s> [sdk] screen orientation ios (#3104)
* [sdk] screen orientation ios
* [ios]
* [ios]
* [ios] pr feedback </s> add - (UIInterfaceOrientationMask)supportedInterfaceOrientationsForVisibleApp;
- (void)removeOrientationChangeListener:(NSString *)experienceId;
- (void)addOrientationChangeListener:(NSString *)experienceId subscriberModule:(id)subscriberModule;
- (UITraitCollection *)getTraitCollection;
</s> remove - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations
forExperienceId:(NSString *)experienceId;
</s> add @property (nonatomic, strong) NSMapTable<NSString *, id> *subscribedModules; </s> add - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations forExperienceId:(NSString *)experienceId;
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
- (UITraitCollection *)getTraitCollection;
</s> add + (NSDictionary *)getStringToOrientationLockJSDict; </s> remove @interface EXScreenOrientation : EXScopedBridgeModule
</s> add @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
|
https://github.com/expo/expo/commit/3da4a97b939e552072110531fa4eb0febc146bdc
|
ios/Exponent/Versioned/Core/Api/EXScreenOrientation.h
|
keep keep keep add keep keep keep keep keep
|
<mask>
<mask> - (void)screenOrientationModule:(id)scopedOrientationModule
<mask> didChangeSupportedInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations;
<mask>
<mask> @end
<mask>
<mask> @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
<mask>
<mask> - (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
</s> [sdk] screen orientation ios (#3104)
* [sdk] screen orientation ios
* [ios]
* [ios]
* [ios] pr feedback </s> remove @interface EXScreenOrientation : EXScopedBridgeModule
</s> add @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection; </s> add + (NSDictionary *)getStringToOrientationLockJSDict; </s> add - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations forExperienceId:(NSString *)experienceId;
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
- (UITraitCollection *)getTraitCollection;
</s> remove - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations
forExperienceId:(NSString *)experienceId;
</s> add @property (nonatomic, strong) NSMapTable<NSString *, id> *subscribedModules; </s> remove #import "EXScopedBridgeModule.h"
</s> add #import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import "EXScopedEventEmitter.h"
typedef NS_ENUM(NSInteger, EXOrientation) {
EXOrientationPortrait,
EXOrientationPortraitUp,
EXOrientationPortraitDown,
EXOrientationLandscape,
EXOrientationLandscapeLeft,
EXOrientationLandscapeRight,
EXOrientationUnknown
};
typedef NS_ENUM(NSInteger, EXOrientationLock) {
EXOrientationDefaultLock,
EXOrientationAllLock,
EXOrientationPortraitLock,
EXOrientationPortraitUpLock,
EXOrientationPortraitDownLock,
EXOrientationLandscapeLock,
EXOrientationLandscapeLeftLock,
EXOrientationLandscapeRightLock,
EXOrientationOtherLock,
EXOrientationAllButUpsideDownLock // deprecated
};
@interface RCTConvert (OrientationLock)
+ (EXOrientationLock)EXOrientationLock:(id)json;
@end
|
https://github.com/expo/expo/commit/3da4a97b939e552072110531fa4eb0febc146bdc
|
ios/Exponent/Versioned/Core/Api/EXScreenOrientation.h
|
keep keep keep keep replace keep keep
|
<mask> didChangeSupportedInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations;
<mask>
<mask> @end
<mask>
<mask> @interface EXScreenOrientation : EXScopedBridgeModule
<mask>
<mask> @end
</s> [sdk] screen orientation ios (#3104)
* [sdk] screen orientation ios
* [ios]
* [ios]
* [ios] pr feedback </s> add + (NSDictionary *)getStringToOrientationLockJSDict; </s> remove - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations
forExperienceId:(NSString *)experienceId;
</s> add @property (nonatomic, strong) NSMapTable<NSString *, id> *subscribedModules; </s> add - (UIInterfaceOrientationMask)supportedInterfaceOrientationsForVisibleApp;
- (void)removeOrientationChangeListener:(NSString *)experienceId;
- (void)addOrientationChangeListener:(NSString *)experienceId subscriberModule:(id)subscriberModule;
- (UITraitCollection *)getTraitCollection;
</s> add - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations forExperienceId:(NSString *)experienceId;
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
- (UITraitCollection *)getTraitCollection;
</s> remove #import "EXScopedBridgeModule.h"
</s> add #import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import "EXScopedEventEmitter.h"
typedef NS_ENUM(NSInteger, EXOrientation) {
EXOrientationPortrait,
EXOrientationPortraitUp,
EXOrientationPortraitDown,
EXOrientationLandscape,
EXOrientationLandscapeLeft,
EXOrientationLandscapeRight,
EXOrientationUnknown
};
typedef NS_ENUM(NSInteger, EXOrientationLock) {
EXOrientationDefaultLock,
EXOrientationAllLock,
EXOrientationPortraitLock,
EXOrientationPortraitUpLock,
EXOrientationPortraitDownLock,
EXOrientationLandscapeLock,
EXOrientationLandscapeLeftLock,
EXOrientationLandscapeRightLock,
EXOrientationOtherLock,
EXOrientationAllButUpsideDownLock // deprecated
};
@interface RCTConvert (OrientationLock)
+ (EXOrientationLock)EXOrientationLock:(id)json;
@end
|
https://github.com/expo/expo/commit/3da4a97b939e552072110531fa4eb0febc146bdc
|
ios/Exponent/Versioned/Core/Api/EXScreenOrientation.h
|
keep keep keep add keep
|
<mask> @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
<mask>
<mask> - (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
<mask>
<mask> @end
</s> [sdk] screen orientation ios (#3104)
* [sdk] screen orientation ios
* [ios]
* [ios]
* [ios] pr feedback </s> remove @interface EXScreenOrientation : EXScopedBridgeModule
</s> add @interface EXScreenOrientation : EXScopedEventEmitter <RCTBridgeModule>
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection; </s> add - (UIInterfaceOrientationMask)supportedInterfaceOrientationsForVisibleApp;
- (void)removeOrientationChangeListener:(NSString *)experienceId;
- (void)addOrientationChangeListener:(NSString *)experienceId subscriberModule:(id)subscriberModule;
- (UITraitCollection *)getTraitCollection;
</s> add - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations forExperienceId:(NSString *)experienceId;
- (void)handleScreenOrientationChange:(nullable UITraitCollection *)traitCollection;
- (UITraitCollection *)getTraitCollection;
</s> remove - (void)setSupportInterfaceOrientations:(UIInterfaceOrientationMask)supportedInterfaceOrientations
forExperienceId:(NSString *)experienceId;
</s> add @property (nonatomic, strong) NSMapTable<NSString *, id> *subscribedModules; </s> remove #import "EXScopedBridgeModule.h"
</s> add #import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import "EXScopedEventEmitter.h"
typedef NS_ENUM(NSInteger, EXOrientation) {
EXOrientationPortrait,
EXOrientationPortraitUp,
EXOrientationPortraitDown,
EXOrientationLandscape,
EXOrientationLandscapeLeft,
EXOrientationLandscapeRight,
EXOrientationUnknown
};
typedef NS_ENUM(NSInteger, EXOrientationLock) {
EXOrientationDefaultLock,
EXOrientationAllLock,
EXOrientationPortraitLock,
EXOrientationPortraitUpLock,
EXOrientationPortraitDownLock,
EXOrientationLandscapeLock,
EXOrientationLandscapeLeftLock,
EXOrientationLandscapeRightLock,
EXOrientationOtherLock,
EXOrientationAllButUpsideDownLock // deprecated
};
@interface RCTConvert (OrientationLock)
+ (EXOrientationLock)EXOrientationLock:(id)json;
@end
|
https://github.com/expo/expo/commit/3da4a97b939e552072110531fa4eb0febc146bdc
|
ios/Exponent/Versioned/Core/Api/EXScreenOrientation.h
|
keep keep add keep keep keep keep
|
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> /**
<mask> * Entry point for handling SplashScreen associated mechanism.
<mask> * This class has state based on the following relation { ViewController -> ApplicationSplashScreenState }.
<mask> * Each method call has to be made using ViewController that holds Application's view hierachy.
</s> [splash-screen] fix splash screen doesn't show when reloading apps (#18229)
# Why
follow up with https://github.com/expo/expo/pull/17592#issuecomment-1141256478 and fix the issue where splash screen doesn't show when reloading apps.
fix #12000
# How
same approach as #17592 but introducing a generic `EXSplashScreenOptions` for the force show feature.
# Test Plan
test with the awesome repro example from #17592: https://github.com/ilyausorov/expo-splash-screen-updates-fix-demo
1. copy the patches to `node_modules/expo-splash-screen`
2. `EXPO_USE_SOURCE=1 pod install`
3. npx expo run:ios
also tested the splash screen functionalities from bare-expo and expo go </s> add options:(EXSplashScreenOptions)options </s> remove - (void)showSplashScreenFor:(UIViewController *)viewController;
</s> add - (void)showSplashScreenFor:(UIViewController *)viewController
options:(EXSplashScreenOptions)options; </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options
|
https://github.com/expo/expo/commit/3ef102f00043d4d26a7eac820e535e2c67afd837
|
packages/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenService.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> /**
<mask> * Overloaded method. See main method below.
<mask> */
<mask> - (void)showSplashScreenFor:(UIViewController *)viewController;
<mask>
<mask> /**
<mask> * Entry point for SplashScreen unimodule.
<mask> * Registers SplashScreen for given viewController and presents it in that viewController.
<mask> */
</s> [splash-screen] fix splash screen doesn't show when reloading apps (#18229)
# Why
follow up with https://github.com/expo/expo/pull/17592#issuecomment-1141256478 and fix the issue where splash screen doesn't show when reloading apps.
fix #12000
# How
same approach as #17592 but introducing a generic `EXSplashScreenOptions` for the force show feature.
# Test Plan
test with the awesome repro example from #17592: https://github.com/ilyausorov/expo-splash-screen-updates-fix-demo
1. copy the patches to `node_modules/expo-splash-screen`
2. `EXPO_USE_SOURCE=1 pod install`
3. npx expo run:ios
also tested the splash screen functionalities from bare-expo and expo go </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add typedef NS_OPTIONS(NSUInteger, EXSplashScreenOptions) {
EXSplashScreenDefault = 0,
// Show splash screen even it was already shown before.
// e.g. show splash screen again when reloading apps,
EXSplashScreenForceShow = 1 << 0,
};
|
https://github.com/expo/expo/commit/3ef102f00043d4d26a7eac820e535e2c67afd837
|
packages/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenService.h
|
keep keep keep add keep keep keep keep keep
|
<mask> * Entry point for SplashScreen unimodule.
<mask> * Registers SplashScreen for given viewController and presents it in that viewController.
<mask> */
<mask> - (void)showSplashScreenFor:(UIViewController *)viewController
<mask> splashScreenViewProvider:(id<EXSplashScreenViewProvider>)splashScreenViewProvider
<mask> successCallback:(void (^)(void))successCallback
<mask> failureCallback:(void (^)(NSString *message))failureCallback;
<mask>
<mask> /**
</s> [splash-screen] fix splash screen doesn't show when reloading apps (#18229)
# Why
follow up with https://github.com/expo/expo/pull/17592#issuecomment-1141256478 and fix the issue where splash screen doesn't show when reloading apps.
fix #12000
# How
same approach as #17592 but introducing a generic `EXSplashScreenOptions` for the force show feature.
# Test Plan
test with the awesome repro example from #17592: https://github.com/ilyausorov/expo-splash-screen-updates-fix-demo
1. copy the patches to `node_modules/expo-splash-screen`
2. `EXPO_USE_SOURCE=1 pod install`
3. npx expo run:ios
also tested the splash screen functionalities from bare-expo and expo go </s> add options:(EXSplashScreenOptions)options </s> remove - (void)showSplashScreenFor:(UIViewController *)viewController;
</s> add - (void)showSplashScreenFor:(UIViewController *)viewController
options:(EXSplashScreenOptions)options; </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add typedef NS_OPTIONS(NSUInteger, EXSplashScreenOptions) {
EXSplashScreenDefault = 0,
// Show splash screen even it was already shown before.
// e.g. show splash screen again when reloading apps,
EXSplashScreenForceShow = 1 << 0,
};
|
https://github.com/expo/expo/commit/3ef102f00043d4d26a7eac820e535e2c67afd837
|
packages/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenService.h
|
keep keep keep add keep keep keep keep
|
<mask> * Entry point for SplashScreen unimodule.
<mask> * Registers SplashScreen for given viewController and EXSplashController and presents it in that viewController.
<mask> */
<mask> -(void)showSplashScreenFor:(UIViewController *)viewController
<mask> splashScreenController:(EXSplashScreenViewController *)splashScreenController
<mask> successCallback:(void (^)(void))successCallback
<mask> failureCallback:(void (^)(NSString *message))failureCallback;
<mask>
</s> [splash-screen] fix splash screen doesn't show when reloading apps (#18229)
# Why
follow up with https://github.com/expo/expo/pull/17592#issuecomment-1141256478 and fix the issue where splash screen doesn't show when reloading apps.
fix #12000
# How
same approach as #17592 but introducing a generic `EXSplashScreenOptions` for the force show feature.
# Test Plan
test with the awesome repro example from #17592: https://github.com/ilyausorov/expo-splash-screen-updates-fix-demo
1. copy the patches to `node_modules/expo-splash-screen`
2. `EXPO_USE_SOURCE=1 pod install`
3. npx expo run:ios
also tested the splash screen functionalities from bare-expo and expo go </s> add options:(EXSplashScreenOptions)options </s> remove - (void)showSplashScreenFor:(UIViewController *)viewController;
</s> add - (void)showSplashScreenFor:(UIViewController *)viewController
options:(EXSplashScreenOptions)options; </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add typedef NS_OPTIONS(NSUInteger, EXSplashScreenOptions) {
EXSplashScreenDefault = 0,
// Show splash screen even it was already shown before.
// e.g. show splash screen again when reloading apps,
EXSplashScreenForceShow = 1 << 0,
};
|
https://github.com/expo/expo/commit/3ef102f00043d4d26a7eac820e535e2c67afd837
|
packages/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenService.h
|
keep add keep keep keep keep keep
|
<mask> */
<mask> - (void)hideSplashScreenFor:(UIViewController *)viewController
<mask> successCallback:(void (^)(BOOL hasEffect))successCallback
<mask> failureCallback:(void (^)(NSString *message))failureCallback;
<mask>
<mask> /**
<mask> * Prevents SplashScreen from default autohiding.
</s> [splash-screen] fix splash screen doesn't show when reloading apps (#18229)
# Why
follow up with https://github.com/expo/expo/pull/17592#issuecomment-1141256478 and fix the issue where splash screen doesn't show when reloading apps.
fix #12000
# How
same approach as #17592 but introducing a generic `EXSplashScreenOptions` for the force show feature.
# Test Plan
test with the awesome repro example from #17592: https://github.com/ilyausorov/expo-splash-screen-updates-fix-demo
1. copy the patches to `node_modules/expo-splash-screen`
2. `EXPO_USE_SOURCE=1 pod install`
3. npx expo run:ios
also tested the splash screen functionalities from bare-expo and expo go </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> remove - (void)showSplashScreenFor:(UIViewController *)viewController;
</s> add - (void)showSplashScreenFor:(UIViewController *)viewController
options:(EXSplashScreenOptions)options; </s> add typedef NS_OPTIONS(NSUInteger, EXSplashScreenOptions) {
EXSplashScreenDefault = 0,
// Show splash screen even it was already shown before.
// e.g. show splash screen again when reloading apps,
EXSplashScreenForceShow = 1 << 0,
};
|
https://github.com/expo/expo/commit/3ef102f00043d4d26a7eac820e535e2c67afd837
|
packages/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenService.h
|
keep add keep keep keep keep keep keep
|
<mask> */
<mask> - (void)preventSplashScreenAutoHideFor:(UIViewController *)viewController
<mask> successCallback:(void (^)(BOOL hasEffect))successCallback
<mask> failureCallback:(void (^)(NSString *message))failureCallback;
<mask>
<mask> /**
<mask> * Signaling method that has to be called upon Content is rendered in view hierarchy.
<mask> * Autohide functionality depends on this call.
</s> [splash-screen] fix splash screen doesn't show when reloading apps (#18229)
# Why
follow up with https://github.com/expo/expo/pull/17592#issuecomment-1141256478 and fix the issue where splash screen doesn't show when reloading apps.
fix #12000
# How
same approach as #17592 but introducing a generic `EXSplashScreenOptions` for the force show feature.
# Test Plan
test with the awesome repro example from #17592: https://github.com/ilyausorov/expo-splash-screen-updates-fix-demo
1. copy the patches to `node_modules/expo-splash-screen`
2. `EXPO_USE_SOURCE=1 pod install`
3. npx expo run:ios
also tested the splash screen functionalities from bare-expo and expo go </s> add options:(EXSplashScreenOptions)options </s> add typedef NS_OPTIONS(NSUInteger, EXSplashScreenOptions) {
EXSplashScreenDefault = 0,
// Show splash screen even it was already shown before.
// e.g. show splash screen again when reloading apps,
EXSplashScreenForceShow = 1 << 0,
};
</s> add options:(EXSplashScreenOptions)options </s> add options:(EXSplashScreenOptions)options </s> remove - (void)showSplashScreenFor:(UIViewController *)viewController;
</s> add - (void)showSplashScreenFor:(UIViewController *)viewController
options:(EXSplashScreenOptions)options;
|
https://github.com/expo/expo/commit/3ef102f00043d4d26a7eac820e535e2c67afd837
|
packages/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenService.h
|
keep add keep keep keep keep
|
<mask> fun getDebuggerHost(): String = getExpoGoConfigRootObject()!!.require("debuggerHost")
<mask> fun getMainModuleName(): String = getExpoGoConfigRootObject()!!.require("mainModuleName")
<mask>
<mask> fun isVerified(): Boolean = json.require("isVerified")
<mask>
<mask> abstract fun getAppKey(): String?
</s> [expo-manifests] dev client compatibility (#14460) </s> add fun getVersion(): String? {
val expoClientConfig = getExpoClientConfigRootObject() ?: return null
return expoClientConfig.getNullable("version")
}
</s> add # Swift/Objective-C compatibility
s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
</s> add - (nullable NSString *)version; </s> add - (nullable NSString *)version;
|
https://github.com/expo/expo/commit/3f81c6c2dfe9b9d63bf792f8ab039405dde0e888
|
packages/expo-manifests/android/src/main/java/expo/modules/manifests/core/Manifest.kt
|
keep keep keep add keep keep keep keep keep keep
|
<mask> val expoClientConfig = getExpoClientConfigRootObject() ?: return null
<mask> return expoClientConfig.getNullable("name")
<mask> }
<mask>
<mask> fun getUpdatesInfo(): JSONObject? {
<mask> val expoClientConfig = getExpoClientConfigRootObject() ?: return null
<mask> return expoClientConfig.getNullable("updates")
<mask> }
<mask>
<mask> abstract fun getSortTime(): String?
</s> [expo-manifests] dev client compatibility (#14460) </s> add fun getHostUri(): String? = getExpoGoConfigRootObject()?.getNullable("hostUri") </s> add # Swift/Objective-C compatibility
s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
</s> add - (nullable NSString *)version; </s> add - (nullable NSString *)version;
|
https://github.com/expo/expo/commit/3f81c6c2dfe9b9d63bf792f8ab039405dde0e888
|
packages/expo-manifests/android/src/main/java/expo/modules/manifests/core/Manifest.kt
|
keep keep keep add keep keep keep keep
|
<mask> 'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES',
<mask> 'GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS' => 'YES'
<mask> }
<mask>
<mask> if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
<mask> s.source_files = "#{s.name}/**/*.h"
<mask> s.vendored_frameworks = "#{s.name}.xcframework"
<mask> else
</s> [expo-manifests] dev client compatibility (#14460) </s> add fun getVersion(): String? {
val expoClientConfig = getExpoClientConfigRootObject() ?: return null
return expoClientConfig.getNullable("version")
}
</s> add fun getHostUri(): String? = getExpoGoConfigRootObject()?.getNullable("hostUri") </s> add - (nullable NSString *)version; </s> add - (nullable NSString *)version;
|
https://github.com/expo/expo/commit/3f81c6c2dfe9b9d63bf792f8ab039405dde0e888
|
packages/expo-manifests/ios/EXManifests.podspec
|
keep keep keep add keep keep keep keep
|
<mask> - (nullable NSString *)revisionId;
<mask> - (nullable NSString *)slug;
<mask> - (nullable NSString *)appKey;
<mask> - (nullable NSString *)name;
<mask> - (nullable NSDictionary *)notificationPreferences;
<mask> - (nullable NSDictionary *)updatesInfo;
<mask> - (nullable NSDictionary *)iosConfig;
<mask> - (nullable NSString *)hostUri;
</s> [expo-manifests] dev client compatibility (#14460) </s> add - (nullable NSString *)version; </s> add # Swift/Objective-C compatibility
s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
</s> add fun getVersion(): String? {
val expoClientConfig = getExpoClientConfigRootObject() ?: return null
return expoClientConfig.getNullable("version")
}
</s> add fun getHostUri(): String? = getExpoGoConfigRootObject()?.getNullable("hostUri")
|
https://github.com/expo/expo/commit/3f81c6c2dfe9b9d63bf792f8ab039405dde0e888
|
packages/expo-manifests/ios/EXManifests/EXManifestsBaseManifest.h
|
keep add keep keep keep keep keep
|
<mask> - (nullable NSString *)appKey;
<mask> - (nullable NSString *)name;
<mask> - (nullable NSDictionary *)notificationPreferences;
<mask> - (nullable NSDictionary *)updatesInfo;
<mask> - (nullable NSDictionary *)iosConfig;
<mask> - (nullable NSString *)hostUri;
<mask> - (nullable NSString *)orientation;
</s> [expo-manifests] dev client compatibility (#14460) </s> add - (nullable NSString *)version; </s> add # Swift/Objective-C compatibility
s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
</s> add fun getVersion(): String? {
val expoClientConfig = getExpoClientConfigRootObject() ?: return null
return expoClientConfig.getNullable("version")
}
</s> add fun getHostUri(): String? = getExpoGoConfigRootObject()?.getNullable("hostUri")
|
https://github.com/expo/expo/commit/3f81c6c2dfe9b9d63bf792f8ab039405dde0e888
|
packages/expo-manifests/ios/EXManifests/EXManifestsManifest.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> flex?: "0" | "1" | undefined;
<mask> shrink?: "0" | "1" | undefined;
<mask> grow?: "0" | "1" | undefined;
<mask> bg?: "secondary" | "default" | "none" | "error" | "warning" | "success" | "overlay" | undefined;
<mask> border?: "default" | "warning" | "hairline" | undefined;
<mask> } & {
<mask> selectors?: {
<mask> light?: (import("react-native").ViewStyle | import("react-native").TextStyle | import("react-native").ImageStyle) | undefined;
<mask> dark?: (import("react-native").ViewStyle | import("react-native").TextStyle | import("react-native").ImageStyle) | undefined;
<mask> } | undefined;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add import { Animated } from 'react-native'; </s> remove export type StackItemStatus = 'pushing' | 'popping' | 'settled';
export type ListenerFn<T> = ({
items,
}: {
action: IStackEvent;
key: string;
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
}) => void;
export type StackItem<T> = T & { key: string; status: StackItemStatus };
export type IReplaceOptions<T> = T & { replaceAmount?: number; key?: string };
export type IPushOptions<T> = T & { key?: string };
export interface IStack<T> {
push: (pushOptions: IPushOptions<T>) => Promise<string>;
pop: (amount?: number) => Promise<string[]>;
replace: (replaceOptions: IReplaceOptions<T>) => Promise<any>;
onPushEnd: (key: string) => void;
onPopEnd: (key: string) => void;
subscribe: (listener: ListenerFn<T>) => () => void;
getState: () => {
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
</s> add export type StackEvent<T = any> = {
state: StackState<T>;
event: {
action: StackAction;
key: string; </s> remove // utility function for capturing all push and pop stack events
// components can subscribe to internal state to push and pop their own views depending on use case
// e.g a modal stack, a screen stack, a toast stack, etc
</s> add export type StackAction = 'pushstart' | 'pushend' | 'popstart' | 'popend';
export type Status = 'pushing' | 'popping' | 'settled' | 'popped'; </s> remove }
</s> add }; </s> remove export type IStackEvent = 'pushstart' | 'pushend' | 'popstart' | 'popend' | 'replace';
</s> add export type StackItemComponent<T = any> = React.JSXElementConstructor<T>; </s> remove const generateRouteKey = () => `${new Date().getTime()}`;
</s> add const AValue = new Animated.Value(0);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/View.d.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> '1': { flexGrow: 1 },
<mask> '0': { flexGrow: 0 },
<mask> },
<mask> bg,
<mask> border,
<mask> ...rounded,
<mask> shadow: {
<mask> micro: shadows.micro,
<mask> tiny: shadows.tiny,
<mask> small: shadows.small,
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> remove "react-native-primitives": "^0.1.3",
</s> add "react-query": "^3.34.16", </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/View.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if (state.theme != null) {
<mask> if (selectors[state.theme] != null) {
<mask> const variants = selectors[state.theme];
<mask> const variantStyles = stylesForVariants(props, variants);
<mask> styles.push(variantStyles);
<mask> if (variants.base != null) {
<mask> styles.push(variants.base);
<mask> }
<mask> }
<mask> }
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove styles.push(variantStyles);
</s> add </s> add styles.push(variantStyles); </s> add styles.push(variantStyles); </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/create-primitive.js
|
keep keep add keep keep keep keep keep
|
<mask> if (variants.base != null) {
<mask> styles.push(variants.base);
<mask> }
<mask> }
<mask> }
<mask> return StyleSheet.flatten(styles);
<mask> }
<mask> function stylesForSelectorProps(selectors = {}, state = {}) {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add styles.push(variantStyles); </s> remove styles.push(variantStyles);
</s> add </s> remove styles.push(variantStyles);
</s> add </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/create-primitive.js
|
keep keep keep add keep keep keep keep keep keep
|
<mask> export * from './ExtensionsFilledIcon';
<mask> export * from './HomeFilledIcon';
<mask> export * from './InfoIcon';
<mask> export * from './InspectElementIcon';
<mask> export * from './PerformanceIcon';
<mask> export * from './QuestionMarkIcon';
<mask> export * from './RefreshIcon';
<mask> export * from './RunIcon';
<mask> export * from './SettingsFilledIcon';
<mask> export * from './ShakeDeviceIcon';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/icons/index.d.ts
|
keep add keep keep
|
<mask> export * from './UpdateIcon';
<mask> export * from './UserIcon';
<mask> export * from './XIcon';
<mask> //# sourceMappingURL=index.d.ts.map </s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/icons/index.d.ts
|
keep keep add keep keep keep keep keep keep
|
<mask> export * from './HomeFilledIcon';
<mask> export * from './InfoIcon';
<mask> export * from './InspectElementIcon';
<mask> export * from './PerformanceIcon';
<mask> export * from './QuestionMarkIcon';
<mask> export * from './RefreshIcon';
<mask> export * from './RunIcon';
<mask> export * from './SettingsFilledIcon';
<mask> export * from './ShakeDeviceIcon';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/icons/index.js
|
keep keep keep add keep keep
|
<mask> export * from './ThreeFingerPressIcon';
<mask> export * from './ToolbarOverlayIcon';
<mask> export * from './UpdateIcon';
<mask> export * from './UserIcon';
<mask> export * from './XIcon';
<mask> //# sourceMappingURL=index.js.map </s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/icons/index.js
|
keep keep add keep keep keep keep keep
|
<mask> borderColor: string;
<mask> borderWidth: number;
<mask> };
<mask> hairline: {
<mask> borderColor: string;
<mask> borderWidth: number;
<mask> };
<mask> };
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> add insets: {
top: number;
left: number;
bottom: number;
right: number;
}; </s> add appId?: string;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/theme.d.ts
|
keep add keep keep keep
|
<mask> default: { borderColor: darkTheme.border.default, borderWidth: 1 },
<mask> warning: { borderColor: darkTheme.border.warning, borderWidth: 1 },
<mask> hairline: { borderColor: darkTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
<mask> };
<mask> //# sourceMappingURL=theme.js.map </s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> add error: {
borderColor: string;
borderWidth: number;
}; </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove "react-native-primitives": "^0.1.3",
</s> add "react-query": "^3.34.16",
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/build/theme.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> },
<mask>
<mask> bg,
<mask>
<mask> border,
<mask>
<mask> ...rounded,
<mask>
<mask> shadow: {
<mask> micro: shadows.micro,
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> remove "react-native-primitives": "^0.1.3",
</s> add "react-query": "^3.34.16", </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/src/View.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if (state.theme != null) {
<mask> if (selectors[state.theme] != null) {
<mask> const variants = selectors[state.theme];
<mask> const variantStyles = stylesForVariants(props, variants);
<mask> styles.push(variantStyles);
<mask>
<mask> if (variants.base != null) {
<mask> styles.push(variants.base);
<mask> }
<mask> }
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove styles.push(variantStyles);
</s> add </s> add styles.push(variantStyles); </s> add styles.push(variantStyles); </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/src/create-primitive.tsx
|
keep keep keep add keep keep keep keep
|
<mask>
<mask> if (variants.base != null) {
<mask> styles.push(variants.base);
<mask> }
<mask> }
<mask> }
<mask>
<mask> return StyleSheet.flatten(styles);
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add styles.push(variantStyles); </s> remove styles.push(variantStyles);
</s> add </s> remove styles.push(variantStyles);
</s> add </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> add return item;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/src/create-primitive.tsx
|
keep keep add keep keep keep keep keep
|
<mask> export * from './HomeFilledIcon';
<mask> export * from './InfoIcon';
<mask> export * from './InspectElementIcon';
<mask> export * from './PerformanceIcon';
<mask> export * from './QuestionMarkIcon';
<mask> export * from './RefreshIcon';
<mask> export * from './RunIcon';
<mask> export * from './SettingsFilledIcon';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/src/icons/index.ts
|
keep keep add keep
|
<mask> export * from './ToolbarOverlayIcon';
<mask> export * from './UpdateIcon';
<mask> export * from './UserIcon';
<mask> export * from './XIcon';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add export * from './WarningIcon'; </s> add export * from './WarningIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add export * from './LoadingIndicatorIcon'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/src/icons/index.ts
|
keep add keep keep
|
<mask> default: { borderColor: darkTheme.border.default, borderWidth: 1 },
<mask> warning: { borderColor: darkTheme.border.warning, borderWidth: 1 },
<mask> hairline: { borderColor: darkTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
<mask> };
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add error: { borderColor: darkTheme.border.error, borderWidth: 1 }, </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> remove border,
</s> add opacity: {
'1': { opacity: 1 },
'0.5': { opacity: 0.5 },
'0.75': { opacity: 0.75 },
'0': { opacity: 0 },
},
absolute: {
top: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
},
bottom: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
all: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
border: {
default: { borderColor: lightTheme.border.default, borderWidth: 1 },
hairline: { borderColor: lightTheme.border.default, borderWidth: StyleSheet.hairlineWidth },
warning: { borderColor: lightTheme.border.warning, borderWidth: 1 },
error: { borderColor: lightTheme.border.error, borderWidth: 1 },
}, </s> add error: {
borderColor: string;
borderWidth: number;
}; </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove "react-native-primitives": "^0.1.3",
</s> add "react-query": "^3.34.16",
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-client-components/src/theme.ts
|
keep keep add keep keep keep keep keep keep
|
<mask> import expo.modules.devlauncher.launcher.DevLauncherControllerInterface
<mask> import expo.modules.devlauncher.launcher.DevLauncherIntentRegistryInterface
<mask> import expo.modules.devlauncher.launcher.errors.DevLauncherErrorRegistry
<mask> import kotlinx.coroutines.launch
<mask> import org.koin.core.component.inject
<mask>
<mask> private const val ON_NEW_DEEP_LINK_EVENT = "expo.modules.devlauncher.onnewdeeplink"
<mask> private const val CLIENT_PACKAGE_NAME = "host.exp.exponent"
<mask> private val CLIENT_HOME_QR_SCANNER_DEEP_LINK = Uri.parse("expo-home://qr-scanner")
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add import { useBuildInfo } from '../providers/BuildInfoProvider'; </s> remove import { SafeAreaView } from 'react-native';
</s> add import { ScrollView } from 'react-native-gesture-handler'; </s> remove import { createAsyncStack, StackItem, useStackItems } from '../functions/createAsyncStack';
export type ModalProps = {
element: React.ReactElement<any>;
</s> add import {
createAsyncStack,
StackItem,
StackItemComponent,
useStackItems,
} from '../functions/createAsyncStack';
type ModalStackContextProps = {
push: (element: StackItemComponent) => StackItem;
pop: (amount?: number) => StackItem[]; </s> remove export function ExtensionsScreen() {
const extensions = [];
const palette = useExpoPalette();
</s> add import { ActivityIndicator } from '../components/ActivityIndicator';
import { AppHeader } from '../components/AppHeader';
import { EASBranchRow } from '../components/EASUpdatesRows';
import { EmptyBranchesMessage } from '../components/EmptyBranchesMessage';
import { useUser, useUserActions } from '../providers/UserContextProvider';
import { useUpdatesConfig } from '../providers/UpdatesConfigProvider';
import { useBranchesForApp } from '../queries/useBranchesForApp';
import { ExtensionsStackParamList } from './ExtensionsStack'; </s> remove import { ExtensionsScreen } from './screens/ExtensionsScreen';
</s> add import { ExtensionsStack } from './screens/ExtensionsStack'; </s> add // TODO - the logic related to getting the appId could be moved into the expo-updates package and used inside the dev launcher JS
var updatesUrl = getMetadataValue("expo.modules.updates.EXPO_UPDATE_URL")
var appId = ""
if (updatesUrl.isNotEmpty()) {
var uri = Uri.parse(updatesUrl)
appId = uri.lastPathSegment ?: ""
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/android/src/debug/java/expo/modules/devlauncher/modules/DevLauncherInternalModule.kt
|
keep keep keep add keep keep keep keep
|
<mask> val runtimeVersion = getMetadataValue("expo.modules.updates.EXPO_RUNTIME_VERSION")
<mask> val sdkVersion = getMetadataValue("expo.modules.updates.EXPO_SDK_VERSION")
<mask> var appIcon = getApplicationIconUri()
<mask>
<mask> map.apply {
<mask> putString("appVersion", packageInfo.versionName)
<mask> putString("appId", appId)
<mask> putString("appName", appName)
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add putString("appId", appId) </s> add import expo.modules.devmenu.DevMenuAppInfo </s> remove const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo;
</s> add </s> add import { useBuildInfo } from '../providers/BuildInfoProvider'; </s> remove type AppHeaderProps = {
title?: string;
subtitle?: string;
appImageUri?: string;
onUserProfilePress: () => void;
};
</s> add export function AppHeader({ navigation }) {
const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo; </s> remove lookup[key] = {
...pushOptions,
</s> add const promise = new Promise<StackItem<T>>((resolve) => {
pushResolvers[key] = resolve;
});
const item: StackItem<T> = {
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/android/src/debug/java/expo/modules/devlauncher/modules/DevLauncherInternalModule.kt
|
keep keep keep add keep keep keep keep keep
|
<mask> }
<mask>
<mask> map.apply {
<mask> putString("appVersion", packageInfo.versionName)
<mask> putString("appName", appName)
<mask> putString("appIcon", appIcon)
<mask> putString("runtimeVersion", runtimeVersion)
<mask> putString("sdkVersion", sdkVersion)
<mask> }
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add // TODO - the logic related to getting the appId could be moved into the expo-updates package and used inside the dev launcher JS
var updatesUrl = getMetadataValue("expo.modules.updates.EXPO_UPDATE_URL")
var appId = ""
if (updatesUrl.isNotEmpty()) {
var uri = Uri.parse(updatesUrl)
appId = uri.lastPathSegment ?: ""
}
</s> remove import { useBuildInfo } from '../providers/BuildInfoProvider';
</s> add </s> add import { QueryProvider } from './QueryProvider'; </s> remove import { ModalProvider } from './ModalStackProvider';
</s> add import { ModalStackProvider } from './ModalStackProvider'; </s> remove import { ExtensionsScreen } from './screens/ExtensionsScreen';
</s> add import { ExtensionsStack } from './screens/ExtensionsStack'; </s> add import { prefetchBranchesForApp } from '../queries/useBranchesForApp';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/android/src/debug/java/expo/modules/devlauncher/modules/DevLauncherInternalModule.kt
|
keep keep add keep keep keep keep keep
|
<mask> module.exports = function (api) {
<mask> api.cache(true);
<mask>
<mask> const gestureHandler = tryResolveModule(
<mask> 'expo-dev-menu/vendored/react-native-gesture-handler/src/index.js'
<mask> );
<mask> const safeAreaContext = tryResolveModule(
<mask> 'expo-dev-menu/vendored/react-native-safe-area-context/src/index.tsx'
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove function ModalStackContainer() {
const modalStack = useModalStack();
</s> add export function ModalStackProvider({ children, modalStack = defaultModalStack }) { </s> remove const ModalContext = React.createContext(createAsyncStack<ModalProps>());
export const useModalStack = () => React.useContext(ModalContext);
export function ModalProvider({ children }) {
const modalStack = React.useRef(createAsyncStack<ModalProps>());
return (
<ModalContext.Provider value={modalStack.current}>
{children}
<ModalStackContainer />
</ModalContext.Provider>
);
}
</s> add const ModalStackContext = React.createContext<ModalStackContextProps | null>(null);
export const useModalStack = () => React.useContext(ModalStackContext);
const defaultModalStack = createAsyncStack(); </s> remove initialUserData?.accounts[0].id ?? ''
</s> add initialUserData?.accounts[0]?.id ?? '' </s> add if (isAuthenticated && updatesConfig.usesEASUpdates) {
prefetchBranchesForApp(updatesConfig.appId, updatesConfig.runtimeVersion).catch((error) =>
console.log({ error })
);
}
</s> remove const pushResolvers: Record<string, Function> = {};
</s> add const pushResolvers: Record<string, any> = {}; </s> remove const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo;
</s> add
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/babel.config.js
|
keep keep keep add keep keep keep keep
|
<mask> import {
<mask> ExtensionsFilledIcon,
<mask> HomeFilledIcon,
<mask> SettingsFilledIcon,
<mask> } from 'expo-dev-client-components';
<mask> import * as React from 'react';
<mask>
<mask> import { LoadInitialData } from './components/LoadInitialData';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add scale,
Divider,
Heading, </s> remove import { useSafeAreaInsets } from 'react-native-safe-area-context';
</s> add </s> remove Divider,
BranchIcon,
UpdateIcon,
</s> add </s> remove import { SafeAreaView } from 'react-native';
</s> add import { ScrollView } from 'react-native-gesture-handler'; </s> add import { apiClient } from './apiClient'; </s> remove import { ExtensionsScreen } from './screens/ExtensionsScreen';
</s> add import { ExtensionsStack } from './screens/ExtensionsStack';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/App.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> import { LoadInitialData } from './components/LoadInitialData';
<mask> import { Splash } from './components/Splash';
<mask> import { AppProviders } from './providers/AppProviders';
<mask> import { CrashReportScreen } from './screens/CrashReportScreen';
<mask> import { ExtensionsScreen } from './screens/ExtensionsScreen';
<mask> import { HomeScreen } from './screens/HomeScreen';
<mask> import { SettingsScreen } from './screens/SettingsScreen';
<mask> import { UserProfileScreen } from './screens/UserProfileScreen';
<mask>
<mask> const Tab = createBottomTabNavigator();
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove import { useBuildInfo } from '../providers/BuildInfoProvider';
</s> add </s> add View, </s> add import { QueryProvider } from './QueryProvider'; </s> remove import { ModalProvider } from './ModalStackProvider';
</s> add import { ModalStackProvider } from './ModalStackProvider'; </s> remove export function ExtensionsScreen() {
const extensions = [];
const palette = useExpoPalette();
</s> add import { ActivityIndicator } from '../components/ActivityIndicator';
import { AppHeader } from '../components/AppHeader';
import { EASBranchRow } from '../components/EASUpdatesRows';
import { EmptyBranchesMessage } from '../components/EmptyBranchesMessage';
import { useUser, useUserActions } from '../providers/UserContextProvider';
import { useUpdatesConfig } from '../providers/UpdatesConfigProvider';
import { useBranchesForApp } from '../queries/useBranchesForApp';
import { ExtensionsStackParamList } from './ExtensionsStack'; </s> add import { prefetchBranchesForApp } from '../queries/useBranchesForApp';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/App.tsx
|
keep add keep keep keep keep keep keep
|
<mask> type LauncherAppProps = {
<mask> isSimulator?: boolean;
<mask> };
<mask>
<mask> export function App(props: LauncherAppProps) {
<mask> return (
<mask> <LoadInitialData loader={<Splash />}>
<mask> <AppProviders>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add {/* TODO -- remove this when safe area context provider is vendored */}
<View style={{ height: props.insets?.top || 10 }} bg="default" /> </s> add isAuthenticated: boolean; </s> add export type EXUpdatesConfig = {
runtimeVersion: string;
sdkVersion: string;
appId: string;
usesEASUpdates: boolean;
};
export const updatesConfig: EXUpdatesConfig = DevLauncher.updatesConfig; </s> remove const ModalContext = React.createContext(createAsyncStack<ModalProps>());
export const useModalStack = () => React.useContext(ModalContext);
export function ModalProvider({ children }) {
const modalStack = React.useRef(createAsyncStack<ModalProps>());
return (
<ModalContext.Provider value={modalStack.current}>
{children}
<ModalStackContainer />
</ModalContext.Provider>
);
}
</s> add const ModalStackContext = React.createContext<ModalStackContextProps | null>(null);
export const useModalStack = () => React.useContext(ModalStackContext);
const defaultModalStack = createAsyncStack(); </s> add import { resetBranchQueries } from '../queries/useBranchesForApp'; </s> remove type AppHeaderProps = {
title?: string;
subtitle?: string;
appImageUri?: string;
onUserProfilePress: () => void;
};
</s> add export function AppHeader({ navigation }) {
const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/App.tsx
|
keep add keep keep keep keep
|
<mask> <LoadInitialData loader={<Splash />}>
<mask> <AppProviders>
<mask> <Stack.Navigator initialRouteName="Main" mode="modal">
<mask> <Stack.Screen name="Main" component={Main} options={{ header: () => null }} />
<mask>
<mask> <Stack.Screen
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add insets: {
top: number;
left: number;
bottom: number;
right: number;
}; </s> remove component={ExtensionsScreen}
</s> add component={ExtensionsStack} </s> remove modalStack.push({
element: (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={() => {
actions.logout();
modalStack.pop();
}}
/>
),
});
</s> add modalStack.push(() => (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={async () => {
await actions.logout();
modalStack.pop();
}}
/>
)); </s> remove <Image size="xl" rounded="large" source={{ uri: appImageUri }} />
</s> add <Image size="xl" rounded="large" source={{ uri: appIcon }} /> </s> remove <Button.ScaleOnPressContainer bg="default" rounded="none">
<View bg="default" py="small" px="small">
<Row>
<Row
style={{ backgroundColor: palette.blue['100'] }}
rounded="medium"
py="tiny"
px="1.5"
align="center">
<BranchIcon
style={{ maxHeight: 10, maxWidth: 12, resizeMode: 'contain' }}
resizeMethod="scale"
/>
<Spacer.Horizontal size="tiny" />
<Text size="small">Branch: staging</Text>
</Row>
<Spacer.Horizontal />
<ChevronRightIcon />
</Row>
</s> add <Spacer.Vertical size="small" /> </s> remove <Button.ScaleOnPressContainer bg="default" rounded="none" roundedTop="medium">
<View bg="default" roundedTop="large" py="small" px="small">
<Row>
<Row
style={{ backgroundColor: palette.blue['100'] }}
py="tiny"
px="1.5"
rounded="medium"
align="center">
<BranchIcon
style={{ maxHeight: 10, maxWidth: 12, resizeMode: 'contain' }}
resizeMethod="scale"
/>
<Spacer.Horizontal size="tiny" />
<Text size="small">Branch: main</Text>
</Row>
<Spacer.Horizontal />
</s> add function onSignupPress() {
actions.login('signup');
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/App.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> />
<mask> {__DEV__ && (
<mask> <Tab.Screen
<mask> name="Extensions"
<mask> component={ExtensionsScreen}
<mask> options={{
<mask> header: () => null,
<mask> tabBarIcon: ({ focused }) => <ExtensionsFilledIcon focused={focused} />,
<mask> }}
<mask> />
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add {/* TODO -- remove this when safe area context provider is vendored */}
<View style={{ height: props.insets?.top || 10 }} bg="default" /> </s> remove {Boolean(appImageUri) && (
</s> add {Boolean(appIcon) && ( </s> remove <Image size="xl" rounded="large" source={{ uri: appImageUri }} />
</s> add <Image size="xl" rounded="large" source={{ uri: appIcon }} /> </s> remove modalStack.push({
element: (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={() => {
actions.logout();
modalStack.pop();
}}
/>
),
});
</s> add modalStack.push(() => (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={async () => {
await actions.logout();
modalStack.pop();
}}
/>
)); </s> remove <View>
<View style={{ height: insets.top }} />
</s> add <View bg="default"> </s> remove <Animated.View
style={[StyleSheet.absoluteFillObject, { backgroundColor }]}
pointerEvents={hasModal ? 'auto' : 'none'}>
<Pressable
onPress={() => {
modalStack.pop();
}}
style={[StyleSheet.absoluteFillObject]}>
{modals.map((item) => (
<ModalScreen
key={item.key}
{...item}
onClose={() => modalStack.pop()}
onPopEnd={() => modalStack.onPopEnd(item.key)}
onPushEnd={() => modalStack.onPushEnd(item.key)}
/>
))}
</Pressable>
</Animated.View>
</s> add <ModalStackContext.Provider value={{ push, pop }}>
{children}
<Animated.View
style={[StyleSheet.absoluteFillObject, { backgroundColor }]}
pointerEvents={hasModal ? 'box-none' : 'none'}>
<Pressable
onPress={() => {
modalStack.pop();
}}
style={[StyleSheet.absoluteFillObject]}>
{modals.map((item) => (
<ModalScreen
key={item.key}
{...item}
onClose={item.pop}
onPopEnd={item.onPopEnd}
onPushEnd={item.onPushEnd}
/>
))}
</Pressable>
</Animated.View>
</ModalStackContext.Provider>
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/App.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> View,
<mask> UserIcon,
<mask> } from 'expo-dev-client-components';
<mask> import * as React from 'react';
<mask> import { useSafeAreaInsets } from 'react-native-safe-area-context';
<mask>
<mask> import { useUser } from '../providers/UserContextProvider';
<mask>
<mask> type AppHeaderProps = {
<mask> title?: string;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add View, </s> remove type AppHeaderProps = {
title?: string;
subtitle?: string;
appImageUri?: string;
onUserProfilePress: () => void;
};
</s> add export function AppHeader({ navigation }) {
const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo; </s> add import { useBuildInfo } from '../providers/BuildInfoProvider'; </s> remove import { useModalStack } from '../providers/ModalStackProvider';
</s> add </s> add scale,
Divider,
Heading, </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep add keep keep keep keep keep
|
<mask> import * as React from 'react';
<mask>
<mask> import { useUser } from '../providers/UserContextProvider';
<mask>
<mask> export function AppHeader({ navigation }) {
<mask> const buildInfo = useBuildInfo();
<mask> const { appName, appIcon } = buildInfo;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove type AppHeaderProps = {
title?: string;
subtitle?: string;
appImageUri?: string;
onUserProfilePress: () => void;
};
</s> add export function AppHeader({ navigation }) {
const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo; </s> remove import { useSafeAreaInsets } from 'react-native-safe-area-context';
</s> add </s> remove import { SafeAreaView } from 'react-native';
</s> add import { ScrollView } from 'react-native-gesture-handler'; </s> remove const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo;
</s> add </s> remove export function ExtensionsScreen() {
const extensions = [];
const palette = useExpoPalette();
</s> add import { ActivityIndicator } from '../components/ActivityIndicator';
import { AppHeader } from '../components/AppHeader';
import { EASBranchRow } from '../components/EASUpdatesRows';
import { EmptyBranchesMessage } from '../components/EmptyBranchesMessage';
import { useUser, useUserActions } from '../providers/UserContextProvider';
import { useUpdatesConfig } from '../providers/UpdatesConfigProvider';
import { useBranchesForApp } from '../queries/useBranchesForApp';
import { ExtensionsStackParamList } from './ExtensionsStack'; </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep replace replace replace replace replace replace keep replace replace keep keep keep
|
<mask>
<mask> type AppHeaderProps = {
<mask> title?: string;
<mask> subtitle?: string;
<mask> appImageUri?: string;
<mask> onUserProfilePress: () => void;
<mask> };
<mask>
<mask> export function AppHeader({ title, subtitle, appImageUri, onUserProfilePress }: AppHeaderProps) {
<mask> const insets = useSafeAreaInsets();
<mask> const { userData, selectedAccount } = useUser();
<mask>
<mask> const isAuthenticated = userData != null;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
</s> add export type EXUpdatesConfig = {
runtimeVersion: string;
sdkVersion: string;
appId: string;
usesEASUpdates: boolean;
};
export const updatesConfig: EXUpdatesConfig = DevLauncher.updatesConfig; </s> remove export function createAsyncStack<T>(): IStack<T> {
</s> add export type StackItem<T = any> = {
key: string;
status: Status;
promise: Promise<StackItem<T>>;
pop: () => void;
onPushEnd: () => void;
onPopEnd: () => void;
data: T;
animatedValue: typeof AValue;
};
export type StackState<T = any> = {
items: StackItem<T>[];
lookup: Record<string, StackItem<T>>;
getItemByKey: (key: string) => StackItem<T> | null;
};
export type Stack<T> = {
push: (data?: T | undefined) => StackItem<T>;
pop: (amount?: number, startIndex?: number) => StackItem<any>[];
subscribe: (listener: (state: StackEvent<T>) => void) => () => void;
getState: () => StackState;
};
export function createAsyncStack<T = any>() { </s> remove import { useSafeAreaInsets } from 'react-native-safe-area-context';
</s> add </s> remove export type StackItemStatus = 'pushing' | 'popping' | 'settled';
export type ListenerFn<T> = ({
items,
}: {
action: IStackEvent;
key: string;
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
}) => void;
export type StackItem<T> = T & { key: string; status: StackItemStatus };
export type IReplaceOptions<T> = T & { replaceAmount?: number; key?: string };
export type IPushOptions<T> = T & { key?: string };
export interface IStack<T> {
push: (pushOptions: IPushOptions<T>) => Promise<string>;
pop: (amount?: number) => Promise<string[]>;
replace: (replaceOptions: IReplaceOptions<T>) => Promise<any>;
onPushEnd: (key: string) => void;
onPopEnd: (key: string) => void;
subscribe: (listener: ListenerFn<T>) => () => void;
getState: () => {
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
</s> add export type StackEvent<T = any> = {
state: StackState<T>;
event: {
action: StackAction;
key: string;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep add keep keep keep keep keep keep
|
<mask> const { userData, selectedAccount } = useUser();
<mask>
<mask> const isAuthenticated = userData != null;
<mask> const selectedUserImage = selectedAccount?.owner?.profilePhoto;
<mask>
<mask> return (
<mask> <View bg="default">
<mask> <Row align="center" pb="small">
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove <View>
<View style={{ height: insets.top }} />
</s> add <View bg="default"> </s> remove export function AppHeader({ title, subtitle, appImageUri, onUserProfilePress }: AppHeaderProps) {
const insets = useSafeAreaInsets();
</s> add </s> remove <Context.Provider value={{ userData, selectedAccount }}>{children}</Context.Provider>
</s> add <Context.Provider value={{ userData, selectedAccount, isAuthenticated: userData != null }}>
{children}
</Context.Provider> </s> remove type AppHeaderProps = {
title?: string;
subtitle?: string;
appImageUri?: string;
onUserProfilePress: () => void;
};
</s> add export function AppHeader({ navigation }) {
const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo; </s> remove <Spacer.Vertical size="small" />
</s> add export function ExtensionsScreen({ navigation }: ExtensionsScreenProps) {
const { isAuthenticated } = useUser();
const actions = useUserActions(); </s> remove return clearSession();
</s> add const result = await clearSession();
await resetBranchQueries();
return result;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep keep keep replace replace replace keep keep keep keep replace keep keep keep
|
<mask> const selectedUserImage = selectedAccount?.owner?.profilePhoto;
<mask>
<mask> return (
<mask> <View>
<mask> <View style={{ height: insets.top }} />
<mask>
<mask> <Row align="center" pb="small">
<mask> <Spacer.Horizontal size="medium" />
<mask> <View flex="1" shrink="1">
<mask> <Row align="center">
<mask> {Boolean(appImageUri) && (
<mask> <>
<mask> <Image size="xl" rounded="large" source={{ uri: appImageUri }} />
<mask> <Spacer.Horizontal size="small" />
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove <Image size="xl" rounded="large" source={{ uri: appImageUri }} />
</s> add <Image size="xl" rounded="large" source={{ uri: appIcon }} /> </s> remove <Button.ScaleOnPressContainer bg="default" rounded="none">
<View bg="default" py="small" px="small">
<Row>
<Row
style={{ backgroundColor: palette.blue['100'] }}
rounded="medium"
py="tiny"
px="1.5"
align="center">
<BranchIcon
style={{ maxHeight: 10, maxWidth: 12, resizeMode: 'contain' }}
resizeMethod="scale"
/>
<Spacer.Horizontal size="tiny" />
<Text size="small">Branch: staging</Text>
</Row>
<Spacer.Horizontal />
<ChevronRightIcon />
</Row>
</s> add <Spacer.Vertical size="small" /> </s> remove <Button.ScaleOnPressContainer bg="default" rounded="none" roundedTop="medium">
<View bg="default" roundedTop="large" py="small" px="small">
<Row>
<Row
style={{ backgroundColor: palette.blue['100'] }}
py="tiny"
px="1.5"
rounded="medium"
align="center">
<BranchIcon
style={{ maxHeight: 10, maxWidth: 12, resizeMode: 'contain' }}
resizeMethod="scale"
/>
<Spacer.Horizontal size="tiny" />
<Text size="small">Branch: main</Text>
</Row>
<Spacer.Horizontal />
</s> add function onSignupPress() {
actions.login('signup');
} </s> remove <Divider />
</s> add return (
<View>
<AppHeader navigation={navigation} />
<ScrollView contentContainerStyle={{ paddingBottom: scale['48'] }}>
<View flex="1">
{compatibleExtensions.length === 0 && (
<>
<Spacer.Vertical size="medium" />
<View bg="default" mx="medium" py="medium" px="medium" rounded="medium">
<View align="centered">
<ExtensionsIcon />
</View>
<Spacer.Vertical size="medium" />
<View px="small">
<Text size="small" align="center">
Extensions allow you to customize your development build with additional
capabilities.
</Text>
</View> </s> add const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> <View flex="1" shrink="1">
<mask> <Row align="center">
<mask> {Boolean(appImageUri) && (
<mask> <>
<mask> <Image size="xl" rounded="large" source={{ uri: appImageUri }} />
<mask> <Spacer.Horizontal size="small" />
<mask> </>
<mask> )}
<mask>
<mask> <View flex="1">
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove {Boolean(appImageUri) && (
</s> add {Boolean(appIcon) && ( </s> remove <View>
<View style={{ height: insets.top }} />
</s> add <View bg="default"> </s> remove </View>
</Button.ScaleOnPressContainer>
</s> add </>
)}
{usesEASUpdates && isAuthenticated && (
<>
<Spacer.Vertical size="medium" />
<EASUpdatesPreview navigation={navigation} />
<Spacer.Vertical size="medium" />
</>
)}
{usesEASUpdates && !isAuthenticated && (
<>
<Spacer.Vertical size="medium" />
<View mx="medium" padding="medium" bg="default" rounded="large">
<Text color="secondary" size="small">
Log in or create an account to get started with Extensions
</Text>
<Spacer.Vertical size="large" />
<View>
<Button.ScaleOnPressContainer
bg="tertiary"
rounded="medium"
onPress={onLoginPress}
accessibilityLabel="Log in">
<View py="small">
<Button.Text color="tertiary" weight="semibold" align="center">
Log In
</Button.Text>
</View>
</Button.ScaleOnPressContainer>
<Spacer.Vertical size="small" />
<Button.ScaleOnPressContainer
bg="secondary"
rounded="medium"
onPress={onSignupPress}
accessibilityLabel="Sign Up">
<View py="small">
<Button.Text color="secondary" weight="semibold" align="center">
Sign Up
</Button.Text>
</View>
</Button.ScaleOnPressContainer>
</View>
</View>
<Spacer.Vertical size="medium" />
</>
)}
{compatibleExtensions.length > 0 && (
<>
<Spacer.Vertical size="medium" />
<View px="xl">
<Text size="small" color="secondary">
Extensions allow you to customize your development build with additional
capabilities.{' '}
<Text size="small" color="secondary">
Learn more.
</Text>
</Text>
</View>
</>
)}
</View>
</ScrollView>
</View>
);
}
function EASUpdatesPreview({ navigation }: ExtensionsScreenProps) {
const { appId } = useUpdatesConfig();
const { isLoading, data: branches, incompatibleBranches } = useBranchesForApp(appId); </s> remove <Divider />
</s> add return (
<View>
<AppHeader navigation={navigation} />
<ScrollView contentContainerStyle={{ paddingBottom: scale['48'] }}>
<View flex="1">
{compatibleExtensions.length === 0 && (
<>
<Spacer.Vertical size="medium" />
<View bg="default" mx="medium" py="medium" px="medium" rounded="medium">
<View align="centered">
<ExtensionsIcon />
</View>
<Spacer.Vertical size="medium" />
<View px="small">
<Text size="small" align="center">
Extensions allow you to customize your development build with additional
capabilities.
</Text>
</View> </s> remove <Button.ScaleOnPressContainer bg="default" rounded="none">
<View bg="default" py="small" px="small">
<Row>
<Row
style={{ backgroundColor: palette.blue['100'] }}
rounded="medium"
py="tiny"
px="1.5"
align="center">
<BranchIcon
style={{ maxHeight: 10, maxWidth: 12, resizeMode: 'contain' }}
resizeMethod="scale"
/>
<Spacer.Horizontal size="tiny" />
<Text size="small">Branch: staging</Text>
</Row>
<Spacer.Horizontal />
<ChevronRightIcon />
</Row>
</s> add <Spacer.Vertical size="small" /> </s> remove <Button.ScaleOnPressContainer bg="default" rounded="none" roundedTop="medium">
<View bg="default" roundedTop="large" py="small" px="small">
<Row>
<Row
style={{ backgroundColor: palette.blue['100'] }}
py="tiny"
px="1.5"
rounded="medium"
align="center">
<BranchIcon
style={{ maxHeight: 10, maxWidth: 12, resizeMode: 'contain' }}
resizeMethod="scale"
/>
<Spacer.Horizontal size="tiny" />
<Text size="small">Branch: main</Text>
</Row>
<Spacer.Horizontal />
</s> add function onSignupPress() {
actions.login('signup');
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep keep keep replace keep keep replace keep
|
<mask>
<mask> <View flex="1">
<mask> <Heading weight="semibold" numberOfLines={1}>
<mask> {title}
<mask> </Heading>
<mask> <Text size="small" color="secondary">
<mask> {subtitle}
<mask> </Text>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove <Spacer.Vertical size="small" />
<View>
<Row>
<View>
<Spacer.Vertical size="tiny" />
<UpdateIcon />
</View>
<Spacer.Horizontal size="small" />
<View flex="1" shrink="1">
<Heading size="small" numberOfLines={1}>
Update "Adds header on screen 123132"
</Heading>
<Spacer.Vertical size="tiny" />
<Text size="small" color="secondary">
Published May 16, 2021, 3:15PM
</Text>
</View>
</Row>
</s> add <View align="centered">
<Button.ScaleOnPressContainer bg="ghost" rounded="small">
<View border="default" px="small" py="2" rounded="small">
<Button.Text color="ghost" weight="semibold" size="small">
Learn More
</Button.Text>
</View>
</Button.ScaleOnPressContainer>
</View> </s> remove <Spacer.Vertical size="small" />
<View>
<Row>
<View>
<Spacer.Vertical size="tiny" />
<UpdateIcon />
</View>
<Spacer.Horizontal size="small" />
<View flex="1" shrink="1">
<Heading size="small" numberOfLines={1}>
Update "Fixes typo"
</Heading>
<Spacer.Vertical size="tiny" />
<Text size="small" color="secondary">
Published May 16, 2021, 3:15PM
</Text>
</View>
</Row>
</View>
</View>
</Button.ScaleOnPressContainer>
</s> add if (usesEASUpdates) {
compatibleExtensions.push('EASUpdates');
} </s> remove </View>
<Spacer.Vertical size="medium" />
<View px="xl">
<Text size="small" color="secondary">
Extensions allow you to customize your development app with additional capabilities.{' '}
<Text size="small" color="secondary">
Learn more.
</Text>
</Text>
</View>
</s> add )} </s> remove <View mx="medium">
<View py="small" px="small">
<Heading size="small" color="secondary">
EAS Update
</Heading>
</View>
</s> add function onLoginPress() {
actions.login('login');
} </s> remove <View align="centered">
<Button.ScaleOnPressContainer bg="ghost" rounded="small">
<View border="default" px="small" py="2" rounded="small">
<Button.Text color="ghost" weight="semibold" size="small">
Learn More
</Button.Text>
</View>
</Button.ScaleOnPressContainer>
</View>
</View>
)}
</s> add const { usesEASUpdates } = useUpdatesConfig();
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/AppHeader.tsx
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> const isFetching = isFetchingDevSessions || isFetchingApps;
<mask>
<mask> const onPackagerPress = ({ url }: { url: string }) => {
<mask> loadApp(url).catch((error) => {
<mask> modalStack.push({
<mask> element: <LoadAppErrorModal message={error.message} />,
<mask> });
<mask> });
<mask> };
<mask>
<mask> if (isFetching) {
<mask> return <ActivityIndicator />;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove modalStack.push({
element: <LoadAppErrorModal message={error.message} />,
});
</s> add modalStack.push(() => <LoadAppErrorModal message={error.message} />); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />); </s> remove modalStack.push({ element: <DevServerExplainerModal /> });
</s> add modalStack.push(() => <DevServerExplainerModal />); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />); </s> remove const unsubscribe = stack.subscribe(({ items }) => {
setItems(items);
</s> add const unsubscribe = stack.subscribe(({ state }) => {
setItems(state.items); </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/DeepLinkModal.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> description: 'fakeDevSessionDescription',
<mask> source: 'test',
<mask> };
<mask>
<mask> describe('<DeepLinkPrompt />', () => {
<mask> afterEach(() => {
<mask> mockGetPendingDeepLink.mockClear();
<mask> mockAddDeepLinkListener.mockClear();
<mask> mockLoadApp.mockClear();
<mask> });
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
</s> add </s> remove modalStack.push({ element: <DevServerExplainerModal /> });
</s> add modalStack.push(() => <DevServerExplainerModal />); </s> remove modalStack.push({
element: (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={() => {
actions.logout();
modalStack.pop();
}}
/>
),
});
</s> add modalStack.push(() => (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={async () => {
await actions.logout();
modalStack.pop();
}}
/>
)); </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove const unsubscribe = stack.subscribe(({ items }) => {
setItems(items);
</s> add const unsubscribe = stack.subscribe(({ state }) => {
setItems(state.items);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/__tests__/DeepLinkModal.test.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> test('shows dev sessions in modal', async () => {
<mask> const fakeDeepLink = 'testing-testing-123';
<mask> mockGetPendingDeepLink.mockResolvedValueOnce(fakeDeepLink);
<mask>
<mask> const { getByText, queryByText } = render(null, {
<mask> initialAppProviderProps: { initialDevSessions: [fakeLocalDevSession] },
<mask> });
<mask>
<mask> expect(queryByText(fakeLocalDevSession.description)).toBe(null);
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const { getByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove await waitFor(() => getByText(/deep link received/i));
getByText(fakeLocalDevSession.description);
</s> add await waitFor(() => queryByText(/deep link received/i));
expect(queryAllByText(fakeLocalDevSession.description)).not.toBe(null); </s> remove const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
</s> add </s> remove modalStack.push({
element: <LoadAppErrorModal message={error.message} />,
});
</s> add modalStack.push(() => <LoadAppErrorModal message={error.message} />); </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/__tests__/DeepLinkModal.test.tsx
|
keep keep keep replace replace keep keep keep keep replace keep keep
|
<mask> expect(queryByText(fakeLocalDevSession.description)).toBe(null);
<mask>
<mask> await act(async () => {
<mask> await waitFor(() => getByText(/deep link received/i));
<mask> getByText(fakeLocalDevSession.description);
<mask> });
<mask> });
<mask>
<mask> test('packagers in modal call loadApp() when pressed', async () => {
<mask> const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
<mask> initialAppProviderProps: { initialDevSessions: [fakeLocalDevSession] },
<mask> });
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const { getByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove const { getByText, queryByText } = render(null, {
</s> add const { queryByText, queryAllByText } = render(null, { </s> remove const button = await waitFor(() => getByText(fakeLocalDevSession.description));
</s> add const [button] = await waitFor(() => getAllByText(fakeLocalDevSession.description)); </s> remove await waitFor(() => getByText(/unable to find any packagers/i));
</s> add await waitFor(() => getAllByText(/unable to find any packagers/i)); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/__tests__/DeepLinkModal.test.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> await act(async () => {
<mask> expect(loadApp).not.toHaveBeenCalled();
<mask>
<mask> const button = await waitFor(() => getByText(fakeLocalDevSession.description));
<mask> fireEvent.press(button);
<mask>
<mask> expect(loadApp).toHaveBeenCalled();
<mask> });
<mask> });
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove await waitFor(() => getByText(/deep link received/i));
getByText(fakeLocalDevSession.description);
</s> add await waitFor(() => queryByText(/deep link received/i));
expect(queryAllByText(fakeLocalDevSession.description)).not.toBe(null); </s> remove await waitFor(() => getByText(/unable to find any packagers/i));
</s> add await waitFor(() => getAllByText(/unable to find any packagers/i)); </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove modalStack.push({
element: (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={() => {
actions.logout();
modalStack.pop();
}}
/>
),
});
</s> add modalStack.push(() => (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={async () => {
await actions.logout();
modalStack.pop();
}}
/>
)); </s> remove await setSessionAsync(null);
</s> add return await setSessionAsync(null); </s> remove return clearSession();
</s> add const result = await clearSession();
await resetBranchQueries();
return result;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/__tests__/DeepLinkModal.test.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> });
<mask> });
<mask>
<mask> test('shows empty message when no packagers are found', async () => {
<mask> const { getByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
<mask> initialAppProviderProps: { initialDevSessions: [], initialRecentlyOpenedApps: [] },
<mask> });
<mask>
<mask> expect(queryByText(/unable to find any packagers/i)).toBe(null);
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove await waitFor(() => getByText(/unable to find any packagers/i));
</s> add await waitFor(() => getAllByText(/unable to find any packagers/i)); </s> remove const { getByText, queryByText } = render(null, {
</s> add const { queryByText, queryAllByText } = render(null, { </s> remove await waitFor(() => getByText(/deep link received/i));
getByText(fakeLocalDevSession.description);
</s> add await waitFor(() => queryByText(/deep link received/i));
expect(queryAllByText(fakeLocalDevSession.description)).not.toBe(null); </s> remove modalStack.push({
element: <LoadAppErrorModal message={error.message} />,
});
</s> add modalStack.push(() => <LoadAppErrorModal message={error.message} />); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/__tests__/DeepLinkModal.test.tsx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> expect(queryByText(/unable to find any packagers/i)).toBe(null);
<mask>
<mask> await act(async () => {
<mask> expect(queryByText(/unable to find any packagers/i)).toBe(null);
<mask> await waitFor(() => getByText(/unable to find any packagers/i));
<mask> });
<mask> });
<mask>
<mask> test('calls subscription on mount', async () => {
<mask> expect(addDeepLinkListener).not.toHaveBeenCalled();
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const { getByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText, queryByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove await waitFor(() => getByText(/deep link received/i));
getByText(fakeLocalDevSession.description);
</s> add await waitFor(() => queryByText(/deep link received/i));
expect(queryAllByText(fakeLocalDevSession.description)).not.toBe(null); </s> remove const button = await waitFor(() => getByText(fakeLocalDevSession.description));
</s> add const [button] = await waitFor(() => getAllByText(fakeLocalDevSession.description)); </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> remove modalStack.push({
element: (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={() => {
actions.logout();
modalStack.pop();
}}
/>
),
});
</s> add modalStack.push(() => (
<LogoutConfirmationModal
onClosePress={() => modalStack.pop()}
onLogoutPress={async () => {
await actions.logout();
modalStack.pop();
}}
/>
)); </s> remove return clearSession();
</s> add const result = await clearSession();
await resetBranchQueries();
return result;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/components/__tests__/DeepLinkModal.test.tsx
|
add keep keep keep keep
|
<mask> import * as React from 'react';
<mask>
<mask> export type StackAction = 'pushstart' | 'pushend' | 'popstart' | 'popend';
<mask> export type Status = 'pushing' | 'popping' | 'settled' | 'popped';
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove // utility function for capturing all push and pop stack events
// components can subscribe to internal state to push and pop their own views depending on use case
// e.g a modal stack, a screen stack, a toast stack, etc
</s> add export type StackAction = 'pushstart' | 'pushend' | 'popstart' | 'popend';
export type Status = 'pushing' | 'popping' | 'settled' | 'popped'; </s> remove export type IStackEvent = 'pushstart' | 'pushend' | 'popstart' | 'popend' | 'replace';
</s> add export type StackItemComponent<T = any> = React.JSXElementConstructor<T>; </s> remove export type StackItemStatus = 'pushing' | 'popping' | 'settled';
export type ListenerFn<T> = ({
items,
}: {
action: IStackEvent;
key: string;
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
}) => void;
export type StackItem<T> = T & { key: string; status: StackItemStatus };
export type IReplaceOptions<T> = T & { replaceAmount?: number; key?: string };
export type IPushOptions<T> = T & { key?: string };
export interface IStack<T> {
push: (pushOptions: IPushOptions<T>) => Promise<string>;
pop: (amount?: number) => Promise<string[]>;
replace: (replaceOptions: IReplaceOptions<T>) => Promise<any>;
onPushEnd: (key: string) => void;
onPopEnd: (key: string) => void;
subscribe: (listener: ListenerFn<T>) => () => void;
getState: () => {
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
</s> add export type StackEvent<T = any> = {
state: StackState<T>;
event: {
action: StackAction;
key: string; </s> remove border?: "default" | "warning" | "hairline" | undefined;
</s> add opacity?: "0" | "1" | "0.5" | "0.75" | undefined;
absolute?: "bottom" | "top" | "all" | undefined;
border?: "default" | "error" | "warning" | "hairline" | undefined; </s> remove const Context = React.createContext<UserContext | null>(null);
</s> add const Context = React.createContext<UserContext>(null); </s> add import { apiClient } from './apiClient';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep replace replace replace keep replace
|
<mask>
<mask> // utility function for capturing all push and pop stack events
<mask> // components can subscribe to internal state to push and pop their own views depending on use case
<mask> // e.g a modal stack, a screen stack, a toast stack, etc
<mask>
<mask> export type IStackEvent = 'pushstart' | 'pushend' | 'popstart' | 'popend' | 'replace';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove export type StackItemStatus = 'pushing' | 'popping' | 'settled';
export type ListenerFn<T> = ({
items,
}: {
action: IStackEvent;
key: string;
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
}) => void;
export type StackItem<T> = T & { key: string; status: StackItemStatus };
export type IReplaceOptions<T> = T & { replaceAmount?: number; key?: string };
export type IPushOptions<T> = T & { key?: string };
export interface IStack<T> {
push: (pushOptions: IPushOptions<T>) => Promise<string>;
pop: (amount?: number) => Promise<string[]>;
replace: (replaceOptions: IReplaceOptions<T>) => Promise<any>;
onPushEnd: (key: string) => void;
onPopEnd: (key: string) => void;
subscribe: (listener: ListenerFn<T>) => () => void;
getState: () => {
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
</s> add export type StackEvent<T = any> = {
state: StackState<T>;
event: {
action: StackAction;
key: string; </s> add import { Animated } from 'react-native'; </s> remove // So we fix the path to correct one
</s> add // This happens in react-navigation and expo-dev-client-components
// The back button in stack is required by the launcher, so we fix the path to correct one
const rnNavigationAssets = '/node_modules/@react-navigation/stack/src/views/assets';
if (platform === 'android' && req.url.startsWith(rnNavigationAssets)) {
req.url = req.url.replace(rnNavigationAssets, `/assets/../..${rnNavigationAssets}`);
}
// The icons in dev-client-components </s> remove border?: "default" | "warning" | "hairline" | undefined;
</s> add opacity?: "0" | "1" | "0.5" | "0.75" | undefined;
absolute?: "bottom" | "top" | "all" | undefined;
border?: "default" | "error" | "warning" | "hairline" | undefined; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace keep keep keep keep
|
<mask>
<mask> export type IStackEvent = 'pushstart' | 'pushend' | 'popstart' | 'popend' | 'replace';
<mask>
<mask> export type StackItemStatus = 'pushing' | 'popping' | 'settled';
<mask>
<mask> export type ListenerFn<T> = ({
<mask> items,
<mask> }: {
<mask> action: IStackEvent;
<mask> key: string;
<mask> items: StackItem<T>[];
<mask> getItemByKey: (key: string) => T | undefined;
<mask> }) => void;
<mask>
<mask> export type StackItem<T> = T & { key: string; status: StackItemStatus };
<mask> export type IReplaceOptions<T> = T & { replaceAmount?: number; key?: string };
<mask> export type IPushOptions<T> = T & { key?: string };
<mask> export interface IStack<T> {
<mask> push: (pushOptions: IPushOptions<T>) => Promise<string>;
<mask> pop: (amount?: number) => Promise<string[]>;
<mask> replace: (replaceOptions: IReplaceOptions<T>) => Promise<any>;
<mask> onPushEnd: (key: string) => void;
<mask> onPopEnd: (key: string) => void;
<mask> subscribe: (listener: ListenerFn<T>) => () => void;
<mask> getState: () => {
<mask> items: StackItem<T>[];
<mask> getItemByKey: (key: string) => T | undefined;
<mask> };
<mask> }
<mask>
<mask> const generateRouteKey = () => `${new Date().getTime()}`;
<mask>
<mask> export function createAsyncStack<T>(): IStack<T> {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove export function createAsyncStack<T>(): IStack<T> {
</s> add export type StackItem<T = any> = {
key: string;
status: Status;
promise: Promise<StackItem<T>>;
pop: () => void;
onPushEnd: () => void;
onPopEnd: () => void;
data: T;
animatedValue: typeof AValue;
};
export type StackState<T = any> = {
items: StackItem<T>[];
lookup: Record<string, StackItem<T>>;
getItemByKey: (key: string) => StackItem<T> | null;
};
export type Stack<T> = {
push: (data?: T | undefined) => StackItem<T>;
pop: (amount?: number, startIndex?: number) => StackItem<any>[];
subscribe: (listener: (state: StackEvent<T>) => void) => () => void;
getState: () => StackState;
};
export function createAsyncStack<T = any>() { </s> remove const generateRouteKey = () => `${new Date().getTime()}`;
</s> add const AValue = new Animated.Value(0); </s> remove export type IStackEvent = 'pushstart' | 'pushend' | 'popstart' | 'popend' | 'replace';
</s> add export type StackItemComponent<T = any> = React.JSXElementConstructor<T>; </s> remove // utility function for capturing all push and pop stack events
// components can subscribe to internal state to push and pop their own views depending on use case
// e.g a modal stack, a screen stack, a toast stack, etc
</s> add export type StackAction = 'pushstart' | 'pushend' | 'popstart' | 'popend';
export type Status = 'pushing' | 'popping' | 'settled' | 'popped'; </s> remove type ModalScreenProps = StackItem<ModalProps> & {
</s> add type ModalScreenProps = StackItem & {
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep replace keep replace keep keep
|
<mask> }
<mask>
<mask> const generateRouteKey = () => `${new Date().getTime()}`;
<mask>
<mask> export function createAsyncStack<T>(): IStack<T> {
<mask> let keys: string[] = [];
<mask> const lookup: Record<string, StackItem<T>> = {};
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const pushResolvers: Record<string, Function> = {};
</s> add const pushResolvers: Record<string, any> = {}; </s> remove }
</s> add }; </s> add let count = 0; </s> remove function push(pushOptions: IPushOptions<T>) {
const key = pushOptions.key || generateRouteKey();
if (keys.includes(key)) {
return Promise.resolve(key);
}
</s> add function push(data?: T) {
count += 1;
const key = '' + count; </s> remove export type StackItemStatus = 'pushing' | 'popping' | 'settled';
export type ListenerFn<T> = ({
items,
}: {
action: IStackEvent;
key: string;
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
}) => void;
export type StackItem<T> = T & { key: string; status: StackItemStatus };
export type IReplaceOptions<T> = T & { replaceAmount?: number; key?: string };
export type IPushOptions<T> = T & { key?: string };
export interface IStack<T> {
push: (pushOptions: IPushOptions<T>) => Promise<string>;
pop: (amount?: number) => Promise<string[]>;
replace: (replaceOptions: IReplaceOptions<T>) => Promise<any>;
onPushEnd: (key: string) => void;
onPopEnd: (key: string) => void;
subscribe: (listener: ListenerFn<T>) => () => void;
getState: () => {
items: StackItem<T>[];
getItemByKey: (key: string) => T | undefined;
</s> add export type StackEvent<T = any> = {
state: StackState<T>;
event: {
action: StackAction;
key: string;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep add keep keep keep keep keep keep
|
<mask> let keys: string[] = [];
<mask> const lookup: Record<string, StackItem<T>> = {};
<mask>
<mask> const pushResolvers: Record<string, any> = {};
<mask> const popResolvers: Record<string, Function> = {};
<mask>
<mask> let listeners: any[] = [];
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const pushResolvers: Record<string, Function> = {};
</s> add const pushResolvers: Record<string, any> = {}; </s> remove const generateRouteKey = () => `${new Date().getTime()}`;
</s> add const AValue = new Animated.Value(0); </s> remove export function createAsyncStack<T>(): IStack<T> {
</s> add export type StackItem<T = any> = {
key: string;
status: Status;
promise: Promise<StackItem<T>>;
pop: () => void;
onPushEnd: () => void;
onPopEnd: () => void;
data: T;
animatedValue: typeof AValue;
};
export type StackState<T = any> = {
items: StackItem<T>[];
lookup: Record<string, StackItem<T>>;
getItemByKey: (key: string) => StackItem<T> | null;
};
export type Stack<T> = {
push: (data?: T | undefined) => StackItem<T>;
pop: (amount?: number, startIndex?: number) => StackItem<any>[];
subscribe: (listener: (state: StackEvent<T>) => void) => () => void;
getState: () => StackState;
};
export function createAsyncStack<T = any>() { </s> remove function push(pushOptions: IPushOptions<T>) {
const key = pushOptions.key || generateRouteKey();
if (keys.includes(key)) {
return Promise.resolve(key);
}
</s> add function push(data?: T) {
count += 1;
const key = '' + count; </s> remove }
</s> add }; </s> remove <ChevronRightIcon />
</Row>
</s> add const compatibleExtensions: string[] = [];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace keep keep keep keep replace replace replace replace replace replace keep keep
|
<mask> export function createAsyncStack<T>(): IStack<T> {
<mask> let keys: string[] = [];
<mask> const lookup: Record<string, StackItem<T>> = {};
<mask>
<mask> const pushResolvers: Record<string, Function> = {};
<mask> const popResolvers: Record<string, Function> = {};
<mask>
<mask> let listeners: any[] = [];
<mask>
<mask> function push(pushOptions: IPushOptions<T>) {
<mask> const key = pushOptions.key || generateRouteKey();
<mask>
<mask> if (keys.includes(key)) {
<mask> return Promise.resolve(key);
<mask> }
<mask>
<mask> keys.push(key);
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add let count = 0; </s> remove const generateRouteKey = () => `${new Date().getTime()}`;
</s> add const AValue = new Animated.Value(0); </s> remove export function createAsyncStack<T>(): IStack<T> {
</s> add export type StackItem<T = any> = {
key: string;
status: Status;
promise: Promise<StackItem<T>>;
pop: () => void;
onPushEnd: () => void;
onPopEnd: () => void;
data: T;
animatedValue: typeof AValue;
};
export type StackState<T = any> = {
items: StackItem<T>[];
lookup: Record<string, StackItem<T>>;
getItemByKey: (key: string) => StackItem<T> | null;
};
export type Stack<T> = {
push: (data?: T | undefined) => StackItem<T>;
pop: (amount?: number, startIndex?: number) => StackItem<any>[];
subscribe: (listener: (state: StackEvent<T>) => void) => () => void;
getState: () => StackState;
};
export function createAsyncStack<T = any>() { </s> remove }
</s> add }; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> keys.push(key);
<mask>
<mask> lookup[key] = {
<mask> ...pushOptions,
<mask> key,
<mask> status: 'pushing',
<mask> };
<mask>
<mask> const promise = new Promise<string>((resolve) => {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove status: 'pushing',
</s> add promise,
// @ts-ignore
data,
status: 'pushing' as Status,
pop: () => pop(`${key}`),
onPushEnd: () => onPushEnd(key),
onPopEnd: () => onPopEnd(key),
animatedValue: new Animated.Value(0), </s> remove const promise = new Promise<string>((resolve) => {
pushResolvers[key] = resolve;
});
</s> add if (data) {
item.data = data;
}
lookup[key] = item; </s> remove function push(pushOptions: IPushOptions<T>) {
const key = pushOptions.key || generateRouteKey();
if (keys.includes(key)) {
return Promise.resolve(key);
}
</s> add function push(data?: T) {
count += 1;
const key = '' + count; </s> remove const promise = new Promise((resolve) => {
</s> add const promise = new Promise<StackItem<T>>((resolve) => { </s> add if (item.status === 'pushing') {
onPushEnd(key);
}
</s> remove promises.push(promise);
</s> add item.promise = promise;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep replace keep keep replace replace replace keep keep keep
|
<mask> key,
<mask> status: 'pushing',
<mask> };
<mask>
<mask> const promise = new Promise<string>((resolve) => {
<mask> pushResolvers[key] = resolve;
<mask> });
<mask>
<mask> emit('pushstart', key);
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove lookup[key] = {
...pushOptions,
</s> add const promise = new Promise<StackItem<T>>((resolve) => {
pushResolvers[key] = resolve;
});
const item: StackItem<T> = { </s> remove const promise = new Promise((resolve) => {
</s> add const promise = new Promise<StackItem<T>>((resolve) => { </s> remove promises.push(promise);
</s> add item.promise = promise;
</s> add if (item.status === 'pushing') {
onPushEnd(key);
}
</s> remove return promise;
</s> add return item;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> });
<mask>
<mask> emit('pushstart', key);
<mask>
<mask> return promise;
<mask> }
<mask>
<mask> function onPushEnd(key: string) {
<mask> const item = lookup[key];
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> add const item = lookup[key]; </s> remove const promise = new Promise<string>((resolve) => {
pushResolvers[key] = resolve;
});
</s> add if (data) {
item.data = data;
}
lookup[key] = item; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove listener({ ...state, key, action });
</s> add const event = { key, action };
listener({ state, event }); </s> remove promises.push(promise);
</s> add item.promise = promise;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
|
<mask>
<mask> function onPushEnd(key: string) {
<mask> const item = lookup[key];
<mask>
<mask> if (item) {
<mask> if (item.status === 'pushing') {
<mask> item.status = 'settled';
<mask> }
<mask>
<mask> emit('pushend', key);
<mask>
<mask> const resolver = pushResolvers[key];
<mask>
<mask> if (resolver) {
<mask> resolver(key);
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add if (item.status === 'pushing') {
onPushEnd(key);
}
</s> add const item = lookup[key]; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key]; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete popResolvers[key]; </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> const resolver = pushResolvers[key];
<mask>
<mask> if (resolver) {
<mask> resolver(key);
<mask> }
<mask> }
<mask> }
<mask>
<mask> function pop(amount = 1, startIndex = 0) {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete popResolvers[key]; </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> add const item = lookup[key]; </s> remove for (let i = 1; i <= amount; i++) {
const key = keys[keys.length - startIndex - i];
</s> add let startIndex = keys.length - 1;
for (let i = keys.length - 1; i >= 0; i--) {
const key = keys[i];
const item = lookup[key];
if (item && (item.status === 'settled' || item.status === 'pushing')) {
startIndex = i;
break;
}
}
for (let i = startIndex; i > startIndex - amount; i--) {
const key = keys[i];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep add keep keep keep keep keep
|
<mask> resolver(getItemByKey(key));
<mask> delete pushResolvers[key];
<mask> }
<mask> }
<mask>
<mask> return item;
<mask> }
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete popResolvers[key]; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key]; </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove }
async function replace(replaceOptions: IReplaceOptions<T>) {
const itemsToPop = replaceOptions.replaceAmount != null ? replaceOptions.replaceAmount : 1;
</s> add </s> remove return promise;
</s> add return item; </s> add return item;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep add keep keep keep keep keep keep
|
<mask> emit('pushend', key);
<mask> }
<mask> }
<mask>
<mask> function pop(amount: number | string = 1) {
<mask> const items: StackItem[] = [];
<mask>
<mask> if (typeof amount === 'string') {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> add function push(element: StackItemComponent) {
return modalStack.push({ element });
}
function pop(amount: number = 1) {
return modalStack.pop(amount);
}
</s> remove }
</s> add }; </s> remove for (let i = 1; i <= amount; i++) {
const key = keys[keys.length - startIndex - i];
</s> add let startIndex = keys.length - 1;
for (let i = keys.length - 1; i >= 0; i--) {
const key = keys[i];
const item = lookup[key];
if (item && (item.status === 'settled' || item.status === 'pushing')) {
startIndex = i;
break;
}
}
for (let i = startIndex; i > startIndex - amount; i--) {
const key = keys[i]; </s> add const item = lookup[key];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> }
<mask> }
<mask> }
<mask>
<mask> function pop(amount = 1, startIndex = 0) {
<mask> const promises = [];
<mask>
<mask> if (amount === -1) {
<mask> // pop them all
<mask> amount = keys.length;
<mask> }
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key]; </s> remove for (let i = 1; i <= amount; i++) {
const key = keys[keys.length - startIndex - i];
</s> add let startIndex = keys.length - 1;
for (let i = keys.length - 1; i >= 0; i--) {
const key = keys[i];
const item = lookup[key];
if (item && (item.status === 'settled' || item.status === 'pushing')) {
startIndex = i;
break;
}
}
for (let i = startIndex; i > startIndex - amount; i--) {
const key = keys[i]; </s> add return item; </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> add if (item.status === 'pushing') {
onPushEnd(key);
}
</s> add if (process.env.NODE_ENV === 'test') {
return {
presets: ['babel-preset-expo'],
};
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> // pop them all
<mask> amount = keys.length;
<mask> }
<mask>
<mask> for (let i = 1; i <= amount; i++) {
<mask> const key = keys[keys.length - startIndex - i];
<mask> const item = lookup[key];
<mask>
<mask> if (item) {
<mask> item.status = 'popping';
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> add if (item.status === 'pushing') {
onPushEnd(key);
}
</s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> remove const promise = new Promise((resolve) => {
</s> add const promise = new Promise<StackItem<T>>((resolve) => { </s> remove function push(pushOptions: IPushOptions<T>) {
const key = pushOptions.key || generateRouteKey();
if (keys.includes(key)) {
return Promise.resolve(key);
}
</s> add function push(data?: T) {
count += 1;
const key = '' + count; </s> add const item = lookup[key];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep add keep keep keep keep
|
<mask> const key = keys[i];
<mask> const item = lookup[key];
<mask>
<mask> if (item) {
<mask> item.status = 'popping';
<mask>
<mask> const promise = new Promise<StackItem<T>>((resolve) => {
<mask> popResolvers[key] = resolve;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const promise = new Promise((resolve) => {
</s> add const promise = new Promise<StackItem<T>>((resolve) => { </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove for (let i = 1; i <= amount; i++) {
const key = keys[keys.length - startIndex - i];
</s> add let startIndex = keys.length - 1;
for (let i = keys.length - 1; i >= 0; i--) {
const key = keys[i];
const item = lookup[key];
if (item && (item.status === 'settled' || item.status === 'pushing')) {
startIndex = i;
break;
}
}
for (let i = startIndex; i > startIndex - amount; i--) {
const key = keys[i]; </s> remove lookup[key] = {
...pushOptions,
</s> add const promise = new Promise<StackItem<T>>((resolve) => {
pushResolvers[key] = resolve;
});
const item: StackItem<T> = { </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> remove promises.push(promise);
</s> add item.promise = promise;
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace keep keep keep replace
|
<mask>
<mask> if (item) {
<mask> item.status = 'popping';
<mask>
<mask> const promise = new Promise((resolve) => {
<mask> popResolvers[key] = resolve;
<mask> });
<mask>
<mask> promises.push(promise);
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add if (item.status === 'pushing') {
onPushEnd(key);
}
</s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> remove lookup[key] = {
...pushOptions,
</s> add const promise = new Promise<StackItem<T>>((resolve) => {
pushResolvers[key] = resolve;
});
const item: StackItem<T> = { </s> remove const promise = new Promise<string>((resolve) => {
pushResolvers[key] = resolve;
});
</s> add if (data) {
item.data = data;
}
lookup[key] = item; </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep add keep keep keep keep
|
<mask>
<mask> emit('popstart', key);
<mask> }
<mask> }
<mask>
<mask> return items;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove return Promise.all(promises) as Promise<string[]>;
</s> add return items; </s> remove promises.push(promise);
</s> add item.promise = promise;
</s> add const item = lookup[key]; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
} </s> add emit('pushend', key); </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> emit('popstart', key);
<mask> }
<mask> }
<mask>
<mask> return Promise.all(promises) as Promise<string[]>;
<mask> }
<mask>
<mask> function onPopEnd(key: string) {
<mask> keys = keys.filter((k) => k !== key);
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add const item = lookup[key]; </s> remove promises.push(promise);
</s> add item.promise = promise;
</s> add items.push(item); </s> remove return promise;
</s> add return item; </s> remove function emit(action: IStackEvent, key: string) {
</s> add function emit(action: StackAction, key: string) { </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep add keep keep keep keep keep
|
<mask> return items;
<mask> }
<mask>
<mask> function onPopEnd(key: string) {
<mask> keys = keys.filter((k) => k !== key);
<mask>
<mask> const resolver = popResolvers[key];
<mask>
<mask> if (resolver) {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove return Promise.all(promises) as Promise<string[]>;
</s> add return items; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete popResolvers[key]; </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key]; </s> remove function pop(amount = 1, startIndex = 0) {
const promises = [];
</s> add function pop(amount: number | string = 1) {
const items: StackItem[] = [];
if (typeof amount === 'string') {
const key = amount;
const item = lookup[key];
if (item) {
if (item.status === 'pushing') {
onPushEnd(key);
}
item.status = 'popping';
const promise = new Promise<StackItem<T>>((resolve) => {
popResolvers[key] = resolve;
});
item.promise = promise;
emit('popstart', key);
items.push(item);
}
return items;
}
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep replace keep keep replace replace replace
|
<mask> if (resolver) {
<mask> resolver(key);
<mask> }
<mask>
<mask> delete popResolvers[key];
<mask> delete pushResolvers[key];
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key]; </s> remove }
async function replace(replaceOptions: IReplaceOptions<T>) {
const itemsToPop = replaceOptions.replaceAmount != null ? replaceOptions.replaceAmount : 1;
</s> add </s> add emit('pushend', key); </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> add const item = lookup[key];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> delete popResolvers[key];
<mask> delete pushResolvers[key];
<mask>
<mask> emit('popend', key);
<mask> }
<mask>
<mask> async function replace(replaceOptions: IReplaceOptions<T>) {
<mask> const itemsToPop = replaceOptions.replaceAmount != null ? replaceOptions.replaceAmount : 1;
<mask>
<mask> const promise2 = await push(replaceOptions);
<mask> const promise1 = await pop(itemsToPop, 1);
<mask>
<mask> return Promise.all([promise2, promise1]);
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const promise2 = await push(replaceOptions);
const promise1 = await pop(itemsToPop, 1);
return Promise.all([promise2, promise1]);
</s> add return item; </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete popResolvers[key]; </s> remove return clearSession();
</s> add const result = await clearSession();
await resetBranchQueries();
return result; </s> remove resolver(key);
</s> add resolver(getItemByKey(key));
delete pushResolvers[key]; </s> add const item = lookup[key];
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep replace replace replace replace keep keep keep keep keep keep keep keep replace keep keep
|
<mask> const itemsToPop = replaceOptions.replaceAmount != null ? replaceOptions.replaceAmount : 1;
<mask>
<mask> const promise2 = await push(replaceOptions);
<mask> const promise1 = await pop(itemsToPop, 1);
<mask>
<mask> return Promise.all([promise2, promise1]);
<mask> }
<mask>
<mask> function subscribe(listener: any) {
<mask> listeners.push(listener);
<mask>
<mask> return Promise.all([promise2, promise1]);
<mask> }
<mask>
<mask> function subscribe(listener: any) {
<mask> listeners.push(listener);
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove }
async function replace(replaceOptions: IReplaceOptions<T>) {
const itemsToPop = replaceOptions.replaceAmount != null ? replaceOptions.replaceAmount : 1;
</s> add </s> remove delete popResolvers[key];
delete pushResolvers[key];
</s> add item.status = 'popped'; </s> remove return clearSession();
</s> add const result = await clearSession();
await resetBranchQueries();
return result; </s> remove await setSessionAsync(null);
</s> add return await setSessionAsync(null); </s> remove return mockFetch.mockResolvedValueOnce({ ok: true, json: () => dataToReturn });
</s> add return mockFetch.mockResolvedValue({ ok: true, json: () => dataToReturn });
}
export function mockGraphQLResponse<T>(data: T) {
const request = apiClient.request as jest.Mock;
return request.mockResolvedValue(data);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep replace keep keep replace keep keep keep
|
<mask> };
<mask> }
<mask>
<mask> function emit(action: IStackEvent, key: string) {
<mask> listeners.forEach((listener) => {
<mask> const state = getState();
<mask> listener({ ...state, key, action });
<mask> });
<mask> }
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove lookup[key] = {
...pushOptions,
</s> add const promise = new Promise<StackItem<T>>((resolve) => {
pushResolvers[key] = resolve;
});
const item: StackItem<T> = { </s> remove const promise = new Promise<string>((resolve) => {
pushResolvers[key] = resolve;
});
</s> add if (data) {
item.data = data;
}
lookup[key] = item; </s> remove return promise;
</s> add return item; </s> remove const unsubscribe = stack.subscribe(({ items }) => {
setItems(items);
</s> add const unsubscribe = stack.subscribe(({ state }) => {
setItems(state.items); </s> remove const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
</s> add
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> function getItemByKey(key: string) {
<mask> return lookup[key];
<mask> }
<mask>
<mask> function getState() {
<mask> const items = keys.map((key) => lookup[key]);
<mask>
<mask> return {
<mask> items,
<mask> getItemByKey,
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add lookup, </s> remove listener({ ...state, key, action });
</s> add const event = { key, action };
listener({ state, event }); </s> remove return promise;
</s> add return item; </s> add const item = lookup[key]; </s> remove if (item) {
if (item.status === 'pushing') {
item.status = 'settled';
}
emit('pushend', key);
</s> add if (item.status === 'pushing') {
item.status = 'settled'; </s> remove export function useStackItems<T>(stack: IStack<T>) {
const [items, setItems] = React.useState(() => stack.getState().items);
</s> add export function useStackItems<T>(stack: Stack<T>) {
const [items, setItems] = React.useState<StackItem<T>[]>(stack.getState().items);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep add keep keep keep keep keep
|
<mask> const items = keys.map((key) => lookup[key]);
<mask>
<mask> return {
<mask> items,
<mask> getItemByKey,
<mask> };
<mask> }
<mask>
<mask> return {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove function getState() {
</s> add function getState(): StackState { </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove const unsubscribe = stack.subscribe(({ items }) => {
setItems(items);
</s> add const unsubscribe = stack.subscribe(({ state }) => {
setItems(state.items); </s> remove export function useStackItems<T>(stack: IStack<T>) {
const [items, setItems] = React.useState(() => stack.getState().items);
</s> add export function useStackItems<T>(stack: Stack<T>) {
const [items, setItems] = React.useState<StackItem<T>[]>(stack.getState().items); </s> remove await setSessionAsync(null);
</s> add return await setSessionAsync(null); </s> add const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep replace keep replace replace keep
|
<mask> push,
<mask> onPushEnd,
<mask> pop,
<mask> onPopEnd,
<mask> replace,
<mask> subscribe,
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove function ModalScreen({ status, element, onPopEnd, onPushEnd }: ModalScreenProps) {
</s> add function ModalScreen({ status, data, onPopEnd, onPushEnd }: ModalScreenProps) {
const { element } = data; </s> add function push(element: StackItemComponent) {
return modalStack.push({ element });
}
function pop(amount: number = 1) {
return modalStack.pop(amount);
}
</s> remove <Animated.View
style={[StyleSheet.absoluteFillObject, { backgroundColor }]}
pointerEvents={hasModal ? 'auto' : 'none'}>
<Pressable
onPress={() => {
modalStack.pop();
}}
style={[StyleSheet.absoluteFillObject]}>
{modals.map((item) => (
<ModalScreen
key={item.key}
{...item}
onClose={() => modalStack.pop()}
onPopEnd={() => modalStack.onPopEnd(item.key)}
onPushEnd={() => modalStack.onPushEnd(item.key)}
/>
))}
</Pressable>
</Animated.View>
</s> add <ModalStackContext.Provider value={{ push, pop }}>
{children}
<Animated.View
style={[StyleSheet.absoluteFillObject, { backgroundColor }]}
pointerEvents={hasModal ? 'box-none' : 'none'}>
<Pressable
onPress={() => {
modalStack.pop();
}}
style={[StyleSheet.absoluteFillObject]}>
{modals.map((item) => (
<ModalScreen
key={item.key}
{...item}
onClose={item.pop}
onPopEnd={item.onPopEnd}
onPushEnd={item.onPushEnd}
/>
))}
</Pressable>
</Animated.View>
</ModalStackContext.Provider> </s> add jest.mock('./bundle/providers/QueryProvider'); </s> remove }
</s> add };
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace keep keep replace replace keep keep keep keep
|
<mask> getState,
<mask> };
<mask> }
<mask>
<mask> export function useStackItems<T>(stack: IStack<T>) {
<mask> const [items, setItems] = React.useState(() => stack.getState().items);
<mask>
<mask> React.useEffect(() => {
<mask> const unsubscribe = stack.subscribe(({ items }) => {
<mask> setItems(items);
<mask> });
<mask>
<mask> return () => {
<mask> unsubscribe && unsubscribe();
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove return () => {
unsubscribe && unsubscribe();
};
}, [stack]);
</s> add return () => unsubscribe();
}, []); </s> remove modalStack.push({
element: <DeepLinkModal pendingDeepLink={url} />,
});
</s> add modalStack.push(() => <DeepLinkModal pendingDeepLink={url} />); </s> add lookup, </s> remove function ModalScreen({ status, element, onPopEnd, onPushEnd }: ModalScreenProps) {
</s> add function ModalScreen({ status, data, onPopEnd, onPushEnd }: ModalScreenProps) {
const { element } = data; </s> remove const onUserProfilePress = () => {
navigation.navigate('User Profile');
};
</s> add
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep keep keep replace replace replace replace keep keep keep
|
<mask> const unsubscribe = stack.subscribe(({ items }) => {
<mask> setItems(items);
<mask> });
<mask>
<mask> return () => {
<mask> unsubscribe && unsubscribe();
<mask> };
<mask> }, [stack]);
<mask>
<mask> return items;
<mask> }
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove const unsubscribe = stack.subscribe(({ items }) => {
setItems(items);
</s> add const unsubscribe = stack.subscribe(({ state }) => {
setItems(state.items); </s> remove export function useStackItems<T>(stack: IStack<T>) {
const [items, setItems] = React.useState(() => stack.getState().items);
</s> add export function useStackItems<T>(stack: Stack<T>) {
const [items, setItems] = React.useState<StackItem<T>[]>(stack.getState().items); </s> add lookup, </s> remove const { getByText } = render(<DeepLinkModal pendingDeepLink="123" />, {
</s> add const { getAllByText } = render(<DeepLinkModal pendingDeepLink="123" />, { </s> add if (isAuthenticated && updatesConfig.usesEASUpdates) {
prefetchBranchesForApp(updatesConfig.appId, updatesConfig.runtimeVersion).catch((error) =>
console.log({ error })
);
}
</s> remove function getState() {
</s> add function getState(): StackState {
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/createAsyncStack.ts
|
keep keep add keep keep keep keep
|
<mask> getCrashReport,
<mask> installationID,
<mask> isDevice,
<mask> } from '../native-modules/DevLauncherInternal';
<mask> import { getMenuPreferencesAsync } from '../native-modules/DevMenuPreferences';
<mask> import { AppProvidersProps } from '../providers/AppProviders';
<mask> import { prefetchBranchesForApp } from '../queries/useBranchesForApp';
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add import { prefetchBranchesForApp } from '../queries/useBranchesForApp'; </s> remove import { useBuildInfo } from '../providers/BuildInfoProvider';
</s> add </s> add import { QueryProvider } from './QueryProvider'; </s> remove import { ModalProvider } from './ModalStackProvider';
</s> add import { ModalStackProvider } from './ModalStackProvider'; </s> add import { ToastStackProvider } from './ToastStackProvider'; </s> add import { resetBranchQueries } from '../queries/useBranchesForApp';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/getInitialData.ts
|
keep keep add keep keep keep keep
|
<mask> } from '../native-modules/DevLauncherInternal';
<mask> import { getMenuPreferencesAsync } from '../native-modules/DevMenuPreferences';
<mask> import { AppProvidersProps } from '../providers/AppProviders';
<mask> import { getDevSessionsAsync } from './getDevSessionsAsync';
<mask> import { restoreUserAsync } from './restoreUserAsync';
<mask>
<mask> export async function getInitialData(): Promise<Partial<AppProvidersProps>> {
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add updatesConfig, </s> remove import { useBuildInfo } from '../providers/BuildInfoProvider';
</s> add </s> add import { QueryProvider } from './QueryProvider'; </s> remove import { ModalProvider } from './ModalStackProvider';
</s> add import { ModalStackProvider } from './ModalStackProvider'; </s> add import { ToastStackProvider } from './ToastStackProvider'; </s> remove import { ExtensionsScreen } from './screens/ExtensionsScreen';
</s> add import { ExtensionsStack } from './screens/ExtensionsStack';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/getInitialData.ts
|
keep keep add keep keep keep keep
|
<mask> const initialDevMenuPreferences = await getMenuPreferencesAsync();
<mask> const initialCrashReport = await getCrashReport();
<mask>
<mask> return {
<mask> initialDevSessions,
<mask> initialUserData,
<mask> initialBuildInfo,
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove return clearSession();
</s> add const result = await clearSession();
await resetBranchQueries();
return result; </s> remove await setSessionAsync(null);
</s> add return await setSessionAsync(null); </s> remove const button = await waitFor(() => getByText(fakeLocalDevSession.description));
</s> add const [button] = await waitFor(() => getAllByText(fakeLocalDevSession.description)); </s> remove const promise2 = await push(replaceOptions);
const promise1 = await pop(itemsToPop, 1);
return Promise.all([promise2, promise1]);
</s> add return item; </s> remove }
async function replace(replaceOptions: IReplaceOptions<T>) {
const itemsToPop = replaceOptions.replaceAmount != null ? replaceOptions.replaceAmount : 1;
</s> add </s> remove await waitFor(() => getByText(/deep link received/i));
getByText(fakeLocalDevSession.description);
</s> add await waitFor(() => queryByText(/deep link received/i));
expect(queryAllByText(fakeLocalDevSession.description)).not.toBe(null);
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/functions/getInitialData.ts
|
keep keep keep add keep keep keep keep keep keep
|
<mask> appVersion?: string;
<mask> appIcon?: string;
<mask> sdkVersion?: string;
<mask> runtimeVersion?: string;
<mask> };
<mask>
<mask> export async function getBuildInfoAsync(): Promise<BuildInfo> {
<mask> return DevLauncher.getBuildInfo();
<mask> }
<mask>
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> add error: {
borderColor: string;
borderWidth: number;
}; </s> add export type EXUpdatesConfig = {
runtimeVersion: string;
sdkVersion: string;
appId: string;
usesEASUpdates: boolean;
};
export const updatesConfig: EXUpdatesConfig = DevLauncher.updatesConfig; </s> remove type AppHeaderProps = {
title?: string;
subtitle?: string;
appImageUri?: string;
onUserProfilePress: () => void;
};
</s> add export function AppHeader({ navigation }) {
const buildInfo = useBuildInfo();
const { appName, appIcon } = buildInfo; </s> remove export function AppHeader({ title, subtitle, appImageUri, onUserProfilePress }: AppHeaderProps) {
const insets = useSafeAreaInsets();
</s> add </s> remove import { useSafeAreaInsets } from 'react-native-safe-area-context';
</s> add </s> add import { useModalStack } from '../providers/ModalStackProvider';
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/native-modules/DevLauncherInternal.ts
|
keep keep keep add
|
<mask>
<mask> export const clientUrlScheme = DevLauncher.clientUrlScheme;
<mask> export const installationID = DevLauncher.installationID;
<mask> export const isDevice = !!DevLauncher.isDevice;
</s> [dev-launcher] implement EAS updates extension panel (#16718)
Co-authored-by: Eric Samelson <[email protected]> </s> remove export const getCrashReport = jest.fn().mockResolvedValue(null); </s> add </s> remove const ModalContext = React.createContext(createAsyncStack<ModalProps>());
export const useModalStack = () => React.useContext(ModalContext);
export function ModalProvider({ children }) {
const modalStack = React.useRef(createAsyncStack<ModalProps>());
return (
<ModalContext.Provider value={modalStack.current}>
{children}
<ModalStackContainer />
</ModalContext.Provider>
);
}
</s> add const ModalStackContext = React.createContext<ModalStackContextProps | null>(null);
export const useModalStack = () => React.useContext(ModalStackContext);
const defaultModalStack = createAsyncStack(); </s> remove export const useUser = () => React.useContext(Context);
</s> add export const useUser = () => React.useContext<UserContext>(Context); </s> remove export function useStackItems<T>(stack: IStack<T>) {
const [items, setItems] = React.useState(() => stack.getState().items);
</s> add export function useStackItems<T>(stack: Stack<T>) {
const [items, setItems] = React.useState<StackItem<T>[]>(stack.getState().items); </s> remove function ModalStackContainer() {
const modalStack = useModalStack();
</s> add export function ModalStackProvider({ children, modalStack = defaultModalStack }) { </s> remove const pushResolvers: Record<string, Function> = {};
</s> add const pushResolvers: Record<string, any> = {};
|
https://github.com/expo/expo/commit/43fd9ed37186e06fc75e7ed1b2d1f022a2d14d69
|
packages/expo-dev-launcher/bundle/native-modules/DevLauncherInternal.ts
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.