Skip to content

Commit cdebac7

Browse files
Merge pull request #22 from torusresearch/feat/ts-v5
Updates
2 parents be0b872 + 2386939 commit cdebac7

File tree

14 files changed

+6388
-14778
lines changed

14 files changed

+6388
-14778
lines changed

.babelrc

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

.babelrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@toruslabs/config/babel.config");

.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require("@rushstack/eslint-patch/modern-module-resolution");
2+
3+
module.exports = {
4+
root: true,
5+
extends: ["@toruslabs/eslint-config-node"],
6+
parser: "@typescript-eslint/parser",
7+
ignorePatterns: ["*.config.js", ".eslintrc.js"],
8+
parserOptions: {
9+
sourceType: "module",
10+
ecmaVersion: 11,
11+
project: "./tsconfig.json",
12+
},
13+
globals: {
14+
document: true,
15+
fetch: true,
16+
jest: true,
17+
it: true,
18+
beforeEach: true,
19+
afterEach: true,
20+
describe: true,
21+
},
22+
};

.eslintrc.json

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

.github/workflows/ci.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
# This workflow will build and push a new container image to Amazon ECR
2-
#
3-
# To use this workflow, you will need to complete the following set-up steps:
4-
#
5-
# 1. Create an ECR repository to store your images.
6-
# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`.
7-
# Replace the value of `ECR_REPOSITORY` in the workflow below with your repository's name.
8-
# Replace the value of `aws-region` in the workflow below with your repository's region.
9-
10-
on: push
1+
on:
2+
push:
3+
branches-ignore:
4+
- 'master'
115

126
name: Run Tests
137

@@ -16,7 +10,7 @@ jobs:
1610
name: run tests
1711
strategy:
1812
matrix:
19-
node: ["18.x"]
13+
node: ["20.x"]
2014
os: [ubuntu-latest]
2115

2216
runs-on: ${{ matrix.os }}

.github/workflows/master.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
push:
3+
branches: [master]
4+
5+
name: Run Tests
6+
7+
jobs:
8+
test:
9+
name: run tests
10+
strategy:
11+
matrix:
12+
node: ["20.x"]
13+
os: [ubuntu-latest]
14+
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Use Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node }}
24+
cache: "npm"
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Run tests
30+
run: npm run test

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>=18.x

.prettierrc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# .prettierrc or .prettierrc.yaml
22
printWidth: 150
33
singleQuote: false
4-
semi: true
4+
semi: true
5+
trailingComma: es5

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Metadata-helpers
22

3-
[![npm version](https://badge.fury.io/js/%40toruslabs%2Fmetadata-helpers.svg)](https://badge.fury.io/js/%40toruslabs%2Fmetadata-helpers)
4-
![npm](https://img.shields.io/npm/dw/@toruslabs/metadata-helpers)
3+
![Build Status](https://github.com/torusresearch/metadata-helpers/actions/workflows/master.yml/badge.svg)
4+
5+
[![npm downloads](https://img.shields.io/npm/dm/@toruslabs/metadata-helpers.svg?style=flat-square)](https://www.npmjs.com/package/@toruslabs/metadata-helpers)
6+
7+
[![NPM](https://nodei.co/npm/@toruslabs/metadata-helpers.png)](https://www.npmjs.com/package/@toruslabs/metadata-helpers)
58

69
## Introduction
710

@@ -18,10 +21,9 @@ This repo allow you to get and set metadata
1821

1922
This module is distributed in 3 formats
2023

21-
- `commonjs` build `dist/metadataHelpers.cjs.js` in es5 format
22-
- `commonjs` build `dist/metadataHelpers-bundled.cjs.js` in es5 format with problematic packages bundled (benfits non-webpack users)
24+
- `ems` build `dist/metadataHelpers.esm.js` in es5 format
25+
- `commonjs` build `dist/metadataHelpers.cjs.js` in es5 format with problematic packages bundled (benfits non-webpack users)
2326
- `umd` build `dist/metadataHelpers.umd.min.js` in es5 format without polyfilling corejs minified
24-
- `umd` build `dist/metadataHelpers.polyfill.umd.min.js` in es5 format with polyfilling corejs minified
2527

2628
By default, the appropriate format is used for your specified usecase
2729
You can use a different format (if you know what you're doing) by referencing the correct file
@@ -56,12 +58,11 @@ Add [`@toruslabs/metadata-helpers`](https://www.npmjs.com/package/@toruslabs/met
5658
To allow your web app to retrieve keys:
5759

5860
Install the package
59-
`npm i @toruslabs/metadata-helpers`
60-
or
61-
`yarn add @toruslabs/metadata-helpers`
61+
`npm i @toruslabs/metadata-helpers`
62+
or
63+
`yarn add @toruslabs/metadata-helpers`
6264

6365
## Requirements
6466

6567
- This package requires a peer dependency of `@babel/runtime`
66-
- Node 14+
67-
68+
- Node 18+

0 commit comments

Comments
 (0)