ajv-validator / ajv-i18n Goto Github PK
View Code? Open in Web Editor NEWInternationalised error messages for Ajv JSON schema validator
Home Page: https://ajv.js.org
License: MIT License
Internationalised error messages for Ajv JSON schema validator
Home Page: https://ajv.js.org
License: MIT License
6.2.1
to 6.2.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
EVENT_RUN_END
events upon uncaught exception (@juergba)html
reporter (browser) (@pec9399)The new version differs by 12 commits.
843a322
6.2.2
aec8b02
update CHANGELOG for v6.2.2 [ci skip]
7a8b95a
npm audit fixes
cebddf2
Improve reporter documentation for mocha in browser. (#4026)
3f7b987
uncaughtException: report more than one exception per test (#4033)
ee82d38
modify alt text of image from Backers to Sponsors inside Sponsors section in Readme (#4046)
e9c036c
special-case parsing of "require" in unparseNodeArgs(); closes #4035 (#4063)
954cf0b
Fix HTMLCollection iteration to make unhide function work as expected (#4051)
816dc27
uncaughtException: fix double EVENT_RUN_END events (#4025)
9650d3f
add OpenJS Foundation logo to website (#4008)
f04b81d
Adopt the OpenJSF Code of Conduct (#3971)
aca8895
Add link checking to docs build step (#3972)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Even though the release message for 3.3.0 mentions added support for nl
and I have seen the merged PR, it's not inside the NPM package
Hi! First of all, thanks for the awesome library!
I need some pt-BR translations that are missing in the latest release, but were already merged to master with commit 7a7ec6e.
Is it possible to generate a minor release with these changes, so I can install via npm ? Thanks!
Branch | Build failing π¨ |
---|---|
Dependency | ajv |
Current Version | 5.1.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As ajv is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 13 commits.
29e6238
5.1.2
9e5eeb1
Merge branch 'blainesch-patch-1'
fc66d31
docs: it.util.equal
d01a0b8
Expose equal from util.
bd1af60
Merge branch 'boenrobot-uglify3'
a7804bd
Made bundle.js write the uncompressed bundle only when standalone is present. Previously, it would instead write it, and remove it later if applicable.
38808e1
Merge branch 'master' into uglify3
5d9c93b
Merge pull request #484 from epoberezkin/greenkeeper/initial
be552a6
Tweaked bundle.js to support UglifyJS3.
8ffd98c
use uglify-js 2.x
f3abd13
Merge branch 'master' into greenkeeper/initial
4b7e422
docs(readme): add Greenkeeper badge
0829178
chore(package): update dependencies
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | uglifyjs |
Current Version | 2.4.10 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As uglifyjs is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
I am using ajv with ajv-i18n to localize validation messages, which is great.
Problem is on required properties, since it is using the property name in the message. Is it possible to use the title instead if available?
It would be benneficial even for english speaking users since instead of this:
should have required property 'firstName'
user would see this:
should have required property 'First Name'
Example schema with title
const registerJsonSchema = {
type: 'object',
properties: {
firstName: { type: 'string', title: 'Meno', minLength: 2, maxLength: 20 },
...
},
required: ['firstName', ...],
};
That would probably require making doT a dependency
Only draft-07 "if/then/else" keyword
Both draft-06 and 07
(boolean schema, keywords "const", "contains", "propertyNames", "if/then/else")
@jmtoball: maybe you could add them? They are in the branch v5 at the moment.
Branch | Build failing π¨ |
---|---|
Dependency | jasmine-core |
Current Version | 2.6.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As jasmine-core is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
Please see the release notes
The new version differs by 7 commits.
5d1d19f
Bump version to 2.6.2
4f49288
Built distribution
b9adc76
Clear the stack if onmessage is called before the previous invocation finishes
5ac3e21
Merge branch 'interleaved-suites' of https://github.com/sgravrock/jasmine into sgravrock-interleaved-suites
b1e97cf
Correctly route errors that occur while a QueueRunner is clearing stack
8e5823c
Merge branch 'sgravrock-global-errors-rethrow'
10f1220
Don't mask errors that occur when no handlers are installed
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Hello,
In first, I'd like to say thank you for this amazing package.
I'd like to know if it's properly possible to remove the "data" prexfix of the errors?
Example:
console.log(ajv.errorsText(validate.errors, { separator: '\n' }));
data.email doit correspondre au format "email"
data.password ne doit pas faire moins de 6 caractères
data.language doit Γͺtre Γ©gal Γ une des valeurs prΓ©dΓ©finies
Ajv error object:
[
{
keyword: 'format',
dataPath: '.email',
schemaPath: 'email.json#/definitions/email/format',
params: { format: 'email' },
message: 'doit correspondre au format "email"'
},
{
keyword: 'minLength',
dataPath: '.password',
schemaPath: 'password.json#/definitions/password/minLength',
params: { limit: 6 },
message: 'ne doit pas faire moins de 6 caractères'
},
{
keyword: 'enum',
dataPath: '.language',
schemaPath: 'language.json#/definitions/language/enum',
params: { allowedValues: [Array] },
message: 'doit Γͺtre Γ©gal Γ une des valeurs prΓ©dΓ©finies'
}
]
Thank you π
Can you merge the Catalan translation please?
#138
Otherwise the bundle that is tested is different from the bundle that is shipped
Also it would reduce the number of scripts in package.json
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If youβre interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didnβt already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didnβt touch job or matrix configurations because these tend to be quite specific and complex, and itβs difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what youβre doing it may require additional work or may not be applicable at all. Weβre also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, Iβm a humble robot and wonβt feel rejected π€
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | mocha |
Current Version | 3.3.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.
This week's highlights:
allowUncaught
added to commandline as --allow-uncaught
(and bugfixed)--no-warnings
and --trace-warnings
flags (@sonicdoe)The new version differs by 9 commits0.
7554b31
Add Changelog for v3.4.0
9f7f7ed
Add --trace-warnings
flag
92561c8
Add --no-warnings
flag
ceee976
lint test/integration/fixtures/simple-reporter.js
dcfc094
Revert "use semistandard
directly"
93392dd
no special case for macOS running Karma locally
4d1d91d
--allow-uncaught cli option
fb1e083
fix allowUncaught in browser
4ed3fc5
Add license report and scan status
false
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
draft4/v5/draft6 (when added)
1.10.1
to 1.10.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
js-beautify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 7 commits.
785c4a6
Release: 1.10.2
b31e71a
Merge remote-tracking branch 'origin/master' into release
403de87
Bump version numbers for 1.10.2
65402bc
Update Changelog
5f85e7e
Update python dependencies
bdb31ae
Improved CodeMirror behavior
510cf7a
Support handlebars unescaped triple curly-braces
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
@jasoniangreen could you add them? They are in the branch v5 at the moment.
6.8.1
to 6.9.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
OpenAPI keyword nullable
can be any boolean (and not only true
).
Custom keyword definition changes:
dependencies
option in to require the presence of keywords in the same schema.The new version differs by 14 commits.
cd404c4
6.9.0
7079aed
remove property in custom keyword definition schema
c89ca0e
eslint option
47c8fc9
refactor: use json schema to validate custom keyword definition
33d1ac4
style fix
fdfbd44
feat: support for required dependencies of custom keyword (keywords that must be present in the same schema)
f080c91
docs: double quotes
51e858e
docs: clarify "format" option values
0cf6e98
Merge branch 'mattpolzin-nullable-can-be-false'
ac2221a
style fix
c5b9516
Merge branch 'master' into nullable-can-be-false
58879a0
fix: pin jshint to 2.9.7 (#939)
859259e
Add tests that show that with nullable option on but 'nullable' keyword set to false an object is not nullable.
28c85ad
Allow nullable property of JSON Schema object to be false as well as true. Remove test that asserted failure if nullable was false.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.1.2
to 1.1.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
dot is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Tests for doT.process
Patch code injection via prototype pollution (#291)
The new version differs by 12 commits.
6adbd81
docs: note
d00300e
1.1.3
87ccef3
test: update travis versions
4cc3253
chore: update dependencies
320e847
test: missing test files
ef5f353
docs: security considerations
c531369
test: exclude unused code from coverage
b4fd211
test: doT.process
fa3890d
test: use doT required via the main module
2cf2226
fix: prevent possibility of execution of the code injected via prototype pollution when undefined is passed to compiled template function, closes #291
299b4da
Merge pull request #237 from EdwardBetts/spelling
2dfe1af
correct spelling mistake
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
2.0.1
to 2.0.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
brfs is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
660f6d8
2.0.2
eb26fec
Merge pull request #93 from jagonzalr/pr/update/static-val-version
434cc8b
Update static-module from 3.0.0 to 3.0.2
8fafcf5
Remove stray console.log
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
3.0.6
to 3.0.7
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 1 commits.
2ed185c
added support for GitLab Merge Request IID
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
3.6.0
to 3.6.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Β
The new version differs by 10 commits.
a82003d
v3.6.1
da9f162
report errors correctly in ufuzz (#3456)
8a4c707
account for catch
in constant lambda expressions (#3454)
0a63f2f
workaround V8 RegExp bug (#3453)
931ac66
fix corner case in hoist_props
(#3452)
35338a1
handle function/variable name collisions correctly (#3451)
d57b606
exclude mangling of addEventListener parameters (#3445)
00ada04
facilitate Webpack compatibility (#3435)
a31c477
fix variable scope determination (#3449)
bde7418
update & fix dependencies (#3450)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | ajv-keywords |
Current Version | 2.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As ajv-keywords is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
uniqueItemProperties keyword (contributed by @blainesch)
The new version differs by 15 commits.
19fdbe3
2.1.0
9989749
docs: uniqueItemProperties
ea14350
test: more tests for uniqueItemProperties
f6e7dd1
refactor: uniqueItemProperties
a1174df
feat: uniqueItemProperties onl applies to arrays
a974bfc
docs: uniqueItemProperties
c75a99a
Merge pull request #19 from blainesch/feature/unique-item-properties
edc78d5
Add unique item property keyword.
ff2c769
docs: gitter badge, license url
a037dd8
Merge branch 'greenkeeper/initial'
63f97de
docs: move greenkeeper badge
e91e8ba
docs(readme): add Greenkeeper badge
b18d6a8
chore(package): update dependencies
c5e492e
Merge pull request #16 from martin-dimitrov13/master
c9e3910
Fixed typo in readme
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Hey,
someone made a mistake when translating to Czech... the correct language code is "cs" or full locale "cs_CZ"
16.3.0
to 16.4.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
browserify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
8980670
16.4.0
f871a85
Update changelog.markdown
52de2c4
Merge pull request #1916 from browserify/stream-http
5dc1bf2
Upgrade stream-http to v3
4a5ea7e
Add funding.yml
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hi,
I think there should some way to translate prop.type and things like that.
Thanks.
4.4.0
to 4.4.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 6 commits.
25d415e
chore: release v4.4.1
67ec618
chore: update contributors
f91be24
fix: if preprocessor is async function and doesn't return a content then await donePromise (#3387)
259be0d
fix(server): Add test coverage for config.singleRun true branch. (#3384)
1cd87ad
fix(deps): back to karma-browserstack-launcher 1.4 (#3361)
df114e1
Refactor (#3382)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.10.2
to 1.10.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
js-beautify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 24 commits.
d5a3652
Release: 1.10.3
1848c2d
Merge remote-tracking branch 'origin/master' into release
b7eca84
Bump version numbers for 1.10.3
894d954
Update Changelog
739a91f
Fix unquoted attributes with slashes in them
472664c
Merge pull request #1745 from bitwiseman/task/deps
66ddffa
Update ci images and supported versions
9b4ba95
Update dependencies
a21941e
Merge pull request #1733 from simonw/patch-1
c618e25
Merge pull request #1735 from MikeDombo/fix-private-fields
e28329c
Add test for private field with changed output
e19cf93
Fix private fields by adding new start token to identifiers
c26968a
Allow # to start identifier, such as private fields in classes
db4bc4d
Merge pull request #1713 from Hirse/codemirror-search
f3c704e
Merge branch 'master' into codemirror-search
There are 24 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
6.11.0
to 6.12.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Improved hostname validation (@sambauers, #1143)
Option keywords
to add custom keywords (@franciscomorais, #1137)
Types fixes (@boenrobot, @MattiAstedrone)
Docs:
The new version differs by 33 commits.
03d0012
6.12.0
1021a00
Merge branch 'RadiationSickness-patch-1'
0163e5c
docs: error logging code sample
52adde5
Merge branch 'patch-1' of git://github.com/RadiationSickness/ajv into RadiationSickness-patch-1
8fd1e44
Merge branch 'franciscomorais-feature/keywords-options'
e5bed30
test: update option keywords test
c90c189
Merge branch 'feature/keywords-options' of git://github.com/franciscomorais/ajv into franciscomorais-feature/keywords-options
38191c2
Update readme with keywords option
f94db48
Update options validation spec
367527c
Merge branch 'master' into patch-1
c1c0ba7
Merge pull request #1091 from thetric/typescript-usage-note
75aa5fd
Merge pull request #1143 from sambauers/master
120748c
Only use regex for hostname checks.
384eec4
Merge branch 'master' into master
4d9dd8c
docs: link to $data reference proposal, closes #51
There are 33 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Not published on bower - could ya publish this? Thanks!
Branch | Build failing π¨ |
---|---|
Dependency | js-beautify |
Current Version | 1.8.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
js-beautify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 51 commits.
b8d4f5c
Release: 1.8.3
8f827c7
Merge remote-tracking branch 'origin/master' into release
d33e70d
Bump version numbers for 1.8.3
b092116
Update Changelog
f76d933
Merge pull request #1529 from MacKLess/last_token
b5ef9b4
Refactor _flags.last_text to _flags.last_token.text
cfa13d9
Merge pull request #1528 from MacKLess/reserved_word
e849cb9
Refactor TOKEN.RESERVED to reserved_word and reserved_array functions
866cfca
Simplified error handling
d46410f
Fix unicode test for windows
418fc7a
Refactor end_with_newline in Output settings
a46d717
Refactor indent_string calculation into Output
02d8969
Added single selection options
de834fd
Python test should not run node build
b89cdb9
Better output for unicode decoding errors
There are 51 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | js-beautify |
Current Version | 1.6.14 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As js-beautify is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 22 commits.
0ac845e
1.7.0
5b3c36c
Python 1.7.0
9276881
Bump version numbers in README.md
1bd274d
Update Changelog for 1.7.0
ea252d1
Package lock update
9d733b5
Merge pull request #1243 from bitwiseman/feature/poly
cbbb2e0
Merge branch 'master' into feature/poly
453bdc9
Fixed yield function spacing
468815e
Merge pull request #1241 from simondel/master
a46f97c
README, LICENSE, CHANGELOG and package.json are always added
f56a513
Remove Object.value polyfill
641d3bc
Don't publish unnessessary files.
ed61dc1
Merge pull request #1240 from aecepoglu/unindent-chains-2
258a361
adding the generated files
2683c35
updated the js src file
There are 22 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | ajv |
Current Version | 5.3.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Option logger
to disable logging or to specify a custom logger (#618, @meirotstein).
The new version differs by 20 commits.
f336cda
5.4.0
00be319
Merge branch 'meirotstein-master'
89a80ca
check that console has log, warn and error methods as well
5ba22a3
remove Logger class, resolve logger object on Ajv ctor instead
e0c7eac
create logger instance per Ajv instance
4cdfcaa
Merge branch 'master' into master
4fe1c21
update readme with logger option
ceb552a
logger option tests
b0e28ee
logger component tests
91374ac
add logger option
cdd93a6
Merge pull request #621 from stuartpb/patch-1
0196611
Update draft-06 meta-schema
0cafcf6
docs: version 6 beta
c73ff44
Merge pull request #616 from kpping/patch-1
bddda60
make available types more noticeable
There are 20 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
I generate JSON schemas based on thy applications metadata (Entity, Properties, Validation-Rules) etc. and then use ajv-i18n to get translated (german) messages out of AJV that get rendered into the otherwise translated UI.
This works great except that I don't see a way to translate the property names. I get messages like:
sollte das erforderliche Attribut firstName enthalten
The word "firstName" is English and should be "Vorname". I have this text already on hand when generating the JSON schema and even when validating.
How can I feed in my custom property name or let's better say "Property Caption" into the messages?
Btw: From PoV there are two things: a) propertyName (technical, internal) and b) propertyCaption (the thing to show to the user/message).
Locales:
Hi,
great work btw.
I tried to use this lib and noticed that in the README it is written the following:
if (!valid) {
// array of error objects with Russian messages
var errors = localize.ru(validate.errors);
// string with all errors and data paths
console.log(ajv.errorsText(errors, { separator: '\n' }));
}
but, checking the language files it looks like it modifies the referenced object and does not return anything.
I could provide a PR to fix the documentation to something like
if (!valid) {
// array of error objects with Russian messages
localize.ru(validate.errors);
// string with all errors and data paths
console.log(ajv.errorsText(validate.errors, { separator: '\n' }));
}
Or make sure that localize returns the errors.
Branch | Build failing π¨ |
---|---|
Dependency | eslint |
Current Version | 4.14.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
ignoreComments
option to indent
rule (fixes #9018) (#9752) (Kevin Partington)The new version differs by 14 commits.
e14ceb0
4.15.0
2dfc3bd
Build: changelog update for 4.15.0
6ab04b5
New: Add context.report({ messageId }) (fixes #6740) (#9165)
fc7f404
Docs: add url to each of the rules (refs #6582) (#9788)
fc44da9
Docs: fix sort-imports rule block language (#9805)
65f0176
New: CLIEngine#getRules() (refs #6582) (#9782)
c64195f
Update: More detailed assert message for rule-tester (#9769)
9fcfabf
Fix: no-extra-parens false positive (fixes: #9755) (#9795)
61e5fa0
Docs: Add table of contents to Node.js API docs (#9785)
4c87f42
Fix: incorrect error messages of no-unused-vars (fixes #9774) (#9791)
bbabf34
Update: add ignoreComments
option to indent
rule (fixes #9018) (#9752)
db431cb
Docs: HTTP -> HTTPS (fixes #9768) (#9768)
cbf0fb9
Docs: describe how to feature-detect scopeManager/visitorKeys support (#9764)
f7dcb70
Docs: Add note about "patch release pending" label to maintainer guide (#9763)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
@szilveszter9, could you add them please when you have a minute?
The only downside is that doT will be a dependency.
@JpabloM maybe you could add them?... They are in the branch v5 at the moment.
6.5.1
to 6.6.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
39dfe08
Update: false positives in function-call-argument-newline (fixes #12123) (#12280) (Scott O'Hara)4d84210
Update: improve report location for no-trailing-spaces (fixes #12315) (#12477) (Milos Djermanovic)c6a7745
Update: no-trailing-spaces false negatives after comments (fixes #12479) (#12480) (Milos Djermanovic)0bffe95
Fix: no-misleading-character-class crash on invalid regex (fixes #12169) (#12347) (Milos Djermanovic)c6a9a3b
Update: Add enforceForIndexOf option to use-isnan (fixes #12207) (#12379) (Milos Djermanovic)364877b
Update: measure plugin loading time and output in debug message (#12395) (Victor Homyakov)1744fab
Fix: operator-assignment removes and duplicates comments (#12485) (Milos Djermanovic)52ca11a
Fix: operator-assignment invalid autofix with adjacent tokens (#12483) (Milos Djermanovic)0f6d0dc
Fix: CLIEngine#addPlugin reset lastConfigArrays (fixes #12425) (#12468) (Toru Nagashima)923a8cb
Chore: Fix lint failure in JSDoc comment (#12489) (Brandon Mills)aac3be4
Update: Add ignored prop regex no-param-reassign (#11275) (Luke Bennett)e5382d6
Chore: Remove unused parameter in dot-location (#12464) (Milos Djermanovic)49faefb
Fix: no-obj-calls false positive (fixes #12437) (#12467) (Toru Nagashima)b3dbd96
Fix: problematic installation issue (fixes #11018) (#12309) (Toru Nagashima)cd7c29b
Sponsors: Sync README with website (ESLint Jenkins)8233873
Docs: Add note about Node.js requiring SSL support (fixes #11413) (#12475) (Nicholas C. Zakas)89e8aaf
Fix: improve report location for no-tabs (#12471) (Milos Djermanovic)7dffe48
Update: Enable function string option in comma-dangle (fixes #12058) (#12462) (YeonJuan)e15e1f9
Docs: fix doc for no-unneeded-ternary rule (fixes #12098) (#12410) (Sam Rae)b1dc58f
Sponsors: Sync README with website (ESLint Jenkins)61749c9
Chore: Provide debug log for parser errors (#12474) (Brad Zacher)7c8bbe0
Update: enforceForOrderingRelations no-unsafe-negation (fixes #12163) (#12414) (Sam Rae)349ed67
Update: improve report location for no-mixed-operators (#12328) (Chiawen Chen)a102eaa
Fix: prefer-numeric-literals invalid autofix with adjacent tokens (#12387) (Milos Djermanovic)6e7c18d
Update: enforceForNewInMemberExpressions no-extra-parens (fixes #12428) (#12436) (Milos Djermanovic)51fbbd7
Fix: array-bracket-newline consistent error with comments (fixes #12416) (#12441) (Milos Djermanovic)e657d4c
Fix: report full dot location in dot-location (#12452) (Milos Djermanovic)2d6e345
Update: make isSpaceBetweenTokens() ignore newline in comments (#12407) (YeonJuan)84f71de
Update: remove default overrides in keyword-spacing (fixes #12369) (#12411) (YeonJuan)18a0b0e
Update: improve report location for no-space-in-parens (#12364) (Chiawen Chen)d61c8a5
Update: improve report location for no-multi-spaces (#12329) (Chiawen Chen)561093f
Upgrade: bump inquirer to ^7.0.0 (#12440) (Joe Graham)fb633b2
Chore: Add a script for testing with more control (#12444) (Eric Wang)012ec51
Sponsors: Sync README with website (ESLint Jenkins)874fe16
New: pass cwd from cli engine (#12389) (Eric Wang)b962775
Update: no-self-assign should detect member expression with this (#12279) (Tibor Blenessy)02977f2
Docs: Clarify eslint:recommended
semver policy (#12429) (Kevin Partington)97045ae
Docs: Fixes object type for rules
in "Use a Plugin" (#12409) (Daisy Develops)24ca088
Docs: Fix typo in v6 migration guide (#12412) (Benjamim Sonntag)b094008
Chore: update version parameter name (#12402) (Toru Nagashima)e5637ba
Chore: enable jsdoc/require-description (#12365) (Kai Cataldo)d31f337
Sponsors: Sync README with website (ESLint Jenkins)7ffb22f
Chore: Clean up inline directive parsing (#12375) (Jordan Eldredge)84467c0
Docs: fix wrong max-depth example (fixes #11991) (#12358) (Gabriel R Sezefredo)3642342
Docs: Fix minor formatting/grammar errors (#12371) (cherryblossom000)c47fa0d
Docs: Fix missing word in sentence (#12361) (Dan Boulet)8108f49
Chore: enable additional eslint-plugin-jsdoc rules (#12336) (Kai Cataldo)b718d2e
Chore: update issue template with --eslint-fix flag (#12352) (James George)20ba14d
Sponsors: Sync README with website (ESLint Jenkins)566a947
Sponsors: Sync README with website (ESLint Jenkins)070cbd0
Sponsors: Sync README with website (ESLint Jenkins)The new version differs by 53 commits.
879c373
6.6.0
c8ba30a
Build: changelog update for 6.6.0
39dfe08
Update: false positives in function-call-argument-newline (fixes #12123) (#12280)
4d84210
Update: improve report location for no-trailing-spaces (fixes #12315) (#12477)
c6a7745
Update: no-trailing-spaces false negatives after comments (fixes #12479) (#12480)
0bffe95
Fix: no-misleading-character-class crash on invalid regex (fixes #12169) (#12347)
c6a9a3b
Update: Add enforceForIndexOf option to use-isnan (fixes #12207) (#12379)
364877b
Update: measure plugin loading time and output in debug message (#12395)
1744fab
Fix: operator-assignment removes and duplicates comments (#12485)
52ca11a
Fix: operator-assignment invalid autofix with adjacent tokens (#12483)
0f6d0dc
Fix: CLIEngine#addPlugin reset lastConfigArrays (fixes #12425) (#12468)
923a8cb
Chore: Fix lint failure in JSDoc comment (#12489)
aac3be4
Update: Add ignored prop regex no-param-reassign (#11275)
e5382d6
Chore: Remove unused parameter in dot-location (#12464)
49faefb
Fix: no-obj-calls false positive (fixes #12437) (#12467)
There are 53 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
@danielzurawski could you add them? They are in the branch v5 at the moment.
Considering ajv-i18n's localization function already mutates the errors
object:
When using ajv-i18 as a plugin, the ajv.errorsText()
function should return the localized error messages.
Currently we need to hack the errors
object and then call errorsText()
.
I propose expose a initialization function in ajv-i18n, just like other plugins, so this function could replace the errorsText()
by its localized method.
// @param {Ajv} ajv An Ajv instance
function initialize(ajv) {
ajv._errorsText = ajv.errorsText;
// intercepts errorsText function
ajv.errorsText = (errors) => {
localize(errors);
return ajv._errorsText(errors);
}
}
So, this initialization could be used like other plugins (ajv-keywords example):
require('ajv-i18n')(ajv);
If the localize
method already converts all errors messages in validate.errors
, the plugin could also replace errors by a getter/setter that does this conversion:
function initialize(ajv, locale) {
ajv._compile = ajv.compile;
// intercepts compile function
ajv.compile = schema => {
const validate = ajv._compile(schema);
Object.defineProperty(validate, 'errors', makeLocalizedErrors(ajv));
return validate;
}
}
function makeLocalizedErrors(ajv) {
return {
get: () => {
return ajv._errors;
},
set: (errors) => {
ajv._errors = localize(errors);
},
configurable: true
};
}
localize
function in module.exports
?To work like other AJV's plugins, the current module.exports
needs to be changed to the proposed initialization function, that would lead to a breaking change (major version).
But the current localization function exported in localize.jst could be exported as a property of the initialization function, just like ajv-keywords does with the get()
function.
module.exports = initialize;
function initialize(ajv) {
// ... initialize function as defined above
}
initialize.localize = localize;
function localize(errors) {
// current exported function in module.exports
}
The inverse could be made, so this plugin injection could be:
module.exports = localize;
function localize(errors) {
// current exported function in module.exports
}
function initialize(ajv) {
// ... initialize function as defined above
}
localize.localize = initialize;
... used as:
const { localize } = require('ajv-i18n');
localize(ajv);
If this implementation design is approved, I start to code it and in a few hours I make a pull request.
Looking forward to a special reply from the most active member, @epoberezkin π€
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.