Skip to content

Commit ddcabff

Browse files
misc: Move to monorepo structure and Yarn V3 (#4057)
1 parent 73c8c62 commit ddcabff

File tree

519 files changed

+27416
-205404
lines changed

Some content is hidden

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

519 files changed

+27416
-205404
lines changed

Diff for: .craft.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ targets:
77
- name: registry
88
sdks:
99
npm:@sentry/react-native:
10-
includeNames: /none/
10+
includeNames: /^sentry-react-native-\d.*\.tgz$/

Diff for: .github/workflows/buildandtest.yml

+42-91
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@ jobs:
1818
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
1919
steps:
2020
- uses: actions/checkout@v4
21+
- run: corepack enable
2122
- uses: actions/setup-node@v4
2223
with:
2324
node-version: 18
24-
- uses: actions/cache@v4
25-
id: cache
26-
with:
27-
path: node_modules
28-
key: ${{ runner.os }}-${{ github.sha }}
25+
cache: 'yarn'
26+
cache-dependency-path: yarn.lock
2927
- name: Install Dependencies
30-
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
3128
run: yarn install
3229
- name: Test
3330
run: yarn test
@@ -39,49 +36,32 @@ jobs:
3936
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
4037
steps:
4138
- uses: actions/checkout@v4
42-
- uses: actions/cache@v4
43-
id: cache
39+
- run: corepack enable
40+
- uses: actions/setup-node@v4
4441
with:
45-
path: node_modules
46-
key: ${{ runner.os }}-${{ github.sha }}
42+
node-version: 18
43+
cache: 'yarn'
44+
cache-dependency-path: yarn.lock
4745
- name: Install Dependencies
48-
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
4946
run: yarn install
5047
- name: Lint
5148
run: yarn lint
5249

53-
job_lint_sample_new_arch:
54-
name: Lint Sample
55-
runs-on: ubuntu-latest
56-
needs: [diff_check]
57-
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
58-
steps:
59-
- uses: actions/checkout@v4
60-
- uses: actions/cache@v4
61-
id: cache
62-
with:
63-
path: samples/react-native/node_modules
64-
key: ${{ runner.os }}-${{ github.sha }}
65-
- name: Install Dependencies
66-
if: steps.cache.outputs['cache-hit'] != 'true'
67-
run: yarn install
68-
working-directory: samples/react-native
69-
- name: Lint Sample
70-
run: yarn lint
71-
working-directory: samples/react-native
72-
7350
job_check_integrity:
7451
name: Check package integrity
7552
runs-on: ubuntu-latest
7653
needs: [diff_check]
7754
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
7855
steps:
7956
- uses: actions/checkout@v4
80-
- uses: actions/cache@v4
81-
id: cache
57+
- run: corepack enable
58+
- uses: actions/setup-node@v4
8259
with:
83-
path: node_modules
84-
key: ${{ runner.os }}-${{ github.sha }}
60+
node-version: 18
61+
cache: 'yarn'
62+
cache-dependency-path: yarn.lock
63+
- name: Install Dependencies
64+
run: yarn install
8565
- name: Save initial lock file
8666
run: cp yarn.lock yarn.lock.initial
8767
- name: Install Dependencies (update lock if necessary)
@@ -97,112 +77,97 @@ jobs:
9777
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
9878
steps:
9979
- uses: actions/checkout@v4
80+
- run: corepack enable
10081
- uses: actions/setup-node@v4
10182
with:
10283
node-version: 18
103-
- uses: actions/cache@v4
104-
id: cache
105-
with:
106-
path: node_modules
107-
key: ${{ runner.os }}-${{ github.sha }}
84+
cache: 'yarn'
85+
cache-dependency-path: yarn.lock
10886
- name: Install Dependencies
109-
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
11087
run: yarn install
11188
- name: Build
11289
run: yarn build
11390
- name: Archive dist
11491
uses: actions/upload-artifact@v4
11592
with:
11693
name: dist
117-
path: dist
94+
path: packages/core/dist
11895
- name: Archive ts3.8
11996
uses: actions/upload-artifact@v4
12097
with:
12198
name: ts3.8
122-
path: ts3.8
99+
path: packages/core/ts3.8
123100
- name: Archive Expo Plugin
124101
uses: actions/upload-artifact@v4
125102
with:
126103
name: expo-plugin
127-
path: plugin/build
104+
path: packages/core/plugin/build
128105
- name: Pack
129-
run: yarn pack
106+
run: yarn build:tarball
130107
- name: Archive Artifacts
131108
uses: actions/upload-artifact@v4
132109
with:
133110
name: ${{ github.sha }}
134111
path: |
135-
${{ github.workspace }}/*.tgz
112+
${{ github.workspace }}/packages/core/*.tgz
136113
137114
job_type_check:
138115
name: Type Check Typescript 3.8
139116
runs-on: ubuntu-latest
140117
needs: [job_build, diff_check]
141118
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
119+
env:
120+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
142121
steps:
143122
- uses: actions/checkout@v4
123+
- run: corepack enable
144124
- uses: actions/setup-node@v4
145125
with:
146126
node-version: 18
147-
- uses: actions/cache@v4
148-
id: cache
149-
with:
150-
path: test/typescript/ts3.8/node_modules
151-
key: ${{ runner.os }}-${{ github.sha }}-ts3.8
127+
cache: 'yarn'
128+
cache-dependency-path: yarn.lock
129+
- name: Install Dependencies
130+
run: yarn install
152131
- name: Download dist
153132
uses: actions/download-artifact@v4
154133
with:
155134
name: dist
156-
path: dist
135+
path: packages/core/dist
157136
- name: Download ts3.8
158137
uses: actions/download-artifact@v4
159138
with:
160139
name: ts3.8
161-
path: ts3.8
140+
path: packages/core/ts3.8
162141
- name: Install Global Dependencies
163-
run: yarn global add yalc
164-
- name: Publish SDK
165-
run: yalc publish
166-
- name: Install SDK
167-
working-directory: test/typescript/ts3.8
168-
run: yalc add @sentry/react-native
169-
- name: Install Dependencies
170-
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
171-
working-directory: test/typescript/ts3.8
172-
run: yarn install
142+
run: npm i -g add yalc
173143
- name: Type Check
174-
working-directory: test/typescript/ts3.8
144+
working-directory: dev-packages/type-check
175145
run: yarn type-check
176-
177146
job_circular_dep_check:
178147
name: Circular Dependency Check
179148
runs-on: ubuntu-latest
180149
needs: [job_build, diff_check]
181150
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
182151
steps:
183152
- uses: actions/checkout@v4
153+
- run: corepack enable
184154
- uses: actions/setup-node@v4
185155
with:
186156
node-version: 18
187-
- name: Cache Dependencies
188-
uses: actions/cache@v4
189-
id: cache
190-
with:
191-
path: node_modules
192-
key: ${{ runner.os }}-${{ github.sha }}
157+
cache: 'yarn'
158+
cache-dependency-path: yarn.lock
193159
- name: Install Dependencies
194-
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
195160
run: yarn install
196161
- name: Download dist
197162
uses: actions/download-artifact@v4
198163
with:
199164
name: dist
200-
path: dist
165+
path: packages/core/dist
201166
- name: Download Expo Plugin
202167
uses: actions/download-artifact@v4
203168
with:
204169
name: expo-plugin
205-
path: plugin/build
170+
path: packages/core/plugin/build
206171
- name: Run madge
207172
run: yarn circularDepCheck
208173

@@ -219,28 +184,14 @@ jobs:
219184
dev: [true, false]
220185
steps:
221186
- uses: actions/checkout@v4
187+
- run: corepack enable
222188
- uses: actions/setup-node@v4
223189
with:
224190
node-version: 18
225-
- name: Cache Dependencies
226-
uses: actions/cache@v4
227-
id: cache
228-
with:
229-
path: node_modules
230-
key: ${{ runner.os }}-${{ github.sha }}
231-
- name: Cache Sample Dependencies
232-
uses: actions/cache@v4
233-
id: cache-sample
234-
with:
235-
path: samples/react-native/node_modules
236-
key: ${{ runner.os }}-${{ hashFiles('samples/react-native/yarn.lock') }}
191+
cache: 'yarn'
192+
cache-dependency-path: yarn.lock
237193
- name: Install Dependencies
238-
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
239-
run: yarn install
240-
- name: Install Sample Dependencies
241-
if: ${{ steps.cache-sample.outputs['cache-hit'] != 'true' }}
242194
run: yarn install
243-
working-directory: samples/react-native
244195
- name: Build
245196
run: yarn build
246197
- name: Make Sample Build Directory

Diff for: .github/workflows/codegen.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,19 @@ jobs:
3131
--outputPath codegen
3232
steps:
3333
- uses: actions/checkout@v4
34+
- run: corepack enable
3435
- uses: actions/setup-node@v4
3536
with:
3637
node-version: 18
38+
cache: 'yarn'
39+
cache-dependency-path: yarn.lock
3740
- uses: actions/setup-java@v4
3841
with:
3942
java-version: '17'
4043
distribution: "adopt"
4144
- name: Gradle cache
4245
uses: gradle/gradle-build-action@v3
43-
- uses: actions/cache@v4
44-
id: cache
45-
with:
46-
path: samples/react-native/node_modules
47-
key: ${{ runner.os }}-${{ github.sha }}
4846
- name: Install Dependencies
49-
if: steps.cache.outputs['cache-hit'] != 'true'
50-
run: |
51-
cd samples/react-native
52-
yarn install
47+
run: yarn install
5348
- name: Codegen
5449
run: ${{ matrix.command }}

0 commit comments

Comments
 (0)