Skip to content

Commit 772f15b

Browse files
carlpooleSteven0351trevor-lambert
authored
feat!: Capacitor version 6 dependency update (#51)
feat(ios, android, react-native): deprecate all stateful implementations that involve portal registration and web-vitals --------- Co-authored-by: Steven Sherry <[email protected]> Co-authored-by: Steven Sherry <[email protected]> Co-authored-by: Trevor Lambert <[email protected]> Co-authored-by: Trevor Lambert <[email protected]>
1 parent 6d2c4ab commit 772f15b

File tree

171 files changed

+40738
-29452
lines changed

Some content is hidden

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

171 files changed

+40738
-29452
lines changed

.eslintignore

-7
This file was deleted.

.github/actions/setup/action.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- run: curl -sL https://raw.githubusercontent.com/ionic-team/portals-cli-releases/main/install.sh | bash
13+
shell: bash
14+
15+
# Caching was causing broken builds. Disabled for now.
16+
# - name: Cache dependencies
17+
# id: yarn-cache
18+
# uses: actions/cache@v3
19+
# with:
20+
# path: |
21+
# **/node_modules
22+
# .yarn/install-state.gz
23+
# key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
24+
# restore-keys: |
25+
# ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
26+
# ${{ runner.os }}-yarn-
27+
28+
- name: Install dependencies
29+
# if: steps.yarn-cache.outputs.cache-hit != 'true'
30+
run: yarn install --immutable
31+
shell: bash
32+
33+
- name: Build example web app
34+
run: |
35+
yarn install --immutable
36+
yarn build
37+
shell: bash
38+
working-directory: web

.github/workflows/ci.yml

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
20+
- name: Lint files
21+
run: yarn lint
22+
23+
- name: Typecheck files
24+
run: yarn typecheck
25+
26+
# test:
27+
# runs-on: ubuntu-latest
28+
# steps:
29+
# - name: Checkout
30+
# uses: actions/checkout@v4
31+
32+
# - name: Setup
33+
# uses: ./.github/actions/setup
34+
35+
# - name: Run unit tests
36+
# run: yarn test --maxWorkers=2 --coverage
37+
38+
build-library:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
44+
- name: Setup
45+
uses: ./.github/actions/setup
46+
47+
- name: Build package
48+
run: yarn prepare
49+
50+
build-android:
51+
runs-on: ubuntu-latest
52+
env:
53+
TURBO_CACHE_DIR: .turbo/android
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
58+
- name: Setup
59+
uses: ./.github/actions/setup
60+
61+
- name: Cache turborepo for Android
62+
uses: actions/cache@v4
63+
with:
64+
path: ${{ env.TURBO_CACHE_DIR }}
65+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
66+
restore-keys: |
67+
${{ runner.os }}-turborepo-android-
68+
69+
- name: Check turborepo cache for Android
70+
run: |
71+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
72+
73+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
74+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
75+
fi
76+
77+
- name: Install JDK
78+
if: env.turbo_cache_hit != 1
79+
uses: actions/setup-java@v3
80+
with:
81+
distribution: 'zulu'
82+
java-version: '17'
83+
84+
- name: Finalize Android SDK
85+
if: env.turbo_cache_hit != 1
86+
run: |
87+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
88+
89+
- name: Cache Gradle
90+
if: env.turbo_cache_hit != 1
91+
uses: actions/cache@v4
92+
with:
93+
path: |
94+
~/.gradle/wrapper
95+
~/.gradle/caches
96+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
97+
restore-keys: |
98+
${{ runner.os }}-gradle-
99+
100+
- name: Build example for Android
101+
env:
102+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
103+
run: |
104+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
105+
106+
build-ios:
107+
runs-on: macos-14
108+
env:
109+
TURBO_CACHE_DIR: .turbo/ios
110+
steps:
111+
- name: Checkout
112+
uses: actions/checkout@v4
113+
114+
- name: Setup
115+
uses: ./.github/actions/setup
116+
117+
- name: Cache turborepo for iOS
118+
uses: actions/cache@v4
119+
with:
120+
path: ${{ env.TURBO_CACHE_DIR }}
121+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
122+
restore-keys: |
123+
${{ runner.os }}-turborepo-ios-
124+
125+
- name: Check turborepo cache for iOS
126+
run: |
127+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
128+
129+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
130+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
131+
fi
132+
133+
- name: Cache cocoapods
134+
if: env.turbo_cache_hit != 1
135+
id: cocoapods-cache
136+
uses: actions/cache@v4
137+
with:
138+
path: |
139+
**/ios/Pods
140+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
141+
restore-keys: |
142+
${{ runner.os }}-cocoapods-
143+
144+
- name: Install cocoapods
145+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
146+
run: |
147+
cd example/ios
148+
pod install
149+
env:
150+
NO_FLIPPER: 1
151+
152+
- name: Build example for iOS
153+
run: |
154+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

.github/workflows/pre-release.yml

+19-20
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@ name: Pre-Release
33
on:
44
push:
55
branches:
6-
- 'release/**'
6+
- "release/**"
77

88
jobs:
99
increment-version:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 14.x
16-
- name: Assign version to RELEASE_VERSION environment variable
17-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV
18-
- name: Bump npm package version
19-
run: npm version $RELEASE_VERSION --no-git-tag-version
20-
env:
21-
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
22-
- name: Push version bump commit
23-
uses: EndBug/add-and-commit@v9
24-
- name: Validate Publish Flow
25-
run: |
26-
npm install
27-
npm publish --dry-run
28-
env:
29-
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
30-
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version-file: .nvmrc
16+
- name: Assign version to RELEASE_VERSION environment variable
17+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV
18+
- name: Bump npm package version
19+
run: yarn version $RELEASE_VERSION --no-git-tag-version
20+
env:
21+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
22+
- name: Push version bump commit
23+
uses: EndBug/add-and-commit@v9
24+
- name: Validate Publish Flow
25+
run: |
26+
yarn install --immutable
27+
yarn pack --dry-run
28+
env:
29+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/release.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ name: Publish NPM Package
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
jobs:
99
publish-to-npm:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 14.x
16-
- name: Publish package
17-
run: |
18-
npm install
19-
npm publish
20-
env:
21-
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version-file: .nvmrc
16+
- name: Publish package
17+
run: |
18+
yarn install --immutable
19+
yarn npm publish
20+
env:
21+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/verify.yml

-24
This file was deleted.

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ example/android/app/src/main/assets
7373
docs/
7474

7575
package-lock.json
76+
77+
**/.yarn/*
78+
.xcode.env.local
79+
80+
!.yarn/releases/
81+
!.yarn/plugins/
82+
.turbo/
83+
coverage/

.husky/.npmignore

-1
This file was deleted.

.husky/commit-msg

-4
This file was deleted.

.husky/pre-commit

-4
This file was deleted.

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18

.vercelignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
docs/
22
.github/
3-
example/
43
node_modules/
54
*.tgz

.watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)