Skip to content

Commit 3658015

Browse files
feat!: Capacitor 8 upgrade (#295)
1 parent 6a7ea7b commit 3658015

17 files changed

Lines changed: 173 additions & 58 deletions

.github/workflows/ci.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@ jobs:
1818
uses: styfle/cancel-workflow-action@ce177499ccf9fd2aded3b0426c97e5434c2e8a73
1919
with:
2020
access_token: ${{ secrets.GITHUB_TOKEN }}
21+
- uses: actions/checkout@v6
2122
- name: Get Latest
22-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v6
2324
with:
24-
node-version: 14.x
25-
- uses: actions/checkout@v2
26-
- name: Restore Dependency Cache
27-
uses: actions/cache@v1
28-
with:
29-
path: ~/.npm
30-
key: ${{ runner.OS }}-dependency-cache-${{ hashFiles('**/package.json') }}
25+
node-version: 22
26+
cache: npm
27+
cache-dependency-path: '**/package-lock.json'
3128
- name: Get Package Version
3229
id: package-version
3330
uses: martinbeentjes/npm-get-version-action@master
@@ -39,15 +36,12 @@ jobs:
3936
needs:
4037
- setup
4138
steps:
42-
- uses: actions/setup-node@v1
43-
with:
44-
node-version: 16.x
45-
- uses: actions/checkout@v2
46-
- name: Restore Dependency Cache
47-
uses: actions/cache@v1
39+
- uses: actions/checkout@v6
40+
- uses: actions/setup-node@v6
4841
with:
49-
path: ~/.npm
50-
key: ${{ runner.OS }}-dependency-cache-${{ hashFiles('**/package.json') }}
42+
node-version: 22
43+
cache: npm
44+
cache-dependency-path: '**/package-lock.json'
5145
- run: npm install
5246
working-directory: plugin
5347
- run: npm run build

.github/workflows/docs-preview.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
name: preview-${{ github.event.number }}
2727
url: https://${{ env.SLUG }}.ionicpreview.com
2828
steps:
29-
- uses: actions/checkout@v3
30-
- uses: actions/setup-node@v3
29+
- uses: actions/checkout@v6
30+
- uses: actions/setup-node@v6
3131
with:
32-
node-version: 18
32+
node-version: 22
3333
cache: npm
34-
cache-dependency-path: website/package-lock.json
34+
cache-dependency-path: '**/package-lock.json'
3535
- name: Build
3636
run: |
3737
npm ci
3838
npm run build
39-
- uses: aws-actions/configure-aws-credentials@v1
39+
- uses: aws-actions/configure-aws-credentials@v6
4040
with:
4141
role-to-assume: arn:aws:iam::319312831725:role/github-docs
4242
aws-region: us-east-1

.github/workflows/docs-production.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ jobs:
2828
name: production
2929
url: https://ionic.io/docs/${{ env.SLUG }}
3030
steps:
31-
- uses: actions/checkout@v3
32-
- uses: actions/setup-node@v3
31+
- uses: actions/checkout@v6
32+
- uses: actions/setup-node@v6
3333
with:
34-
node-version: 18
34+
node-version: 22
3535
cache: npm
36-
cache-dependency-path: website/package-lock.json
36+
cache-dependency-path: '**/package-lock.json'
3737
- name: Build
3838
run: |
3939
npm ci
4040
npm run build
41-
- uses: aws-actions/configure-aws-credentials@v1
41+
- uses: aws-actions/configure-aws-credentials@v6
4242
with:
4343
role-to-assume: arn:aws:iam::319312831725:role/github-docs
4444
aws-region: us-east-1

.github/workflows/pre-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
increment-version:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
12+
- uses: actions/checkout@v6
13+
- uses: actions/setup-node@v6
1414
with:
15-
node-version: 16.x
15+
node-version: 22
1616
- name: Assign version to RELEASE_VERSION environment variable
1717
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV
1818
- name: Bump npm package version

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
publish-to-npm:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
12+
- uses: actions/checkout@v6
13+
- uses: actions/setup-node@v6
1414
with:
15-
node-version: 16.x
15+
node-version: 22
1616
- name: Publish package
1717
run: |
1818
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc

lerna.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"capacitorVersion": "7.0.0",
3-
"iosMinVersion": "14.0",
4-
"androidMinSdk": "23",
2+
"capacitorVersion": "8.0.0",
3+
"iosMinVersion": "15.0",
4+
"androidMinSdk": "24",
55
"rnMinVersion": "0.75.4",
66
"androidLiveUpdatesVersion": "0.5.5",
7-
"rnVersion": "0.8.0",
8-
"iosVersion": "0.12.0",
9-
"androidVersion": "0.12.0",
7+
"rnVersion": "0.8.5",
8+
"iosVersion": "0.13.0",
9+
"androidVersion": "0.13.0",
1010
"cliVersion": "0.3.1",
11-
"version": "0.12.0"
12-
}
11+
"version": "0.13.0"
12+
}

plugin/.prettierignore

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

plugin/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@
2929
"lint": "npm run eslint && npm run prettier -- --check",
3030
"fmt": "npm run eslint -- --fix && npm run prettier -- --write",
3131
"eslint": "eslint . --ext ts",
32-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
32+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
3333
"docgen": "docgen --api PortalsPlugin --output-readme README.md --output-json dist/docs.json",
34-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
34+
"build": "npm run clean && tsc && rollup -c rollup.config.mjs",
3535
"clean": "rimraf ./dist && rimraf ./build && rimraf ./types",
3636
"watch": "tsc --watch",
3737
"prepublishOnly": "npm run build"
3838
},
3939
"devDependencies": {
40-
"@capacitor/core": "^7.0.0",
41-
"@capacitor/docgen": "^0.0.10",
40+
"@capacitor/core": "^8.0.0",
41+
"@capacitor/docgen": "^0.3.1",
4242
"@ionic/eslint-config": "^0.4.0",
43-
"@ionic/prettier-config": "^1.0.1",
43+
"@ionic/prettier-config": "^4.0.0",
4444
"@ionic/swiftlint-config": "^2.0.0",
45-
"@rollup/plugin-node-resolve": "^13.0.4",
46-
"eslint": "^8.57.0",
47-
"prettier": "~2.2.0",
48-
"prettier-plugin-java": "~1.0.0",
49-
"rimraf": "^6.0.1",
50-
"rollup": "^2.32.0",
45+
"@rollup/plugin-node-resolve": "^16.0.3",
46+
"eslint": "^8.57.1",
47+
"prettier": "^3.6.2",
48+
"prettier-plugin-java": "^2.7.7",
49+
"rimraf": "^6.1.0",
50+
"rollup": "^4.53.2",
5151
"swiftlint": "^2.0.0",
52-
"typescript": "~5.0.2"
52+
"typescript": "^5.9.3"
5353
},
5454
"peerDependencies": {
55-
"@capacitor/core": ">=7.0.0"
55+
"@capacitor/core": ">=8.0.0"
5656
},
5757
"prettier": "@ionic/prettier-config",
5858
"swiftlint": "@ionic/swiftlint-config",
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export default {
1919
file: 'dist/index.js',
2020
format: 'esm',
2121
banner,
22-
preferConst: true,
2322
sourcemap: true,
2423
inlineDynamicImports: true,
2524
},

scripts/get-latest-capacitor-version.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const req = https.request(options, res => {
1515

1616
res.on('close', () => {
1717
const latestVersion = JSON.parse(json)['dist-tags'].latest;
18-
const lernaConfig = JSON.parse(fs.readFileSync('./lerna.json', 'utf-8'))
18+
const lernaConfig = JSON.parse(fs.readFileSync('../lerna.json', 'utf-8'))
1919
lernaConfig.capacitorVersion = latestVersion
20-
fs.writeFileSync('./lerna.json', JSON.stringify(lernaConfig, null, 2) + '\n')
20+
fs.writeFileSync('../lerna.json', JSON.stringify(lernaConfig, null, 2) + '\n')
2121
})
2222
})
2323

0 commit comments

Comments
 (0)