Skip to content

Commit

Permalink
chore: fix package.json (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Hochstöger Matthias <[email protected]>
Co-authored-by: Dieter Wimberger <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent cc9cf18 commit 2e58ca1
Show file tree
Hide file tree
Showing 11 changed files with 843 additions and 1,473 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
pull_request:
branches: [ "main" ]
jobs:
build:
lint_typecheck:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
node-version: [lts/*]
# See supported Node.js release schedule at https://nodejs.org/en/about/previous-releases
steps:
- uses: actions/checkout@v3
Expand All @@ -21,4 +21,5 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn
- run: yarn run lint
- run: yarn lint
- run: yarn typecheck
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ example/vendor/
example/android/.idea/
example/android/local.properties
android/build

# Exclude because this repo forces to use yarn instead of npm
package-lock.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict = true
17 changes: 17 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "${version}"
},
"npm": {
"publish": true
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
}
24 changes: 24 additions & 0 deletions bob.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
"source": "src",
"output": "lib",
"targets": [
[
"commonjs",
{
"esm": true
}
],
[
"module",
{
"esm": true
}
],
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
]
};
14 changes: 7 additions & 7 deletions example/src/BleScreenComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ async function mobileIdentificationMediumService(data: ScanResult, setStatus: an

const outerADataHex = hex.encode(outerAData);

const outerCT = await AbrevvaCrypto.encrypt({
key: xsMobileDerivedKey,
iv: challengeHex,
pt: mediumDataFrame,
adata: outerADataHex,
tagLength: 16,
});
const outerCT = await AbrevvaCrypto.encrypt(
xsMobileDerivedKey,
challengeHex,
mediumDataFrame,
outerADataHex,
16,
);

const mdfSchema = new Parser()
.buffer('outerIV', { length: 13 })
Expand Down
7 changes: 7 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/example/node_modules",
"<rootDir>/lib/"
]
}
79 changes: 12 additions & 67 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"name": "react-native-example-app",
"name": "@evva-sfw/abrevva-react-native",
"version": "0.1.0",
"description": "evva",
"description": "The EVVA React-Native Module is a collection of tools to work with electronical EVVA access components. It allows for scanning and connecting via BLE.",
"source": "./src/index.tsx",
"main": "./lib/commonjs/index.js",
"module": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
"engines": {
"npm": "please-use-yarn",
"yarn": ">= 3.6.1"
},
"packageManager": "[email protected]",
"exports": {
".": {
"types": "./lib/typescript/src/index.d.ts",
Expand Down Expand Up @@ -47,14 +52,13 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/mhochstoeger/react-native-example-app.git"
"url": "git+https://github.com/evva-sfw/abrevva-react-native.git"
},
"author": "HOCHSTÖGER Matthias / EVVA Wien <[email protected]> (https://github.com/mhochstoeger)",
"license": "MIT",
"license": "SEE LICENSE IN <LICENSE>",
"bugs": {
"url": "https://github.com/mhochstoeger/react-native-example-app/issues"
"url": "https://github.com/evva-sfw/abrevva-react-native/issues"
},
"homepage": "https://github.com/mhochstoeger/react-native-example-app#readme",
"homepage": "https://github.com/evva-sfw/abrevva-react-native",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
Expand All @@ -78,7 +82,7 @@
"react": "18.2.0",
"react-native": "0.74.3",
"react-native-builder-bob": "^0.29.0",
"release-it": "^15.0.0",
"release-it": "^17.6.0",
"turbo": "^1.10.7",
"typescript": "^5.2.2"
},
Expand All @@ -92,36 +96,6 @@
"workspaces": [
"example"
],
"packageManager": "[email protected]",
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/example/node_modules",
"<rootDir>/lib/"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"release-it": {
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "v${version}"
},
"npm": {
"publish": true
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
},
"eslintConfig": {
"root": true,
"extends": [
Expand Down Expand Up @@ -169,34 +143,5 @@
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
[
"commonjs",
{
"esm": true
}
],
[
"module",
{
"esm": true
}
],
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
]
},
"create-react-native-library": {
"type": "module-legacy",
"languages": "kotlin-swift",
"version": "0.38.2"
}
}
2 changes: 1 addition & 1 deletion react-native-example-app.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/mhochstoeger/react-native-example-app.git", :tag => "#{s.version}" }
s.source = { :git => "https://github.com/evva-sfw/abrevva-react-native.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm,swift}"

Expand Down
Loading

0 comments on commit 2e58ca1

Please sign in to comment.