Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Aug 11, 2023
1 parent fa402eb commit 829bb01
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 80 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,6 @@ name: Node.js CI
on: [push]

jobs:
test-node:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run test with Node.js ${{ matrix.node-version }}
run: npm run test-node
env:
CI: true
test-karma:
runs-on: ubuntu-latest
# needs: [lint]
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run karma tests
run: npm run test-karma
lint:
runs-on: ubuntu-latest
strategy:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Example Isomorphic TS/JS Lib Template _(@digitalcredentials/data-integrity-rn)_
# Data Integrity Polyfill for React Native _(@digitalcredentials/data-integrity-rn)_

[![Build status](https://img.shields.io/github/actions/workflow/status/digitalcredentials/data-integrity-rn/main.yml?branch=main)](https://github.com/digitalcredentials/data-integrity-rn/actions?query=workflow%3A%22Node.js+CI%22)
[![NPM Version](https://img.shields.io/npm/v/@digitalcredentials/data-integrity-rn.svg)](https://npm.im/@digitalcredentials/data-integrity-rn)

> React Native polyfill for globals required for Data Integrity and VC apps (TextEncoder, URL, setImmediate, etc).
> React Native polyfill for globals required for Data Integrity and VC apps (TextEncoder, crypto.subtle, etc).
## Table of Contents

Expand All @@ -24,7 +24,7 @@ TBD

## Install

- Node.js 16+ is recommended.
- Node.js 20+ is recommended.

### NPM

Expand Down
28 changes: 3 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"name": "@digitalcredentials/data-integrity-rn",
"description": "React Native polyfill for globals required for Data Integrity and VC apps (TextEncoder, URL, setImmediate, etc).",
"version": "0.0.1",
"description": "React Native polyfill for globals required for Data Integrity and VC apps (TextEncoder, crypto.subtle, etc).",
"version": "1.0.0",
"scripts": {
"build": "npm run clear && tsc -d && tsc -p tsconfig.esm.json",
"clear": "rimraf dist/*",
"lint": "ts-standard --fix",
"prepare": "npm run build",
"prettier": "prettier src --write",
"rebuild": "npm run clear && npm run build",
"test": "npm run lint && npm run test-node",
"test-karma": "karma start karma.conf.js",
"test-node": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.spec.json TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --project tsconfig.spec.json 'test/*.ts'"
"rebuild": "npm run clear && npm run build"
},
"files": [
"dist",
Expand All @@ -22,37 +19,18 @@
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.6",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"chai": "^4.3.7",
"cross-env": "^7.0.3",
"eslint": "^8.46.0",
"karma": "^6.4.2",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.2.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.4.0",
"karma-typescript": "^5.5.4",
"mocha": "^10.2.0",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"ts-standard": "^12.0.2",
"typescript": "^5.1.6"
},
"publishConfig": {
"access": "public"
},
"mocha": {
"require": "ts-node/register",
"extension": [
"ts"
],
"spec": "test/**/*.ts"
},
"ts-standard": {
"ignore": [
"dist"
Expand Down
8 changes: 0 additions & 8 deletions src/Example.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// declare module 'jsonld'
declare module 'jsonld'
declare module 'rdf-canonize'
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*!
* Copyright (c) 2023 Digital Credentials Consortium. All rights reserved.
*/
export { Example } from './Example'
// Exports the TextEncoder and TextDecoder globals
import 'fast-text-encoding'
// Exports the crypto.subtle / WebCryptography API
import 'isomorphic-webcrypto'
9 changes: 0 additions & 9 deletions test/Example.spec.ts

This file was deleted.

0 comments on commit 829bb01

Please sign in to comment.