Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
- Fixed bundling issues
- Reduced library size.
  • Loading branch information
ozziest committed Feb 17, 2024
1 parent cea0f87 commit 0de68a4
Show file tree
Hide file tree
Showing 85 changed files with 6,158 additions and 4,020 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
- run: |
npm ci
npm run build
cd tests/consumers/cjs && npm install && node index.js
cd ../esm && npm install && node index.js
cd ../ts && npm install && npm run start
cd tests/consumers/cjs && npm install && npm run test
cd ../esm && npm install && npm run test
cd ../ts-local && npm install && npm run test
linting:
runs-on: ubuntu-latest
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
# Release Notes

## [1.1.0 (2024-02-17)](https://github.com/axe-api/axe-api/compare/1.1.0...1.0.1)

- Fixed bundling issues
- Reduced library size.
- Fixed custom rule registration issue [#43](https://github.com/axe-api/validator/issues/43)

### Breaking changes

Before:

```ts
import { validate, setLocales } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
```

After:

```ts
import { validate, setLocales, en } from "robust-validator";
```

## [1.0.1 (2024-02-16)](https://github.com/axe-api/axe-api/compare/1.0.1...1.0.0)

### Fixed

- Fixed module target

## [1.0.0 (2024-02-11)](https://github.com/axe-api/axe-api/compare/1.0.0...1.0.0)
Expand Down
18 changes: 9 additions & 9 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"hash": "0de1b832",
"hash": "ceca42ae",
"configHash": "ff5347c3",
"lockfileHash": "54634a67",
"browserHash": "8bc42beb",
"lockfileHash": "51abb8cb",
"browserHash": "85837995",
"optimized": {
"vue": {
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "b35a2191",
"fileHash": "3d32afdd",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "6a882c71",
"fileHash": "0de30102",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "61b74767",
"fileHash": "21a843f0",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "52e24bd6",
"fileHash": "23bae971",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "fa0dfeb6",
"fileHash": "6473614a",
"needsInterop": false
},
"@theme/index": {
"src": "../../../node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "9a203ec8",
"fileHash": "45c6db2a",
"needsInterop": false
}
},
Expand Down
3 changes: 1 addition & 2 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ You can register your custom rules easily.
## Register

```ts
import { validate, setLocales, register } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, register, en } from "robust-validator";

// Setting the locales firsrts
setLocales(en);
Expand Down
14 changes: 4 additions & 10 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ You can find a Vue.js example here.
```vue [App.vue]
<script setup>
import { ref, computed } from "vue";
import { validate, setLocales } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, en } from "robust-validator";
setLocales(en);
Expand Down Expand Up @@ -45,8 +44,7 @@ You can find a Node.js example here.
::: code-group

```js [index.js]
const { validate, setLocales } = require("robust-validator");
const en = require("robust-validator/dist/i18n/en.json");
const { validate, setLocales, en } = require("robust-validator");

setLocales(en);

Expand All @@ -72,10 +70,7 @@ You can find a Node.js (ESM) example here.
::: code-group

```js [index.ts]
import pkg from "robust-validator";
import en from "robust-validator/dist/i18n/en.json" assert { type: "json" };

const { validate, setLocales } = pkg;
import { validate, setLocales, en } from "robust-validator";

setLocales(en);

Expand All @@ -101,8 +96,7 @@ You can find a TypeScript example here.
::: code-group

```js [index.js]
import { validate, setLocales, setOptions } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, en } from "robust-validator";

setLocales(en);

Expand Down
5 changes: 2 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ You should just call the `validate()` function with data and the definition.
::: code-group

```js [Declarative]
import { validate, setLocales } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, en } from "robust-validator";

setLocales(en);

Expand Down Expand Up @@ -46,8 +45,8 @@ import {
email,
min,
max,
en,
} from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";

setLocales(en);

Expand Down
8 changes: 2 additions & 6 deletions docs/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
You should import languages that you plan to support like the following example.

```ts
import { validate, setLocales } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import fr from "robust-validator/dist/i18n/fr.json";
import de from "robust-validator/dist/i18n/de.json";
import { validate, setLocales, en, fr, de } from "robust-validator";

setLocales([en, fr, de]);
```
Expand All @@ -20,8 +17,7 @@ setLocales([en, fr, de]);
You can decide default language selection.

```ts
import { validate, setLocales, setOptions } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, setOptions, en } from "robust-validator";

setLocales(en);

Expand Down
6 changes: 2 additions & 4 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
You can set options for the validator.

```ts
import { validate, setLocales, setOptions } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, setOptions, en } from "robust-validator";

setLocales(en);

Expand All @@ -23,8 +22,7 @@ setOptions({
You can override the default options for a validate action like the following example:

```ts
import { validate, setLocales, setOptions } from "robust-validator";
import en from "robust-validator/dist/i18n/en.json";
import { validate, setLocales, setOptions, en } from "robust-validator";

setLocales(en);

Expand Down
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export * from "./src/converters";
export * from "./src/Constants";
export * from "./src/Interface";
export * from "./src/Types";
export * from "./src/i18n";
Loading

0 comments on commit 0de68a4

Please sign in to comment.