Android 4 compatibility, #143
parent
de23630ea1
commit
44dd6b78b9
|
@ -46,10 +46,10 @@ module.exports = function(config) {
|
|||
browserName: 'internet explorer',
|
||||
version: '11' // default
|
||||
},
|
||||
// 'SL_MicrosoftEdge': {
|
||||
// base: 'SauceLabs',
|
||||
// browserName: 'MicrosoftEdge'
|
||||
// },
|
||||
'SL_MicrosoftEdge': {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'MicrosoftEdge'
|
||||
},
|
||||
'SL_FireFox_17': {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'firefox',
|
||||
|
@ -89,6 +89,11 @@ module.exports = function(config) {
|
|||
browserName: 'iphone',
|
||||
version: '9.2'
|
||||
}
|
||||
// 'SL_Android_4': {
|
||||
// base: 'SauceLabs',
|
||||
// browserName: 'android',
|
||||
// version: '4'
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
|
|
11
lib/ajv.js
11
lib/ajv.js
|
@ -201,6 +201,11 @@ function Ajv(opts) {
|
|||
* @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
||||
*/
|
||||
function removeSchema(schemaKeyRef) {
|
||||
if (schemaKeyRef instanceof RegExp) {
|
||||
_removeAllSchemas(self._schemas, schemaKeyRef);
|
||||
_removeAllSchemas(self._refs, schemaKeyRef);
|
||||
return;
|
||||
}
|
||||
switch (typeof schemaKeyRef) {
|
||||
case 'undefined':
|
||||
_removeAllSchemas(self._schemas);
|
||||
|
@ -214,11 +219,6 @@ function Ajv(opts) {
|
|||
delete self._refs[schemaKeyRef];
|
||||
return;
|
||||
case 'object':
|
||||
if (schemaKeyRef instanceof RegExp) {
|
||||
_removeAllSchemas(self._schemas, schemaKeyRef);
|
||||
_removeAllSchemas(self._refs, schemaKeyRef);
|
||||
return;
|
||||
}
|
||||
var jsonStr = stableStringify(schemaKeyRef);
|
||||
self._cache.del(jsonStr);
|
||||
var id = schemaKeyRef.id;
|
||||
|
@ -228,7 +228,6 @@ function Ajv(opts) {
|
|||
delete self._refs[id];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ module.exports = {
|
|||
allOf: require('../dotjs/allOf'),
|
||||
anyOf: require('../dotjs/anyOf'),
|
||||
dependencies: require('../dotjs/dependencies'),
|
||||
enum: require('../dotjs/enum'),
|
||||
'enum': require('../dotjs/enum'),
|
||||
format: require('../dotjs/format'),
|
||||
items: require('../dotjs/items'),
|
||||
maximum: require('../dotjs/_limit'),
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
additionalProperties: "'should NOT have additional properties'",
|
||||
anyOf: "'should match some schema in anyOf'",
|
||||
dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
|
||||
enum: "'should be equal to one of the allowed values'",
|
||||
'enum': "'should be equal to one of the allowed values'",
|
||||
format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
|
||||
_limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
|
||||
_exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
|
||||
|
@ -129,7 +129,7 @@
|
|||
additionalProperties: "false",
|
||||
anyOf: "validate.schema{{=$schemaPath}}",
|
||||
dependencies: "validate.schema{{=$schemaPath}}",
|
||||
enum: "validate.schema{{=$schemaPath}}",
|
||||
'enum': "validate.schema{{=$schemaPath}}",
|
||||
format: "{{#def.schemaRefOrQS}}",
|
||||
_limit: "{{#def.schemaRefOrVal}}",
|
||||
_exclusiveLimit: "validate.schema{{=$schemaPath}}",
|
||||
|
@ -161,7 +161,7 @@
|
|||
additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
|
||||
anyOf: "{}",
|
||||
dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
|
||||
enum: "{}",
|
||||
'enum': "{}",
|
||||
format: "{ format: {{#def.schemaValueQS}} }",
|
||||
_limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
|
||||
_exclusiveLimit: "{}",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ajv",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Another JSON Schema Validator",
|
||||
"main": "lib/ajv.js",
|
||||
"typings": "lib/ajv.d.ts",
|
||||
|
|
|
@ -337,7 +337,7 @@ describe('Type coercion', function () {
|
|||
tests.forEach(function (test) {
|
||||
var canCoerce = test.to !== undefined;
|
||||
var schema = canCoerce
|
||||
? { type: toType, enum: [ test.to ] }
|
||||
? { type: toType, "enum": [ test.to ] }
|
||||
: { type: toType };
|
||||
cb(test, schema, canCoerce, toType, fromType);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue