Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-beautify

Package Overview
Dependencies
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-beautify - npm Package Compare versions

Comparing version 1.14.9 to 1.14.10

8

js/lib/beautify-css.js

@@ -1284,3 +1284,3 @@ /* AUTO-GENERATED. DO NOT MODIFY. */

// we have a variable or pseudo-class, add it and insert one space before continuing
variable = this.eatString(": ").replace(/\s$/, '');
variable = this.eatString(": ").replace(/\s+$/, '');
this.print_string(variable);

@@ -1290,4 +1290,2 @@ this._output.space_before_token = true;

variable = variable.replace(/\s$/, '');
// might be sass variable

@@ -1312,3 +1310,3 @@ if (parenLevel === 0 && variable.indexOf(':') !== -1) {

// we have a variable or pseudo-class, add it and insert one space before continuing
variableOrRule = this.eatString(": ").replace(/\s$/, '');
variableOrRule = this.eatString(": ").replace(/\s+$/, '');
this.print_string(variableOrRule);

@@ -1318,4 +1316,2 @@ this._output.space_before_token = true;

variableOrRule = variableOrRule.replace(/\s$/, '');
// might be less variable

@@ -1322,0 +1318,0 @@ if (parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {

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

/*jshint strict:false */
/*jshint esversion: 6 */
const { globSync } = require('glob');
var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG ? function() {

@@ -45,3 +48,3 @@ console.error.apply(console, arguments);

nopt = require('nopt'),
glob = require('glob');
glob = require("glob");

@@ -639,4 +642,3 @@ nopt.invalidHandler = function(key, val) {

hadGlob = true;
foundFiles = glob(f, {
sync: true,
foundFiles = globSync(f, {
absolute: true,

@@ -643,0 +645,0 @@ ignore: ['**/node_modules/**', '**/.git/**']

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

/*jshint strict:false */
/*jshint esversion: 6 */
const { globSync } = require('glob');
var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG ? function() {

@@ -45,3 +48,3 @@ console.error.apply(console, arguments);

nopt = require('nopt'),
glob = require('glob');
glob = require("glob");

@@ -639,4 +642,3 @@ nopt.invalidHandler = function(key, val) {

hadGlob = true;
foundFiles = glob(f, {
sync: true,
foundFiles = globSync(f, {
absolute: true,

@@ -643,0 +645,0 @@ ignore: ['**/node_modules/**', '**/.git/**']

@@ -261,3 +261,3 @@ /*jshint node:true */

// we have a variable or pseudo-class, add it and insert one space before continuing
variable = this.eatString(": ").replace(/\s$/, '');
variable = this.eatString(": ").replace(/\s+$/, '');
this.print_string(variable);

@@ -267,4 +267,2 @@ this._output.space_before_token = true;

variable = variable.replace(/\s$/, '');
// might be sass variable

@@ -289,3 +287,3 @@ if (parenLevel === 0 && variable.indexOf(':') !== -1) {

// we have a variable or pseudo-class, add it and insert one space before continuing
variableOrRule = this.eatString(": ").replace(/\s$/, '');
variableOrRule = this.eatString(": ").replace(/\s+$/, '');
this.print_string(variableOrRule);

@@ -295,4 +293,2 @@ this._output.space_before_token = true;

variableOrRule = variableOrRule.replace(/\s$/, '');
// might be less variable

@@ -299,0 +295,0 @@ if (parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {

@@ -38,8 +38,9 @@ /* jshint node: true, curly: false */

var identifierStart = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierStartChars + nonASCIIidentifierStartChars + "])";
var identifierChars = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])*";
var unicodeEscapeOrCodePoint = "\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}";
var identifierStart = "(?:" + unicodeEscapeOrCodePoint + "|[" + baseASCIIidentifierStartChars + nonASCIIidentifierStartChars + "])";
var identifierChars = "(?:" + unicodeEscapeOrCodePoint + "|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])*";
exports.identifier = new RegExp(identifierStart + identifierChars, 'g');
exports.identifierStart = new RegExp(identifierStart);
exports.identifierMatch = new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])+");
exports.identifierMatch = new RegExp("(?:" + unicodeEscapeOrCodePoint + "|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])+");

@@ -46,0 +47,0 @@ var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line

@@ -894,3 +894,5 @@ /*jshint node:true */

if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {
if (!this.start_of_object_property()) {
if (!this.start_of_object_property() && !(
// start of object property is different for numeric values with +/- prefix operators
in_array(this._flags.last_token.text, ['+', '-']) && this._last_last_text === ':' && this._flags.parent.mode === MODE.ObjectLiteral)) {
this.allow_wrap_or_preserved_newline(current_token);

@@ -1176,2 +1178,8 @@ }

if (in_array(current_token.text, ['-', '+']) && this.start_of_object_property()) {
// numeric value with +/- symbol in front as a property
this.print_token(current_token);
return;
}
// Allow line wrapping between operators when operator_position is

@@ -1178,0 +1186,0 @@ // set to before or preserve

@@ -487,2 +487,5 @@ /*jshint node:true */

matched = input_scan.match(/u([0-9A-Fa-f]{4})/g);
if (!matched) {
matched = input_scan.match(/u\{([0-9A-Fa-f]+)\}/g);
}
} else {

@@ -511,3 +514,5 @@ out += '\\';

out += '\\' + matched[0];
continue;
} else if (escaped > 0x10FFFF) {
// If the escape sequence is out of bounds, keep the original sequence and continue conversion
out += '\\' + matched[0];
} else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) {

@@ -514,0 +519,0 @@ // single-quote, apostrophe, backslash - escape these

{
"name": "js-beautify",
"version": "1.14.9",
"version": "1.14.10",
"description": "beautifier.io for node",

@@ -48,3 +48,3 @@ "main": "js/index.js",

"engines": {
"node": ">=12"
"node": ">=14"
},

@@ -55,4 +55,4 @@ "browserslist": "ie 11",

"editorconfig": "^1.0.3",
"glob": "^8.1.0",
"nopt": "^6.0.0"
"glob": "^10.3.3",
"nopt": "^7.2.0"
},

@@ -72,4 +72,4 @@ "devDependencies": {

"webpack": "^5.81.0",
"webpack-cli": "^4.10.0"
"webpack-cli": "^5.1.4"
}
}

@@ -61,9 +61,9 @@ <p align="center"><img src="https://raw.githubusercontent.com/beautify-web/js-beautify/7db71fc/web/wordmark-light.svg" height="200px" align="center" alt="JS Beautifier"/></p>

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify-html.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify-html.min.js"></script>
```

@@ -80,3 +80,3 @@

<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.10/beautify.min.js"></script>
<script src="script.js"></script>

@@ -439,2 +439,2 @@ </body>

(README.md: js-beautify@1.14.9)
(README.md: js-beautify@1.14.10)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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