Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@platformatic/config

Package Overview
Dependencies
Maintainers
6
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/config - npm Package Compare versions

Comparing version 0.16.0 to 0.17.0

25

index.js
'use strict'
const { basename, extname, join, resolve, dirname } = require('path')
const { basename, join, resolve, dirname } = require('path')
const { readFile, access } = require('fs/promises')

@@ -8,7 +8,5 @@ const EventEmitter = require('events')

const fastifyPlugin = require('./lib/plugin')
const YAML = require('yaml')
const TOML = require('@iarna/toml')
const JSON5 = require('json5')
const dotenv = require('dotenv')
const { FileWatcher } = require('@platformatic/utils')
const { getParser } = require('@platformatic/metaconfig')

@@ -29,3 +27,3 @@ class ConfigManager extends EventEmitter {

allowToWatch.push(basename(this.fullPath))
this._parser = this._getParser()
this._parser = getParser(this.fullPath)

@@ -80,19 +78,2 @@ this.fileWatcher = new FileWatcher({

_getParser () {
switch (extname(this.fullPath)) {
case '.yaml':
case '.yml':
return YAML.parse
case '.json':
return JSON.parse
case '.json5':
return JSON5.parse
case '.toml':
case '.tml':
return TOML.parse
default:
throw new Error('Invalid config file extension. Only yml, yaml, json, json5, toml, tml are supported.')
}
}
purgeEnv (providedEnvironment) {

@@ -99,0 +80,0 @@ const env = {

17

package.json
{
"name": "@platformatic/config",
"version": "0.16.0",
"version": "0.17.0",
"description": "Platformatic DB Config Manager",

@@ -17,15 +17,16 @@ "main": "index.js",

"devDependencies": {
"fastify": "^4.10.2",
"fastify": "^4.13.0",
"snazzy": "^9.0.0",
"standard": "^17.0.0",
"tap": "^16.3.2"
"json5": "^2.2.3",
"yaml": "^2.2.1",
"@iarna/toml": "^2.2.5",
"tap": "^16.3.4"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
"ajv": "^8.11.2",
"ajv": "^8.12.0",
"dotenv": "^16.0.3",
"json5": "^2.2.2",
"pupa": "^3.1.0",
"yaml": "^2.1.3",
"@platformatic/utils": "0.16.0"
"@platformatic/utils": "0.17.0",
"@platformatic/metaconfig": "0.17.0"
},

@@ -32,0 +33,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc