Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- Update snapshots after webpack update
- Update test data after babel/webpack update
- Bump version 2.5.1
  • Loading branch information
nikolay-borzov committed Nov 25, 2020
1 parent 38497b9 commit c6de712
Show file tree
Hide file tree
Showing 9 changed files with 1,923 additions and 3,802 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

12 changes: 11 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
module.exports = {
root: true,
"ignorePatterns": [
"**/*.*",
"**/*.js",
"!**/*.ts",
"node_modules",
"/bin",
"/lib",
"tests/data",
"tests/generate-data/src",
"*vendor*",
],
env: {
commonjs: true,
node: true,
Expand Down Expand Up @@ -29,7 +40,6 @@ module.exports = {
{ blankLine: 'any', prev: ['const', 'let'], next: ['const', 'let'] },
],
'no-console': 'off',
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
yoda: 'error',
// TypeScript specific
'@typescript-eslint/explicit-function-return-type': [
Expand Down
5,540 changes: 1,823 additions & 3,717 deletions package-lock.json

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "source-map-explorer",
"version": "2.5.0",
"version": "2.5.1",
"description": "Analyze and debug space usage through source maps",
"main": "lib/index.js",
"bin": {
Expand Down Expand Up @@ -75,63 +75,63 @@
"ejs": "^3.1.5",
"escape-html": "^1.0.3",
"glob": "^7.1.6",
"gzip-size": "^5.1.1",
"gzip-size": "^6.0.0",
"lodash": "^4.17.20",
"open": "^7.1.0",
"open": "^7.3.0",
"source-map": "^0.7.3",
"temp": "^0.9.1",
"yargs": "^15.4.1"
"temp": "^0.9.4",
"yargs": "^16.1.1"
},
"devDependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.11.0",
"@babel/core": "^7.12.9",
"@babel/preset-env": "^7.12.7",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@smpx/snap-shot-it": "^6.6.1",
"@types/browserify": "^12.0.36",
"@types/btoa": "^1.2.3",
"@types/chai": "^4.2.12",
"@types/chai": "^4.2.14",
"@types/chai-as-promised": "^7.1.3",
"@types/concat-stream": "^1.6.0",
"@types/convert-source-map": "^1.5.1",
"@types/cross-spawn": "^6.0.2",
"@types/ejs": "^3.0.4",
"@types/ejs": "^3.0.5",
"@types/escape-html": "1.0.0",
"@types/glob": "^7.1.3",
"@types/lodash": "^4.14.159",
"@types/mocha": "^8.0.3",
"@types/lodash": "^4.14.165",
"@types/mocha": "^8.0.4",
"@types/node": "^14.x",
"@types/rimraf": "^3.0.0",
"@types/temp": "^0.8.34",
"@types/yargs": "^15.0.5",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"@types/yargs": "^15.0.10",
"@typescript-eslint/eslint-plugin": "^4.8.2",
"@typescript-eslint/parser": "^4.8.2",
"babelify": "^10.0.0",
"browserify": "^16.5.2",
"browserify": "^17.0.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chokidar-cli": "^2.1.0",
"concat-stream": "^2.0.0",
"copyfiles": "^2.3.0",
"copyfiles": "^2.4.0",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"cross-spawn": "^7.0.3",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"generate-source-map": "0.0.5",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"mocha": "^8.1.1",
"husky": "^4.3.0",
"lint-staged": "^10.5.2",
"mocha": "^8.2.1",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"prettier": "^2.2.0",
"rewiremock": "^3.14.3",
"rimraf": "^3.0.2",
"source-map-support": "^0.5.19",
"terser": "^5.2.1",
"terser-webpack-plugin": "^4.1.0",
"ts-node": "^8.10.2",
"typescript": "^3.9.7",
"webpack": "^4.44.1"
"terser": "^5.5.0",
"terser-webpack-plugin": "^5.0.3",
"ts-node": "^9.0.0",
"typescript": "^4.1.2",
"webpack": "^5.6.0"
}
}
5 changes: 4 additions & 1 deletion src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ async function writeHtmlToTempFile(html?: string): Promise<void> {
if (childProcess.stderr) {
// Catch error output from child process
childProcess.stderr.once('data', (error: Buffer) => {
logError({ code: 'CannotOpenTempFile', tempFile, error });
// TODO: Figure out why `#< CLIXML` ends up in stderr. Maybe we should simply ignore it
if (error.toString().trim() !== '#< CLIXML') {
logError({ code: 'CannotOpenTempFile', tempFile, error });
}
});
}
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions tests/data/big.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/data/null-source.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions tests/generate-data/build/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ export function createBundleWithWebpack(srcFilename: string, distFilename: strin
},
},
(err, stats) => {
if (err || stats.hasErrors()) {
console.error(`Unable to generate "${distFilename}"`, err || stats.compilation.errors);
const error = err ? err : stats && stats.hasErrors() ? stats.compilation.errors : null;

if (error) {
console.error(`Unable to generate "${distFilename}"`, error);
}
}
);
Expand Down
91 changes: 50 additions & 41 deletions tests/unit/__snapshots__/api.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -357,29 +357,32 @@ exports['api explore should give name to "null" source a name 1'] = {
"bundles": [
{
"bundleName": "data/null-source.js",
"totalBytes": 7854,
"mappedBytes": 1004,
"unmappedBytes": 13,
"totalBytes": 2641,
"mappedBytes": 211,
"unmappedBytes": 21,
"eolBytes": 1,
"sourceMapCommentBytes": 6836,
"sourceMapCommentBytes": 2408,
"files": {
"webpack:///webpack/bootstrap": {
"size": 897
"webpack://source-map-explorer/tests/generate-data/src/bar.js": {
"size": 40
},
"[no source]": {
"size": 32
"size": 17
},
"webpack:///tests/generate-data/src/foo.js": {
"size": 35
"webpack://source-map-explorer/tests/generate-data/src/foo.js": {
"size": 38
},
"webpack:///tests/generate-data/src/bar.js": {
"size": 40
"webpack://source-map-explorer/webpack/bootstrap": {
"size": 109
},
"webpack://source-map-explorer/webpack/startup": {
"size": 7
},
"[sourceMappingURL]": {
"size": 6836
"size": 2408
},
"[unmapped]": {
"size": 13
"size": 21
},
"[EOLs]": {
"size": 1
Expand All @@ -392,7 +395,7 @@ exports['api explore should give name to "null" source a name 1'] = {
"bundleName": "data/null-source.js",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 13/7854 bytes (0.17%)"
"message": "Unable to map 21/2641 bytes (0.80%)"
}
]
}
Expand Down Expand Up @@ -429,29 +432,32 @@ exports['api explore should sort bundles by name 1'] = {
},
{
"bundleName": "data/null-source.js",
"totalBytes": 7854,
"mappedBytes": 1004,
"unmappedBytes": 13,
"totalBytes": 2641,
"mappedBytes": 211,
"unmappedBytes": 21,
"eolBytes": 1,
"sourceMapCommentBytes": 6836,
"sourceMapCommentBytes": 2408,
"files": {
"webpack:///webpack/bootstrap": {
"size": 897
"webpack://source-map-explorer/tests/generate-data/src/bar.js": {
"size": 40
},
"[no source]": {
"size": 32
"size": 17
},
"webpack:///tests/generate-data/src/foo.js": {
"size": 35
"webpack://source-map-explorer/tests/generate-data/src/foo.js": {
"size": 38
},
"webpack:///tests/generate-data/src/bar.js": {
"size": 40
"webpack://source-map-explorer/webpack/bootstrap": {
"size": 109
},
"webpack://source-map-explorer/webpack/startup": {
"size": 7
},
"[sourceMappingURL]": {
"size": 6836
"size": 2408
},
"[unmapped]": {
"size": 13
"size": 21
},
"[EOLs]": {
"size": 1
Expand Down Expand Up @@ -520,7 +526,7 @@ exports['api explore should sort bundles by name 1'] = {
"bundleName": "data/null-source.js",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 13/7854 bytes (0.17%)"
"message": "Unable to map 21/2641 bytes (0.80%)"
},
{
"bundleName": "data/inline-map.js",
Expand All @@ -535,32 +541,35 @@ exports['api explore should sort filenames 1'] = {
"bundles": [
{
"bundleName": "data/null-source.js",
"totalBytes": 7854,
"mappedBytes": 1004,
"unmappedBytes": 13,
"totalBytes": 2641,
"mappedBytes": 211,
"unmappedBytes": 21,
"eolBytes": 1,
"sourceMapCommentBytes": 6836,
"sourceMapCommentBytes": 2408,
"files": {
"[EOLs]": {
"size": 1
},
"[no source]": {
"size": 32
"size": 17
},
"[sourceMappingURL]": {
"size": 6836
"size": 2408
},
"[unmapped]": {
"size": 13
"size": 21
},
"webpack:///tests/generate-data/src/bar.js": {
"webpack://source-map-explorer/tests/generate-data/src/bar.js": {
"size": 40
},
"webpack:///tests/generate-data/src/foo.js": {
"size": 35
"webpack://source-map-explorer/tests/generate-data/src/foo.js": {
"size": 38
},
"webpack://source-map-explorer/webpack/bootstrap": {
"size": 109
},
"webpack:///webpack/bootstrap": {
"size": 897
"webpack://source-map-explorer/webpack/startup": {
"size": 7
}
}
}
Expand All @@ -570,7 +579,7 @@ exports['api explore should sort filenames 1'] = {
"bundleName": "data/null-source.js",
"isWarning": true,
"code": "UnmappedBytes",
"message": "Unable to map 13/7854 bytes (0.17%)"
"message": "Unable to map 21/2641 bytes (0.80%)"
}
]
}
Expand Down

0 comments on commit c6de712

Please sign in to comment.