+17
-37
@@ -24,47 +24,27 @@ #!/usr/bin/env node | ||
| var flags = function () { | ||
| return ( | ||
| "🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" + | ||
| " 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" | ||
| ); | ||
| }; | ||
| process._rawDebug( | ||
| [ | ||
| "", flags(), "", | ||
| "\x1b[37m24 февраля " + | ||
| bold("Россия напала на Украину") + | ||
| ", что уже стало причиной " + | ||
| bold("15000+ жертв среди российских военных") + | ||
| " и примерно " + | ||
| bold("10000+ - среди украинских") + | ||
| ", а также " + | ||
| bold("5000+ убитых граждан, в том числе 300+ детей") + | ||
| ".", | ||
| "", | ||
| "Народ Украины всеобще мобилизован и готов защищать свою страну от вражеского" + | ||
| " вторжения. " + | ||
| bold( | ||
| "91% украинцев полностью поддерживает своего президента Владимира Зеленского" | ||
| ) + | ||
| " и его ответные действия на нападение России.", | ||
| "\x1b[37m24 февраля 2022 года " + | ||
| bold("Россия вторглась на Украину") + | ||
| ". Это вторжение стало крупнейшей атакой на европейскую страну со времен " + | ||
| "Второй мировой войны.", | ||
| "", | ||
| "Весь мир осудил необоснованное вторжение и решил ввести " + | ||
| bold("невиданные ранее санкции против России") + | ||
| ". С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных" + | ||
| " граждан.", | ||
| "Оценивается, что это привело к десяткам тысяч жертв среди гражданского " + | ||
| "населения Украины и сотням тысяч военных потерь.", | ||
| "", | ||
| "В то же время, " + | ||
| bold("российское правительство ограничивает доступ граждан к внешней информации") + | ||
| ", насаждая однобокие формулировки и версии происходящего.", | ||
| "", "В качестве надежного источника информации загрузите безопасный браузер Tor:", "", | ||
| "Российское правительство ограничивает доступ граждан к внешней информации, " + | ||
| "продвигая односторонние формулировки и версии происходящего. Другие соседние " + | ||
| "страны изображаются как угроза для России, создавая предлог для очередного " + | ||
| "неоправданного вторжения в ближайшие годы.", | ||
| "", | ||
| "Это необходимо остановить. Узнайте, как обойти цензуру и безопасно получить доступ " + | ||
| "к широкому спектру источников:", | ||
| "", | ||
| bold( | ||
| "https://forum.torproject.net/t/tor-blocked-in-russia-how-to-circumvent-censorship/982" | ||
| ), | ||
| "", "И посетите:", "", | ||
| bold( | ||
| "https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian" | ||
| ), | ||
| bold("https://www.dwnewsgngmhlplxy6o2twtfgjnrnjxbegbwqx6wnotdhkzt562tszfid.onion/ru/"), | ||
| "", flags(), "" | ||
| "", | ||
| "Мы призываем изучать множество точек зрения для формирования всестороннего взгляда " + | ||
| "на ситуацию." | ||
| ].join("\n") | ||
@@ -71,0 +51,0 @@ ); |
+12
-0
@@ -5,2 +5,14 @@ # Changelog | ||
| ### [0.10.63](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63) (2024-02-21) | ||
| ### Bug Fixes | ||
| - Do not rely on problematic regex ([3551cdd](https://github.com/medikoo/es5-ext/commit/3551cdd7b2db08b1632841f819d008757d28e8e2)), addresses [#201](https://github.com/medikoo/es5-ext/issues/201) | ||
| - Support ES2015+ function definitions in `function#toStringTokens()` ([a52e957](https://github.com/medikoo/es5-ext/commit/a52e95736690ad1d465ebcd9791d54570e294602)), addresses [#021](https://github.com/medikoo/es5-ext/issues/021) | ||
| - Ensure postinstall script does not crash on Windows, fixes [#181](https://github.com/medikoo/es5-ext/issues/181) ([bf8ed79](https://github.com/medikoo/es5-ext/commit/bf8ed799d57df53096da9d908ff577f305e1366f)) | ||
| ### Maintenance Improvements | ||
| - Simplify the manifest message ([7855319](https://github.com/medikoo/es5-ext/commit/7855319f41b9736639cf4555bd2c419f17addf55)) | ||
| ### [0.10.62](https://github.com/medikoo/es5-ext/compare/v0.10.61...v0.10.62) (2022-08-02) | ||
@@ -7,0 +19,0 @@ |
| "use strict"; | ||
| var mixin = require("../../object/mixin") | ||
| , validFunction = require("../valid-function") | ||
| , re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/; | ||
| , validFunction = require("../valid-function"); | ||
| module.exports = function () { | ||
| var match = String(validFunction(this)).match(re), fn; | ||
| validFunction(this); | ||
| var args = []; | ||
| for (var i = 0; i < this.length; ++i) args.push("arg" + (i + 1)); | ||
| // eslint-disable-next-line no-new-func | ||
| fn = new Function( | ||
| var fn = new Function( | ||
| "fn", | ||
| "return function " + | ||
| match[1].trim() + | ||
| (this.name || "") + | ||
| "(" + | ||
| match[2] + | ||
| args.join(", ") + | ||
| ") { return fn.apply(this, arguments); };" | ||
@@ -18,0 +19,0 @@ )(this); |
| "use strict"; | ||
| var validFunction = require("../valid-function"); | ||
| var isValue = require("../../object/is-value") | ||
| , esniff = require("esniff") | ||
| , validFunction = require("../valid-function"); | ||
| var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/ | ||
| , re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/; | ||
| var classRe = /^\s*class[\s{/}]/; | ||
| module.exports = function () { | ||
| var str = String(validFunction(this)), data = str.match(re1); | ||
| if (!data) { | ||
| data = str.match(re2); | ||
| if (!data) throw new Error("Unrecognized string format"); | ||
| data[1] = data[1].trim(); | ||
| if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1); | ||
| } | ||
| return { args: data[1], body: data[2] }; | ||
| var str = String(validFunction(this)); | ||
| if (classRe.test(str)) throw new Error("Class methods are not supported"); | ||
| var argsStartIndex | ||
| , argsEndIndex | ||
| , bodyStartIndex | ||
| , bodyEndReverseIndex = -1 | ||
| , shouldTrimArgs = false; | ||
| esniff(str, function (emitter, accessor) { | ||
| emitter.once("trigger:(", function () { argsStartIndex = accessor.index + 1; }); | ||
| emitter.once("trigger:=", function () { | ||
| if (isValue(argsStartIndex)) return; | ||
| argsStartIndex = 0; | ||
| argsEndIndex = accessor.index; | ||
| shouldTrimArgs = true; | ||
| if (!accessor.skipCodePart("=>")) { | ||
| throw new Error("Unexpected function string: " + str); | ||
| } | ||
| accessor.skipWhitespace(); | ||
| if (!accessor.skipCodePart("{")) bodyEndReverseIndex = Infinity; | ||
| bodyStartIndex = accessor.index; | ||
| }); | ||
| emitter.on("trigger:)", function () { | ||
| if (accessor.scopeDepth) return; | ||
| argsEndIndex = accessor.index; | ||
| accessor.skipCodePart(")"); | ||
| accessor.skipWhitespace(); | ||
| if (accessor.skipCodePart("=>")) { | ||
| accessor.skipWhitespace(); | ||
| if (!accessor.skipCodePart("{")) bodyEndReverseIndex = Infinity; | ||
| } else if (!accessor.skipCodePart("{")) { | ||
| throw new Error("Unexpected function string: " + str); | ||
| } | ||
| bodyStartIndex = accessor.index; | ||
| accessor.stop(); | ||
| }); | ||
| }); | ||
| var argsString = str.slice(argsStartIndex, argsEndIndex); | ||
| if (shouldTrimArgs) argsString = argsString.trim(); | ||
| return { args: argsString, body: str.slice(bodyStartIndex, bodyEndReverseIndex) }; | ||
| }; |
+1
-1
| ISC License | ||
| Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com | ||
| Copyright (c) 2011-2024, Mariusz Nowak, @medikoo, medikoo.com | ||
@@ -5,0 +5,0 @@ Permission to use, copy, modify, and/or distribute this software for any |
+8
-7
| { | ||
| "name": "es5-ext", | ||
| "version": "0.10.62", | ||
| "version": "0.10.63", | ||
| "description": "ECMAScript extensions and shims", | ||
@@ -28,15 +28,16 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
| "es6-symbol": "^3.1.3", | ||
| "esniff": "^2.0.1", | ||
| "next-tick": "^1.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "eslint": "^8.13.0", | ||
| "eslint-config-medikoo": "^4.1.2", | ||
| "eslint": "^8.56.0", | ||
| "eslint-config-medikoo": "^4.2.0", | ||
| "git-list-updated": "^1.2.1", | ||
| "github-release-from-cc-changelog": "^2.3.0", | ||
| "husky": "^4.3.8", | ||
| "lint-staged": "^12.3.8", | ||
| "lint-staged": "~13.2.3", | ||
| "nyc": "^15.1.0", | ||
| "plain-promise": "^0.1.1", | ||
| "prettier-elastic": "^2.2.1", | ||
| "tad": "^3.1.0" | ||
| "prettier-elastic": "^2.8.8", | ||
| "tad": "^3.1.1" | ||
| }, | ||
@@ -116,3 +117,3 @@ "husky": { | ||
| "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", | ||
| "postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\" || exit 0", | ||
| "postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\"", | ||
| "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", | ||
@@ -119,0 +120,0 @@ "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", |
Install scripts
Supply chain riskInstall scripts are run when the package is installed or built. Malicious packages often use scripts that run automatically to execute payloads or fetch additional code.
Found 1 instance in 1 package
Protestware or potentially unwanted behavior
Supply chain riskThis package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed or built. Malicious packages often use scripts that run automatically to execute payloads or fetch additional code.
Found 1 instance in 1 package
Protestware or potentially unwanted behavior
Supply chain riskThis package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
373640
0.33%11619
0.12%4
33.33%+ Added