Markdown editor with inline preview
niktekusho/all-contributors-bot 0
🤖 A GitHub bot to automate acknowledging contributors to your open source projects
Assignments for Advanced Programming with JavaScript course
Convert object keys to camel case
Get details of the current CI environment. Heavily inspired by https://github.com/watson/ci-info
Compare semver version strings to find which is greater, equal or lesser.
niktekusho/complete-guide-nodejs 0
NodeJS - The Complete Guide (incl. MVC, REST APIs, GraphQL) by Maximilian Schwarzmüller
Simple config handling for your app or module
Copy files
issue commentsindresorhus/conf
Lost ability to use "date-time" format in JSON Scheme (version 7.0.0)
Please read the release notes.
comment created time in 4 hours
issue openedsindresorhus/conf
Lost ability to use "date-time" format in JSON Scheme (version 7.0.0)
HI,
I just upgraded to 7.0.0, but I get the following error when loading the store using a JSON scheme:
Error: unknown format "date-time" ignored in schema at path "#/properties/extra/properties/lastStartDate"
Nothing else has changed, just the packages upgrade. AM i missing something?
My JSON Scheme is the following:
const AppDatabaseSchema: Schema<AppDatabaseModel> = {
extra: {
type: 'object',
properties: {
lastStartDate: {
type: "string",
format: "date-time"
}
}
}
}
And I initialize it like this:
this.store = new Store<AppDatabaseModel>({
name: "appDatabase",
schema: AppDatabaseSchema,
clearInvalidConfig: true
});
Thank you
created time in 10 hours
issue commentsindresorhus/conf
Changing schema name causes `string` defaults to show up as undefined
Right, what I meant was the name of the schema variable, not the option name.
I just used schema
and Schema
in the initial issue to say that even a slight change in the schema variable name causes string defaults to be returned as undefined. (Notice: one has a lowercase s
, and the other has an uppercase S
)
So, this works:
const schema = {...some_schema_object}
const config = new Conf({schema}) // works as expected
But, the following examples don't work:
const someRandomVariableName = {...some_schema_object}
const config = new Conf({someRandomVariableName}) // does not work
or
const confSchema = {...some_schema_object}
const config = new Conf({confSchema}) // does not work
or
const Schema = {...some_schema_object}
const config = new Conf({Schema}) // does not work
comment created time in 13 hours
push eventsindresorhus/conf
commit sha b2910216768114295ae024bd633d02dcb805bf35
Make the `clearInvalidConfig` option `false` by default
commit sha 8ba18f960ae6483d1057db4d717d871f40564cdd
9.0.0
push time in 17 hours
issue closedsindresorhus/conf
Changing schema name causes `string` defaults to show up as undefined
const Conf = require('conf');
const schema = {
foo: {
type: 'number',
maximum: 100,
minimum: 1,
default: 50
},
bar: {
type: 'string',
format: 'url',
default: 'https://www.google.com'
},
test: {
default: 'aaaaaaaaaaaaaaa'
}
};
const config = new Conf({schema});
console.log(config.get('foo')); // => 50
console.log(config.get('bar')); // => https://www.google.com
console.log(config.get('test')); // => aaaaaaaaaaaaaaa
This works fine, just changing even one character from the schema name causes all string defaults to be returned as undefined.
Something as simple as capitalizing the S in schema throws it off. Numbers seem to work fine. Same issue when you remove type definition from the schema, numbers work, strings don't.
const Conf = require('conf');
const Schema = {
foo: {
type: 'number',
maximum: 100,
minimum: 1,
default: 50
},
bar: {
type: 'string',
format: 'url',
default: 'https://www.google.com'
},
test: {
default: 'aaaaaaaaaaaaaaa'
}
};
const config = new Conf({Schema});
console.log(config.get('foo')); // => 50
console.log(config.get('bar')); // => undefined
console.log(config.get('test')); // => undefined
I am using Node v14.15.1
closed time in 18 hours
anujdatarissue commentsindresorhus/conf
Changing schema name causes `string` defaults to show up as undefined
const config = new Conf({Schema});
is shorthand for:
const config = new Conf({Schema: Schema});
so the option name is no longer what's expected.
comment created time in 18 hours
push eventsebhildebrandt/systeminformation
commit sha 588fb93f4906a978496800ef00892b6aa54eb2d5
code cleanup
push time in 18 hours
push eventsebhildebrandt/systeminformation
commit sha a3abdce549f965607bd1dbdcb1bf8ecd00af3468
code cleanup
push time in 18 hours
pull request commentsindresorhus/camelcase-keys
Support type level camelization
@qnighy Friendly bump :)
comment created time in 18 hours
pull request commentisaacs/rimraf
add promise support with tests
@isaacs is this still good to go? It'd be a nice addition for sure.
comment created time in 19 hours
push eventsebhildebrandt/systeminformation
commit sha 0fd5265cd63ec7309bcb39bbbeb81031cc91eb1e
bluetooth linux implementation
push time in a day
issue openedsindresorhus/conf
Changing schema name causes `string` defaults to show up as undefined
const Conf = require('conf');
const schema = {
foo: {
type: 'number',
maximum: 100,
minimum: 1,
default: 50
},
bar: {
type: 'string',
format: 'url',
default: 'https://www.google.com'
},
test: {
default: 'aaaaaaaaaaaaaaa'
}
};
const config = new Conf({schema});
console.log(config.get('foo')); // => 50
console.log(config.get('bar')); // => https://www.google.com
console.log(config.get('test')); // => aaaaaaaaaaaaaaa
This works fine, just changing even one character from the schema name causes all string defaults to be returned as undefined.
Something as simple as capitalizing the S in schema throws it off. Numbers seem to work fine. Same issue when you remove type definition from the schema, numbers work, strings don't.
const Conf = require('conf');
const Schema = {
foo: {
type: 'number',
maximum: 100,
minimum: 1,
default: 50
},
bar: {
type: 'string',
format: 'url',
default: 'https://www.google.com'
},
test: {
default: 'aaaaaaaaaaaaaaa'
}
};
const config = new Conf({Schema});
console.log(config.get('foo')); // => 50
console.log(config.get('bar')); // => undefined
console.log(config.get('test')); // => undefined
created time in a day
startednpmhub/npmhub
started time in 2 days
startedakavel/up
started time in 2 days
startedrxhanson/Rectangle
started time in 2 days
issue commentsindresorhus/np
Without lerna, Yarn Workspaces support would require looking at the top-level yarn.lock – otherwise np
will try to use npm (and probably fail) or if you specify --yarn
it will also fail because there is no lockfile that it can find.
comment created time in 2 days
startedYummygum/flagpack-core
started time in 2 days