Skip to content

Commit

Permalink
deps: upgrade to latest versions (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackschuster authored May 1, 2020
1 parent 5741771 commit 3920013
Show file tree
Hide file tree
Showing 16 changed files with 3,943 additions and 2,693 deletions.
6 changes: 4 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ node_modules
lib-cov
coverage
cov-pt*
npm-debug.log
*.seed
*.log
*.csv
*.dat
*.out
*.patch
*.pid
*.gz
**/test/output*
**/test/temp
.release.json
lerna-debug.log
package-lock.json
14 changes: 14 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
overrides: [
{
files: '*.js',
options: {
parser: 'babel',
trailingComma: 'es5',
},
},
],
};
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"name": "pug-monorepo",
"private": true,
"devDependencies": {
"coveralls": "3.0.2",
"jest": "24.0.0",
"lerna": "3.10.8",
"prettier": "^1.3.1"
"coveralls": "3.0.9",
"jest": "24.9.0",
"lerna": "3.20.2",
"prettier": "1.19.1"
},
"repository": {
"type": "git",
"url": "https://github.com/pugjs/pug.git"
},
"scripts": {
"format": "prettier --ignore-path .gitignore --write './**/*.js'",
"bootstrap": "lerna bootstrap",
"clean": "lerna clean",
"release": "lerna publish",
Expand All @@ -31,5 +32,11 @@
"license": "MIT",
"workspaces": [
"packages/*"
]
],
"resolutions": {
"jstransformer-markdown-it": "2.0.0",
"mkdirp": "0.5.1",
"shallow-clone": "2.0.0",
"stylus": "0.54.5"
}
}
2 changes: 1 addition & 1 deletion packages/pug-attrs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"dependencies": {
"constantinople": "^4.0.1",
"js-stringify": "^1.0.1",
"js-stringify": "^1.0.2",
"pug-runtime": "^2.0.5"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/pug-code-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"dependencies": {
"constantinople": "^4.0.1",
"doctypes": "^1.1.0",
"js-stringify": "^1.0.1",
"js-stringify": "^1.0.2",
"pug-attrs": "^2.0.4",
"pug-error": "^1.3.3",
"pug-runtime": "^2.0.5",
"void-elements": "^3.1.0",
"with": "^5.0.0"
"with": "^6.0.0"
},
"files": [
"index.js"
Expand Down
14 changes: 7 additions & 7 deletions packages/pug-filters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"pug"
],
"dependencies": {
"clean-css": "^4.1.11",
"clean-css": "^4.2.3",
"constantinople": "^4.0.1",
"jstransformer": "1.0.0",
"pug-error": "^1.3.3",
"pug-walk": "^1.1.8",
"resolve": "^1.1.6",
"resolve": "^1.15.1",
"uglify-js": "^2.6.1"
},
"devDependencies": {
"get-repo": "^1.0.0",
"jstransformer-cdata": "^1.0.0",
"jstransformer-coffee-script": "^1.0.0",
"jstransformer-less": "^2.1.0",
"jstransformer-markdown-it": "^1.0.0",
"jstransformer-stylus": "^1.0.0",
"jstransformer-uglify-js": "^1.1.1",
"jstransformer-coffee-script": "^1.1.1",
"jstransformer-less": "^2.3.0",
"jstransformer-markdown-it": "^2.0.0",
"jstransformer-stylus": "^1.5.0",
"jstransformer-uglify-js": "^1.2.0",
"pug-lexer": "^4.1.0",
"pug-load": "^2.0.12",
"pug-parser": "^5.0.1"
Expand Down
5 changes: 3 additions & 2 deletions packages/pug-lexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
"pug"
],
"dependencies": {
"character-parser": "^2.1.1",
"character-parser": "^2.2.0",
"is-expression": "^3.0.0",
"pug-error": "^1.3.3"
},
"devDependencies": {
"acorn": "^7.1.0"
"acorn": "^7.1.1",
"acorn-walk": "^7.1.1"
},
"files": [
"index.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/pug-lexer/test/check-lexer-functions.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs');
var acorn = require('acorn');
var walk = require('acorn/dist/walk');
var walk = require('acorn-walk');

var hadErrors = false;

Expand Down
2 changes: 1 addition & 1 deletion packages/pug-load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"pug"
],
"dependencies": {
"object-assign": "^4.1.0",
"object-assign": "^4.1.1",
"pug-walk": "^1.1.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pug-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"dependencies": {
"pug-error": "^1.3.3",
"token-stream": "0.0.1"
"token-stream": "1.0.0"
},
"devDependencies": {
"get-repo": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/pug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"jstransformer-cdata": "^1.0.0",
"jstransformer-coffee-script": "^1.0.0",
"jstransformer-less": "^2.1.0",
"jstransformer-markdown-it": "^1.0.0",
"jstransformer-markdown-it": "^2.0.0",
"jstransformer-stylus": "^1.0.0",
"jstransformer-uglify-js": "^1.1.1",
"jstransformer-verbatim": "^1.0.0",
"mkdirp": "^0.5.1",
"rimraf": "^3.0.0",
"rimraf": "^3.0.2",
"uglify-js": "github:mishoo/UglifyJS2#1c15d0db456ce32f1b9b507aad97e5ee5c8285f7"
},
"files": [
Expand Down
40 changes: 20 additions & 20 deletions packages/pug/test/__snapshots__/pug.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it false 1`] = `
"var pug = require(\\"pug-runtime\\");
"var pug = require('pug-runtime');
function template(locals) {
var pug_html = \\"\\",
var pug_html = '',
pug_mixins = {},
pug_interp;
var pug_debug_filename, pug_debug_line;
Expand All @@ -14,8 +14,8 @@ function template(locals) {
pug_debug_line = 1;
pug_html =
pug_html +
pug.escape(null == (pug_interp = self.foo) ? \\"\\" : pug_interp) +
\\"\\\\u003C\\\\u002Fdiv\\\\u003E\\";
pug.escape(null == (pug_interp = self.foo) ? '' : pug_interp) +
'\\\\u003C\\\\u002Fdiv\\\\u003E';
} catch (err) {
pug.rethrow(err, pug_debug_filename, pug_debug_line);
}
Expand All @@ -27,26 +27,26 @@ module.exports = template;

exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it true 1`] = `
"function pug_escape(e) {
var a = \\"\\" + e,
var a = '' + e,
t = pug_match_html.exec(a);
if (!t) return e;
var r,
c,
n,
s = \\"\\";
s = '';
for (r = t.index, c = 0; r < a.length; r++) {
switch (a.charCodeAt(r)) {
case 34:
n = \\"&quot;\\";
n = '&quot;';
break;
case 38:
n = \\"&amp;\\";
n = '&amp;';
break;
case 60:
n = \\"&lt;\\";
n = '&lt;';
break;
case 62:
n = \\"&gt;\\";
n = '&gt;';
break;
default:
continue;
Expand All @@ -58,30 +58,30 @@ exports[`pug .compileClient() should support module syntax in pug.compileClient(
var pug_match_html = /[\\"&<>]/;
function pug_rethrow(n, e, r, t) {
if (!(n instanceof Error)) throw n;
if (!((\\"undefined\\" == typeof window && e) || t))
throw ((n.message += \\" on line \\" + r), n);
if (!(('undefined' == typeof window && e) || t))
throw ((n.message += ' on line ' + r), n);
try {
t = t || require(\\"fs\\").readFileSync(e, \\"utf8\\");
t = t || require('fs').readFileSync(e, 'utf8');
} catch (e) {
pug_rethrow(n, null, r);
}
var i = 3,
a = t.split(\\"\\\\n\\"),
a = t.split('\\\\n'),
o = Math.max(r - i, 0),
h = Math.min(a.length, r + i),
i = a
.slice(o, h)
.map(function(n, e) {
var t = e + o + 1;
return (t == r ? \\" > \\" : \\" \\") + t + \\"| \\" + n;
return (t == r ? ' > ' : ' ') + t + '| ' + n;
})
.join(\\"\\\\n\\");
.join('\\\\n');
throw ((n.path = e),
(n.message = (e || \\"Pug\\") + \\":\\" + r + \\"\\\\n\\" + i + \\"\\\\n\\\\n\\" + n.message),
(n.message = (e || 'Pug') + ':' + r + '\\\\n' + i + '\\\\n\\\\n' + n.message),
n);
}
function template(locals) {
var pug_html = \\"\\",
var pug_html = '',
pug_mixins = {},
pug_interp;
var pug_debug_filename, pug_debug_line;
Expand All @@ -92,8 +92,8 @@ function template(locals) {
pug_debug_line = 1;
pug_html =
pug_html +
pug_escape(null == (pug_interp = self.foo) ? \\"\\" : pug_interp) +
\\"\\\\u003C\\\\u002Fdiv\\\\u003E\\";
pug_escape(null == (pug_interp = self.foo) ? '' : pug_interp) +
'\\\\u003C\\\\u002Fdiv\\\\u003E';
} catch (err) {
pug_rethrow(err, pug_debug_filename, pug_debug_line);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pug/test/pug.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('pug', function(){
});

it('should support Buffers', function(){
assert.equal('<p>foo</p>', pug.render(new Buffer('p foo')));
assert.equal('<p>foo</p>', pug.render(Buffer.from('p foo')));
});

it('should support line endings', function(){
Expand Down
12 changes: 11 additions & 1 deletion scripts/prettier-javascript-serializer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
const fs = require('fs');
const path = require('path');
const prettier = require('prettier');

const prettierOptions = {} // optional
const prettierrc = require('../.prettierrc.js');
const prettierOptions = Object.assign(
{
trailingComma:
/** @type {import('prettier').ParserOptions['trailingComma']} */ ('es5'),
},
prettierrc,
prettierrc.overrides[0].options
);

// filename serializer that removes the basedir
module.exports = {
Expand Down
Loading

0 comments on commit 3920013

Please # to comment.