-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: Move to monorepo structure and Yarn V3 #4057
Changes from 41 commits
e009b63
2849a68
9e8dc85
6cb96a3
9ee5c00
e048e3b
629e9e4
f144527
122c165
c0defc2
69be83f
da000f2
d108e7a
3cf06ea
d8aae91
72bb4b2
edb072b
89ae2ec
0f0437e
216449c
f101155
023c7d2
08b4a2a
ff75800
7e145ce
f64c120
72812d3
e9fbb30
0403ffb
8e95d0d
6c17163
312c1b5
02f5d53
ba326ac
97e11a3
1de81c5
993844d
18fc781
ec9c85e
88a4611
bf5bd4b
642218f
481488d
28f029b
8dcb8f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,16 +18,13 @@ jobs: | |
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }} | ||
run: yarn install | ||
- name: Test | ||
run: yarn test | ||
|
@@ -39,49 +36,32 @@ jobs: | |
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
node-version: 18 | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }} | ||
run: yarn install | ||
- name: Lint | ||
run: yarn lint | ||
|
||
job_lint_sample_new_arch: | ||
name: Lint Sample | ||
runs-on: ubuntu-latest | ||
needs: [diff_check] | ||
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: samples/react-native/node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
- name: Install Dependencies | ||
if: steps.cache.outputs['cache-hit'] != 'true' | ||
run: yarn install | ||
working-directory: samples/react-native | ||
- name: Lint Sample | ||
run: yarn lint | ||
working-directory: samples/react-native | ||
|
||
job_check_integrity: | ||
name: Check package integrity | ||
runs-on: ubuntu-latest | ||
needs: [diff_check] | ||
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
node-version: 18 | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
run: yarn install | ||
- name: Save initial lock file | ||
run: cp yarn.lock yarn.lock.initial | ||
- name: Install Dependencies (update lock if necessary) | ||
|
@@ -97,112 +77,99 @@ jobs: | |
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }} | ||
run: yarn install | ||
- name: Build | ||
run: yarn build | ||
- name: Archive dist | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
path: packages/core/dist | ||
- name: Archive ts3.8 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ts3.8 | ||
path: ts3.8 | ||
path: packages/core/ts3.8 | ||
- name: Archive Expo Plugin | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: expo-plugin | ||
path: plugin/build | ||
path: packages/core/plugin/build | ||
- name: Pack | ||
run: yarn pack | ||
run: | | ||
cp README.md packages/core | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. l (no action required): In the JS SDK monorepo we keep a Readme per package but I guess that's only gonna become necessary if you have more than one package. |
||
npm pack | ||
- name: Archive Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.sha }} | ||
path: | | ||
${{ github.workspace }}/*.tgz | ||
${{ github.workspace }}/packages/core/*.tgz | ||
|
||
job_type_check: | ||
name: Type Check Typescript 3.8 | ||
runs-on: ubuntu-latest | ||
needs: [job_build, diff_check] | ||
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
env: | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: test/typescript/ts3.8/node_modules | ||
key: ${{ runner.os }}-${{ github.sha }}-ts3.8 | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
run: yarn install | ||
- name: Download dist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
path: packages/core/dist | ||
- name: Download ts3.8 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ts3.8 | ||
path: ts3.8 | ||
path: packages/core/ts3.8 | ||
- name: Install Global Dependencies | ||
run: yarn global add yalc | ||
- name: Publish SDK | ||
run: yalc publish | ||
- name: Install SDK | ||
working-directory: test/typescript/ts3.8 | ||
run: yalc add @sentry/react-native | ||
- name: Install Dependencies | ||
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }} | ||
working-directory: test/typescript/ts3.8 | ||
run: yarn install | ||
run: npm i -g add yalc | ||
- name: Type Check | ||
working-directory: test/typescript/ts3.8 | ||
working-directory: dev-packages/type-check | ||
run: yarn type-check | ||
|
||
job_circular_dep_check: | ||
name: Circular Dependency Check | ||
runs-on: ubuntu-latest | ||
needs: [job_build, diff_check] | ||
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Cache Dependencies | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }} | ||
run: yarn install | ||
- name: Download dist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
path: packages/core/dist | ||
- name: Download Expo Plugin | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: expo-plugin | ||
path: plugin/build | ||
path: packages/core/plugin/build | ||
- name: Run madge | ||
run: yarn circularDepCheck | ||
|
||
|
@@ -219,28 +186,14 @@ jobs: | |
dev: [true, false] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Cache Dependencies | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
- name: Cache Sample Dependencies | ||
uses: actions/cache@v4 | ||
id: cache-sample | ||
with: | ||
path: samples/react-native/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('samples/react-native/yarn.lock') }} | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
- name: Install Dependencies | ||
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }} | ||
run: yarn install | ||
- name: Install Sample Dependencies | ||
if: ${{ steps.cache-sample.outputs['cache-hit'] != 'true' }} | ||
run: yarn install | ||
working-directory: samples/react-native | ||
- name: Build | ||
run: yarn build | ||
- name: Make Sample Build Directory | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No immediate action required since you only publish one package at the moment. Once you have more than one pkg, I'd recommend to create one NPM target per package and release in package dependency order.