diff --git a/deprecated.js b/deprecated.js new file mode 100644 index 0000000000..18b11cc369 --- /dev/null +++ b/deprecated.js @@ -0,0 +1,26 @@ +Reset = "\x1b[0m" +FgRed = "\x1b[31m" +FgWhite = "\x1b[37m" +FgWhite = "\x1b[37m" +Bright = "\x1b[1m" +FgBlue = "\x1b[34m" +BgRed = "\x1b[41m" + +DEPRECATION = ` +${BgRed + FgWhite} +-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +${Reset}${Bright}${FgWhite} + Verion 9 of Highlight.js has reached EOL. It will no longer + be supported or receive security updates in the future. + Please upgrade to version 10. + + For more info: + ${FgBlue} + https://github.com/highlightjs/highlight.js/issues/2877 + https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_UPGRADE.md + ${BgRed + FgWhite} + -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +${Reset} +`.trim() + +console.log(DEPRECATION) diff --git a/docs/conf.py b/docs/conf.py index 2411239996..c5558a7c27 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,7 @@ # The short X.Y version. version = '9.18' # The full version, including alpha/beta/rc tags. -release = '9.18.3' +release = '9.18.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/package-lock.json b/package-lock.json index 5ac08311e5..15b2cf1a1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "highlight.js", - "version": "9.18.3", + "version": "9.18.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f93d1fee50..31b8b4ced3 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "syntax" ], "homepage": "https://highlightjs.org/", - "version": "9.18.3", + "version": "9.18.4", "author": { "name": "Ivan Sagalaev", "email": "maniac@softwaremaniacs.org" @@ -24,6 +24,7 @@ "scripts": { "mocha": "mocha", "test": "mocha --globals document test", + "postinstall": "node deprecated.js", "test-browser": "mocha --globals document test/browser" }, "engines": { diff --git a/tools/build.js b/tools/build.js index d39955139b..333b9fbdfa 100644 --- a/tools/build.js +++ b/tools/build.js @@ -64,6 +64,7 @@ let commander = require('commander'); let path = require('path'); let Queue = require('gear').Queue; let registry = require('./tasks'); +let fs = require('fs'); let build, dir = {}; @@ -85,5 +86,7 @@ new Queue({ registry: registry }) .clean(dir.build) .log('Starting build.') .series(build(commander, dir)) + .read(["deprecated.js"]) + .dest("./build") .log('Finished build.') - .run(); + .run()