From 38048f84de05c877db1de8bee9dc78660cb576c8 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 6 Feb 2020 12:02:55 +0100 Subject: [PATCH 01/76] Replace ESLint rule no-unused-vars-experimental with no-unused-vars The experimental rule leverages the TypeScript compiler's unused variable checks to report. Thus it correctly identifies even import used for compilerOptions.jsxFactory etc. --- .eslintrc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2ac9470..8446eda 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -102,9 +102,9 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-namespace': 'warn', '@typescript-eslint/no-require-imports': 'error', - '@typescript-eslint/no-unused-vars': ['error', { - argsIgnorePattern: '^_', - }], + // Disabled in favour of the next rule. + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars-experimental': 'error', '@typescript-eslint/no-use-before-define': ['error', { classes: true, functions: false, From 1e0400a16027cff13ccb85a388af88230d573d53 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 6 Feb 2020 12:08:52 +0100 Subject: [PATCH 02/76] Switch ESLint rule no-non-null-assertion to warn --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8446eda..d4bfbe9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -101,6 +101,7 @@ module.exports = { }], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-namespace': 'warn', + '@typescript-eslint/no-non-null-assertion': 'warn', '@typescript-eslint/no-require-imports': 'error', // Disabled in favour of the next rule. '@typescript-eslint/no-unused-vars': 'off', @@ -144,7 +145,6 @@ module.exports = { 'space-in-parens': 'off', // jest.mock() must be above imports. 'import/first': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', }, }, ], From ddef7d0da59be595a6948747d11accf5c9298855 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 7 Feb 2020 00:58:33 +0100 Subject: [PATCH 03/76] Fix package script "lint" in packages/* --- packages/ipynb2html-cli/package.json | 2 +- packages/ipynb2html-core/package.json | 2 +- packages/ipynb2html/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ipynb2html-cli/package.json b/packages/ipynb2html-cli/package.json index 223cff5..e8e9c41 100644 --- a/packages/ipynb2html-cli/package.json +++ b/packages/ipynb2html-cli/package.json @@ -32,7 +32,7 @@ "build": "ttsc --build", "bundle": "rollup -c && ./scripts/pack-bundle", "clean": "rimraf coverage/ dist/ lib/ .tsbuildinfo", - "lint": "eslint --ext .ts,.tsx,.js .", + "lint": "PKGDIR=$PWD; cd ../../ && eslint --ext .ts,.tsx,.js $PKGDIR", "prepublishOnly": "run-s readme2md", "readme2md": "../../scripts/adoc2md -a npm-readme ../../README.adoc > README.md", "watch-ts": "ttsc --build --watch" diff --git a/packages/ipynb2html-core/package.json b/packages/ipynb2html-core/package.json index b656a91..b893188 100644 --- a/packages/ipynb2html-core/package.json +++ b/packages/ipynb2html-core/package.json @@ -26,7 +26,7 @@ "scripts": { "build": "ttsc --build", "clean": "rimraf coverage/ lib/ .tsbuildinfo", - "lint": "eslint --ext .ts,.tsx,.js .", + "lint": "PKGDIR=$PWD; cd ../../ && eslint --ext .ts,.tsx,.js $PKGDIR", "prepublishOnly": "run-s readme2md", "test": "jest --detectOpenHandles --coverage --verbose", "readme2md": "../../scripts/adoc2md -a npm-readme ../../README.adoc > README.md", diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index 9caca30..8ef3086 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -32,7 +32,7 @@ "build": "ttsc --build", "bundle": "rollup -c", "clean": "rimraf coverage/ dist/ lib/ .tsbuildinfo", - "lint": "eslint --ext .ts,.tsx,.js .", + "lint": "PKGDIR=$PWD; cd ../../ && eslint --ext .ts,.tsx,.js $PKGDIR", "minify-css": "csso styles/notebook.css -o dist/notebook.min.css -s dist/notebook.min.css.map", "prepublishOnly": "run-p bundle minify-css readme2md", "test": "jest --detectOpenHandles --coverage --verbose", From 56608c27040dea7283c1960e148ca188be9ad397 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 7 Feb 2020 01:03:46 +0100 Subject: [PATCH 04/76] Use ESLint cache --- .gitignore | 1 + package.json | 4 ++-- packages/ipynb2html-cli/package.json | 4 ++-- packages/ipynb2html-core/package.json | 4 ++-- packages/ipynb2html/package.json | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7125557..1961eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /.*cache/ /.tmp/ node_modules/ +.eslintcache .tsbuildinfo tsconfig.tsbuildinfo *.log diff --git a/package.json b/package.json index d9f6ed4..ee20320 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "scripts": { "build": "ttsc --build", "bundle": "wsrun --exclude-missing bundle", - "clean": "rimraf coverage/ dist/ lib/ *.log && wsrun clean", - "lint": "eslint --ext .ts,.tsx,.js .", + "clean": "rimraf coverage/ dist/ lib/ .eslintcache *.log && wsrun clean", + "lint": "eslint --cache --ext .ts,.tsx,.js .", "postinstall": "patch-package && run-s build", "publish-all": "wsrun --serial publish", "test": "jest --detectOpenHandles --coverage --verbose", diff --git a/packages/ipynb2html-cli/package.json b/packages/ipynb2html-cli/package.json index e8e9c41..64f7895 100644 --- a/packages/ipynb2html-cli/package.json +++ b/packages/ipynb2html-cli/package.json @@ -31,8 +31,8 @@ "scripts": { "build": "ttsc --build", "bundle": "rollup -c && ./scripts/pack-bundle", - "clean": "rimraf coverage/ dist/ lib/ .tsbuildinfo", - "lint": "PKGDIR=$PWD; cd ../../ && eslint --ext .ts,.tsx,.js $PKGDIR", + "clean": "rimraf coverage/ dist/ lib/ .eslintcache .tsbuildinfo", + "lint": "PKGDIR=$PWD; cd ../../ && eslint --cache --ext .ts,.tsx,.js $PKGDIR", "prepublishOnly": "run-s readme2md", "readme2md": "../../scripts/adoc2md -a npm-readme ../../README.adoc > README.md", "watch-ts": "ttsc --build --watch" diff --git a/packages/ipynb2html-core/package.json b/packages/ipynb2html-core/package.json index b893188..41366a8 100644 --- a/packages/ipynb2html-core/package.json +++ b/packages/ipynb2html-core/package.json @@ -25,8 +25,8 @@ ], "scripts": { "build": "ttsc --build", - "clean": "rimraf coverage/ lib/ .tsbuildinfo", - "lint": "PKGDIR=$PWD; cd ../../ && eslint --ext .ts,.tsx,.js $PKGDIR", + "clean": "rimraf coverage/ lib/ .eslintcache .tsbuildinfo", + "lint": "PKGDIR=$PWD; cd ../../ && eslint --cache --ext .ts,.tsx,.js $PKGDIR", "prepublishOnly": "run-s readme2md", "test": "jest --detectOpenHandles --coverage --verbose", "readme2md": "../../scripts/adoc2md -a npm-readme ../../README.adoc > README.md", diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index 8ef3086..f34793a 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -31,8 +31,8 @@ "scripts": { "build": "ttsc --build", "bundle": "rollup -c", - "clean": "rimraf coverage/ dist/ lib/ .tsbuildinfo", - "lint": "PKGDIR=$PWD; cd ../../ && eslint --ext .ts,.tsx,.js $PKGDIR", + "clean": "rimraf coverage/ dist/ lib/ .eslintcache .tsbuildinfo", + "lint": "PKGDIR=$PWD; cd ../../ && eslint --cache --ext .ts,.tsx,.js $PKGDIR", "minify-css": "csso styles/notebook.css -o dist/notebook.min.css -s dist/notebook.min.css.map", "prepublishOnly": "run-p bundle minify-css readme2md", "test": "jest --detectOpenHandles --coverage --verbose", From 001219b173bf4d673cec5bc2c053573366411a7d Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 7 Mar 2020 13:07:10 +0100 Subject: [PATCH 05/76] Fix base header level in generated README.md --- scripts/adoc2md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/adoc2md b/scripts/adoc2md index fb7e5a0..3ae18a7 100755 --- a/scripts/adoc2md +++ b/scripts/adoc2md @@ -1,4 +1,4 @@ #!/bin/sh -e ( set -o pipefail 2>/dev/null ) && set -o pipefail -asciidoctor -o - -b docbook "$@" | pandoc -f docbook -t markdown_github -o - +asciidoctor -o - -b docbook "$@" | pandoc -f docbook -t markdown_github --base-header-level 2 -o - From a17cbefa51beaf85a6d350da0bec482dd35cbc72 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 7 Mar 2020 16:08:11 +0100 Subject: [PATCH 06/76] CI: Add Node.js 13 and lts/* to build matrix --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 061cbb7..93fcf20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,10 @@ dist: bionic language: node_js node_js: - - '10' + - '13' - '12' + - '10' + - lts/* - node addons: From 47dc53b1a70b8f1fe9f8d2ba61395ce26736c994 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 7 Mar 2020 17:04:24 +0100 Subject: [PATCH 07/76] Bump babel to ^7.8.7 to fix build error on Node.js 13 --- package.json | 4 +- yarn.lock | 259 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 195 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index ee20320..8e733da 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "node": ">=10.13.0" }, "devDependencies": { - "@babel/core": "^7.8.3", - "@babel/preset-env": "^7.8.3", + "@babel/core": "^7.8.7", + "@babel/preset-env": "^7.8.7", "@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-node-resolve": "^7.0.0", "@types/dedent": "^0.7.0", diff --git a/yarn.lock b/yarn.lock index 2e21b7d..69d621d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,16 +9,16 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.0", "@babel/compat-data@^7.8.1": - version "7.8.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.1.tgz#fc0bbbb7991e4fb2b47e168e60f2cc2c41680be9" - integrity sha512-Z+6ZOXvyOWYxJ50BwxzdhRnRsGST8Y3jaZgxYig575lTjVSs3KtJnmESwZegg6e2Dn0td1eDhoWlp1wI4BTCPw== +"@babel/compat-data@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.6.tgz#7eeaa0dfa17e50c7d9c0832515eee09b56f04e35" + integrity sha512-CurCIKPTkS25Mb8mz267vU95vy+TyUpnctEX2lV33xWNmHAfjruztgiPBbXZRh3xZZy1CYvGx6XfxyTVS+sk7Q== dependencies: - browserslist "^4.8.2" + browserslist "^4.8.5" invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@^7.8.3": +"@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA== @@ -39,6 +39,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" + integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.7" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.7" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.7" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + "@babel/generator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03" @@ -49,6 +70,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.8.6", "@babel/generator@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7" + integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew== + dependencies: + "@babel/types" "^7.8.7" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" @@ -64,24 +95,24 @@ "@babel/helper-explode-assignable-expression" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-call-delegate@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz#de82619898aa605d409c42be6ffb8d7204579692" - integrity sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A== +"@babel/helper-call-delegate@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.7.tgz#28a279c2e6c622a6233da548127f980751324cab" + integrity sha512-doAA5LAKhsFCR0LAFIf+r2RSMmC+m8f/oQ+URnUET/rWeEzC0yTRmAGyWkD4sSu3xwbS7MYQ2u+xlt1V5R56KQ== dependencies: "@babel/helper-hoist-variables" "^7.8.3" "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/types" "^7.8.7" -"@babel/helper-compilation-targets@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.3.tgz#2deedc816fd41dca7355ef39fd40c9ea69f0719a" - integrity sha512-JLylPCsFjhLN+6uBSSh3iYdxKdeO9MNmoY96PE/99d8kyBFaXLORtAVhqN6iHa+wtPeqxKLghDOZry0+Aiw9Tw== +"@babel/helper-compilation-targets@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" + integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== dependencies: - "@babel/compat-data" "^7.8.1" - browserslist "^4.8.2" + "@babel/compat-data" "^7.8.6" + browserslist "^4.9.1" invariant "^2.2.4" - levenary "^1.1.0" + levenary "^1.1.1" semver "^5.5.0" "@babel/helper-create-regexp-features-plugin@^7.8.3": @@ -198,6 +229,16 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-replace-supers@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" + integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" + "@babel/helper-simple-access@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" @@ -232,6 +273,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" + "@babel/highlight@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" @@ -246,6 +296,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081" integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ== +"@babel/parser@^7.8.6", "@babel/parser@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a" + integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A== + "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" @@ -405,17 +460,17 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz#46fd7a9d2bb9ea89ce88720477979fe0d71b21b8" - integrity sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w== +"@babel/plugin-transform-classes@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz#77534447a477cbe5995ae4aee3e39fbc8090c46d" + integrity sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg== dependencies: "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-define-map" "^7.8.3" "@babel/helper-function-name" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" "@babel/helper-split-export-declaration" "^7.8.3" globals "^11.1.0" @@ -456,10 +511,10 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-for-of@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz#15f17bce2fc95c7d59a24b299e83e81cedc22e18" - integrity sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA== +"@babel/plugin-transform-for-of@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz#a051bd1b402c61af97a27ff51b468321c7c2a085" + integrity sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -544,12 +599,12 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz#7890576a13b17325d8b7d44cb37f21dc3bbdda59" - integrity sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q== +"@babel/plugin-transform-parameters@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.7.tgz#66fa2f1de4129b4e0447509223ac71bda4955395" + integrity sha512-brYWaEPTRimOctz2NDA3jnBbDi7SVN2T4wYuu0aqSzxC3nozFZngGaw29CJ9ZPweB7k+iFmZuoG3IVPIcXmD2g== dependencies: - "@babel/helper-call-delegate" "^7.8.3" + "@babel/helper-call-delegate" "^7.8.7" "@babel/helper-get-function-arity" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -560,12 +615,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-regenerator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz#b31031e8059c07495bf23614c97f3d9698bc6ec8" - integrity sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA== +"@babel/plugin-transform-regenerator@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8" + integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA== dependencies: - regenerator-transform "^0.14.0" + regenerator-transform "^0.14.2" "@babel/plugin-transform-reserved-words@^7.8.3": version "7.8.3" @@ -604,10 +659,10 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-typeof-symbol@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz#5cffb216fb25c8c64ba6bf5f76ce49d3ab079f4d" - integrity sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g== +"@babel/plugin-transform-typeof-symbol@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412" + integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -619,13 +674,13 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/preset-env@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.3.tgz#dc0fb2938f52bbddd79b3c861a4b3427dd3a6c54" - integrity sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg== +"@babel/preset-env@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.7.tgz#1fc7d89c7f75d2d70c2b6768de6c2e049b3cb9db" + integrity sha512-BYftCVOdAYJk5ASsznKAUl53EMhfBbr8CJ1X+AJLfGPscQkwJFiaV/Wn9DPH/7fzm2v6iRYJKYHSqyynTGw0nw== dependencies: - "@babel/compat-data" "^7.8.0" - "@babel/helper-compilation-targets" "^7.8.3" + "@babel/compat-data" "^7.8.6" + "@babel/helper-compilation-targets" "^7.8.7" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -648,13 +703,13 @@ "@babel/plugin-transform-async-to-generator" "^7.8.3" "@babel/plugin-transform-block-scoped-functions" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.8.3" + "@babel/plugin-transform-classes" "^7.8.6" "@babel/plugin-transform-computed-properties" "^7.8.3" "@babel/plugin-transform-destructuring" "^7.8.3" "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.8.3" + "@babel/plugin-transform-for-of" "^7.8.6" "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" @@ -665,21 +720,21 @@ "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.8.7" "@babel/plugin-transform-property-literals" "^7.8.3" - "@babel/plugin-transform-regenerator" "^7.8.3" + "@babel/plugin-transform-regenerator" "^7.8.7" "@babel/plugin-transform-reserved-words" "^7.8.3" "@babel/plugin-transform-shorthand-properties" "^7.8.3" "@babel/plugin-transform-spread" "^7.8.3" "@babel/plugin-transform-sticky-regex" "^7.8.3" "@babel/plugin-transform-template-literals" "^7.8.3" - "@babel/plugin-transform-typeof-symbol" "^7.8.3" + "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" - "@babel/types" "^7.8.3" - browserslist "^4.8.2" + "@babel/types" "^7.8.7" + browserslist "^4.8.5" core-js-compat "^3.6.2" invariant "^2.2.2" - levenary "^1.1.0" + levenary "^1.1.1" semver "^5.5.0" "@babel/runtime@^7.7.6": @@ -689,6 +744,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.8.4": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.7.tgz#8fefce9802db54881ba59f90bb28719b4996324d" + integrity sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.7.4", "@babel/template@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" @@ -698,6 +760,15 @@ "@babel/parser" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/template@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" + integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a" @@ -713,6 +784,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" + integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.6" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" @@ -722,6 +808,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.8.6", "@babel/types@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" + integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1559,7 +1654,7 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browserslist@^4.8.2, browserslist@^4.8.3: +browserslist@^4.8.3: version "4.8.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.5.tgz#691af4e327ac877b25e7a3f7ee869c4ef36cdea3" integrity sha512-4LMHuicxkabIB+n9874jZX/az1IaZ5a+EUuvD7KFOu9x/Bd5YHyO0DIz2ls/Kl8g0ItS4X/ilEgf4T1Br0lgSg== @@ -1568,6 +1663,15 @@ browserslist@^4.8.2, browserslist@^4.8.3: electron-to-chromium "^1.3.338" node-releases "^1.1.46" +browserslist@^4.8.5, browserslist@^4.9.1: + version "4.9.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.9.1.tgz#01ffb9ca31a1aef7678128fc6a2253316aa7287c" + integrity sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw== + dependencies: + caniuse-lite "^1.0.30001030" + electron-to-chromium "^1.3.363" + node-releases "^1.1.50" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -1632,6 +1736,11 @@ caniuse-lite@^1.0.30001022: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001022.tgz#9eeffe580c3a8f110b7b1742dcf06a395885e4c6" integrity sha512-FjwPPtt/I07KyLPkBQ0g7/XuZg6oUkYBVnPHNj3VHJbOjmmJ/GdSo/GUY6MwINEQvjhP6WZVbX8Tvms8xh0D5A== +caniuse-lite@^1.0.30001030: + version "1.0.30001032" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001032.tgz#b8d224914e2cd7f507085583d4e38144c652bce4" + integrity sha512-8joOm7BwcpEN4BfVHtfh0hBXSAPVYk+eUIcNntGtMkUWy/6AKRCDZINCLe3kB1vHhT2vBxBF85Hh9VlPXi/qjA== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -2158,6 +2267,11 @@ electron-to-chromium@^1.3.338: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.340.tgz#5d4fe78e984d4211194cf5a52e08069543da146f" integrity sha512-hRFBAglhcj5iVYH+o8QU0+XId1WGoc0VGowJB1cuJAt3exHGrivZvWeAO5BRgBZqwZtwxjm8a5MQeGoT/Su3ww== +electron-to-chromium@^1.3.363: + version "1.3.372" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.372.tgz#fb61b6dfe06f3278a384d084ebef75d463ec7580" + integrity sha512-77a4jYC52OdisHM+Tne7dgWEvQT1FoNu/jYl279pP88ZtG4ZRIPyhQwAKxj6C2rzsyC1OwsOds9JlZtNncSz6g== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -3956,10 +4070,10 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levenary@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.0.tgz#fc146fe75f32dc483a0a2c64aef720f602cd6210" - integrity sha512-VHcwhO0UTpUW7rLPN2/OiWJdgA1e9BqEDALhrgCe/F+uUJnep6CoUsTzMeP8Rh0NGr9uKquXxqe7lwLZo509nQ== +levenary@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" + integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== dependencies: leven "^3.1.0" @@ -4335,6 +4449,13 @@ node-releases@^1.1.46: dependencies: semver "^6.3.0" +node-releases@^1.1.50: + version "1.1.50" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.50.tgz#803c40d2c45db172d0410e4efec83aa8c6ad0592" + integrity sha512-lgAmPv9eYZ0bGwUYAKlr8MG6K4CvWliWqnkcT2P8mMAgVrH3lqfBPorFlxiG1pHQnqmavJZ9vbMXUTNyMLbrgQ== + dependencies: + semver "^6.3.0" + nodom@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/nodom/-/nodom-2.4.0.tgz#de09965814d717fba21eb7be891c26ca6c437dd8" @@ -4788,7 +4909,7 @@ pretty-format@^25.1.0: ansi-styles "^4.0.0" react-is "^16.12.0" -private@^0.1.6: +private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== @@ -4947,12 +5068,18 @@ regenerator-runtime@^0.13.2: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== -regenerator-transform@^0.14.0: - version "0.14.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" - integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== +regenerator-runtime@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz#e96bf612a3362d12bb69f7e8f74ffeab25c7ac91" + integrity sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g== + +regenerator-transform@^0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.2.tgz#949d9d87468ff88d5a7e4734ebb994a892de1ff2" + integrity sha512-V4+lGplCM/ikqi5/mkkpJ06e9Bujq1NFmNLvsCs56zg3ZbzrnUzAtizZ24TXxtRX/W2jcdScwQCnbL0CICTFkQ== dependencies: - private "^0.1.6" + "@babel/runtime" "^7.8.4" + private "^0.1.8" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" From ea852d43f719ee58b9c78c275462d6613dc1a880 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 27 Mar 2020 23:54:27 +0100 Subject: [PATCH 08/76] =?UTF-8?q?Add=20meta=20tag=20generator=20to=20HTML?= =?UTF-8?q?=E2=80=89template=20for=20CLI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ipynb2html-cli/src/page.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ipynb2html-cli/src/page.ts b/packages/ipynb2html-cli/src/page.ts index 7cdebba..ad8083e 100644 --- a/packages/ipynb2html-cli/src/page.ts +++ b/packages/ipynb2html-cli/src/page.ts @@ -1,3 +1,4 @@ +import { version } from 'ipynb2html' import { $INLINE_FILE } from 'ts-transformer-inline-file' const notebookCss = $INLINE_FILE('../../ipynb2html/styles/notebook.css') @@ -10,6 +11,7 @@ export default (contents: string, title: string): string => `\ + ${title} Date: Mon, 30 Mar 2020 18:11:53 +0200 Subject: [PATCH 09/76] Replace eslint-import-resolver-ts with eslint-import-resolver-typescript --- .eslintrc.js | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d4bfbe9..f11bb2a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,8 +18,8 @@ module.exports = { }, settings: { 'import/resolver': { - // Use eslint-import-resolver-ts to obey "paths" in tsconfig.json. - ts: { + // Use eslint-import-resolver-typescript to obey "paths" in tsconfig.json. + typescript: { directory: tsconfigs, }, }, diff --git a/package.json b/package.json index 8e733da..f7dae6f 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dedent": "^0.7.0", "eslint": "^6.8.0", "eslint-config-standard-with-typescript": "^12.0.1", - "eslint-import-resolver-ts": "^0.4.0", + "eslint-import-resolver-typescript": "^2.0.0", "eslint-plugin-import": "^2.20.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-promise": "^4.2.1", diff --git a/yarn.lock b/yarn.lock index 69d621d..234ea20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2360,10 +2360,10 @@ eslint-import-resolver-node@^0.3.2: debug "^2.6.9" resolve "^1.13.1" -eslint-import-resolver-ts@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-ts/-/eslint-import-resolver-ts-0.4.2.tgz#cd1a4a31144d15b5b6ec7aa88920df4b0e07a385" - integrity sha512-M5WH0xJ3nnwSZZ8f6J550elDmsf/86mau66irHm+qBr5n0soqfuKqr41Qd6oZNBCY6FoSAkiLgnVFEvXAoBvZA== +eslint-import-resolver-typescript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.0.0.tgz#e95f126cc12d3018b9cc11692b4dbfd3e17d3ea6" + integrity sha512-bT5Frpl8UWoHBtY25vKUOMoVIMlJQOMefHLyQ4Tz3MQpIZ2N6yYKEEIHMo38bszBNUuMBW6M3+5JNYxeiGFH4w== dependencies: debug "^4.1.1" is-glob "^4.0.1" From dbd6bc8821bee48b61a4ab09c9a164f33859a693 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 04:03:54 +0000 Subject: [PATCH 10/76] Bump minimist from 1.2.0 to 1.2.3 Bumps [minimist](https://github.com/substack/minimist) from 1.2.0 to 1.2.3. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.0...1.2.3) Signed-off-by: dependabot[bot] --- packages/ipynb2html-cli/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ipynb2html-cli/package.json b/packages/ipynb2html-cli/package.json index 64f7895..7e62e87 100644 --- a/packages/ipynb2html-cli/package.json +++ b/packages/ipynb2html-cli/package.json @@ -42,7 +42,7 @@ }, "dependencies": { "ipynb2html": "0.1.0", - "minimist": "^1.2.0", + "minimist": "^1.2.3", "minimist-options": "^4.0.2", "nodom": "^2.3.0", "source-map-support": "^0.5.16" diff --git a/yarn.lock b/yarn.lock index 234ea20..aa014a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4339,10 +4339,10 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f" + integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw== minipass@^3.0.0: version "3.1.1" From 4c47e54acff91e64520d91baada9987337d5e32f Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 7 Apr 2020 01:02:35 +0200 Subject: [PATCH 11/76] Bump marked from ^0.8.0 to ^0.8.2 This version fixes insufficient sanitization of IDs. --- packages/ipynb2html/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index f34793a..763e251 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -47,7 +47,7 @@ "highlightjs": "^9.16.2", "ipynb2html-core": "0.1.0", "katex": "^0.11.1", - "marked": "^0.8.0" + "marked": "^0.8.2" }, "peerDependencies": { "nodom": "^2.3.0" diff --git a/yarn.lock b/yarn.lock index aa014a4..d6bfa0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4246,10 +4246,10 @@ markdown-table@1.1.3: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== -marked@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.0.tgz#ec5c0c9b93878dc52dd54be8d0e524097bd81a99" - integrity sha512-MyUe+T/Pw4TZufHkzAfDj6HarCBWia2y27/bhuYkTaiUnfDYFnCP3KUN+9oM7Wi6JA2rymtVYbQu3spE0GCmxQ== +marked@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.2.tgz#4faad28d26ede351a7a1aaa5fec67915c869e355" + integrity sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw== mdn-data@2.0.4: version "2.0.4" From 7e35810c7fe341444059645bb1517082dd5e7678 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 7 Apr 2020 22:42:01 +0200 Subject: [PATCH 12/76] Remove types/ from compilerOptions.paths in tsconfigs It's not needed here and it breaks ESLint rule import/order. --- packages/ipynb2html-cli/tsconfig.json | 1 - packages/ipynb2html-core/tsconfig.json | 1 - packages/ipynb2html/tsconfig.json | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/ipynb2html-cli/tsconfig.json b/packages/ipynb2html-cli/tsconfig.json index 00b05ac..894e718 100644 --- a/packages/ipynb2html-cli/tsconfig.json +++ b/packages/ipynb2html-cli/tsconfig.json @@ -6,7 +6,6 @@ "tsBuildInfoFile": "./.tsbuildinfo", "baseUrl": ".", "paths": { - "*": ["../../types/*"], "@/*": ["./src/*"], "~/*": ["../../*"], }, diff --git a/packages/ipynb2html-core/tsconfig.json b/packages/ipynb2html-core/tsconfig.json index 1835848..5af69c6 100644 --- a/packages/ipynb2html-core/tsconfig.json +++ b/packages/ipynb2html-core/tsconfig.json @@ -6,7 +6,6 @@ "tsBuildInfoFile": "./.tsbuildinfo", "baseUrl": ".", "paths": { - "*": ["../../types/*"], "@/*": ["./src/*"], "~/*": ["../../*"], }, diff --git a/packages/ipynb2html/tsconfig.json b/packages/ipynb2html/tsconfig.json index bd715db..150c596 100644 --- a/packages/ipynb2html/tsconfig.json +++ b/packages/ipynb2html/tsconfig.json @@ -6,7 +6,6 @@ "tsBuildInfoFile": "./.tsbuildinfo", "baseUrl": ".", "paths": { - "*": ["../../types/*"], "@/*": ["./src/*"], "~/*": ["../../*"], }, From bbbcd2398efa77ccea2f4225ce83d4fb3567c7d0 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 7 Apr 2020 22:45:37 +0200 Subject: [PATCH 13/76] Enable ESLint rule import/order --- .eslintrc.js | 4 ++++ packages/ipynb2html/test/readNotebookTitle.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f11bb2a..7251cc6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,6 +66,10 @@ module.exports = { 'import/no-duplicates': 'off', // Some packages has it wrong in type declarations (e.g. katex, marked). 'import/no-named-as-default-member': 'off', + 'import/order': ['warn', { + 'groups': [['builtin', 'external']], + 'newlines-between': 'always-and-inside-groups', + }], // TypeScript '@typescript-eslint/consistent-type-definitions': 'off', diff --git a/packages/ipynb2html/test/readNotebookTitle.test.ts b/packages/ipynb2html/test/readNotebookTitle.test.ts index b69fd70..c134f22 100644 --- a/packages/ipynb2html/test/readNotebookTitle.test.ts +++ b/packages/ipynb2html/test/readNotebookTitle.test.ts @@ -1,7 +1,7 @@ -import readNotebookTitle from '@/readNotebookTitle' - import { Notebook, CellType, MarkdownCell } from 'ipynb2html-core' +import readNotebookTitle from '@/readNotebookTitle' + const markdownCell = (source: string | string[]): MarkdownCell => ({ cell_type: CellType.Markdown, From c13cb544cb2665801289c00335c125d2e8dde786 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 7 Apr 2020 22:49:45 +0200 Subject: [PATCH 14/76] Change structure of tsconfigs for tests to fix issues in VSCode --- .eslintrc.js | 2 ++ jest.config.base.js | 2 +- packages/ipynb2html-cli/tsconfig.json | 4 ---- packages/ipynb2html-core/test/tsconfig.json | 10 +++++++--- packages/ipynb2html-core/tsconfig.json | 4 ---- packages/ipynb2html/test/global.d.ts | 1 + packages/ipynb2html/test/tsconfig.json | 10 +++++++--- packages/ipynb2html/tsconfig.json | 4 ---- test/tsconfig.json | 6 ++++++ tsconfig.test.json | 16 ++++++++++++++++ 10 files changed, 40 insertions(+), 19 deletions(-) create mode 120000 packages/ipynb2html/test/global.d.ts create mode 100644 test/tsconfig.json create mode 100644 tsconfig.test.json diff --git a/.eslintrc.js b/.eslintrc.js index 7251cc6..b5cb214 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,6 @@ const tsconfigs = [ + 'tsconfig.json', + '*/tsconfig.json', 'packages/*/tsconfig.json', 'packages/*/test/tsconfig.json', ] diff --git a/jest.config.base.js b/jest.config.base.js index 1a191cc..cb556f0 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -63,7 +63,7 @@ module.exports = { globals: { 'ts-jest': { compiler: 'ttypescript', - tsConfig: '/tsconfig.json', + tsConfig: '/test/tsconfig.json', }, }, diff --git a/packages/ipynb2html-cli/tsconfig.json b/packages/ipynb2html-cli/tsconfig.json index 894e718..99cc228 100644 --- a/packages/ipynb2html-cli/tsconfig.json +++ b/packages/ipynb2html-cli/tsconfig.json @@ -5,10 +5,6 @@ "outDir": "./lib", "tsBuildInfoFile": "./.tsbuildinfo", "baseUrl": ".", - "paths": { - "@/*": ["./src/*"], - "~/*": ["../../*"], - }, }, "include": [ "./src", diff --git a/packages/ipynb2html-core/test/tsconfig.json b/packages/ipynb2html-core/test/tsconfig.json index 7c935a3..d7e1593 100644 --- a/packages/ipynb2html-core/test/tsconfig.json +++ b/packages/ipynb2html-core/test/tsconfig.json @@ -1,5 +1,9 @@ -// This file is needed only for VSCode, see https://github.com/palmerhq/tsdx/issues/84. { - "extends": "../tsconfig.json", - "include": ["."], + "extends": "../../../tsconfig.test.json", + "compilerOptions": { + "baseUrl": ".", + }, + "references": [ + { "path": "../" }, + ], } diff --git a/packages/ipynb2html-core/tsconfig.json b/packages/ipynb2html-core/tsconfig.json index 5af69c6..cbb3edb 100644 --- a/packages/ipynb2html-core/tsconfig.json +++ b/packages/ipynb2html-core/tsconfig.json @@ -5,10 +5,6 @@ "outDir": "./lib", "tsBuildInfoFile": "./.tsbuildinfo", "baseUrl": ".", - "paths": { - "@/*": ["./src/*"], - "~/*": ["../../*"], - }, }, "include": [ "./src", diff --git a/packages/ipynb2html/test/global.d.ts b/packages/ipynb2html/test/global.d.ts new file mode 120000 index 0000000..1846fb7 --- /dev/null +++ b/packages/ipynb2html/test/global.d.ts @@ -0,0 +1 @@ +../src/global.d.ts \ No newline at end of file diff --git a/packages/ipynb2html/test/tsconfig.json b/packages/ipynb2html/test/tsconfig.json index 7c935a3..d7e1593 100644 --- a/packages/ipynb2html/test/tsconfig.json +++ b/packages/ipynb2html/test/tsconfig.json @@ -1,5 +1,9 @@ -// This file is needed only for VSCode, see https://github.com/palmerhq/tsdx/issues/84. { - "extends": "../tsconfig.json", - "include": ["."], + "extends": "../../../tsconfig.test.json", + "compilerOptions": { + "baseUrl": ".", + }, + "references": [ + { "path": "../" }, + ], } diff --git a/packages/ipynb2html/tsconfig.json b/packages/ipynb2html/tsconfig.json index 150c596..848f67a 100644 --- a/packages/ipynb2html/tsconfig.json +++ b/packages/ipynb2html/tsconfig.json @@ -5,10 +5,6 @@ "outDir": "./lib", "tsBuildInfoFile": "./.tsbuildinfo", "baseUrl": ".", - "paths": { - "@/*": ["./src/*"], - "~/*": ["../../*"], - }, }, "include": [ "./src", diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000..daedc49 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.test.json", + "compilerOptions": { + "baseUrl": ".", + }, +} diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..1195a58 --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "declaration": false, + "declarationMap": false, + "sourceMap": false, + "composite": false, + "noEmit": true, + "paths": { + // These paths are relative from baseUrl which is defined in + // tsconfig.json that includes this file inside each project. + "@/*": ["../src/*"], + "~/*": ["../../../*"], + }, + }, +} From 6eebe39b4d04236c3b065d8a544ad5d5aa25d153 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 01:02:20 +0200 Subject: [PATCH 15/76] Fix swapped arguments in toMatchElement --- test/support/matchers/toMatchElement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/support/matchers/toMatchElement.ts b/test/support/matchers/toMatchElement.ts index fcb8930..0caa726 100644 --- a/test/support/matchers/toMatchElement.ts +++ b/test/support/matchers/toMatchElement.ts @@ -36,7 +36,7 @@ function filterWildcardChildren (rec: Node, exp: Node): void { if (exp.children[i] === AnythingNode) { rec.children[i] = AnythingNode } else { - filterWildcardChildren(exp.children[i], rec.children[i]) + filterWildcardChildren(rec.children[i], exp.children[i]) } } } From ad741eaf48dd2be3c6a1d89ea860eff75280ce35 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 01:26:12 +0200 Subject: [PATCH 16/76] Make toMatchElement compatible with other DOM implementations --- test/support/matchers/toMatchElement.ts | 32 ++++++++++++++++--------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/test/support/matchers/toMatchElement.ts b/test/support/matchers/toMatchElement.ts index 0caa726..68ed993 100644 --- a/test/support/matchers/toMatchElement.ts +++ b/test/support/matchers/toMatchElement.ts @@ -18,25 +18,33 @@ declare global { export const AnythingNode = new class extends Node { render () { return '' } + toString () { return this.render() } }() export const Anything = () => AnythingNode +function isWritable (obj: any, prop: string): boolean { + const desc = Object.getOwnPropertyDescriptor(obj, prop) + // eslint-disable-next-line @typescript-eslint/unbound-method + return !!desc?.writable || !!desc?.set +} + function filterWildcardChildren (rec: Node, exp: Node): void { if (exp.firstChild === AnythingNode - && exp.children.length === 1 - && rec instanceof HTMLElement - && rec.innerHTML + && exp.childNodes.length === 1 + && (rec as HTMLElement).innerHTML ) { - rec.innerHTML = '' - rec.children.splice(0, rec.children.length, AnythingNode) + if (isWritable(rec, 'innerHTML')) { + ;(rec as HTMLElement).innerHTML = '' + } + rec.childNodes.splice(0, rec.childNodes.length, AnythingNode) return } - for (let i = 0; i < exp.children.length && i < rec.children.length; i++) { - if (exp.children[i] === AnythingNode) { - rec.children[i] = AnythingNode + for (let i = 0; i < exp.childNodes.length && i < rec.childNodes.length; i++) { + if (exp.childNodes[i] === AnythingNode) { + rec.childNodes[i] = AnythingNode } else { - filterWildcardChildren(rec.children[i], exp.children[i]) + filterWildcardChildren(rec.childNodes[i], exp.childNodes[i]) } } } @@ -46,11 +54,13 @@ function clearAttributes (node: Node): void { node.attributes = {} node.className = '' } - node.children.forEach(clearAttributes) + node.childNodes.forEach(clearAttributes) } export function toMatchElement (received: HTMLElement, expected: HTMLElement, opts?: Options): MatcherResult { - received = received.cloneNode(true) as HTMLElement + if (received.cloneNode) { + received = received.cloneNode(true) as HTMLElement + } if (opts?.ignoreAttrs) { clearAttributes(received) From e6b9ecf96b922db7e37eb784e00e0957bec25298 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 12:19:00 +0200 Subject: [PATCH 17/76] Change options for ESLint rule @typescript-eslint/unbound-method --- .eslintrc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index b5cb214..f45f1c5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -129,6 +129,9 @@ module.exports = { '@typescript-eslint/restrict-template-expressions': 'off', '@typescript-eslint/semi': ['error', 'never'], '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/unbound-method': ['warn', { + ignoreStatic: true, + }], }, overrides: [ { From 498112834c27fe5e3869cf8680f68c54e9115dc0 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 6 Apr 2020 22:35:30 +0200 Subject: [PATCH 18/76] Use markdownRenderer even when katex is not available --- packages/ipynb2html/src/index.ts | 6 +--- packages/ipynb2html/src/markdownRenderer.ts | 31 +++++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/packages/ipynb2html/src/index.ts b/packages/ipynb2html/src/index.ts index 166227f..c3195e2 100644 --- a/packages/ipynb2html/src/index.ts +++ b/packages/ipynb2html/src/index.ts @@ -115,11 +115,7 @@ export function createRenderer ( codeHighlighter = hljsCodeHighlighter } if (!markdownRenderer && marked) { - if (katex) { - markdownRenderer = buildMarkdownRenderer(opts.markedOpts, katexOpts) - } else { - markdownRenderer = (text) => marked.parse(text, opts.markedOpts) - } + markdownRenderer = buildMarkdownRenderer(opts.markedOpts, katexOpts) } if (!dataRenderers['text/html'] && katex) { const mathRenderer = (tex: string) => katex.renderToString(tex, katexOpts) diff --git a/packages/ipynb2html/src/markdownRenderer.ts b/packages/ipynb2html/src/markdownRenderer.ts index 135d9d9..d1b83a6 100644 --- a/packages/ipynb2html/src/markdownRenderer.ts +++ b/packages/ipynb2html/src/markdownRenderer.ts @@ -11,9 +11,21 @@ function highlight (code: string, lang: string): string { : code } +const renderer = (markedOpts: MarkedOptions) => (markdown: string) => marked.parse(markdown, markedOpts) + +const rendererWithMath = (markedOpts: MarkedOptions, katexOpts: KatexOptions) => (markdown: string) => { + const [text, math] = mathExtractor.extractMath(markdown) + const html = marked.parse(text, markedOpts) + + const mathHtml = math.map(({ value, displayMode }) => { + return katex.renderToString(value, { ...katexOpts, displayMode }) + }) + return mathExtractor.restoreMath(html, mathHtml) +} + /** - * Returns a pre-configured marked parser with math support (using KaTeX) - * and code highlighter (highlight.js). + * Returns a pre-configured marked parser with (optional) math support (using + * KaTeX) and code highlighter (highlight.js). * * @param {MarkedOptions} markedOpts Options for the marked Markdown renderer. * @param {KatexOptions} katexOpts Options for the KaTeX math renderer. @@ -23,16 +35,7 @@ export default (markedOpts: MarkedOptions = {}, katexOpts: KatexOptions = {}) => markedOpts = { highlight, ...markedOpts } } - /** - * Converts the given *markdown* into HTML. - */ - return (markdown: string): string => { - const [text, math] = mathExtractor.extractMath(markdown) - const html = marked.parse(text, markedOpts) - - const mathHtml = math.map(({ value, displayMode }) => { - return katex.renderToString(value, { ...katexOpts, displayMode }) - }) - return mathExtractor.restoreMath(html, mathHtml) - } + return katex // katex may be an optional dependency (in browser bundle) + ? rendererWithMath(markedOpts, katexOpts) + : renderer(markedOpts) } From e7402a80ea79d980c70098b53d227c7d25f023a8 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 6 Apr 2020 23:23:15 +0200 Subject: [PATCH 19/76] Add anchors to Markdown headings --- packages/ipynb2html-cli/src/page.css | 23 +++++++++++++++++++++ packages/ipynb2html/src/index.ts | 11 +++++++--- packages/ipynb2html/src/markdownRenderer.ts | 21 ++++++++++++++++++- 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/packages/ipynb2html-cli/src/page.css b/packages/ipynb2html-cli/src/page.css index b5d038f..51c1677 100644 --- a/packages/ipynb2html-cli/src/page.css +++ b/packages/ipynb2html-cli/src/page.css @@ -13,6 +13,29 @@ pre { h1, h2, h3, h4, h5, h6 { margin-top: 1.6em; + position: relative; +} + +h1 .anchor, +h2 .anchor, +h3 .anchor, +h4 .anchor, +h5 .anchor, +h6 .anchor { + display: block; + width: 1em; + left: -1em; + height: 100%; + position: absolute; +} + +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cg fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M26.1 22a5.8 5.8 0 00-8.1 0l-9.6 9.5a5.8 5.8 0 008.2 8.2l5.8-5.9'/%3E%3Cpath d='M23.6 28a5.8 5.8 0 008.2 0l9.5-9.5a5.8 5.8 0 00-8.1-8.2l-5.8 5.9'/%3E%3C/g%3E%3C/svg%3E") no-repeat 100% center; } table { diff --git a/packages/ipynb2html/src/index.ts b/packages/ipynb2html/src/index.ts index c3195e2..1e49fd4 100644 --- a/packages/ipynb2html/src/index.ts +++ b/packages/ipynb2html/src/index.ts @@ -1,7 +1,7 @@ import anser from 'anser' import hljs from 'highlightjs' import katex, { KatexOptions } from 'katex' -import marked, { MarkedOptions } from 'marked' +import marked from 'marked' import { createElementCreator, @@ -12,7 +12,7 @@ import { Notebook, } from 'ipynb2html-core' -import buildMarkdownRenderer from './markdownRenderer' +import buildMarkdownRenderer, { MarkedOptions } from './markdownRenderer' export { default as version } from './version' @@ -50,6 +50,10 @@ const defaultKatexOpts: KatexOptions = { throwOnError: false, } +const defaultMarkedOpts: MarkedOptions = { + headerAnchors: true, +} + function hljsCodeHighlighter (code: string, lang: string): string { return hljs.getLanguage(lang) ? hljs.highlight(lang, code).value @@ -115,7 +119,8 @@ export function createRenderer ( codeHighlighter = hljsCodeHighlighter } if (!markdownRenderer && marked) { - markdownRenderer = buildMarkdownRenderer(opts.markedOpts, katexOpts) + const markedOpts = { ...defaultMarkedOpts, ...opts.markedOpts } + markdownRenderer = buildMarkdownRenderer(markedOpts, katexOpts) } if (!dataRenderers['text/html'] && katex) { const mathRenderer = (tex: string) => katex.renderToString(tex, katexOpts) diff --git a/packages/ipynb2html/src/markdownRenderer.ts b/packages/ipynb2html/src/markdownRenderer.ts index d1b83a6..3207cef 100644 --- a/packages/ipynb2html/src/markdownRenderer.ts +++ b/packages/ipynb2html/src/markdownRenderer.ts @@ -1,10 +1,27 @@ import hljs from 'highlightjs' import katex, { KatexOptions } from 'katex' -import marked, { MarkedOptions } from 'marked' +import marked, { Slugger } from 'marked' import { mathExtractor } from 'ipynb2html-core' +export interface MarkedOptions extends marked.MarkedOptions { + /** Generate heading anchors (this implies headingIds). */ + headerAnchors?: boolean, +} + +class Renderer extends marked.Renderer { + + heading (text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string, slugger: Slugger): string { + if ((this.options as MarkedOptions).headerAnchors) { + const id = (this.options.headerPrefix ?? '') + slugger.slug(raw) + return `${text}` + } else { + return super.heading(text, level, raw, slugger) + } + } +} + function highlight (code: string, lang: string): string { return hljs.getLanguage(lang) ? hljs.highlight(lang, code, true).value @@ -31,6 +48,8 @@ const rendererWithMath = (markedOpts: MarkedOptions, katexOpts: KatexOptions) => * @param {KatexOptions} katexOpts Options for the KaTeX math renderer. */ export default (markedOpts: MarkedOptions = {}, katexOpts: KatexOptions = {}) => { + + markedOpts = { renderer: new Renderer(markedOpts), ...markedOpts } if (hljs) { // highlightjs may be an optional dependency (in browser bundle) markedOpts = { highlight, ...markedOpts } } From e1b817b13bada605f16e75ff376009f4fe98dd38 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 14:41:02 +0200 Subject: [PATCH 20/76] Backport patch for @types/marked to fix type on nullable parameters https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43732 --- patches/@types+marked+0.7.2.patch | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 patches/@types+marked+0.7.2.patch diff --git a/patches/@types+marked+0.7.2.patch b/patches/@types+marked+0.7.2.patch new file mode 100644 index 0000000..981c8a0 --- /dev/null +++ b/patches/@types+marked+0.7.2.patch @@ -0,0 +1,38 @@ +Remove after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43732 +is merged and released. + +diff --git a/node_modules/@types/marked/index.d.ts b/node_modules/@types/marked/index.d.ts +index e89b2cf..2dc01dc 100644 +--- a/node_modules/@types/marked/index.d.ts ++++ b/node_modules/@types/marked/index.d.ts +@@ -129,8 +129,8 @@ declare namespace marked { + codespan(code: string): string; + br(): string; + del(text: string): string; +- link(href: string, title: string, text: string): string; +- image(href: string, title: string, text: string): string; ++ link(href: string | null, title: string | null, text: string): string; ++ image(href: string | null, title: string | null, text: string): string; + text(text: string): string; + } + +@@ -140,8 +140,8 @@ declare namespace marked { + codespan(text: string): string; + del(text: string): string; + text(text: string): string; +- link(href: string, title: string, text: string): string; +- image(href: string, title: string, text: string): string; ++ link(href: string | null, title: string | null, text: string): string; ++ image(href: string | null, title: string | null, text: string): string; + br(): string; + } + +@@ -182,7 +182,7 @@ declare namespace marked { + + type TokensList = Token[] & { + links: { +- [key: string]: { href: string; title: string; } ++ [key: string]: { href: string | null; title: string | null; } + } + }; + From 1f5e0fdab8f00260b4e2b4a30f61bfdf1b2b63a7 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 7 Apr 2020 02:20:33 +0200 Subject: [PATCH 21/76] Strip math from generated alt, id, href, and title attributes --- packages/ipynb2html-core/src/mathExtractor.ts | 2 +- packages/ipynb2html/src/markdownRenderer.ts | 24 +++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/packages/ipynb2html-core/src/mathExtractor.ts b/packages/ipynb2html-core/src/mathExtractor.ts index 88ca4da..6437539 100644 --- a/packages/ipynb2html-core/src/mathExtractor.ts +++ b/packages/ipynb2html-core/src/mathExtractor.ts @@ -204,6 +204,6 @@ export function extractMath (text: string): [string, MathExpression[]] { */ export function restoreMath (text: string, math: string[]): string { return text - .replace(/@@([1-9][0-9]*)@@/g, (_, n) => math[Number(n) - 1]) + .replace(/@@([1-9][0-9]*)@@/g, (_, n) => math[Number(n) - 1] ?? '') .replace(/@@0(\d+)@@/g, (_, n) => `@@${n}@@`) } diff --git a/packages/ipynb2html/src/markdownRenderer.ts b/packages/ipynb2html/src/markdownRenderer.ts index 3207cef..ec790e1 100644 --- a/packages/ipynb2html/src/markdownRenderer.ts +++ b/packages/ipynb2html/src/markdownRenderer.ts @@ -10,15 +10,31 @@ export interface MarkedOptions extends marked.MarkedOptions { headerAnchors?: boolean, } +// Removes math markers from the given string. +const stripMath = (text: string) => mathExtractor.restoreMath(text, []).trim() + class Renderer extends marked.Renderer { heading (text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string, slugger: Slugger): string { - if ((this.options as MarkedOptions).headerAnchors) { - const id = (this.options.headerPrefix ?? '') + slugger.slug(raw) - return `${text}` - } else { + const opts = this.options as MarkedOptions + + if (!opts.headerIds && !opts.headerAnchors) { return super.heading(text, level, raw, slugger) } + const id = (opts.headerPrefix ?? '') + slugger.slug(stripMath(raw)) + + if (opts.headerAnchors) { + text = `${text}` + } + return `${text}` + } + + link (href: string | null, title: string | null, text: string): string { + return super.link(href && stripMath(href), title && stripMath(title), text) + } + + image (href: string | null, title: string | null, text: string): string { + return super.image(href && stripMath(href), title && stripMath(title), stripMath(text)) } } From 03f89b2196c3b19be8595c65239f8879dc55a2d3 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 16:37:51 +0200 Subject: [PATCH 22/76] Install node-html-parser as dev dependency --- package.json | 1 + yarn.lock | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/package.json b/package.json index f7dae6f..c30f4ab 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "fs-extra": "^8.1.0", "jest": "^25.1.0", "jest-chain": "^1.1.2", + "node-html-parser": "^1.2.14", "nodom": "^2.3.0", "npm-run-all": "^4.1.5", "patch-package": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index d6bfa0e..bc0315b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3050,6 +3050,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= + highlightjs@^9.16.2: version "9.16.2" resolved "https://registry.yarnpkg.com/highlightjs/-/highlightjs-9.16.2.tgz#07ea6cc7c93340fc440734fb7abf28558f1f0fe1" @@ -4421,6 +4426,13 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-html-parser@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-1.2.14.tgz#5570fe4ad03744f80dde3b470aa980fefc6893a1" + integrity sha512-Jzdpk6xrZGgR4zB2L85uPvcGN9Z667RxN5mS9RHpv7I0ACcNOS3x8dbKMkQrKMl6N4+xveuQNfxXL4RZRib7Mw== + dependencies: + he "1.1.1" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" From 40011569ab09826cd8bcdfd6f7f4bd4d1c831344 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 15:52:47 +0200 Subject: [PATCH 23/76] Backport patch for node-html-parser to fix rendering of void tags --- patches/node-html-parser+1.2.14.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patches/node-html-parser+1.2.14.patch diff --git a/patches/node-html-parser+1.2.14.patch b/patches/node-html-parser+1.2.14.patch new file mode 100644 index 0000000..d6558c7 --- /dev/null +++ b/patches/node-html-parser+1.2.14.patch @@ -0,0 +1,25 @@ +Remove after https://github.com/taoqf/node-html-parser/pull/39 +is merged and released. + +diff --git a/node_modules/node-html-parser/dist/nodes/html.js b/node_modules/node-html-parser/dist/nodes/html.js +index a3c33b1..8b4c2b2 100644 +--- a/node_modules/node-html-parser/dist/nodes/html.js ++++ b/node_modules/node-html-parser/dist/nodes/html.js +@@ -176,15 +176,11 @@ var HTMLElement = /** @class */ (function (_super) { + HTMLElement.prototype.toString = function () { + var tag = this.tagName; + if (tag) { +- var is_un_closed = /^meta$/i.test(tag); +- var is_self_closed = /^(img|br|hr|area|base|input|doctype|link)$/i.test(tag); ++ const is_void = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i.test(tag); + var attrs = this.rawAttrs ? ' ' + this.rawAttrs : ''; +- if (is_un_closed) { ++ if (is_void) { + return "<" + tag + attrs + ">"; + } +- else if (is_self_closed) { +- return "<" + tag + attrs + " />"; +- } + else { + return "<" + tag + attrs + ">" + this.innerHTML + ""; + } From af91c38a022fb5f91fd6f80547ce45d3345e12d9 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 16:38:51 +0200 Subject: [PATCH 24/76] Add tests for markdownRenderer --- .../ipynb2html/test/markdownRenderer.test.tsx | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 packages/ipynb2html/test/markdownRenderer.test.tsx diff --git a/packages/ipynb2html/test/markdownRenderer.test.tsx b/packages/ipynb2html/test/markdownRenderer.test.tsx new file mode 100644 index 0000000..862c213 --- /dev/null +++ b/packages/ipynb2html/test/markdownRenderer.test.tsx @@ -0,0 +1,135 @@ +import { KatexOptions } from 'katex' +import parseHtml from 'node-html-parser' + +import markdownRenderer, { MarkedOptions } from '@/markdownRenderer' + +import '~/test/setup' // setupFilesAfterEnv doesn't work here +import { Anything } from '~/test/support/matchers/toMatchElement' + + +let katexOpts: KatexOptions +let markedOpts: MarkedOptions + +beforeEach(() => { + katexOpts = { + displayMode: true, + throwOnError: false, + } + markedOpts = {} +}) + + +describe('headings', () => { + + it('renders h tag without anchor', () => { + expect( render('## Some Title') ).toHtmlEqual( +

