diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ad02b6..7772ccf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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: diff --git a/.releaserc.json b/.releaserc.json index 3674746..4e2202e 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -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}" } ] ], diff --git a/README.md b/README.md index 6ff48d8..eca8ee2 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,16 @@

- + - + - + - + @@ -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 @@ -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 { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 550b16d..aa2c6cb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index 2756767..6fb7800 100644 --- a/package.json +++ b/package.json @@ -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": "yarn@3.1.1", diff --git a/website/apis.ts b/website/apis.ts index 7dedb53..f50aef4 100644 --- a/website/apis.ts +++ b/website/apis.ts @@ -3,7 +3,7 @@ interface FetchVersionReturn { } const fetchVersion = async (): Promise => { - 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 }; @@ -19,7 +19,7 @@ interface FetchBundleSizeReturn { } const fetchBundleSize = async (): Promise => { - 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 }; diff --git a/website/package.json b/website/package.json index 519f627..19300fc 100644 --- a/website/package.json +++ b/website/package.json @@ -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", diff --git a/website/pages/index.tsx b/website/pages/index.tsx index aba7ee7..9c03b83 100644 --- a/website/pages/index.tsx +++ b/website/pages/index.tsx @@ -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(); diff --git a/website/yarn.lock b/website/yarn.lock index 922130d..ec76951 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -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 @@ -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