Skip to content

Commit da0686e

Browse files
committed
fix: monorepo dependencies
1 parent 88dc568 commit da0686e

28 files changed

+409
-187
lines changed

.github/workflows/app-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020

2121
- name: Setup Xcode
2222
run: |
23-
cd ./app
23+
cd ./apps/app
2424
xcodebuild -downloadAllPlatforms
2525
2626
- name: Build
2727
run: |
28-
cd ./app
28+
cd ./apps/app
2929
xcodebuild build -scheme metro-now -project metro-now.xcodeproj -destination 'platform=iOS Simulator,name=iPhone ${{ matrix.device }},OS=${{ matrix.iOS }}' | xcpretty && exit ${PIPESTATUS[0]}
3030
3131
- name: Test
3232
run: |
33-
cd ./app
33+
cd ./apps/app
3434
xcodebuild test -scheme metro-now -project metro-now.xcodeproj -destination 'platform=iOS Simulator,name=iPhone ${{ matrix.device }},OS=${{ matrix.iOS }}' | xcpretty && exit ${PIPESTATUS[0]}

.github/workflows/backend-ci.yaml

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

.github/workflows/check-format.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,19 @@ jobs:
1313
swift-version: 5.10
1414
- uses: actions/checkout@v4
1515

16-
- name: Check Swift format
17-
run: swiftformat . --lint
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
21+
- uses: pnpm/action-setup@v3
22+
with:
23+
version: 8
24+
25+
- name: Check JS format
26+
run: |
27+
pnpm format:swift:check
28+
1829
1930
js-format-check:
2031
name: JS format check 💅
@@ -33,7 +44,5 @@ jobs:
3344
version: 8
3445

3546
- name: Check JS format
36-
run: |
37-
pnpm i -g turbo
38-
pnpm i -r
39-
pnpm run prettier:format:check
47+
run: |
48+
pnpm format:prettier:check

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Backend CI
2+
3+
on: push
4+
5+
jobs:
6+
turbo-ci:
7+
name: Turbo CI 🚀
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, macos-latest]
11+
runs-on: ${{ matrix.os }}
12+
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
19+
- uses: pnpm/action-setup@v3
20+
with:
21+
version: 8
22+
23+
- name: Setup Node.js environment
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Build 🏗️
33+
run: pnpm build
34+
35+
- name: Check format 💅
36+
run: pnpm format:check

.github/workflows/docs-ci.yml

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

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.19.1
1+
18

.prettierrc.json

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

apps/app/metro-now.xcodeproj/project.pbxproj

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
2D1B2C502BFAD8ED007ED5EB /* metroRoutesTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1B2C4E2BFAD8ED007ED5EB /* metroRoutesTypes.swift */; };
2424
2D1B2C522BFAD90B007ED5EB /* metroStationsTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1B2C512BFAD90B007ED5EB /* metroStationsTypes.swift */; };
2525
2D1B2C532BFAD90B007ED5EB /* metroStationsTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D1B2C512BFAD90B007ED5EB /* metroStationsTypes.swift */; };
26-
2D1B2C592BFAD9FB007ED5EB /* metro-stations.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2D1B2C562BFAD9FB007ED5EB /* metro-stations.geojson */; };
27-
2D1B2C5A2BFAD9FB007ED5EB /* metro-stations.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2D1B2C562BFAD9FB007ED5EB /* metro-stations.geojson */; };
2826
2D350E672BFBE50600F68039 /* MapStationAnnotationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D350E662BFBE50600F68039 /* MapStationAnnotationView.swift */; };
29-
2D350E692BFBF6B100F68039 /* metro-routes.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2D350E682BFBF6B100F68039 /* metro-routes.geojson */; };
30-
2D350E6A2BFBF6B100F68039 /* metro-routes.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2D350E682BFBF6B100F68039 /* metro-routes.geojson */; };
3127
2D4486862BFAA10A005C59CE /* metro_now_watchApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4486852BFAA10A005C59CE /* metro_now_watchApp.swift */; };
3228
2D4486882BFAA10A005C59CE /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4486872BFAA10A005C59CE /* ContentView.swift */; };
3329
2D44868A2BFAA10B005C59CE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2D4486892BFAA10B005C59CE /* Assets.xcassets */; };
@@ -47,6 +43,12 @@
4743
2DC63A222BF50EDD00A72C7F /* timeUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DC63A212BF50EDD00A72C7F /* timeUtilsTests.swift */; };
4844
2DC63A242BF5266700A72C7F /* metroUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DC63A232BF5266700A72C7F /* metroUtilsTests.swift */; };
4945
2DC63A262BF5280F00A72C7F /* jsonUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DC63A252BF5280F00A72C7F /* jsonUtilsTests.swift */; };
46+
2DD3DEA92C07D319002233DE /* metro-stations.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2DD3DEA72C07D319002233DE /* metro-stations.geojson */; };
47+
2DD3DEAA2C07D319002233DE /* metro-stations.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2DD3DEA72C07D319002233DE /* metro-stations.geojson */; };
48+
2DD3DEAB2C07D319002233DE /* metro-stations.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2DD3DEA72C07D319002233DE /* metro-stations.geojson */; };
49+
2DD3DEAC2C07D319002233DE /* metro-routes.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2DD3DEA82C07D319002233DE /* metro-routes.geojson */; };
50+
2DD3DEAD2C07D319002233DE /* metro-routes.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2DD3DEA82C07D319002233DE /* metro-routes.geojson */; };
51+
2DD3DEAE2C07D319002233DE /* metro-routes.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2DD3DEA82C07D319002233DE /* metro-routes.geojson */; };
5052
2DF48A472C01F185002F754E /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DF48A462C01F185002F754E /* WidgetKit.framework */; };
5153
2DF48A492C01F185002F754E /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DF48A482C01F185002F754E /* SwiftUI.framework */; };
5254
2DF48A4C2C01F186002F754E /* metro_now_widgetsBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DF48A4B2C01F186002F754E /* metro_now_widgetsBundle.swift */; };
@@ -128,9 +130,7 @@
128130
2D1B2C4A2BFAD807007ED5EB /* fileUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = fileUtils.swift; sourceTree = "<group>"; };
129131
2D1B2C4E2BFAD8ED007ED5EB /* metroRoutesTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = metroRoutesTypes.swift; sourceTree = "<group>"; };
130132
2D1B2C512BFAD90B007ED5EB /* metroStationsTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = metroStationsTypes.swift; sourceTree = "<group>"; };
131-
2D1B2C562BFAD9FB007ED5EB /* metro-stations.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "metro-stations.geojson"; path = "../../../data/metro-stations.geojson"; sourceTree = "<group>"; };
132133
2D350E662BFBE50600F68039 /* MapStationAnnotationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapStationAnnotationView.swift; sourceTree = "<group>"; };
133-
2D350E682BFBF6B100F68039 /* metro-routes.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "metro-routes.geojson"; path = "../../../data/metro-routes.geojson"; sourceTree = "<group>"; };
134134
2D4486832BFAA10A005C59CE /* metro-now-watch Watch App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "metro-now-watch Watch App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
135135
2D4486852BFAA10A005C59CE /* metro_now_watchApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = metro_now_watchApp.swift; sourceTree = "<group>"; };
136136
2D4486872BFAA10A005C59CE /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@@ -152,6 +152,8 @@
152152
2DC63A212BF50EDD00A72C7F /* timeUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = timeUtilsTests.swift; sourceTree = "<group>"; };
153153
2DC63A232BF5266700A72C7F /* metroUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = metroUtilsTests.swift; sourceTree = "<group>"; };
154154
2DC63A252BF5280F00A72C7F /* jsonUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = jsonUtilsTests.swift; sourceTree = "<group>"; };
155+
2DD3DEA72C07D319002233DE /* metro-stations.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "metro-stations.geojson"; path = "../../../../packages/data/metro-stations.geojson"; sourceTree = "<group>"; };
156+
2DD3DEA82C07D319002233DE /* metro-routes.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "metro-routes.geojson"; path = "../../../../packages/data/metro-routes.geojson"; sourceTree = "<group>"; };
155157
2DF48A442C01F185002F754E /* metro-now-widgetsExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "metro-now-widgetsExtension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
156158
2DF48A462C01F185002F754E /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
157159
2DF48A482C01F185002F754E /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
@@ -249,8 +251,8 @@
249251
2D1B2C542BFAD93F007ED5EB /* Data */ = {
250252
isa = PBXGroup;
251253
children = (
252-
2D1B2C562BFAD9FB007ED5EB /* metro-stations.geojson */,
253-
2D350E682BFBF6B100F68039 /* metro-routes.geojson */,
254+
2DD3DEA82C07D319002233DE /* metro-routes.geojson */,
255+
2DD3DEA72C07D319002233DE /* metro-stations.geojson */,
254256
2DF66D972BFD39B000B31FA2 /* test-coordinates.swift */,
255257
);
256258
path = Data;
@@ -560,8 +562,8 @@
560562
buildActionMask = 2147483647;
561563
files = (
562564
2D44868D2BFAA10B005C59CE /* Preview Assets.xcassets in Resources */,
563-
2D350E6A2BFBF6B100F68039 /* metro-routes.geojson in Resources */,
564-
2D1B2C5A2BFAD9FB007ED5EB /* metro-stations.geojson in Resources */,
565+
2DD3DEAD2C07D319002233DE /* metro-routes.geojson in Resources */,
566+
2DD3DEAA2C07D319002233DE /* metro-stations.geojson in Resources */,
565567
2D44868A2BFAA10B005C59CE /* Assets.xcassets in Resources */,
566568
);
567569
runOnlyForDeploymentPostprocessing = 0;
@@ -571,8 +573,8 @@
571573
buildActionMask = 2147483647;
572574
files = (
573575
2DC639E32BF3CCBC00A72C7F /* Preview Assets.xcassets in Resources */,
574-
2D350E692BFBF6B100F68039 /* metro-routes.geojson in Resources */,
575-
2D1B2C592BFAD9FB007ED5EB /* metro-stations.geojson in Resources */,
576+
2DD3DEAC2C07D319002233DE /* metro-routes.geojson in Resources */,
577+
2DD3DEA92C07D319002233DE /* metro-stations.geojson in Resources */,
576578
2DC639E02BF3CCBC00A72C7F /* Assets.xcassets in Resources */,
577579
);
578580
runOnlyForDeploymentPostprocessing = 0;
@@ -588,6 +590,8 @@
588590
isa = PBXResourcesBuildPhase;
589591
buildActionMask = 2147483647;
590592
files = (
593+
2DD3DEAE2C07D319002233DE /* metro-routes.geojson in Resources */,
594+
2DD3DEAB2C07D319002233DE /* metro-stations.geojson in Resources */,
591595
2DF48A502C01F186002F754E /* Assets.xcassets in Resources */,
592596
);
593597
runOnlyForDeploymentPostprocessing = 0;

apps/backend-v1/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ WORKDIR /usr/src/app
77
# this will cache them and speed up future builds
88
FROM base AS install
99
RUN mkdir -p /temp/dev
10-
COPY package.json pnpm-lock.yaml /temp/dev/
11-
RUN cd /temp/dev && pnpm install --frozen-lockfile
10+
COPY package.json /temp/dev/
11+
RUN cd /temp/dev && pnpm install
1212

1313
# install with --production (exclude devDependencies)
1414
RUN mkdir -p /temp/prod
15-
COPY package.json pnpm-lock.yaml /temp/prod/
16-
RUN cd /temp/prod && pnpm install --frozen-lockfile --production
15+
COPY package.json /temp/prod/
16+
RUN cd /temp/prod && pnpm install --production
1717

1818
# copy node_modules from temp directory
1919
# then copy all (non-ignored) project files into the image

apps/backend-v1/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
{
2-
"name": "metro-now-server",
2+
"name": "@metro-now/backend-v1",
33
"module": "src/server.ts",
44
"type": "module",
55
"version": "0.0.1",
66
"scripts": {
7-
"start": "bun run src/server.ts",
8-
"dev": "bun --watch src/server.ts",
9-
"build": "bun build src/server.ts --outdir build --minify",
10-
"docker:build": "docker build -t metro-now-server ."
7+
"start": "pnpm exec bun run src/server.ts",
8+
"dev": "pnpm exec bun --watch src/server.ts",
9+
"build": "pnpm exec bun build src/server.ts --outdir build --minify",
10+
"docker": "docker build -t metro-now-server .",
11+
"typecheck": "tsc --pretty"
1112
},
1213
"dependencies": {
14+
"@metro-now/validation": "workspace:*",
1315
"radash": "^12.1.0",
1416
"zod": "^3.22.4"
1517
},

apps/backend-v2/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
{
2-
"name": "metro-now-backend-v2",
2+
"name": "@metro-now/backend-v2",
33
"version": "0.2.0",
44
"license": "MPL-2.0",
5-
"author": {
6-
"name": "Krystof Kratky",
7-
"url": "https://github.com/krystxf",
8-
"email": "krystof.kratky2003@gmail.com"
9-
},
105
"main": "src/server.ts",
116
"scripts": {
127
"build": "npx tsc",
138
"start": "node build/src/server.js",
149
"dev": "nodemon src/server.ts",
15-
"test": "jest"
10+
"test": "jest",
11+
"typecheck": "tsc --pretty"
1612
},
1713
"dependencies": {
14+
"@metro-now/validation": "workspace:*",
1815
"dotenv": "^16.4.5",
1916
"express": "^4.19.2",
2017
"radash": "^12.1.0",

apps/docs/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"name": "metro-now-docs",
2+
"name": "@metro-now/docs",
33
"homepage": "https://metro-now.vercel.app/",
44
"license": "MPL-2.0",
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"typecheck": "tsc --pretty"
1011
},
1112
"dependencies": {
1213
"@next/mdx": "^14.2.2",
@@ -17,6 +18,7 @@
1718
"react-dom": "^18.2.0"
1819
},
1920
"devDependencies": {
21+
"@metro-now/config": "workspace:*",
2022
"@types/node": "^20",
2123
"@types/react": "^18",
2224
"@types/react-dom": "^18",

0 commit comments

Comments
 (0)