Skip to content

Commit

Permalink
Merge pull request #4 from sxwei123/develop
Browse files Browse the repository at this point in the history
Release v0.1.0
  • Loading branch information
sxwei123 authored Jan 1, 2021
2 parents f22cccf + 57cc593 commit 87e9cb5
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 10 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Coverage"

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
release:
name: Run test coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn coverage
env:
NODE_ENV: test
- name: Add coverage to comment
uses: romeovs/lcov-reporter-action@v0.2.16
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 4 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: "Test"
name: "Lint and Test"

on:
pull_request:
branches:
- master
on: pull_request

jobs:
release:
name: Build and run test
name: Run lint and test
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -21,6 +18,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn lint
- run: yarn test
env:
NODE_ENV: test
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
This software is released under the MIT license:

Copyright (c) 2021 Leon Song
Copyright (c) 2017 Evgeny Poberezkin
Copyright (c) 2013 James Halliday

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# quick-stable-stringify

![Test status](https://github.com/sxwei123/quick-stable-stringify/workflows/Coverage/badge.svg?branch=master)

Deterministic `JSON.stringify()` - a faster version of [@epoberezkin](https://github.com/epoberezkin)'s [fast-json-stable-strigify](https://github.com/epoberezkin/fast-json-stable-stringify). Built with Typescript and modern Javascript.

## Features

- Support both browser and nodejs
- Support custom comparator function
- No dependencies

## Install

With npm do:
Expand Down
5 changes: 3 additions & 2 deletions jestconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
"^.+\\.ts$": "ts-jest"
},
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
"coverageReporters": ["text-summary", "lcov", "json-summary"]
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quick-stable-stringify",
"version": "0.0.3",
"version": "0.1.0",
"description": "Deterministic `JSON.stringify()` - a faster version of Evgeny's fast-json-stable-strigify. Built with Typescript and modern Javascript.",
"main": "./dist/index.js",
"exports": "./dist/index.js",
Expand Down Expand Up @@ -33,7 +33,8 @@
"build": "tsc",
"prepublish": "tsc",
"lint": "eslint . --ext .ts",
"test": "jest --config jestconfig.json"
"test": "jest --config jestconfig.json",
"coverage": "jest --config jestconfig.json --coverage"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 87e9cb5

Please sign in to comment.