Skip to content

Commit

Permalink
feat: switched to pnpm and added react native example app
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
Berend Sliedrecht committed Sep 25, 2023
1 parent 62912bc commit d47f9f3
Show file tree
Hide file tree
Showing 120 changed files with 12,460 additions and 11,458 deletions.
100 changes: 0 additions & 100 deletions wrappers/javascript/.eslintrc.js

This file was deleted.

70 changes: 70 additions & 0 deletions wrappers/javascript/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
root: true

parser: '@typescript-eslint/parser'

plugins:
- '@typescript-eslint'
- prettier
- import

parserOptions:
tsconfigRootDir: .
project:
- './tsconfig.eslint.json'
- './packages/**/tsconfig.json'

extends:
- eslint:recommended
- plugin:@typescript-eslint/strict
- plugin:@typescript-eslint/stylistic
- plugin:prettier/recommended

ignorePatterns:
- '**/build/**'
- '**/node_modules/**'

rules:
'@typescript-eslint/no-extraneous-class': off
'@typescript-eslint/no-use-before-define':
- error
- functions: false
classes: false
variables: true
'@typescript-eslint/explicit-member-accessibility': error
no-console: error
'@typescript-eslint/consistent-type-imports': error
import/newline-after-import:
- error
- count: 1
import/order:
- error
- groups:
- type
- - builtin
- external
- parent
- sibling
- index
alphabetize:
order: asc
newlines-between: always
'@typescript-eslint/no-non-null-assertion': error
import/no-extraneous-dependencies:
- error
- devDependencies: false

overrides:
- files: '**/tests/**'
env:
jest: true
node: true

- files:
- '**/scripts/**'
- '**/*.config.js'
env:
node: true
rules:
no-undef: off
no-console: off
'@typescript-eslint/no-var-requires': off
6 changes: 3 additions & 3 deletions wrappers/javascript/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ android.iml

# node.js
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# BUCK
buck-out/
Expand All @@ -54,3 +51,6 @@ android/keystores/debug.keystore
**/native/*.dll
**/native/*.so
**/native/*.dylib

**/*-example/android
**/*-example/ios
1 change: 1 addition & 0 deletions wrappers/javascript/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
3 changes: 2 additions & 1 deletion wrappers/javascript/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"printWidth": 120,
"semi": false,
"singleQuote": true
"singleQuote": true,
"trailingComma": "none"
}
12 changes: 0 additions & 12 deletions wrappers/javascript/anoncreds-nodejs/jest.config.ts

This file was deleted.

13 changes: 0 additions & 13 deletions wrappers/javascript/anoncreds-nodejs/scripts/platform.js

This file was deleted.

9 changes: 0 additions & 9 deletions wrappers/javascript/anoncreds-nodejs/tsconfig.build.json

This file was deleted.

6 changes: 0 additions & 6 deletions wrappers/javascript/anoncreds-nodejs/tsconfig.json

This file was deleted.

13 changes: 0 additions & 13 deletions wrappers/javascript/anoncreds-react-native/jest.config.ts

This file was deleted.

21 changes: 0 additions & 21 deletions wrappers/javascript/anoncreds-react-native/src/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions wrappers/javascript/anoncreds-react-native/tsconfig.json

This file was deleted.

12 changes: 0 additions & 12 deletions wrappers/javascript/anoncreds-shared/jest.config.ts

This file was deleted.

1 change: 0 additions & 1 deletion wrappers/javascript/anoncreds-shared/test/index.test.ts

This file was deleted.

7 changes: 0 additions & 7 deletions wrappers/javascript/anoncreds-shared/tsconfig.build.json

This file was deleted.

6 changes: 0 additions & 6 deletions wrappers/javascript/anoncreds-shared/tsconfig.json

This file was deleted.

21 changes: 0 additions & 21 deletions wrappers/javascript/jest.config.base.ts

This file was deleted.

25 changes: 17 additions & 8 deletions wrappers/javascript/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import type { Config } from '@jest/types'
import type { JestConfigWithTsJest } from 'ts-jest'

import base from './jest.config.base'

const config: Config.InitialOptions = {
...base,
roots: ['<rootDir>'],
projects: ['<rootDir>/anoncreds-nodejs', '<rootDir>/anoncreds-shared', '<rootDir>/anoncreds-react-native'],
const config: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
isolatedModules: true
}
]
},
moduleNameMapper: {
'@hyperledger/anoncreds-shared': '<rootDir>/packages/anoncreds-shared/src'
}
}

export default config
module.exports = config
9 changes: 5 additions & 4 deletions wrappers/javascript/lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
"packages": ["packages/*"],
"version": "0.2.0-dev.1",
"useWorkspaces": true,
"npmClient": "yarn",
"npmClient": "pnpm",
"command": {
"version": {
"allowBranch": ["main"]
"allowBranch": "main"
}
}
},
}
Loading

0 comments on commit d47f9f3

Please sign in to comment.