Socket
Socket
Sign inDemoInstall

@18f/identity-normalize-yaml

Package Overview
Dependencies
3
Maintainers
11
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

4

cli.js

@@ -13,3 +13,3 @@ #!/usr/bin/env node

/** @type {Record<string,any>=} */
const prettierConfig = prettier.resolveConfig.sync(process.cwd());
const prettierConfig = (await prettier.resolveConfig(process.cwd())) || undefined;

@@ -38,3 +38,3 @@ const args = process.argv.slice(2);

try {
await writeFile(absolutePath, normalize(content, options));
await writeFile(absolutePath, await normalize(content, options));
} catch (error) {

@@ -41,0 +41,0 @@ console.error(`Error normalizing ${relativePath}: ${error.message}`);

@@ -15,3 +15,3 @@ import YAML from 'yaml';

/**
* Given an input YAML string and optional options, returns a normalized YAML string.
* Given an input YAML string and optional options, resolves to a normalized YAML string.
*

@@ -21,3 +21,3 @@ * @param {string} content Original content.

*
* @return {string} Normalized content.
* @return {Promise<string>} Normalized content.
*/

@@ -24,0 +24,0 @@ function normalize(content, { prettierConfig, exclude } = {}) {

@@ -5,3 +5,3 @@ {

"description": "Normalizes YAML files to ensure consistency and typographical quality",
"version": "1.0.0",
"version": "2.0.0",
"type": "module",

@@ -38,7 +38,7 @@ "main": "./index.js",

"smartquotes": "^2.3.2",
"yaml": "^2.3.1"
"yaml": "^2.3.4"
},
"peerDependencies": {
"prettier": "*"
"prettier": ">=3"
}
}

@@ -52,5 +52,5 @@ # @18f/identity-normalize-yaml

#### `normalize(content: string, config?: Options): string`
#### `normalize(content: string, config?: Options): Promise<string>`
Given an input YAML string and optional options, returns a normalized YAML string.
Given an input YAML string and optional options, resolves to a normalized YAML string.

@@ -57,0 +57,0 @@ **Options:**

@@ -21,3 +21,3 @@ export default normalize;

/**
* Given an input YAML string and optional options, returns a normalized YAML string.
* Given an input YAML string and optional options, resolves to a normalized YAML string.
*

@@ -27,4 +27,4 @@ * @param {string} content Original content.

*
* @return {string} Normalized content.
* @return {Promise<string>} Normalized content.
*/
declare function normalize(content: string, { prettierConfig, exclude }?: NormalizeOptions): string;
declare function normalize(content: string, { prettierConfig, exclude }?: NormalizeOptions): Promise<string>;
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc