Socket
Socket
Sign inDemoInstall

@ionic/cli-framework

Package Overview
Dependencies
Maintainers
24
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionic/cli-framework - npm Package Compare versions

Comparing version 5.0.6 to 5.1.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [5.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@5.0.6...@ionic/cli-framework@5.1.0) (2020-12-10)
### Features
* **config:** add spaces option when writing JSON config ([#4612](https://github.com/ionic-team/ionic-cli/issues/4612)) ([fdd9bb2](https://github.com/ionic-team/ionic-cli/commit/fdd9bb26098441238adc56ea7a67b385a3b9a964))
## [5.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@5.0.5...@ionic/cli-framework@5.0.6) (2020-09-29)

@@ -8,0 +19,0 @@

7

lib/config.d.ts
export interface BaseConfigOptions {
/**
* The number of spaces to use when writing the JSON file.
*/
spaces?: string | number;
/**
* If specified, the class will operate on a nested object within the config

@@ -13,4 +17,5 @@ * file navigated to by this path prefix, an array of object path keys.

readonly p: string;
protected readonly spaces: string | number;
protected readonly pathPrefix: readonly string[];
constructor(p: string, { pathPrefix }?: BaseConfigOptions);
constructor(p: string, { spaces, pathPrefix }?: BaseConfigOptions);
get file(): any;

@@ -17,0 +22,0 @@ get c(): T;

5

lib/config.js

@@ -10,4 +10,5 @@ "use strict";

class BaseConfig {
constructor(p, { pathPrefix = [] } = {}) {
constructor(p, { spaces = 2, pathPrefix = [] } = {}) {
this.p = p;
this.spaces = spaces;
this.pathPrefix = pathPrefix;

@@ -67,5 +68,5 @@ }

utils_fs_1.mkdirpSync(path.dirname(this.p));
writeFileAtomic.sync(this.p, JSON.stringify(value, undefined, 2) + '\n');
writeFileAtomic.sync(this.p, JSON.stringify(value, undefined, this.spaces) + '\n');
}
}
exports.BaseConfig = BaseConfig;
{
"name": "@ionic/cli-framework",
"version": "5.0.6",
"version": "5.1.0",
"description": "The foundation framework of the Ionic CLI",

@@ -51,3 +51,3 @@ "homepage": "https://ionicframework.com/",

},
"gitHead": "85097593e45837e1a0bdef8f3e20a5f44f6cd1e6"
"gitHead": "62a4225e961a48dde3d8b8f3280882c68a604418"
}
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