Skip to content
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

Merged
merged 45 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e009b63
initial reorganization
krystofwoldrich Aug 29, 2024
2849a68
enable corepack for build and test ci
krystofwoldrich Aug 29, 2024
9e8dc85
fix core lint
krystofwoldrich Aug 29, 2024
6cb96a3
revert RNSentry imports changes
krystofwoldrich Aug 29, 2024
9ee5c00
Remove global eslint config and its deps which are direct deps of cor…
krystofwoldrich Aug 29, 2024
e048e3b
remove perf test plain app changes
krystofwoldrich Aug 29, 2024
629e9e4
clean up expo sample
krystofwoldrich Aug 29, 2024
f144527
fix samples metro config
krystofwoldrich Aug 29, 2024
122c165
update git ignore return missing ts3.8 test
krystofwoldrich Aug 29, 2024
c0defc2
fix build and test workflow
krystofwoldrich Aug 29, 2024
69be83f
fix missing md files
krystofwoldrich Aug 29, 2024
da000f2
fix caching in build workflow
krystofwoldrich Aug 29, 2024
d108e7a
Update ts 3 8 tests yarn lock
krystofwoldrich Aug 29, 2024
3cf06ea
fix ts 3 8 test deps install order
krystofwoldrich Aug 29, 2024
d8aae91
fix sample application workflow
krystofwoldrich Aug 29, 2024
72bb4b2
enable corepack first to use node cache
krystofwoldrich Aug 29, 2024
edb072b
fix android sentry.gradle path
krystofwoldrich Aug 29, 2024
89ae2ec
fix native tests paths
krystofwoldrich Aug 29, 2024
0f0437e
fix android sample build issue
krystofwoldrich Aug 29, 2024
216449c
fix performance test
krystofwoldrich Aug 29, 2024
f101155
update type check to be separate package and use yalc
krystofwoldrich Aug 30, 2024
023c7d2
update e2e test location and ci
krystofwoldrich Aug 30, 2024
08b4a2a
update git ignore
krystofwoldrich Aug 30, 2024
ff75800
skip appium chrome driver install
krystofwoldrich Aug 30, 2024
7e145ce
fix chromedriver install
krystofwoldrich Aug 30, 2024
f64c120
use old node after test app creation
krystofwoldrich Sep 2, 2024
72812d3
fix old test apps path for ruby setup
krystofwoldrich Sep 2, 2024
e9fbb30
remove test and lint scripts from perf apps
krystofwoldrich Sep 2, 2024
0403ffb
drop yalc from metric as it changes yarn lock
krystofwoldrich Sep 2, 2024
8e95d0d
allow mutations for type check test
krystofwoldrich Sep 2, 2024
6c17163
use node cache for build and test jobs
krystofwoldrich Sep 2, 2024
312c1b5
fix e2e tests install typo
krystofwoldrich Sep 2, 2024
02f5d53
7.0.0-alpha.0
krystofwoldrich Sep 2, 2024
ba326ac
fix versioning of the repository
krystofwoldrich Sep 2, 2024
97e11a3
fix lock file
krystofwoldrich Sep 2, 2024
1de81c5
clean up unused env
krystofwoldrich Sep 2, 2024
993844d
fix craft releases
krystofwoldrich Sep 2, 2024
18fc781
Merge branch 'v6' into kw/change-to-monorepo
krystofwoldrich Sep 2, 2024
ec9c85e
enable node 18 and corepack for release jobs
krystofwoldrich Sep 3, 2024
88a4611
set version to 6.0.0-alpha.0
krystofwoldrich Sep 3, 2024
bf5bd4b
Merge remote-tracking branch 'origin/v6' into kw/change-to-monorepo
krystofwoldrich Sep 3, 2024
642218f
fix native versioning
krystofwoldrich Sep 3, 2024
481488d
fix tarball builds
krystofwoldrich Sep 3, 2024
28f029b
fix publish private e2e test package for e2e tests
krystofwoldrich Sep 3, 2024
8dcb8f3
clean core tarballs before creating new
krystofwoldrich Sep 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .craft.yml
Copy link
Member

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.

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ targets:
- name: registry
sdks:
npm:@sentry/react-native:
includeNames: /none/
includeNames: /^sentry-react-native-\d.*\.tgz$/
135 changes: 44 additions & 91 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l (no action required):
Are you keeping the readme of the SDK top level and you copy it to the package to get it into the tarball? No objections btw, just curious.

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

Expand All @@ -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
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,19 @@ jobs:
--outputPath codegen
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: yarn.lock
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: "adopt"
- name: Gradle cache
uses: gradle/gradle-build-action@v3
- 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: |
cd samples/react-native
yarn install
run: yarn install
- name: Codegen
run: ${{ matrix.command }}
Loading
Loading