Skip to content

Commit 8fc5a22

Browse files
authored
Merge pull request #45 from axe-api/microbundle
v1.1.0
2 parents ffb8746 + 6472e38 commit 8fc5a22

85 files changed

Lines changed: 6171 additions & 4033 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
- run: |
3535
npm ci
3636
npm run build
37-
cd tests/consumers/cjs && npm install && node index.js
38-
cd ../esm && npm install && node index.js
39-
cd ../ts && npm install && npm run start
37+
cd tests/consumers/cjs && npm install && npm run test
38+
cd ../esm && npm install && npm run test
39+
cd ../ts-local && npm install && npm run test
4040
4141
linting:
4242
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
# Release Notes
22

3+
## [1.1.0 (2024-02-17)](https://github.com/axe-api/axe-api/compare/1.1.0...1.0.1)
4+
5+
- Fixed bundling issues
6+
- Reduced library size.
7+
- Fixed custom rule registration issue [#43](https://github.com/axe-api/validator/issues/43)
8+
9+
### Breaking changes
10+
11+
Before:
12+
13+
```ts
14+
import { validate, setLocales } from "robust-validator";
15+
import en from "robust-validator/dist/i18n/en.json";
16+
```
17+
18+
After:
19+
20+
```ts
21+
import { validate, setLocales, en } from "robust-validator";
22+
```
23+
324
## [1.0.1 (2024-02-16)](https://github.com/axe-api/axe-api/compare/1.0.1...1.0.0)
425

26+
### Fixed
27+
528
- Fixed module target
629

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

docs/.vitepress/cache/deps/_metadata.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"hash": "0de1b832",
2+
"hash": "ceca42ae",
33
"configHash": "ff5347c3",
4-
"lockfileHash": "54634a67",
5-
"browserHash": "8bc42beb",
4+
"lockfileHash": "51abb8cb",
5+
"browserHash": "85837995",
66
"optimized": {
77
"vue": {
88
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
99
"file": "vue.js",
10-
"fileHash": "b35a2191",
10+
"fileHash": "3d32afdd",
1111
"needsInterop": false
1212
},
1313
"vitepress > @vue/devtools-api": {
1414
"src": "../../../node_modules/@vue/devtools-api/lib/esm/index.js",
1515
"file": "vitepress___@vue_devtools-api.js",
16-
"fileHash": "6a882c71",
16+
"fileHash": "0de30102",
1717
"needsInterop": false
1818
},
1919
"vitepress > @vueuse/integrations/useFocusTrap": {
2020
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
2121
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
22-
"fileHash": "61b74767",
22+
"fileHash": "21a843f0",
2323
"needsInterop": false
2424
},
2525
"vitepress > mark.js/src/vanilla.js": {
2626
"src": "../../../node_modules/mark.js/src/vanilla.js",
2727
"file": "vitepress___mark__js_src_vanilla__js.js",
28-
"fileHash": "52e24bd6",
28+
"fileHash": "23bae971",
2929
"needsInterop": false
3030
},
3131
"vitepress > minisearch": {
3232
"src": "../../../node_modules/minisearch/dist/es/index.js",
3333
"file": "vitepress___minisearch.js",
34-
"fileHash": "fa0dfeb6",
34+
"fileHash": "6473614a",
3535
"needsInterop": false
3636
},
3737
"@theme/index": {
3838
"src": "../../../node_modules/vitepress/dist/client/theme-default/index.js",
3939
"file": "@theme_index.js",
40-
"fileHash": "9a203ec8",
40+
"fileHash": "45c6db2a",
4141
"needsInterop": false
4242
}
4343
},

docs/customization.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ You can register your custom rules easily.
55
## Register
66

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

1110
// Setting the locales firsrts
1211
setLocales(en);

docs/examples.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ You can find a Vue.js example here.
1111
```vue [App.vue]
1212
<script setup>
1313
import { ref, computed } from "vue";
14-
import { validate, setLocales } from "robust-validator";
15-
import en from "robust-validator/dist/i18n/en.json";
14+
import { validate, setLocales, en } from "robust-validator";
1615
1716
setLocales(en);
1817
@@ -45,8 +44,7 @@ You can find a Node.js example here.
4544
::: code-group
4645

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

5149
setLocales(en);
5250

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

7472
```js [index.ts]
75-
import pkg from "robust-validator";
76-
import en from "robust-validator/dist/i18n/en.json" assert { type: "json" };
77-
78-
const { validate, setLocales } = pkg;
73+
import { validate, setLocales, en } from "robust-validator";
7974

8075
setLocales(en);
8176

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

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

107101
setLocales(en);
108102

docs/getting-started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ You should just call the `validate()` function with data and the definition.
1717
::: code-group
1818

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

2322
setLocales(en);
2423

@@ -46,8 +45,8 @@ import {
4645
email,
4746
min,
4847
max,
48+
en,
4949
} from "robust-validator";
50-
import en from "robust-validator/dist/i18n/en.json";
5150

5251
setLocales(en);
5352

docs/i18n.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
You should import languages that you plan to support like the following example.
88

99
```ts
10-
import { validate, setLocales } from "robust-validator";
11-
import en from "robust-validator/dist/i18n/en.json";
12-
import fr from "robust-validator/dist/i18n/fr.json";
13-
import de from "robust-validator/dist/i18n/de.json";
10+
import { validate, setLocales, en, fr, de } from "robust-validator";
1411

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

2219
```ts
23-
import { validate, setLocales, setOptions } from "robust-validator";
24-
import en from "robust-validator/dist/i18n/en.json";
20+
import { validate, setLocales, setOptions, en } from "robust-validator";
2521

2622
setLocales(en);
2723

docs/options.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
You can set options for the validator.
66

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

1110
setLocales(en);
1211

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

2524
```ts
26-
import { validate, setLocales, setOptions } from "robust-validator";
27-
import en from "robust-validator/dist/i18n/en.json";
25+
import { validate, setLocales, setOptions, en } from "robust-validator";
2826

2927
setLocales(en);
3028

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ export * from "./src/converters";
77
export * from "./src/Constants";
88
export * from "./src/Interface";
99
export * from "./src/Types";
10+
export * from "./src/i18n";

0 commit comments

Comments
 (0)