Some Title

+ ) + }) + + it('renders math in text, but strips it in id', () => { + expect( render('## Integers $\\mathbb{Z}$') ).toMatchElement( +

+ Integers +

+ ) + }) + + describe('when headerAnchors is true', () => { + beforeEach(() => { + markedOpts = { headerAnchors: true } + }) + + it('renders h tag with anchor', () => { + expect( render('## Some Title') ).toHtmlEqual( +

+ Some Title +

+ ) + }) + + it('renders math in text, but strips it in href and id', () => { + expect( render('## Integers $\\mathbb{Z}$') ).toMatchElement( +

+ + Integers +

+ ) + }) + }) + + describe('when headerIds is false', () => { + beforeEach(() => { + markedOpts = { headerIds: false } + }) + + it('renders h tag without id and anchor', () => { + expect( render('## Some Title') ).toHtmlEqual( +

Some Title

+ ) + }) + }) +}) + + +describe('link', () => { + + it('strips math in title', () => { + expect( render('[link](https://example.org "This is $\\TeX$!")') ).toHtmlEqual( +

link

+ ) + }) + + it('strips math in href', () => { + expect( render('[link](https://example.org/$\\TeX$)') ).toHtmlEqual( +

link

+ ) + }) + + it('renders math in text', () => { + expect( render('[This is $\\TeX$!](https://example.org/)') ).toMatchElement( +

This is !

+ ) + }) +}) + + +describe('image', () => { + + it('strips math in title', () => { + expect( render('![x](https://example.org/img.png "This is $\\TeX$!")') ).toHtmlEqual( +

x

+ ) + }) + + it('strips math in href', () => { + expect( render('![image](https://example.org/$\\TeX$.png)') ).toHtmlEqual( +

image

+ ) + }) + + it('strips math in alt text', () => { + expect( render('![This is $\\TeX$!](https://example.org/img.png)') ).toHtmlEqual( +

This is !

+ ) + }) +}) + + +describe('code', () => { + + it('highlights fenced code block', () => { + expect( render('```js\nconsole.log("Hello, world!")\n```') ).toHtmlEqual( +
+        
+          console.log("Hello, world!")
+        
+      
+ ) + }) +}) + + +function render (text: string) { + return parseHtml(markdownRenderer(markedOpts, katexOpts)(text), { pre: true }).childNodes[0] +} From ca6e88159ecbf28476708c8177cc42d15fe42065 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 17:26:27 +0200 Subject: [PATCH 25/76] Strip accents from generated header ids --- packages/ipynb2html/src/index.ts | 1 + packages/ipynb2html/src/markdownRenderer.ts | 10 +++++++++- packages/ipynb2html/test/markdownRenderer.test.tsx | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/ipynb2html/src/index.ts b/packages/ipynb2html/src/index.ts index 1e49fd4..45897ca 100644 --- a/packages/ipynb2html/src/index.ts +++ b/packages/ipynb2html/src/index.ts @@ -52,6 +52,7 @@ const defaultKatexOpts: KatexOptions = { const defaultMarkedOpts: MarkedOptions = { headerAnchors: true, + headerIdsStripAccents: true, } function hljsCodeHighlighter (code: string, lang: string): string { diff --git a/packages/ipynb2html/src/markdownRenderer.ts b/packages/ipynb2html/src/markdownRenderer.ts index ec790e1..af4ab23 100644 --- a/packages/ipynb2html/src/markdownRenderer.ts +++ b/packages/ipynb2html/src/markdownRenderer.ts @@ -8,8 +8,12 @@ import { mathExtractor } from 'ipynb2html-core' export interface MarkedOptions extends marked.MarkedOptions { /** Generate heading anchors (this implies headingIds). */ headerAnchors?: boolean, + headerIdsStripAccents?: boolean, } +// Removes accents from the given string. +const stripAccents = (text: string) => text.normalize('NFD').replace(/[\u0300-\u036f]/g, '') + // Removes math markers from the given string. const stripMath = (text: string) => mathExtractor.restoreMath(text, []).trim() @@ -21,7 +25,11 @@ class Renderer extends marked.Renderer { if (!opts.headerIds && !opts.headerAnchors) { return super.heading(text, level, raw, slugger) } - const id = (opts.headerPrefix ?? '') + slugger.slug(stripMath(raw)) + + let id = (opts.headerPrefix ?? '') + slugger.slug(stripMath(raw)) + if (opts.headerIdsStripAccents) { + id = stripAccents(id) + } if (opts.headerAnchors) { text = `${text}` diff --git a/packages/ipynb2html/test/markdownRenderer.test.tsx b/packages/ipynb2html/test/markdownRenderer.test.tsx index 862c213..85ddbb4 100644 --- a/packages/ipynb2html/test/markdownRenderer.test.tsx +++ b/packages/ipynb2html/test/markdownRenderer.test.tsx @@ -69,6 +69,20 @@ describe('headings', () => { ) }) }) + + describe('when headerIdsStripAccents is true', () => { + beforeEach(() => { + markedOpts = { headerIdsStripAccents: true } + }) + + it('strips accents in generated id', () => { + expect( render('## Příliš žluťoučký kůň') ).toHtmlEqual( +

+ Příliš žluťoučký kůň +

+ ) + }) + }) }) From fcdfb50698090e6b306c7f91937b727a5bff4126 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 17:41:55 +0200 Subject: [PATCH 26/76] Bump minimist from ^1.2.3 to ^1.2.5 --- packages/ipynb2html-cli/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/ipynb2html-cli/package.json b/packages/ipynb2html-cli/package.json index 7e62e87..8da94da 100644 --- a/packages/ipynb2html-cli/package.json +++ b/packages/ipynb2html-cli/package.json @@ -42,7 +42,7 @@ }, "dependencies": { "ipynb2html": "0.1.0", - "minimist": "^1.2.3", + "minimist": "^1.2.5", "minimist-options": "^4.0.2", "nodom": "^2.3.0", "source-map-support": "^0.5.16" diff --git a/yarn.lock b/yarn.lock index bc0315b..c793a3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4344,11 +4344,16 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3: +minimist@^1.1.1, minimist@^1.2.0: version "1.2.3" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f" integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw== +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + minipass@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" From a901a0ad681adfa1c4b0cc9cf83a3eb4b0e76ba3 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 17:45:57 +0200 Subject: [PATCH 27/76] Release version 0.2.0 --- README.adoc | 2 +- package.json | 2 +- packages/ipynb2html-cli/package.json | 4 ++-- packages/ipynb2html-core/package.json | 2 +- packages/ipynb2html/package.json | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index 3b5185f..cab7c26 100644 --- a/README.adoc +++ b/README.adoc @@ -2,7 +2,7 @@ :npm-name: ipynb2html :gh-name: jirutka/{npm-name} :gh-branch: master -:version: 0.1.0 +:version: 0.2.0 :ansiup-version: 4.0.4 :hljs-version: 9.15.10 :katex-version: 0.11.1 diff --git a/package.json b/package.json index c30f4ab..17791a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html-parent", - "version": "0.1.0", + "version": "0.2.0", "private": true, "scripts": { "build": "ttsc --build", diff --git a/packages/ipynb2html-cli/package.json b/packages/ipynb2html-cli/package.json index 8da94da..cd7d289 100644 --- a/packages/ipynb2html-cli/package.json +++ b/packages/ipynb2html-cli/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html-cli", - "version": "0.1.0", + "version": "0.2.0", "description": "CLI tool for converting Jupyter Notebooks to static HTML", "author": "Jakub Jirutka ", "license": "MIT", @@ -41,7 +41,7 @@ "node": ">=10.13.0" }, "dependencies": { - "ipynb2html": "0.1.0", + "ipynb2html": "0.2.0", "minimist": "^1.2.5", "minimist-options": "^4.0.2", "nodom": "^2.3.0", diff --git a/packages/ipynb2html-core/package.json b/packages/ipynb2html-core/package.json index 41366a8..80715f7 100644 --- a/packages/ipynb2html-core/package.json +++ b/packages/ipynb2html-core/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html-core", - "version": "0.1.0", + "version": "0.2.0", "description": "Convert Jupyter Notebook to static HTML", "author": "Jakub Jirutka ", "license": "MIT", diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index 763e251..346f4f3 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html", - "version": "0.1.0", + "version": "0.2.0", "description": "Convert Jupyter Notebook to static HTML", "author": "Jakub Jirutka ", "license": "MIT", @@ -45,7 +45,7 @@ "dependencies": { "anser": "^1.4.9", "highlightjs": "^9.16.2", - "ipynb2html-core": "0.1.0", + "ipynb2html-core": "0.2.0", "katex": "^0.11.1", "marked": "^0.8.2" }, From 381caf644d50a6be1afb752c406c626a4be394e6 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 8 Apr 2020 18:02:17 +0200 Subject: [PATCH 28/76] Add types/ to compilerOptions.paths in tsconfigs This basically reverts commit 7e35810c7fe341444059645bb1517082dd5e7678 which was a mistake - I forgot that there are no typings in types/, that's why it worked... --- tsconfig.base.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index a1949fa..c1c3749 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -42,7 +42,9 @@ /* Module Resolution Options */ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "*": ["../../types/*"], /* This path is relative from baseUrl which is defined in tsconfig.json that includes this file inside each project. */ + }, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ "typeRoots": [ /* List of folders to include type definitions from. */ "./types", From 20008c9834d01f5bbbf97d0083fdd474d921678f Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 10 Apr 2020 17:27:52 +0200 Subject: [PATCH 29/76] Replace deprecated dependency highlightjs with highlight.js --- package.json | 2 +- packages/ipynb2html/package.json | 2 +- packages/ipynb2html/rollup.config.js | 8 ++++---- packages/ipynb2html/src/index.ts | 2 +- packages/ipynb2html/src/markdownRenderer.ts | 4 ++-- yarn.lock | 17 +++++------------ 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 17791a7..1eb8087 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-node-resolve": "^7.0.0", "@types/dedent": "^0.7.0", - "@types/highlightjs": "^9.12.0", + "@types/highlight.js": "^9.12.3", "@types/jest": "^24.9.0", "@types/katex": "^0.11.0", "@types/marked": "^0.7.2", diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index 346f4f3..c1634d6 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "anser": "^1.4.9", - "highlightjs": "^9.16.2", + "highlight.js": "^9.16.2", "ipynb2html-core": "0.2.0", "katex": "^0.11.1", "marked": "^0.8.2" diff --git a/packages/ipynb2html/rollup.config.js b/packages/ipynb2html/rollup.config.js index ff5ef36..d6d88c1 100644 --- a/packages/ipynb2html/rollup.config.js +++ b/packages/ipynb2html/rollup.config.js @@ -13,10 +13,10 @@ import pkg from './package.json' const extensions = ['.mjs', '.js', '.ts'] const globals = { - anser: 'anser', - highlightjs: 'hljs', - katex: 'katex', - marked: 'marked', + 'anser': 'anser', + 'highlight.js': 'hljs', + 'katex': 'katex', + 'marked': 'marked', } const plugins = [ diff --git a/packages/ipynb2html/src/index.ts b/packages/ipynb2html/src/index.ts index 45897ca..352342b 100644 --- a/packages/ipynb2html/src/index.ts +++ b/packages/ipynb2html/src/index.ts @@ -1,5 +1,5 @@ import anser from 'anser' -import hljs from 'highlightjs' +import hljs from 'highlight.js' import katex, { KatexOptions } from 'katex' import marked from 'marked' diff --git a/packages/ipynb2html/src/markdownRenderer.ts b/packages/ipynb2html/src/markdownRenderer.ts index af4ab23..3fe8320 100644 --- a/packages/ipynb2html/src/markdownRenderer.ts +++ b/packages/ipynb2html/src/markdownRenderer.ts @@ -1,4 +1,4 @@ -import hljs from 'highlightjs' +import hljs from 'highlight.js' import katex, { KatexOptions } from 'katex' import marked, { Slugger } from 'marked' @@ -74,7 +74,7 @@ const rendererWithMath = (markedOpts: MarkedOptions, katexOpts: KatexOptions) => export default (markedOpts: MarkedOptions = {}, katexOpts: KatexOptions = {}) => { markedOpts = { renderer: new Renderer(markedOpts), ...markedOpts } - if (hljs) { // highlightjs may be an optional dependency (in browser bundle) + if (hljs) { // highlight.js may be an optional dependency (in browser bundle) markedOpts = { highlight, ...markedOpts } } diff --git a/yarn.lock b/yarn.lock index c793a3d..2c20acc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1107,18 +1107,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== -"@types/highlight.js@*": +"@types/highlight.js@^9.12.3": version "9.12.3" resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca" integrity sha512-pGF/zvYOACZ/gLGWdQH8zSwteQS1epp68yRcVLJMgUck/MjEn/FBYmPub9pXT8C1e4a8YZfHo1CKyV8q1vKUnQ== -"@types/highlightjs@^9.12.0": - version "9.12.0" - resolved "https://registry.yarnpkg.com/@types/highlightjs/-/highlightjs-9.12.0.tgz#2d41f689f63b3746e882dc795cbebe07ab6eaf27" - integrity sha512-MmUcjkDtCBfx2BPeLLTtJ5mFmGgWk9nAgZmNesixaGHOr0tCecsTU2iUgYvhRsWJSts2WbcpAtVPuIzZ0ybJ1A== - dependencies: - "@types/highlight.js" "*" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -3055,10 +3048,10 @@ he@1.1.1: resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= -highlightjs@^9.16.2: - version "9.16.2" - resolved "https://registry.yarnpkg.com/highlightjs/-/highlightjs-9.16.2.tgz#07ea6cc7c93340fc440734fb7abf28558f1f0fe1" - integrity sha512-FK1vmMj8BbEipEy8DLIvp71t5UsC7n2D6En/UfM/91PCwmOpj6f2iu0Y0coRC62KSRHHC+dquM2xMULV/X7NFg== +highlight.js@^9.16.2: + version "9.18.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" + integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== hosted-git-info@^2.1.4: version "2.8.5" From 294e9c1f838cff4d7a9329f6f67a8f91fc415ecb Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 10 Apr 2020 17:39:37 +0200 Subject: [PATCH 30/76] Bump highlight.js from ^9.16.2 to ^9.18.1 --- packages/ipynb2html/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index c1634d6..7cf0ba4 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "anser": "^1.4.9", - "highlight.js": "^9.16.2", + "highlight.js": "^9.18.1", "ipynb2html-core": "0.2.0", "katex": "^0.11.1", "marked": "^0.8.2" diff --git a/yarn.lock b/yarn.lock index 2c20acc..0008d9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3048,7 +3048,7 @@ he@1.1.1: resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= -highlight.js@^9.16.2: +highlight.js@^9.18.1: version "9.18.1" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== From cc2da7398e5d52c0eaa678808432f19c4e0582a9 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 10 Apr 2020 17:40:21 +0200 Subject: [PATCH 31/76] Release version 0.2.1 --- README.adoc | 2 +- package.json | 2 +- packages/ipynb2html-cli/package.json | 4 ++-- packages/ipynb2html-core/package.json | 2 +- packages/ipynb2html/package.json | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index cab7c26..f731df7 100644 --- a/README.adoc +++ b/README.adoc @@ -2,7 +2,7 @@ :npm-name: ipynb2html :gh-name: jirutka/{npm-name} :gh-branch: master -:version: 0.2.0 +:version: 0.2.1 :ansiup-version: 4.0.4 :hljs-version: 9.15.10 :katex-version: 0.11.1 diff --git a/package.json b/package.json index 1eb8087..485ecb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html-parent", - "version": "0.2.0", + "version": "0.2.1", "private": true, "scripts": { "build": "ttsc --build", diff --git a/packages/ipynb2html-cli/package.json b/packages/ipynb2html-cli/package.json index cd7d289..736bf5e 100644 --- a/packages/ipynb2html-cli/package.json +++ b/packages/ipynb2html-cli/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html-cli", - "version": "0.2.0", + "version": "0.2.1", "description": "CLI tool for converting Jupyter Notebooks to static HTML", "author": "Jakub Jirutka ", "license": "MIT", @@ -41,7 +41,7 @@ "node": ">=10.13.0" }, "dependencies": { - "ipynb2html": "0.2.0", + "ipynb2html": "0.2.1", "minimist": "^1.2.5", "minimist-options": "^4.0.2", "nodom": "^2.3.0", diff --git a/packages/ipynb2html-core/package.json b/packages/ipynb2html-core/package.json index 80715f7..9b758ab 100644 --- a/packages/ipynb2html-core/package.json +++ b/packages/ipynb2html-core/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html-core", - "version": "0.2.0", + "version": "0.2.1", "description": "Convert Jupyter Notebook to static HTML", "author": "Jakub Jirutka ", "license": "MIT", diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index 7cf0ba4..0455154 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -1,6 +1,6 @@ { "name": "ipynb2html", - "version": "0.2.0", + "version": "0.2.1", "description": "Convert Jupyter Notebook to static HTML", "author": "Jakub Jirutka ", "license": "MIT", @@ -45,7 +45,7 @@ "dependencies": { "anser": "^1.4.9", "highlight.js": "^9.18.1", - "ipynb2html-core": "0.2.0", + "ipynb2html-core": "0.2.1", "katex": "^0.11.1", "marked": "^0.8.2" }, From 6461e84fe7495baada3140c9898cb2c160d12002 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 19 Apr 2020 18:19:01 +0200 Subject: [PATCH 32/76] Bump @babel/* from ^7.8.7 to ^7.9.0 This should fix build error on Node.js 13, https://www.reddit.com/r/Nuxt/comments/g32jr5/babel_breaking_changes/. --- package.json | 4 +- yarn.lock | 335 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 239 insertions(+), 100 deletions(-) diff --git a/package.json b/package.json index 485ecb5..fdbf309 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "node": ">=10.13.0" }, "devDependencies": { - "@babel/core": "^7.8.7", - "@babel/preset-env": "^7.8.7", + "@babel/core": "^7.9.0", + "@babel/preset-env": "^7.9.0", "@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-node-resolve": "^7.0.0", "@types/dedent": "^0.7.0", diff --git a/yarn.lock b/yarn.lock index 0008d9b..277d6ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,6 +18,15 @@ invariant "^2.2.4" semver "^5.5.0" +"@babel/compat-data@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" + integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== + dependencies: + browserslist "^4.9.1" + invariant "^2.2.4" + semver "^5.5.0" + "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" @@ -39,22 +48,23 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" - integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== +"@babel/core@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" + integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.7" - "@babel/helpers" "^7.8.4" - "@babel/parser" "^7.8.7" + "@babel/generator" "^7.9.0" + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helpers" "^7.9.0" + "@babel/parser" "^7.9.0" "@babel/template" "^7.8.6" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.7" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" - json5 "^2.1.0" + json5 "^2.1.2" lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" @@ -70,7 +80,7 @@ lodash "^4.17.13" source-map "^0.5.0" -"@babel/generator@^7.8.6", "@babel/generator@^7.8.7": +"@babel/generator@^7.8.6": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7" integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew== @@ -80,6 +90,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.9.0", "@babel/generator@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" + integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== + dependencies: + "@babel/types" "^7.9.5" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" @@ -95,15 +115,6 @@ "@babel/helper-explode-assignable-expression" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-call-delegate@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.7.tgz#28a279c2e6c622a6233da548127f980751324cab" - integrity sha512-doAA5LAKhsFCR0LAFIf+r2RSMmC+m8f/oQ+URnUET/rWeEzC0yTRmAGyWkD4sSu3xwbS7MYQ2u+xlt1V5R56KQ== - dependencies: - "@babel/helper-hoist-variables" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.7" - "@babel/helper-compilation-targets@^7.8.7": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" @@ -123,6 +134,15 @@ "@babel/helper-regex" "^7.8.3" regexpu-core "^4.6.0" +"@babel/helper-create-regexp-features-plugin@^7.8.8": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz#5d84180b588f560b7864efaeea89243e58312087" + integrity sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-regex" "^7.8.3" + regexpu-core "^4.7.0" + "@babel/helper-define-map@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz#a0655cad5451c3760b726eba875f1cd8faa02c15" @@ -149,6 +169,15 @@ "@babel/template" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-function-name@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" + integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.9.5" + "@babel/helper-get-function-arity@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" @@ -177,16 +206,17 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-module-transforms@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz#d305e35d02bee720fbc2c3c3623aa0c316c01590" - integrity sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q== +"@babel/helper-module-transforms@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" + integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== dependencies: "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" "@babel/helper-simple-access" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/template" "^7.8.6" + "@babel/types" "^7.9.0" lodash "^4.17.13" "@babel/helper-optimise-call-expression@^7.8.3": @@ -254,6 +284,11 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-validator-identifier@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + "@babel/helper-wrap-function@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610" @@ -273,14 +308,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" - integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== +"@babel/helpers@^7.9.0": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" + integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" "@babel/highlight@^7.8.3": version "7.8.3" @@ -296,11 +331,16 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081" integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ== -"@babel/parser@^7.8.6", "@babel/parser@^7.8.7": +"@babel/parser@^7.8.6": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a" integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A== +"@babel/parser@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" + integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== + "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" @@ -334,13 +374,22 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" -"@babel/plugin-proposal-object-rest-spread@^7.8.3": +"@babel/plugin-proposal-numeric-separator@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz#eb5ae366118ddca67bed583b53d7554cad9951bb" - integrity sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA== + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8" + integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + +"@babel/plugin-proposal-object-rest-spread@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116" + integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.9.5" "@babel/plugin-proposal-optional-catch-binding@^7.8.3": version "7.8.3" @@ -350,14 +399,22 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz#ae10b3214cb25f7adb1f3bc87ba42ca10b7e2543" - integrity sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg== +"@babel/plugin-proposal-optional-chaining@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58" + integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.0" +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d" + integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.8" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-proposal-unicode-property-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz#b646c3adea5f98800c9ab45105ac34d06cd4a47f" @@ -401,6 +458,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-numeric-separator@^7.8.0", "@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f" + integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" @@ -460,14 +524,14 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz#77534447a477cbe5995ae4aee3e39fbc8090c46d" - integrity sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg== +"@babel/plugin-transform-classes@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz#800597ddb8aefc2c293ed27459c1fcc935a26c2c" + integrity sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg== dependencies: "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-define-map" "^7.8.3" - "@babel/helper-function-name" "^7.8.3" + "@babel/helper-function-name" "^7.9.5" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.6" @@ -481,14 +545,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-destructuring@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz#20ddfbd9e4676906b1056ee60af88590cc7aaa0b" - integrity sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ== +"@babel/plugin-transform-destructuring@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz#72c97cf5f38604aea3abf3b935b0e17b1db76a50" + integrity sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-dotall-regex@^7.8.3": +"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e" integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw== @@ -511,10 +575,10 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-for-of@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz#a051bd1b402c61af97a27ff51b468321c7c2a085" - integrity sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw== +"@babel/plugin-transform-for-of@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz#0f260e27d3e29cd1bb3128da5e76c761aa6c108e" + integrity sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -540,41 +604,41 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-modules-amd@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz#65606d44616b50225e76f5578f33c568a0b876a5" - integrity sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ== +"@babel/plugin-transform-modules-amd@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" + integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== dependencies: - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz#df251706ec331bd058a34bdd72613915f82928a5" - integrity sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg== +"@babel/plugin-transform-modules-commonjs@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" + integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== dependencies: - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-simple-access" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-systemjs@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz#d8bbf222c1dbe3661f440f2f00c16e9bb7d0d420" - integrity sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg== +"@babel/plugin-transform-modules-systemjs@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" + integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== dependencies: "@babel/helper-hoist-variables" "^7.8.3" - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-umd@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz#592d578ce06c52f5b98b02f913d653ffe972661a" - integrity sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw== +"@babel/plugin-transform-modules-umd@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz#e909acae276fec280f9b821a5f38e1f08b480697" + integrity sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ== dependencies: - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": @@ -599,12 +663,11 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.7.tgz#66fa2f1de4129b4e0447509223ac71bda4955395" - integrity sha512-brYWaEPTRimOctz2NDA3jnBbDi7SVN2T4wYuu0aqSzxC3nozFZngGaw29CJ9ZPweB7k+iFmZuoG3IVPIcXmD2g== +"@babel/plugin-transform-parameters@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz#173b265746f5e15b2afe527eeda65b73623a0795" + integrity sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA== dependencies: - "@babel/helper-call-delegate" "^7.8.7" "@babel/helper-get-function-arity" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -674,12 +737,12 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/preset-env@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.7.tgz#1fc7d89c7f75d2d70c2b6768de6c2e049b3cb9db" - integrity sha512-BYftCVOdAYJk5ASsznKAUl53EMhfBbr8CJ1X+AJLfGPscQkwJFiaV/Wn9DPH/7fzm2v6iRYJKYHSqyynTGw0nw== +"@babel/preset-env@^7.9.0": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f" + integrity sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ== dependencies: - "@babel/compat-data" "^7.8.6" + "@babel/compat-data" "^7.9.0" "@babel/helper-compilation-targets" "^7.8.7" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -687,14 +750,16 @@ "@babel/plugin-proposal-dynamic-import" "^7.8.3" "@babel/plugin-proposal-json-strings" "^7.8.3" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.8.3" + "@babel/plugin-proposal-numeric-separator" "^7.8.3" + "@babel/plugin-proposal-object-rest-spread" "^7.9.5" "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" - "@babel/plugin-proposal-optional-chaining" "^7.8.3" + "@babel/plugin-proposal-optional-chaining" "^7.9.0" "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" "@babel/plugin-syntax-async-generators" "^7.8.0" "@babel/plugin-syntax-dynamic-import" "^7.8.0" "@babel/plugin-syntax-json-strings" "^7.8.0" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.8.0" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" "@babel/plugin-syntax-optional-chaining" "^7.8.0" @@ -703,24 +768,24 @@ "@babel/plugin-transform-async-to-generator" "^7.8.3" "@babel/plugin-transform-block-scoped-functions" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.8.6" + "@babel/plugin-transform-classes" "^7.9.5" "@babel/plugin-transform-computed-properties" "^7.8.3" - "@babel/plugin-transform-destructuring" "^7.8.3" + "@babel/plugin-transform-destructuring" "^7.9.5" "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.8.6" + "@babel/plugin-transform-for-of" "^7.9.0" "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.8.3" - "@babel/plugin-transform-modules-commonjs" "^7.8.3" - "@babel/plugin-transform-modules-systemjs" "^7.8.3" - "@babel/plugin-transform-modules-umd" "^7.8.3" + "@babel/plugin-transform-modules-amd" "^7.9.0" + "@babel/plugin-transform-modules-commonjs" "^7.9.0" + "@babel/plugin-transform-modules-systemjs" "^7.9.0" + "@babel/plugin-transform-modules-umd" "^7.9.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.7" + "@babel/plugin-transform-parameters" "^7.9.5" "@babel/plugin-transform-property-literals" "^7.8.3" "@babel/plugin-transform-regenerator" "^7.8.7" "@babel/plugin-transform-reserved-words" "^7.8.3" @@ -730,13 +795,25 @@ "@babel/plugin-transform-template-literals" "^7.8.3" "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" - "@babel/types" "^7.8.7" - browserslist "^4.8.5" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.9.5" + browserslist "^4.9.1" core-js-compat "^3.6.2" invariant "^2.2.2" levenary "^1.1.1" semver "^5.5.0" +"@babel/preset-modules@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" + integrity sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + "@babel/runtime@^7.7.6": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.3.tgz#0811944f73a6c926bb2ad35e918dcc1bfab279f1" @@ -784,7 +861,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": +"@babel/traverse@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== @@ -799,6 +876,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.9.0": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" + integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.9.5" + "@babel/helper-function-name" "^7.9.5" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.9.0" + "@babel/types" "^7.9.5" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" @@ -808,6 +900,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.4.4", "@babel/types@^7.9.0", "@babel/types@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" + integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== + dependencies: + "@babel/helper-validator-identifier" "^7.9.5" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@babel/types@^7.8.6", "@babel/types@^7.8.7": version "7.8.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" @@ -3989,6 +4090,13 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +json5@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" + integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + dependencies: + minimist "^1.2.5" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -5068,6 +5176,13 @@ regenerate-unicode-properties@^8.1.0: dependencies: regenerate "^1.4.0" +regenerate-unicode-properties@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" + integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== + dependencies: + regenerate "^1.4.0" + regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" @@ -5121,6 +5236,18 @@ regexpu-core@^4.6.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.1.0" +regexpu-core@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" + integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.2.0" + registry-auth-token@^3.0.1: version "3.4.0" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e" @@ -5136,7 +5263,7 @@ registry-url@^3.0.3: dependencies: rc "^1.0.1" -regjsgen@^0.5.0: +regjsgen@^0.5.0, regjsgen@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== @@ -5148,6 +5275,13 @@ regjsparser@^0.6.0: dependencies: jsesc "~0.5.0" +regjsparser@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" + integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== + dependencies: + jsesc "~0.5.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -6257,6 +6391,11 @@ unicode-match-property-value-ecmascript@^1.1.0: resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== +unicode-match-property-value-ecmascript@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" + integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== + unicode-property-aliases-ecmascript@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" From 19b41d9c22e4496cbab62d0069a629fc3bfad178 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 19 Apr 2020 17:29:37 +0200 Subject: [PATCH 33/76] Allow to include own style(s) into HTML produced by CLI Resolves #6 --- packages/ipynb2html-cli/src/cli.ts | 38 +++++++++++++++++++++++------ packages/ipynb2html-cli/src/page.ts | 14 ++++++----- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/packages/ipynb2html-cli/src/cli.ts b/packages/ipynb2html-cli/src/cli.ts index d7d0f6f..78c640d 100644 --- a/packages/ipynb2html-cli/src/cli.ts +++ b/packages/ipynb2html-cli/src/cli.ts @@ -3,7 +3,7 @@ import minimist from 'minimist' import minimistOptions from 'minimist-options' import { Document } from 'nodom' import { exit } from 'process' -import { $INLINE_JSON } from 'ts-transformer-inline-file' +import { $INLINE_FILE, $INLINE_JSON } from 'ts-transformer-inline-file' import * as ipynb2html from 'ipynb2html' @@ -11,6 +11,8 @@ import renderPage from './page' const { version, bugs: bugsUrl } = $INLINE_JSON('../package.json') +const notebookCss = $INLINE_FILE('../../ipynb2html/styles/notebook.css') +const pageCss = $INLINE_FILE('./page.css') const progName = 'ipynb2html' const helpMsg = `\ @@ -24,13 +26,20 @@ Arguments: provided, the output will be written to STDOUT. Options: - -d --debug Print debug messages. - -h --help Show this message and exit. - -V --version Print version and exit. + -d --debug Print debug messages. + + -s --style Comma separated stylesheet(s) to embed into the output + HTML. The stylesheet may be a path to a CSS file, + "@base" for the base ipynb2html style, or "@default" + for the default full page style. Default is @default. + + -h --help Show this message and exit. + + -V --version Print version and exit. Exit Codes: - 1 Generic error code. - 2 Missing required arguments or invalid option. + 1 Generic error code. + 2 Missing required arguments or invalid option. Please report bugs at <${bugsUrl}>. ` @@ -39,9 +48,14 @@ function logErr (msg: string): void { console.error(`${progName}: ${msg}`) } +function arrify (obj: T | T[]): T[] { + return Array.isArray(obj) ? obj : [obj] +} + function parseCliArgs (argv: string[]) { const opts = minimist(argv, minimistOptions({ debug: { alias: 'd', type: 'boolean' }, + style: { alias: 's', type: 'string', default: '@default' }, version: { alias: 'V', type: 'boolean' }, help: { alias: 'h', type: 'boolean' }, arguments: 'string', @@ -73,24 +87,34 @@ function parseCliArgs (argv: string[]) { const [input, output] = opts._ return { + styles: arrify(opts.style).join(',').split(/,\s*/), debug: opts.debug as boolean, input: input === '-' ? 0 : input, // 0 = stdin output, } } +function loadStyle (name: string): string { + switch (name) { + case '@base': return notebookCss + case '@default': return pageCss + notebookCss + default: return fs.readFileSync(name, 'utf8') + } +} + export default (argv: string[]): void => { const opts = parseCliArgs(argv) try { const notebook = JSON.parse(fs.readFileSync(opts.input, 'utf-8')) + const style = opts.styles.map(loadStyle).join('\n') const title = ipynb2html.readNotebookTitle(notebook) ?? 'Notebook' const renderNotebook = ipynb2html.createRenderer(new Document()) const contents = renderNotebook(notebook).outerHTML - const html = renderPage(contents, title) + const html = renderPage({ contents, title, style }) if (opts.output) { fs.writeFileSync(opts.output, html) diff --git a/packages/ipynb2html-cli/src/page.ts b/packages/ipynb2html-cli/src/page.ts index ad8083e..8552e4c 100644 --- a/packages/ipynb2html-cli/src/page.ts +++ b/packages/ipynb2html-cli/src/page.ts @@ -1,11 +1,13 @@ import { version } from 'ipynb2html' -import { $INLINE_FILE } from 'ts-transformer-inline-file' - -const notebookCss = $INLINE_FILE('../../ipynb2html/styles/notebook.css') -const pageCss = $INLINE_FILE('./page.css') -export default (contents: string, title: string): string => `\ +export type Options = { + contents: string, + title: string, + style: string, +} + +export default ({ contents, title, style }: Options): string => `\ @@ -22,7 +24,7 @@ export default (contents: string, title: string): string => `\ integrity="sha384-BdGj8xC2eZkQaxoQ8nSLefg4AV4/AwB3Fj+8SUSo7pnKP6Eoy18liIKTPn9oBYNG" crossorigin="anonymous"> From 3a312385f604167027010f92687b0ffe8c04e043 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 19 Apr 2020 18:50:36 +0200 Subject: [PATCH 34/76] Wrap cells in
instead of
--- packages/ipynb2html-core/src/renderer.ts | 6 +++--- packages/ipynb2html-core/test/renderer.test.tsx | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/ipynb2html-core/src/renderer.ts b/packages/ipynb2html-core/src/renderer.ts index 9914444..494148b 100644 --- a/packages/ipynb2html-core/src/renderer.ts +++ b/packages/ipynb2html-core/src/renderer.ts @@ -165,11 +165,11 @@ class NbRenderer extends CallableInstance> { } renderMarkdownCell (cell: MarkdownCell, _notebook: Notebook): TElement { - return this.el('div', ['cell', 'markdown-cell'], this.renderMarkdown(joinText(cell.source))) + return this.el('section', ['cell', 'markdown-cell'], this.renderMarkdown(joinText(cell.source))) } renderRawCell (cell: RawCell, _notebook: Notebook): TElement { - return this.el('div', ['cell', 'raw-cell'], joinText(cell.source)) + return this.el('section', ['cell', 'raw-cell'], joinText(cell.source)) } renderCodeCell (cell: CodeCell, notebook: Notebook): TElement { @@ -180,7 +180,7 @@ class NbRenderer extends CallableInstance> { const outputs = coalesceStreams(cell.outputs ?? []) .map(output => this.renderOutput(output, cell)) - return this.el('div', ['cell', 'code-cell'], [source, ...outputs]) + return this.el('section', ['cell', 'code-cell'], [source, ...outputs]) } renderSource (cell: CodeCell, notebook: Notebook): TElement { diff --git a/packages/ipynb2html-core/test/renderer.test.tsx b/packages/ipynb2html-core/test/renderer.test.tsx index 3618204..352e8a6 100644 --- a/packages/ipynb2html-core/test/renderer.test.tsx +++ b/packages/ipynb2html-core/test/renderer.test.tsx @@ -102,11 +102,11 @@ describe('built renderer', () => { eachMultilineVariant(fixtures.MarkdownCell, 'source', (cell) => { const source = join(cell.source) - it('returns div.cell.markdown-cell with the $source converted using markdownRenderer() as content', () => { + it('returns section.cell.markdown-cell with the $source converted using markdownRenderer() as content', () => { expect( renderer.renderMarkdownCell(cell, notebook) ).toHtmlEqual( -
+
{{__html: mockLastResult(markdownRenderer) }} -
+
) expect( markdownRenderer ).toBeCalledWith(source) }) @@ -117,11 +117,11 @@ describe('built renderer', () => { describe('.renderRawCell', () => { eachMultilineVariant(fixtures.RawCell, 'source', (cell) => { - it('returns div.cell.raw-cell with the $source as content', () => { + it('returns section.cell.raw-cell with the $source as content', () => { expect( renderer.renderRawCell(cell, notebook) ).toHtmlEqual( -
+
{{__html: join(cell.source) }} -
+ ) }) }) @@ -139,9 +139,9 @@ describe('built renderer', () => { result = renderer.renderCodeCell(cell, notebook) }) - it('returns div.cell.code-cell', () => { + it('returns section.cell.code-cell', () => { expect( result ).toMatchElement( -
+
) }) From e4549711f100bc3eeef24392068f486e5b96330f Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 19 Apr 2020 19:09:39 +0200 Subject: [PATCH 35/76] Fix font-size of

inside
See https://stackoverflow.com/a/26291186/2217862. --- packages/ipynb2html-cli/src/page.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ipynb2html-cli/src/page.css b/packages/ipynb2html-cli/src/page.css index 51c1677..a6e45d7 100644 --- a/packages/ipynb2html-cli/src/page.css +++ b/packages/ipynb2html-cli/src/page.css @@ -15,6 +15,9 @@ h1, h2, h3, h4, h5, h6 { margin-top: 1.6em; position: relative; } +h1 { + font-size: 2em; +} h1 .anchor, h2 .anchor, From 1d9ce38eb4db0622ee7f2d99266809e204696c34 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 26 Apr 2020 18:10:41 +0200 Subject: [PATCH 36/76] Bump @types/marked from ^0.7.2 to ^0.7.4 --- package.json | 2 +- patches/@types+marked+0.7.2.patch | 38 ------------------------------- yarn.lock | 8 +++---- 3 files changed, 5 insertions(+), 43 deletions(-) delete mode 100644 patches/@types+marked+0.7.2.patch diff --git a/package.json b/package.json index fdbf309..64e6c7f 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@types/highlight.js": "^9.12.3", "@types/jest": "^24.9.0", "@types/katex": "^0.11.0", - "@types/marked": "^0.7.2", + "@types/marked": "^0.7.4", "@types/node": "^10.13.0", "@typescript-eslint/eslint-plugin": "^2.17.0", "@typescript-eslint/parser": "^2.17.0", diff --git a/patches/@types+marked+0.7.2.patch b/patches/@types+marked+0.7.2.patch deleted file mode 100644 index 981c8a0..0000000 --- a/patches/@types+marked+0.7.2.patch +++ /dev/null @@ -1,38 +0,0 @@ -Remove after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43732 -is merged and released. - -diff --git a/node_modules/@types/marked/index.d.ts b/node_modules/@types/marked/index.d.ts -index e89b2cf..2dc01dc 100644 ---- a/node_modules/@types/marked/index.d.ts -+++ b/node_modules/@types/marked/index.d.ts -@@ -129,8 +129,8 @@ declare namespace marked { - codespan(code: string): string; - br(): string; - del(text: string): string; -- link(href: string, title: string, text: string): string; -- image(href: string, title: string, text: string): string; -+ link(href: string | null, title: string | null, text: string): string; -+ image(href: string | null, title: string | null, text: string): string; - text(text: string): string; - } - -@@ -140,8 +140,8 @@ declare namespace marked { - codespan(text: string): string; - del(text: string): string; - text(text: string): string; -- link(href: string, title: string, text: string): string; -- image(href: string, title: string, text: string): string; -+ link(href: string | null, title: string | null, text: string): string; -+ image(href: string | null, title: string | null, text: string): string; - br(): string; - } - -@@ -182,7 +182,7 @@ declare namespace marked { - - type TokensList = Token[] & { - links: { -- [key: string]: { href: string; title: string; } -+ [key: string]: { href: string | null; title: string | null; } - } - }; - diff --git a/yarn.lock b/yarn.lock index 277d6ca..5a6590f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1255,10 +1255,10 @@ resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.11.0.tgz#b16c54ee670925ffef0616beae9e90c557e17334" integrity sha512-27BfE8zASRLYfSBNMk5/+KIjr2CBBrH0i5lhsO04fca4TGirIIMay73v3zNkzqmsaeIa/Mi5kejWDcxPLAmkvA== -"@types/marked@^0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.7.2.tgz#1393f076773b55cc7078c0fbeb86a497c69db97e" - integrity sha512-A3EDyNaq6OCcpaOia2HQ/tu2QYt8DKuj4ExP21VU3cU3HTo2FLslvbqa2T1vux910RHvuSVqpwKnnykSFcRWOA== +"@types/marked@^0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.7.4.tgz#607685669bb1bbde2300bc58ba43486cbbee1f0a" + integrity sha512-fdg0NO4qpuHWtZk6dASgsrBggY+8N4dWthl1bAQG9ceKUNKFjqpHaDKCAhRUI6y8vavG7hLSJ4YBwJtZyZEXqw== "@types/minimist@^1.2.0": version "1.2.0" From 9685b5d8b8f032c8718f3d09ba27063018982455 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 15 Jun 2020 18:06:20 +0200 Subject: [PATCH 37/76] Bump marked to 1.0.0 The latest version is 1.1.0 but they changed rendering of img from `` to `` which breaks our tests. --- README.adoc | 2 +- examples/bundle.html | 2 +- packages/ipynb2html/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index f731df7..bb1cac8 100644 --- a/README.adoc +++ b/README.adoc @@ -6,7 +6,7 @@ :ansiup-version: 4.0.4 :hljs-version: 9.15.10 :katex-version: 0.11.1 -:marked-version: 0.7.0 +:marked-version: 1.0.0 :vs-marketplace-uri: https://marketplace.visualstudio.com/items?itemName= ifdef::env-github[] diff --git a/examples/bundle.html b/examples/bundle.html index 82f7a1e..5950a11 100644 --- a/examples/bundle.html +++ b/examples/bundle.html @@ -13,7 +13,7 @@ rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.10/build/styles/default.min.css" crossorigin="anonymous"> - + diff --git a/packages/ipynb2html/package.json b/packages/ipynb2html/package.json index 0455154..0295e87 100644 --- a/packages/ipynb2html/package.json +++ b/packages/ipynb2html/package.json @@ -47,7 +47,7 @@ "highlight.js": "^9.18.1", "ipynb2html-core": "0.2.1", "katex": "^0.11.1", - "marked": "^0.8.2" + "marked": "^1.0.0" }, "peerDependencies": { "nodom": "^2.3.0" diff --git a/yarn.lock b/yarn.lock index 5a6590f..5589d6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4352,10 +4352,10 @@ markdown-table@1.1.3: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== -marked@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.2.tgz#4faad28d26ede351a7a1aaa5fec67915c869e355" - integrity sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw== +marked@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-1.1.0.tgz#62504ad4d11550c942935ccc5e39d64e5a4c4e50" + integrity sha512-EkE7RW6KcXfMHy2PA7Jg0YJE1l8UPEZE8k45tylzmZM30/r1M1MUXWQfJlrSbsTeh7m/XTwHbWUENvAJZpp1YA== mdn-data@2.0.4: version "2.0.4" From 76c9a1e67fb8be4fc855e8f8a6eaac76284453b5 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 15 Jun 2020 18:08:57 +0200 Subject: [PATCH 38/76] Bump node-html-parser from ^1.2.14 to ^1.2.19 --- package.json | 2 +- patches/node-html-parser+1.2.14.patch | 25 ------------------------- yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 patches/node-html-parser+1.2.14.patch diff --git a/package.json b/package.json index 64e6c7f..fbb9e6e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "fs-extra": "^8.1.0", "jest": "^25.1.0", "jest-chain": "^1.1.2", - "node-html-parser": "^1.2.14", + "node-html-parser": "^1.2.19", "nodom": "^2.3.0", "npm-run-all": "^4.1.5", "patch-package": "^6.2.0", diff --git a/patches/node-html-parser+1.2.14.patch b/patches/node-html-parser+1.2.14.patch deleted file mode 100644 index d6558c7..0000000 --- a/patches/node-html-parser+1.2.14.patch +++ /dev/null @@ -1,25 +0,0 @@ -Remove after https://github.com/taoqf/node-html-parser/pull/39 -is merged and released. - -diff --git a/node_modules/node-html-parser/dist/nodes/html.js b/node_modules/node-html-parser/dist/nodes/html.js -index a3c33b1..8b4c2b2 100644 ---- a/node_modules/node-html-parser/dist/nodes/html.js -+++ b/node_modules/node-html-parser/dist/nodes/html.js -@@ -176,15 +176,11 @@ var HTMLElement = /** @class */ (function (_super) { - HTMLElement.prototype.toString = function () { - var tag = this.tagName; - if (tag) { -- var is_un_closed = /^meta$/i.test(tag); -- var is_self_closed = /^(img|br|hr|area|base|input|doctype|link)$/i.test(tag); -+ const is_void = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i.test(tag); - var attrs = this.rawAttrs ? ' ' + this.rawAttrs : ''; -- if (is_un_closed) { -+ if (is_void) { - return "<" + tag + attrs + ">"; - } -- else if (is_self_closed) { -- return "<" + tag + attrs + " />"; -- } - else { - return "<" + tag + attrs + ">" + this.innerHTML + ""; - } diff --git a/yarn.lock b/yarn.lock index 5589d6c..0ee5196 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4532,10 +4532,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-html-parser@^1.2.14: - version "1.2.14" - resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-1.2.14.tgz#5570fe4ad03744f80dde3b470aa980fefc6893a1" - integrity sha512-Jzdpk6xrZGgR4zB2L85uPvcGN9Z667RxN5mS9RHpv7I0ACcNOS3x8dbKMkQrKMl6N4+xveuQNfxXL4RZRib7Mw== +node-html-parser@^1.2.19: + version "1.2.19" + resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-1.2.19.tgz#2cb14ce7981dfe2c0f5af53cf8654a3d49cded7d" + integrity sha512-MQvBz+qk7SbqNPp0c7hR0F8lRTPXK5n2tww4eFmXf+cXp5hZHtL5rJHlAWlcjzRep+T5Pd5lz3lqFgN7IFYEiw== dependencies: he "1.1.1" From d9bea2feb2a995319d5f6e8bf14fc59f9d4867bc Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 17 Jun 2020 00:34:52 +0200 Subject: [PATCH 39/76] Bump highlight.js to 10.1.1 --- README.adoc | 2 +- examples/bundle-full.html | 2 +- examples/bundle.html | 4 ++-- package.json | 2 +- packages/ipynb2html-cli/src/page.ts | 4 ++-- packages/ipynb2html/package.json | 2 +- .../ipynb2html/test/markdownRenderer.test.tsx | 6 ++++-- yarn.lock | 16 ++++++++-------- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/README.adoc b/README.adoc index bb1cac8..ecedd64 100644 --- a/README.adoc +++ b/README.adoc @@ -4,7 +4,7 @@ :gh-branch: master :version: 0.2.1 :ansiup-version: 4.0.4 -:hljs-version: 9.15.10 +:hljs-version: 10.1.1 :katex-version: 0.11.1 :marked-version: 1.0.0 :vs-marketplace-uri: https://marketplace.visualstudio.com/items?itemName= diff --git a/examples/bundle-full.html b/examples/bundle-full.html index 0778c40..a9d97f0 100644 --- a/examples/bundle-full.html +++ b/examples/bundle-full.html @@ -11,7 +11,7 @@ crossorigin="anonymous">