configuration
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -5,3 +5,3 @@ "use strict"; | ||
const atomically_1 = require("atomically"); | ||
const fs = require("fs"); | ||
const watcher_1 = require("watcher"); | ||
/* FILE */ | ||
@@ -15,5 +15,3 @@ const File = { | ||
const listener = () => callback(); | ||
const close = () => fs.unwatchFile(filePath, listener); | ||
fs.watchFile(filePath, { persistent: false, interval: 3000 }, listener); | ||
return { close }; | ||
return new watcher_1.default(filePath, { persistent: false, pollingInterval: 3000 }, listener); | ||
} | ||
@@ -20,0 +18,0 @@ }; |
{ | ||
"name": "configuration", | ||
"description": "Performant and feature rich library for managing configurations/settings.", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "dist/index.js", | ||
@@ -55,3 +55,4 @@ "types": "dist/index.d.ts", | ||
"plain-object-merge": "^1.0.1", | ||
"strip-json-comments": "^3.1.1" | ||
"strip-json-comments": "^3.1.1", | ||
"watcher": "^1.0.0" | ||
}, | ||
@@ -58,0 +59,0 @@ "devDependencies": { |
@@ -5,3 +5,3 @@ | ||
import {readFile, readFileSync, writeFile, writeFileSync} from 'atomically'; | ||
import * as fs from 'fs'; | ||
import Watcher from 'watcher'; | ||
import {FSWatcher} from '../types'; | ||
@@ -18,5 +18,3 @@ | ||
const listener = () => callback (); | ||
const close = () => fs.unwatchFile ( filePath, listener ); | ||
fs.watchFile ( filePath, { persistent: false, interval: 3000 }, listener ); | ||
return {close}; | ||
return new Watcher ( filePath, { persistent: false, pollingInterval: 3000 }, listener ); | ||
} | ||
@@ -23,0 +21,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
101663
8
2655
+ Addedwatcher@^1.0.0
+ Addedaborter@1.1.0(transitive)
+ Addedare-shallow-equal@1.1.1(transitive)
+ Addeddebounce@1.2.1(transitive)
+ Addedpromise-concurrency-limiter@1.0.0(transitive)
+ Addedripstat@1.1.1(transitive)
+ Addedstring-indexes@1.0.0(transitive)
+ Addedtiny-readdir@1.5.0(transitive)
+ Addedwatcher@1.2.0(transitive)