Skip to content

Commit d468f08

Browse files
authored
chore(deps): set versioning rules for packages in monorepo (#66)
- set up a basic syncpack configuration to ensure versioning across monorepo follows some base rules - format repo closes #47
1 parent f0f086b commit d468f08

238 files changed

Lines changed: 7011 additions & 7666 deletions

File tree

Some content is hidden

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

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"singleQuote": false
5+
}

.syncpackrc.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "./node_modules/syncpack/schema.json",
3+
"versionGroups": [
4+
{
5+
"label": "Use workspace protocol for local packages",
6+
"dependencyTypes": [
7+
"prod",
8+
"dev",
9+
"peer"
10+
],
11+
"dependencies": [
12+
"$LOCAL"
13+
],
14+
"pinVersion": "workspace:*"
15+
}
16+
],
17+
"semverGroups": [
18+
{
19+
"label": "Native peer dependencies must use minor version range",
20+
"dependencyTypes": [
21+
"peer"
22+
],
23+
"dependencies": [
24+
"react",
25+
"react-dom",
26+
"react-native",
27+
"react-native-reanimated",
28+
"react-native-gesture-handler",
29+
"expo-font",
30+
"react-native-svg"
31+
],
32+
"range": "^"
33+
}
34+
]
35+
}

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ as well as `dark` and `light` mode support:
4949

5050
```tsx
5151
export default function App() {
52-
const [hasLoadedEds, edsLoadError] = useEDS();
53-
if (!hasLoadedEds) {
54-
return null;
55-
} else {
56-
return (
57-
<SafeAreaProvider>
58-
<EDSProvider colorScheme="light" density="phone">
59-
<Navigation colorScheme="light" />
60-
<StatusBar />
61-
</EDSProvider>
62-
</SafeAreaProvider>
63-
);
64-
}
52+
const [hasLoadedEds, edsLoadError] = useEDS();
53+
if (!hasLoadedEds) {
54+
return null;
55+
} else {
56+
return (
57+
<SafeAreaProvider>
58+
<EDSProvider colorScheme="light" density="phone">
59+
<Navigation colorScheme="light" />
60+
<StatusBar />
61+
</EDSProvider>
62+
</SafeAreaProvider>
63+
);
64+
}
6565
}
6666
```
6767

@@ -72,10 +72,10 @@ Creating stylesheets that use EDS values is made to be easy and performant. Star
7272

7373
```tsx
7474
const themeStyles = EDSStyleSheet.create((theme) => ({
75-
container: {
76-
backgroundColor: theme.colors.container.background,
77-
borderRadius: theme.geometry.border.containerBorderRadius,
78-
},
75+
container: {
76+
backgroundColor: theme.colors.container.background,
77+
borderRadius: theme.geometry.border.containerBorderRadius,
78+
},
7979
}));
8080
```
8181

@@ -87,8 +87,8 @@ We resolve our stylesheet in our components using the provided `useStyles` hook:
8787

8888
```tsx
8989
const MyComponent = () => {
90-
const styles = useStyles(themeStyles);
91-
return <View style={styles.container} />;
90+
const styles = useStyles(themeStyles);
91+
return <View style={styles.container} />;
9292
};
9393
```
9494

@@ -99,25 +99,25 @@ you to pass any additional props into the style sheet:
9999
```tsx
100100
// Notice that we type our second argument!
101101
const themeStylesWithProps = EDSStyleSheet.create(
102-
(theme, props: { color?: string }) => {
103-
const backgroundColor = color ?? theme.colors.container.background;
104-
105-
return {
106-
container: {
107-
backgroundColor,
108-
},
109-
};
110-
}
102+
(theme, props: { color?: string }) => {
103+
const backgroundColor = color ?? theme.colors.container.background;
104+
105+
return {
106+
container: {
107+
backgroundColor,
108+
},
109+
};
110+
}
111111
);
112112
```
113113

114114
We are then required by our `useStyle` hook to pass these props in with the `EDSStyleSheet`:
115115

116116
```tsx
117117
const MyOtherComponent = () => {
118-
// Normally you'd pass some of your component props into this hook.
119-
const styles = useStyles(themeStylesWithProps, { color: "red" });
120-
return <View style={styles.container} />;
118+
// Normally you'd pass some of your component props into this hook.
119+
const styles = useStyles(themeStylesWithProps, { color: "red" });
120+
return <View style={styles.container} />;
121121
};
122122
```
123123

apps/mobile-storybook/app/(tabs)/_layout.tsx

Lines changed: 0 additions & 37 deletions
This file was deleted.

apps/mobile-storybook/app/(tabs)/components/_layout.tsx

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)