@boost/common
Advanced tools
Comparing version 1.8.5 to 1.9.0
@@ -6,2 +6,20 @@ # Change Log | ||
## 1.9.0 - 2020-06-21 | ||
#### 🚀 Updates | ||
- Add `isFilePath` helper. ([4e8676c](https://github.com/milesj/boost/commit/4e8676c)) | ||
- Add `isModuleName` helper. ([b28fac3](https://github.com/milesj/boost/commit/b28fac3)) | ||
- Add JSON and YAML serializers. (#82) ([ce5b718](https://github.com/milesj/boost/commit/ce5b718)), closes [#82](https://github.com/milesj/boost/issues/82) | ||
#### 🛠 Internals | ||
- Increase code coverage. ([b4eb8cf](https://github.com/milesj/boost/commit/b4eb8cf)) | ||
**Note:** Version bump only for package @boost/common | ||
### 1.8.5 - 2020-04-29 | ||
@@ -8,0 +26,0 @@ |
export { default as createBlueprint } from './createBlueprint'; | ||
export { default as deepFreeze } from './deepFreeze'; | ||
export { default as formatMs } from './formatMs'; | ||
export { default as instanceOf } from './instanceOf'; | ||
export { default as isEmpty } from './isEmpty'; | ||
export { default as isFilePath } from './isFilePath'; | ||
export { default as isModuleName } from './isModuleName'; | ||
export { default as isObject } from './isObject'; | ||
@@ -6,0 +9,0 @@ export { default as parseFile } from './parseFile'; |
@@ -5,2 +5,4 @@ "use strict"; | ||
exports.createBlueprint = createBlueprint_1.default; | ||
var deepFreeze_1 = require("./deepFreeze"); | ||
exports.deepFreeze = deepFreeze_1.default; | ||
var formatMs_1 = require("./formatMs"); | ||
@@ -12,2 +14,6 @@ exports.formatMs = formatMs_1.default; | ||
exports.isEmpty = isEmpty_1.default; | ||
var isFilePath_1 = require("./isFilePath"); | ||
exports.isFilePath = isFilePath_1.default; | ||
var isModuleName_1 = require("./isModuleName"); | ||
exports.isModuleName = isModuleName_1.default; | ||
var isObject_1 = require("./isObject"); | ||
@@ -14,0 +20,0 @@ exports.isObject = isObject_1.default; |
@@ -7,7 +7,7 @@ "use strict"; | ||
const fs_1 = __importDefault(require("fs")); | ||
const json5_1 = __importDefault(require("json5")); | ||
const js_yaml_1 = __importDefault(require("js-yaml")); | ||
const internal_1 = require("@boost/internal"); | ||
const Path_1 = __importDefault(require("../Path")); | ||
const requireModule_1 = __importDefault(require("./requireModule")); | ||
const json_1 = require("../serializers/json"); | ||
const yaml_1 = require("../serializers/yaml"); | ||
function parseFile(filePath) { | ||
@@ -24,6 +24,6 @@ const path = Path_1.default.create(filePath); | ||
case '.json5': | ||
return json5_1.default.parse(fs_1.default.readFileSync(path.path(), 'utf8')); | ||
return json_1.parse(fs_1.default.readFileSync(path.path(), 'utf8')); | ||
case '.yml': | ||
case '.yaml': | ||
return js_yaml_1.default.safeLoad(fs_1.default.readFileSync(path.path(), 'utf8')); | ||
return yaml_1.parse(fs_1.default.readFileSync(path.path(), 'utf8')); | ||
default: | ||
@@ -30,0 +30,0 @@ throw new internal_1.RuntimeError('common', 'CM_PARSE_INVALID_EXT', [path.name()]); |
@@ -9,5 +9,8 @@ /** | ||
import PathResolver from './PathResolver'; | ||
import * as json from './serializers/json'; | ||
import * as yaml from './serializers/yaml'; | ||
export * from './constants'; | ||
export * from './helpers'; | ||
export * from './types'; | ||
export { Contract, Blueprint, Path, PathResolver, Predicates, optimal, predicates }; | ||
export { Contract, Blueprint, Path, PathResolver, Predicates, optimal, predicates, json, yaml }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -29,3 +29,8 @@ "use strict"; | ||
exports.PathResolver = PathResolver_1.default; | ||
const json = __importStar(require("./serializers/json")); | ||
exports.json = json; | ||
const yaml = __importStar(require("./serializers/yaml")); | ||
exports.yaml = yaml; | ||
__export(require("./constants")); | ||
__export(require("./helpers")); | ||
__export(require("./types")); |
{ | ||
"name": "@boost/common", | ||
"version": "1.8.5", | ||
"version": "1.9.0", | ||
"description": "Common utilities for Boost applications.", | ||
@@ -24,6 +24,6 @@ "keywords": [ | ||
"@boost/internal": "^1.2.0", | ||
"js-yaml": "^3.13.1", | ||
"json5": "^2.1.3", | ||
"optimal": "^4.2.0", | ||
"pretty-ms": "^5.1.0" | ||
"pretty-ms": "^5.1.0", | ||
"yaml": "^1.9.2" | ||
}, | ||
@@ -37,3 +37,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "c77dc723462d054d8b7bbe927e99efd7e4f75084" | ||
"gitHead": "257f5a0a342a014f3ce9cf8c288879a73b36ef76" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
51325
65
853
6
+ Addedyaml@^1.9.2
+ Addedyaml@1.10.2(transitive)
- Removedjs-yaml@^3.13.1
- Removedargparse@1.0.10(transitive)
- Removedesprima@4.0.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedsprintf-js@1.0.3(transitive)