js-beautify 1.13.13 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/src/cli.js CHANGED
@@ -40,7 +40,6 @@ var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG ? funct
40
40
  var fs = require('fs'),
41
41
  cc = require('config-chain'),
42
42
  beautify = require('../index'),
43
- mkdirp = require('mkdirp'),
44
43
  nopt = require('nopt'),
45
44
  glob = require('glob');
46
45
 
@@ -485,7 +484,7 @@ function writePretty(err, pretty, outfile, config) {
485
484
  }
486
485
 
487
486
  if (outfile) {
488
- mkdirp.sync(path.dirname(outfile));
487
+ fs.mkdirSync(path.dirname(outfile), { recursive: true });
489
488
 
490
489
  if (isFileDifferent(outfile, pretty)) {
491
490
  try {
@@ -433,7 +433,7 @@ Beautifier.prototype.beautify = function() {
433
433
  } else if (this._ch === ',') {
434
434
  this.print_string(this._ch);
435
435
  this.eatWhitespace(true);
436
- if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
436
+ if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
437
437
  this._output.add_new_line();
438
438
  } else {
439
439
  this._output.space_before_token = true;
@@ -66,7 +66,7 @@ var TOKEN = {
66
66
 
67
67
  var directives_core = new Directives(/\/\*/, /\*\//);
68
68
 
69
- var number_pattern = /0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/;
69
+ var number_pattern = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/;
70
70
 
71
71
  var digit = /[0-9]/;
72
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-beautify",
3
- "version": "1.13.13",
3
+ "version": "1.14.0",
4
4
  "description": "beautifier.io for node",
5
5
  "main": "js/index.js",
6
6
  "bin": {
@@ -52,7 +52,6 @@
52
52
  "config-chain": "^1.1.12",
53
53
  "editorconfig": "^0.15.3",
54
54
  "glob": "^7.1.3",
55
- "mkdirp": "^1.0.4",
56
55
  "nopt": "^5.0.0"
57
56
  },
58
57
  "devDependencies": {