Comparing version 1.1.2 to 1.1.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMatchAdapter = exports.getAdapter = exports.adapters = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -4,0 +5,0 @@ const path_1 = require("path"); |
@@ -7,1 +7,6 @@ /// <reference types="node" /> | ||
export declare const readFile: <T = any>(p: fs.PathLike, options?: IReadFileOptions) => WriteConfig<T>; | ||
declare const _default: { | ||
read: <T = any>(data: string, options: string | IReadOptions) => WriteConfig<T>; | ||
readFile: <T_1 = any>(p: fs.PathLike, options?: IReadFileOptions) => WriteConfig<T_1>; | ||
}; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readFile = exports.read = void 0; | ||
const fs = require("fs"); | ||
@@ -48,1 +49,2 @@ const path = require("path"); | ||
}; | ||
exports.default = { read: exports.read, readFile: exports.readFile }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WriteConfig = void 0; | ||
const fs = require("fs"); | ||
@@ -4,0 +5,0 @@ const makeDir = require("make-dir"); |
@@ -50,1 +50,3 @@ import * as fs from "fs"; | ||
}; | ||
export default { read, readFile }; |
export interface IReadFileOptions extends IReadOptions { | ||
encoding?: string; | ||
encoding?: BufferEncoding; | ||
} | ||
export interface IWriteOptions extends IReadOptions { | ||
encoding?: string; | ||
encoding?: BufferEncoding; | ||
} | ||
@@ -8,0 +8,0 @@ |
{ | ||
"name": "ftconfig", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "F*ck the config", | ||
@@ -14,3 +14,3 @@ "main": "dist/index.js", | ||
"pretest": "npm run clean && npm run build:test", | ||
"test": "ava dist/test/**/*.{spec,e2e}.js", | ||
"test": "ava -v dist/test/**/*.{spec,e2e}.js", | ||
"lint": "npm run lint:typescript", | ||
@@ -64,3 +64,3 @@ "lint:typescript": "tslint {lib,test}/**/*.ts", | ||
"@types/make-dir": "^1.0.3", | ||
"@types/node": "^12.0.4", | ||
"@types/node": "^14.17.4", | ||
"ava": "^1.4.1", | ||
@@ -67,0 +67,0 @@ "eslint": "^5.10.0", |
@@ -23,4 +23,4 @@ # ftconfig | ||
```typescript | ||
const ftconfig = require("ftconfig"); | ||
const config = ftconfig.loadFile("./package.json") | ||
import ftconfig = require("ftconfig"); | ||
const config = ftconfig.readFile("./package.json") | ||
.modify((obj) => { | ||
@@ -155,2 +155,2 @@ config.name = "simple"; | ||
[LICENSE_996_URL]: https://img.shields.io/badge/license-NPL%20(The%20996%20Prohibited%20License)-blue.svg?style=flat-square&maxAge=7200 | ||
[LICENSE_996_HREF]: https://github.com/996icu/996.ICU | ||
[LICENSE_996_HREF]: https://github.com/996icu/996.ICU |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24427
569
155
0