Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions example-app-spm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@
"@capacitor/barcode-scanner": "file:../plugin/",
"@capacitor/core": "next",
"@capacitor/ios": "next",
"@ionic/react": "^8.7.0",
"@ionic/react-router": "^8.7.0",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"ionicons": "^7.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@ionic/react": "^8.7.9",
"@ionic/react-router": "^8.7.9",
"ionicons": "^8.0.13",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4"
},
"devDependencies": {
"@capacitor/cli": "next",
"@testing-library/dom": ">=7.21.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.12",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-legacy": "^5.0.0",
"@vitejs/plugin-react": "^4.2.1",
"cypress": "^13.5.0",
"eslint": "^8.35.0",
"eslint-plugin-react": "^7.32.2",
"jsdom": "^22.1.0",
"terser": "^5.4.0",
"typescript": "^5.1.6",
"vite": "^5.0.0",
"vitest": "^0.34.6"
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^30.0.0",
"@types/react": "^19.2.6",
"@types/react-dom": "^19.2.3",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-legacy": "^7.2.1",
"@vitejs/plugin-react": "^5.1.1",
"cypress": "^15.6.0",
"eslint": "^8.57.1",
"eslint-plugin-react": "^7.37.5",
"jsdom": "^27.2.0",
"terser": "^5.44.1",
"typescript": "^5.9.3",
"vite": "^7.2.2",
"vitest": "^4.0.10"
},
"description": "An Ionic project"
}
50 changes: 25 additions & 25 deletions example-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@
"@capacitor/barcode-scanner": "file:../plugin/",
"@capacitor/core": "next",
"@capacitor/ios": "next",
"@ionic/react": "^8.7.0",
"@ionic/react-router": "^8.7.0",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"ionicons": "^7.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@ionic/react": "^8.7.9",
"@ionic/react-router": "^8.7.9",
"ionicons": "^8.0.13",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4"
},
"devDependencies": {
"@capacitor/cli": "next",
"@testing-library/dom": ">=7.21.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.12",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-legacy": "^5.0.0",
"@vitejs/plugin-react": "^4.2.1",
"cypress": "^13.5.0",
"eslint": "^8.35.0",
"eslint-plugin-react": "^7.32.2",
"jsdom": "^22.1.0",
"terser": "^5.4.0",
"typescript": "^5.1.6",
"vite": "^5.0.0",
"vitest": "^0.34.6"
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^30.0.0",
"@types/react": "^19.2.6",
"@types/react-dom": "^19.2.3",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-legacy": "^7.2.1",
"@vitejs/plugin-react": "^5.1.1",
"cypress": "^15.6.0",
"eslint": "^8.57.1",
"eslint-plugin-react": "^7.37.5",
"jsdom": "^27.2.0",
"terser": "^5.44.1",
"typescript": "^5.9.3",
"vite": "^7.2.2",
"vitest": "^4.0.10"
},
"description": "An Ionic project"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"publish:latest": "lerna publish --conventional-commits --dist-tag latest --force-publish --no-verify-access --yes"
},
"devDependencies": {
"@types/node": "^20.11.25",
"husky": "^9.0.1",
"lerna": "^8.1.2",
"typescript": "^5.4.2"
"@types/node": "^24.10.1",
"husky": "^9.1.7",
"lerna": "^9.0.1",
"typescript": "^5.9.3"
},
"engines": {
"node": ">=20",
Expand Down
5 changes: 0 additions & 5 deletions plugin/.eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions plugin/.eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions plugin/.prettierignore

This file was deleted.

29 changes: 0 additions & 29 deletions plugin/.prettierrc

This file was deleted.

4 changes: 2 additions & 2 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Defines the options for configuring a barcode scan.

| Members | Value |
| ----------- | -------------------- |
| **`ZXING`** | <code>'zxing'</code> |
| **`MLKIT`** | <code>'mlkit'</code> |
| **`ZXING`** | <code>"zxing"</code> |
| **`MLKIT`** | <code>"mlkit"</code> |

</docgen-api>
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {

@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext =
InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("com.getcapacitor.android", appContext.getPackageName());
}
assertEquals("com.getcapacitor.android", appContext.getPackageName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*/
public class ExampleUnitTest {

@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
47 changes: 47 additions & 0 deletions plugin/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const eslintjs = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tseslintparser = require('@typescript-eslint/parser');
const prettierConfig = require('eslint-config-prettier');

module.exports = [
{
ignores: ['node_modules/**', 'dist/**', 'build/**', 'types/**', 'android/**', 'ios/**', 'eslint.config.*'],
},
eslintjs.configs.recommended,
{
files: ['**/*.ts', '**/*.js'],
languageOptions: {
parser: tseslintparser,
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
browser: 'readonly',
window: 'readonly',
document: 'readonly',
console: 'readonly',
HTMLStyleElement: 'readonly',
atob: 'readonly',
btoa: 'readonly',
Blob: 'readonly',
FileReader: 'readonly',
capacitorExports: 'readonly',
html5Qrcode: 'readonly',
exports: 'readonly',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'off',
'no-redeclare': 'off',
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
},
prettierConfig,
];

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import OSBarcodeLib

@objc(CapacitorBarcodeScannerPlugin)
public class CapacitorBarcodeScannerPlugin: CAPPlugin, CAPBridgedPlugin {
public let identifier = "CapacitorBarcodeScannerPlugin"
public let jsName = "CapacitorBarcodeScanner"
public let identifier = "CapacitorBarcodeScannerPlugin"
public let jsName = "CapacitorBarcodeScanner"
public let pluginMethods: [CAPPluginMethod] = [
CAPPluginMethod(name: "scanBarcode", returnType: CAPPluginReturnPromise),
]
CAPPluginMethod(name: "scanBarcode", returnType: CAPPluginReturnPromise)
]
var manager: OSBARCManagerProtocol?

override public func load() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ import XCTest
@testable import Plugin

class OSBarcodeTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}

override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}

func testEcho() {
// This is an example of a functional test case for a plugin.
Expand Down
32 changes: 16 additions & 16 deletions plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api CapacitorBarcodeScannerPlugin --output-readme README.md --output-json dist/docs.json",
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
Expand All @@ -55,23 +55,23 @@
"devDependencies": {
"@capacitor/android": "next",
"@capacitor/core": "next",
"@capacitor/docgen": "^0.2.2",
"@capacitor/docgen": "0.3.0",
"@capacitor/ios": "next",
"@ionic/swiftlint-config": "^1.1.2",
"@types/node": "~20.12.4",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.8.0",
"prettier": "^2.8.8",
"prettier-plugin-java": "~2.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.78.1",
"swiftlint": "^1.0.2",
"typescript": "~5.7.2"
"@ionic/swiftlint-config": "^2.0.0",
"@types/node": "^24.10.1",
"@typescript-eslint/eslint-plugin": "^8.47.0",
"@typescript-eslint/parser": "^8.47.0",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"prettier": "^3.6.2",
"prettier-plugin-java": "^2.7.7",
"rimraf": "^6.1.0",
"rollup": "^4.53.2",
"swiftlint": "^2.0.0",
"typescript": "^5.9.3"
},
"peerDependencies": {
"@capacitor/core": "next"
"@capacitor/core": ">=8.0.0-beta.0"
},
"swiftlint": "@ionic/swiftlint-config",
"capacitor": {
Expand All @@ -82,4 +82,4 @@
"src": "android"
}
}
}
}
Loading
Loading