Skip to content

Commit 87e9cb5

Browse files
authored
Merge pull request #4 from sxwei123/develop
Release v0.1.0
2 parents f22cccf + 57cc593 commit 87e9cb5

File tree

6 files changed

+49
-10
lines changed

6 files changed

+49
-10
lines changed

.github/workflows/coverage.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Coverage"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
release:
13+
name: Run test coverage
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Setup node.js
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: "14.x"
22+
registry-url: "https://registry.npmjs.org"
23+
- run: yarn install
24+
- run: yarn coverage
25+
env:
26+
NODE_ENV: test
27+
- name: Add coverage to comment
28+
uses: romeovs/[email protected]
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
name: "Test"
1+
name: "Lint and Test"
22

3-
on:
4-
pull_request:
5-
branches:
6-
- master
3+
on: pull_request
74

85
jobs:
96
release:
10-
name: Build and run test
7+
name: Run lint and test
118
runs-on: ubuntu-latest
129
strategy:
1310
matrix:
@@ -21,6 +18,7 @@ jobs:
2118
node-version: ${{ matrix.node-version }}
2219
registry-url: "https://registry.npmjs.org"
2320
- run: yarn install
21+
- run: yarn lint
2422
- run: yarn test
2523
env:
2624
NODE_ENV: test

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
This software is released under the MIT license:
22

3+
Copyright (c) 2021 Leon Song
34
Copyright (c) 2017 Evgeny Poberezkin
45
Copyright (c) 2013 James Halliday
56

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# quick-stable-stringify
22

3+
![Test status](https://github.com/sxwei123/quick-stable-stringify/workflows/Coverage/badge.svg?branch=master)
4+
35
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.
46

7+
## Features
8+
9+
- Support both browser and nodejs
10+
- Support custom comparator function
11+
- No dependencies
12+
513
## Install
614

715
With npm do:

jestconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"transform": {
3-
"^.+\\.(t|j)sx?$": "ts-jest"
3+
"^.+\\.ts$": "ts-jest"
44
},
55
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
6-
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
6+
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
7+
"coverageReporters": ["text-summary", "lcov", "json-summary"]
78
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quick-stable-stringify",
3-
"version": "0.0.3",
3+
"version": "0.1.0",
44
"description": "Deterministic `JSON.stringify()` - a faster version of Evgeny's fast-json-stable-strigify. Built with Typescript and modern Javascript.",
55
"main": "./dist/index.js",
66
"exports": "./dist/index.js",
@@ -33,7 +33,8 @@
3333
"build": "tsc",
3434
"prepublish": "tsc",
3535
"lint": "eslint . --ext .ts",
36-
"test": "jest --config jestconfig.json"
36+
"test": "jest --config jestconfig.json",
37+
"coverage": "jest --config jestconfig.json --coverage"
3738
},
3839
"repository": {
3940
"type": "git",

0 commit comments

Comments
 (0)