profile
viewpoint

niktekusho/Abricotine 0

Markdown editor with inline preview

niktekusho/all-contributors-bot 0

🤖 A GitHub bot to automate acknowledging contributors to your open source projects

niktekusho/apjs-assignments 0

Assignments for Advanced Programming with JavaScript course

niktekusho/camelcase-keys 0

Convert object keys to camel case

niktekusho/ci-info-next 0

Get details of the current CI environment. Heavily inspired by https://github.com/watson/ci-info

niktekusho/compare-versions 0

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

niktekusho/conf 0

Simple config handling for your app or module

niktekusho/cpy 0

Copy files

delete branch sindresorhus/delay

delete branch : master

delete time in an hour

create barnchsindresorhus/delay

branch : main

created branch time in an hour

delete branch sindresorhus/conf

delete branch : master

delete time in an hour

create barnchsindresorhus/conf

branch : main

created branch time in an hour

delete branch sindresorhus/camelcase-keys

delete branch : master

delete time in 2 hours

create barnchsindresorhus/camelcase-keys

branch : main

created branch time in 2 hours

create barnchsindresorhus/awesome-scifi

branch : main

created branch time in 2 hours

delete branch sindresorhus/awesome-scifi

delete branch : master

delete time in 2 hours

issue commentsindresorhus/conf

Lost ability to use "date-time" format in JSON Scheme (version 7.0.0)

Please read the release notes.

lnovelli

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
anujdatar

comment created time in 13 hours

release sindresorhus/conf

v9.0.0

released time in 17 hours

push eventsindresorhus/conf

Sindre Sorhus

commit sha b2910216768114295ae024bd633d02dcb805bf35

Make the `clearInvalidConfig` option `false` by default

view details

Sindre Sorhus

commit sha 8ba18f960ae6483d1057db4d717d871f40564cdd

9.0.0

view details

push time in 17 hours

created tagsindresorhus/conf

tagv9.0.0

Simple config handling for your app or module

created 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

anujdatar

issue 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.

anujdatar

comment created time in 18 hours

push eventsebhildebrandt/systeminformation

Sebastian Hildebrandt

commit sha 588fb93f4906a978496800ef00892b6aa54eb2d5

code cleanup

view details

push time in 18 hours

push eventsebhildebrandt/systeminformation

Sebastian Hildebrandt

commit sha a3abdce549f965607bd1dbdcb1bf8ecd00af3468

code cleanup

view details

push time in 18 hours

pull request commentsindresorhus/camelcase-keys

Support type level camelization

@qnighy Friendly bump :)

qnighy

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.

JamesKyburz

comment created time in 19 hours

push eventsebhildebrandt/systeminformation

Sebastian Hildebrandt

commit sha 0fd5265cd63ec7309bcb39bbbeb81031cc91eb1e

bluetooth linux implementation

view details

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

PublicEvent
PublicEvent

startedrxhanson/Rectangle

started time in 2 days

fork fregante/cli

the package manager for JavaScript

https://npm.community

fork in 2 days

issue commentsindresorhus/np

yarn workspaces

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.

Ore4444

comment created time in 2 days

startedYummygum/flagpack-core

started time in 2 days

more