Skip to content

Commit 7aa124a

Browse files
Merge branch 'main' into RMET-4558
2 parents 75a5cfb + 5e2cea7 commit 7aa124a

File tree

119 files changed

+779
-1147
lines changed

Some content is hidden

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

119 files changed

+779
-1147
lines changed

.github/actions/changed-packages/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ outputs:
88
paths:
99
description: An array of relative paths to packages that were changed
1010
runs:
11-
using: node12
11+
using: node20
1212
main: main.js

.github/actions/changed-packages/main.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
require = require('esm')(module);
2-
31
const { relative, resolve } = require('path');
4-
const core = require('@actions/core')
2+
const core = require('@actions/core');
3+
4+
(async () => {
5+
const { root } = await import('../../../scripts/lib/repo.mjs');
6+
const { execute } = await import('../../../scripts/lib/cli.mjs');
7+
const { ls } = await import('../../../scripts/lib/lerna.mjs');
58

6-
const { root } = require('../../../scripts/lib/repo.mjs');
7-
const { execute } = require('../../../scripts/lib/cli.mjs');
8-
const { ls } = require('../../../scripts/lib/lerna.mjs');
9+
execute(async () => {
10+
const files = JSON.parse(core.getInput('files', '[]')).map(f => resolve(root, f));
11+
const packages = await ls();
12+
const changedPackages = packages.filter(pkg => files.some(f => f.startsWith(pkg.location)));
13+
const paths = JSON.stringify(changedPackages.map(pkg => relative(root, pkg.location)));
914

10-
execute(async () => {
11-
const files = JSON.parse(core.getInput('files', '[]')).map(f => resolve(root, f));
12-
const packages = await ls();
13-
const changedPackages = packages.filter(pkg => files.some(f => f.startsWith(pkg.location)));
14-
const paths = JSON.stringify(changedPackages.map(pkg => relative(root, pkg.location)));
15+
core.info(`Changed package paths: ${paths}`);
16+
core.setOutput('paths', paths);
17+
});
18+
})();
1519

16-
core.info(`Changed package paths: ${paths}`);
17-
core.setOutput('paths', paths);
18-
});

action-sheet/.prettierignore

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

action-sheet/android/src/main/java/com/capacitorjs/plugins/actionsheet/ActionSheet.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,13 @@ public void setupDialog(Dialog dialog, int style) {
101101
tv.setTextColor(Color.parseColor("#000000"));
102102
tv.setPadding(layoutPaddingPx12, layoutPaddingPx12, layoutPaddingPx12, layoutPaddingPx12);
103103
tv.setText(options[i].getTitle());
104-
tv.setOnClickListener(
105-
view -> {
106-
Logger.debug("CliCKED: " + optionIndex);
104+
tv.setOnClickListener((view) -> {
105+
Logger.debug("CliCKED: " + optionIndex);
107106

108-
if (listener != null) {
109-
listener.onSelect(optionIndex);
110-
}
107+
if (listener != null) {
108+
listener.onSelect(optionIndex);
111109
}
112-
);
110+
});
113111
layout.addView(tv);
114112
}
115113

action-sheet/android/src/main/java/com/capacitorjs/plugins/actionsheet/ActionSheetPlugin.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ public void showActions(final PluginCall call) {
4040
implementation.setTitle(title);
4141
implementation.setOptions(actionOptions);
4242
implementation.setCancelable(false);
43-
implementation.setOnSelectedListener(
44-
index -> {
45-
JSObject ret = new JSObject();
46-
ret.put("index", index);
47-
call.resolve(ret);
48-
implementation.dismiss();
49-
}
50-
);
43+
implementation.setOnSelectedListener((index) -> {
44+
JSObject ret = new JSObject();
45+
ret.put("index", index);
46+
call.resolve(ret);
47+
implementation.dismiss();
48+
});
5149
implementation.show(getActivity().getSupportFragmentManager(), "capacitorModalsActionSheet");
5250
} catch (JSONException ex) {
5351
Logger.error("JSON error processing an option for showActions", ex);

action-sheet/ios/Sources/ActionSheetPlugin/ActionSheetPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ActionSheetPlugin: CAPPlugin, CAPBridgedPlugin {
2929
} else if style == "CANCEL" {
3030
buttonStyle = .cancel
3131
}
32-
let action = UIAlertAction(title: title, style: buttonStyle, handler: { (_) -> Void in
32+
let action = UIAlertAction(title: title, style: buttonStyle, handler: { (_) in
3333
call.resolve([
3434
"index": index
3535
])

action-sheet/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
3838
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
3939
"eslint": "eslint . --ext ts",
40-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
40+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
4141
"swiftlint": "node-swiftlint",
4242
"docgen": "docgen --api ActionSheetPlugin --output-readme README.md --output-json dist/docs.json",
4343
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -52,11 +52,11 @@
5252
"@capacitor/docgen": "0.2.2",
5353
"@capacitor/ios": "next",
5454
"@ionic/eslint-config": "^0.4.0",
55-
"@ionic/prettier-config": "~1.0.1",
55+
"@ionic/prettier-config": "^4.0.0",
5656
"@ionic/swiftlint-config": "^1.1.2",
5757
"eslint": "^8.57.0",
58-
"prettier": "~2.3.0",
59-
"prettier-plugin-java": "~1.0.2",
58+
"prettier": "^3.6.2",
59+
"prettier-plugin-java": "^2.7.7",
6060
"rimraf": "^6.0.1",
6161
"rollup": "^4.26.0",
6262
"swiftlint": "^1.0.1",

action-sheet/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { registerPlugin } from '@capacitor/core';
33
import type { ActionSheetPlugin } from './definitions';
44

55
const ActionSheet = registerPlugin<ActionSheetPlugin>('ActionSheet', {
6-
web: () => import('./web').then(m => new m.ActionSheetWeb()),
6+
web: () => import('./web').then((m) => new m.ActionSheetWeb()),
77
});
88

99
export * from './definitions';

action-sheet/src/web.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { WebPlugin } from '@capacitor/core';
22

3-
import type {
4-
ActionSheetPlugin,
5-
ShowActionsResult,
6-
ShowActionsOptions,
7-
} from './definitions';
3+
import type { ActionSheetPlugin, ShowActionsResult, ShowActionsOptions } from './definitions';
84

95
export class ActionSheetWeb extends WebPlugin implements ActionSheetPlugin {
106
async showActions(options: ShowActionsOptions): Promise<ShowActionsResult> {

app-launcher/.prettierignore

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

0 commit comments

Comments
 (0)