Skip to content

Commit

Permalink
Merge pull request #56 from arjunvegda/next
Browse files Browse the repository at this point in the history
Release stable
  • Loading branch information
arjunvegda authored Feb 21, 2022
2 parents 5c54f73 + a497a7b commit 8ed0dfa
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:

jobs:
lint-test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Lint & Test
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -46,7 +45,6 @@ jobs:
run: yarn run test:ci

release:
if: "!contains(github.event.head_commit.message, 'skip ci')"
needs: lint-test
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@semantic-release/git",
{
"assets": ["package.json", "docs/CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}
]
],
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
</p>
<p align="center">
<a href="https://www.npmjs.com/package/japanese-moji">
<img src="https://badgen.net/github/release/arjunvegda/japanese-moji/stable"/>
<img src="https://badgen.net/github/release/arjunvegda/japanese-moji/stable?cache=300"/>
</a>
<a href="https://bundlephobia.com/package/japanese-moji">
<img src="https://badgen.net/bundlephobia/minzip/japanese-moji?color=green"/>
<img src="https://badgen.net/bundlephobia/minzip/japanese-moji@latest?cache=300&color=green"/>
</a>
<a href="https://bundlephobia.com/package/japanese-moji">
<img src="https://badgen.net/bundlephobia/dependency-count/japanese-moji?color=green"/>
<img src="https://badgen.net/bundlephobia/dependency-count/japanese-moji@latest?cache=300&color=green"/>
</a>
<a href="https://bundlephobia.com/package/japanese-moji">
<img src="https://badgen.net/bundlephobia/tree-shaking/japanese-moji"/>
<img src="https://badgen.net/bundlephobia/tree-shaking/japanese-moji@latest?cache=300"/>
</a>
<a href="https://codecov.io/gh/arjunvegda/japanese-moji">
<img src="https://codecov.io/gh/arjunvegda/japanese-moji/branch/main/graph/badge.svg?token=GZ8GBUVYD8"/>
Expand Down Expand Up @@ -49,11 +49,11 @@ The word "Moji" translates to "Character" in English
- Supports strict and threshold-based validation for Kanji, Kana, and all the Japanese characters
including punctuations
- Exports easy to use score calculator for Kanji, Kana, and the rest of the Japanese characters
- Easy to extend with customizable options and build-your-own validators
- Supports custom single Unicode and Unicode ranges out-of-the-box
- Easy to extend with customizable options and custom validator creators
- Supports both custom single Unicode and Unicode ranges out-of-the-box
- 100% TypeScript friendly
- ESM, CJS, and UMD builds
- Only pay for what you use — its fully tree-shakable
- Only pay for what you use — it is fully tree-shakable

## 📦 Install

Expand Down Expand Up @@ -165,7 +165,10 @@ type MatchScoreCalculator = (arg: string) => number;

## 🛠 Build Your Own Validators

You could create your own validators too, should the existing validators not suffice your case.
You could create custom validators too, should the existing validators not fit your use case.

There are also ready-to-use, copy-pastable code snippets that may fit your use cases
[here](./docs/RECIPES.md)

```ts
import {
Expand Down
8 changes: 8 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [1.1.1-next.1](https://github.com/arjunvegda/japanese-moji/compare/v1.1.0...v1.1.1-next.1) (2022-02-21)


### Bug Fixes

* improve docs for npm ([#55](https://github.com/arjunvegda/japanese-moji/issues/55)) ([a559a89](https://github.com/arjunvegda/japanese-moji/commit/a559a89744ef17747a75ed726f7c6dfc5a641f7f))
* trigger build, empty commit ([#54](https://github.com/arjunvegda/japanese-moji/issues/54)) ([b082bb4](https://github.com/arjunvegda/japanese-moji/commit/b082bb49c91816c147fbf1f50608ab796d80930e))

# [1.1.0](https://github.com/arjunvegda/japanese-moji/compare/v1.0.0...v1.1.0) (2022-02-21)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "japanese-moji",
"version": "1.1.0",
"version": "1.1.1-next.1",
"description": "A toolkit to validate Japanese characters",
"type": "module",
"packageManager": "[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions website/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ interface FetchVersionReturn {
}

const fetchVersion = async (): Promise<FetchVersionReturn> => {
const result = await fetch('https://cdn.jsdelivr.net/npm/japanese-moji/package.json')
const result = await fetch('https://cdn.jsdelivr.net/npm/japanese-moji@latest/package.json')
.then((res) => res.json())
.catch(() => {
return { version: null };
Expand All @@ -19,7 +19,7 @@ interface FetchBundleSizeReturn {
}

const fetchBundleSize = async (): Promise<FetchBundleSizeReturn> => {
const result = await fetch('https://bundlephobia.com/api/size?package=japanese-moji')
const result = await fetch('https://bundlephobia.com/api/size?package=japanese-moji@latest')
.then((res) => res.json())
.catch(() => {
return { gzip: null };
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@fontsource/jetbrains-mono": "^4.5.3",
"analytics": "^0.8.0",
"framer-motion": "^6.2.6",
"japanese-moji": "^1.1.0-next.3",
"japanese-moji": "^1.1.0",
"lodash.debounce": "^4.0.8",
"next": "^12.1.0",
"pretty-bytes": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion website/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
const { res } = context;
res.setHeader(
'Cache-Control',
`public, Cache-Control: max-age=432000, stale-while-revalidate=18000, stale-if-error=36000`,
`public, Cache-Control: max-age=3600, stale-while-revalidate=18000, stale-if-error=86400`,
);

const response = await fetchPackageInfo();
Expand Down
10 changes: 5 additions & 5 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3039,10 +3039,10 @@ __metadata:
languageName: node
linkType: hard

"japanese-moji@npm:^1.1.0-next.3":
version: 1.1.0-next.3
resolution: "japanese-moji@npm:1.1.0-next.3"
checksum: bf149a01e1b1c33614b6331349bd6e14c5a6df6383454657f6bd4a6402f57f26799bff95870ecbc06908c37d860186fad874ef729880f232fb4152c8ec34ed1b
"japanese-moji@npm:^1.1.0":
version: 1.1.0
resolution: "japanese-moji@npm:1.1.0"
checksum: 9cd574d8f93b9ce5568366ad768cb89b482eb11e9fa70b3561b7706ddf16daa39344d6f338deafc6fb5b8c214091f5148082ddc118d5a9703eb3417a179ae0d6
languageName: node
linkType: hard

Expand Down Expand Up @@ -3920,7 +3920,7 @@ __metadata:
eslint: 8.9.0
eslint-config-next: 12.1.0
framer-motion: ^6.2.6
japanese-moji: ^1.1.0-next.3
japanese-moji: ^1.1.0
lodash.debounce: ^4.0.8
next: ^12.1.0
pretty-bytes: ^6.0.0
Expand Down

1 comment on commit 8ed0dfa

@vercel
Copy link

@vercel vercel bot commented on 8ed0dfa Feb 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.