A non-validating SQL parser module for Python
tar-stream is a streaming tar parser and generator.
Like UNIX Expect, but for Node.js.
ben-ng/minifyify 188
Minify your browserify bundle without losing the sourcemap
A curses-like library for node.js.
Map all the things, validate all the maps
Create subfilesystems that are rooted at a specific directory.
streaming cpio parser and packer
startedSlimbook-Team/samsung
started time in 16 minutes
issue commentfathyb/carbonyl
I think people is more used to have URL and navigational buttons on top, I've only seen them in bottom on mobile phones and some TUI browsers, maybe an option for both? Regarding modals, I think we should show them at the center of the screen as floating windows, with some darkening of the background, and maybe some animation to show them from the center to get user attention over them.
comment created time in 20 minutes
issue commentfathyb/carbonyl
Render boxes as ASCII characters
But this probably means creating another renderer (and might break other sites)
Not really, it would be mostly similar to how image rendering is being done, detect the pixels and match with the most-alike glyph, and later adjust to layout similar to how text rendering is being done.
Definitely I would like to see this implemented :-)
comment created time in 26 minutes
pull request commentnodejs/node
test_runner: refactor coverage report output for readability
I missed to publish my review before, anyway good to know this has landed :-)
comment created time in 34 minutes
Pull request review commentnodejs/node
test_runner: refactor coverage report output for readability
function countCompletedTest(test, harness = test.root.harness) { } -function coverageThreshold(coverage, color) {- coverage = NumberPrototypeToFixed(coverage, 2);- if (color) {- if (coverage > 90) return `${green}${coverage}${color}`;- if (coverage < 50) return `${red}${coverage}${color}`;- }- return coverage;+function addTableLine(prefix, width) {+ return `${prefix}${'-'.repeat(width)}\n`;+}++function truncateStart(string, width) {+ return string.length > width ? `\u2026${string.substring(string.length - width + 1, string.length)}` : string;+}++function truncateEnd(string, width) {+ return string.length > width ? `${string.substring(0, width - 1)}\u2026` : string;+}++function formatLinesToRanges(values) {+ return ArrayPrototypeMap(ArrayPrototypeReduce(values, (prev, current, index, array) => {+ if ((index > 0) && ((current - array[index - 1]) === 1)) {+ prev[prev.length - 1][1] = current;+ } else {+ prev.push([current]);+ }+ return prev;+ }, []), (range) => range.join('-'));+}++function formatUncoveredLines(lines, table) {+ if (table) return ArrayPrototypeJoin(formatLinesToRanges(lines), ' ');+ return ArrayPrototypeJoin(lines, ', '); } -function getCoverageReport(pad, summary, symbol, color) {- let report = `${color}${pad}${symbol}start of coverage report\n`;+const kColumns = ['line %', 'branch %', 'funcs %'];+const kColumnsKeys = ['coveredLinePercent', 'coveredBranchPercent', 'coveredFunctionPercent'];+const kSeparator = ' | ';++function getCoverageReport(pad, summary, symbol, color, table) {+ const prefix = `${pad}${symbol}`;+ let report = `${color}${prefix}start of coverage report\n`;++ let filePadLength;+ let columnPadLengths = [];+ let uncoveredLinesPadLength;+ let tableWidth;++ if (table) {+ // Get expected column sizes+ filePadLength = table && ArrayPrototypeReduce(summary.files, (acc, file) =>+ MathMax(acc, relative(summary.workingDirectory, file.path).length), 0);+ filePadLength = MathMax(filePadLength, 'file'.length);+ const fileWidth = filePadLength + 2;++ columnPadLengths = ArrayPrototypeMap(kColumns, (column) => (table ? MathMax(column.length, 6) : 0));+ const columnsWidth = ArrayPrototypeReduce(columnPadLengths, (acc, columnPadLength) => acc + columnPadLength + 3, 0);++ uncoveredLinesPadLength = table && ArrayPrototypeReduce(summary.files, (acc, file) =>+ MathMax(acc, formatUncoveredLines(file.uncoveredLineNumbers, table).length), 0);+ uncoveredLinesPadLength = MathMax(uncoveredLinesPadLength, 'uncovered lines'.length);+ const uncoveredLinesWidth = uncoveredLinesPadLength + 2;++ tableWidth = fileWidth + columnsWidth + uncoveredLinesWidth;++ // Fit with sensible defaults+ const availableWidth = (process.stdout.columns || 9000) - prefix.length;+ const columnsExtras = tableWidth - availableWidth;+ if (table && columnsExtras > 0) {+ // Ensure file name is sufficiently visible+ const minFilePad = MathMin(8, filePadLength);+ filePadLength -= MathFloor(columnsExtras * 0.2);+ filePadLength = MathMax(filePadLength, minFilePad);++ // Get rest of available space, subtracting margins+ uncoveredLinesPadLength = MathMax(availableWidth - columnsWidth - (filePadLength + 2) - 2, 1);++ // Update table width+ tableWidth = availableWidth;+ } else {+ uncoveredLinesPadLength = Infinity;+ }+ }+++ function getCell(string, width, { pad, truncate, coverage }) {+ if (!table) return string;++ let result = string;+ if (pad) result = pad(result, width);+ if (truncate) result = truncate(result, width);+ if (color && coverage !== undefined) {+ if (coverage > 90) return `${coverageColors.high}${result}${color}`;+ if (coverage > 50) return `${coverageColors.medium}${result}${color}`;
Not sure if these values should be configurable someway...
comment created time in a month
Pull request review commentnodejs/node
test_runner: refactor coverage report output for readability
function countCompletedTest(test, harness = test.root.harness) { } -function coverageThreshold(coverage, color) {- coverage = NumberPrototypeToFixed(coverage, 2);- if (color) {- if (coverage > 90) return `${green}${coverage}${color}`;- if (coverage < 50) return `${red}${coverage}${color}`;- }- return coverage;+function addTableLine(prefix, width) {+ return `${prefix}${'-'.repeat(width)}\n`;+}++function truncateStart(string, width) {+ return string.length > width ? `\u2026${string.substring(string.length - width + 1, string.length)}` : string;+}++function truncateEnd(string, width) {+ return string.length > width ? `${string.substring(0, width - 1)}\u2026` : string;+}++function formatLinesToRanges(values) {+ return ArrayPrototypeMap(ArrayPrototypeReduce(values, (prev, current, index, array) => {+ if ((index > 0) && ((current - array[index - 1]) === 1)) {+ prev[prev.length - 1][1] = current;
Use .at(-1)
?
comment created time in a month
startedjshttp/type-is
started time in 21 hours
startedreactive-python/reactpy
started time in 2 days
push eventpiranna/toolbar-clock
Jesús Leganés-Combarro 'piranna
commit sha db7ec169d843183b8705c817d4aaf2a9e5d53dfe
Add original content from https://github.com/durango99/chrome-extensions/tree/master/toolbar-clock
push time in 2 days
created repositorypiranna/toolbar-clock
a BIG numbers toolbar clock for Google Chrome
created time in 2 days
starteddurango99/chrome-extensions
started time in 2 days
startedkalman/chrome-extensions
started time in 2 days
startedlambertjamesd/portal64
started time in 3 days
push eventMafalda-SFU/Mafalda-SFU.github.io
commit sha b8358787516d3d08da99a65e42f177d9dad4c3bd
Update from https://github.com/Mafalda-SFU/ROPE-server-CLI/commit/9a5e5bea477ea4c61234ba16f6f517ca080455a5
push time in 3 days
startedlife4/textdistance
started time in 3 days
startedaruiz/autofirma-flatpak
started time in 3 days
issue commentnodejs/node
`--experimental-test-coverage` cannot be used with `--test`
will it be added in version 18?
It's already included.
comment created time in 3 days
startedmafintosh/chromecasts
started time in 4 days
startedmafintosh/read-write-mutexify
started time in 4 days
issue commentpiranna/decompress-maybe
Add support for `brotli` algorithm
brotli
doesn't have a magic number, so it's not possible to identify it by inspecting the stream itself. There's some work to provide some frame and metadata, but it's moving slow. Once it's available in the spec, we can use it.
comment created time in 4 days
push eventMafalda-SFU/Mafalda-SFU.github.io
commit sha ccc1bddb95457a5c79f500fd995d88a1cfc533f6
Update chronology.md
push time in 4 days
startedStieneee/simple-zstd
started time in 4 days
startedelfshaker/elfshaker
started time in 4 days
issue commentpiranna/decompress-maybe
Add support for all Node.js supported compression algorithms
https://github.com/mafintosh/gunzip-maybe/issues/10
comment created time in 4 days
issue commentmafintosh/gunzip-maybe
Also, since this project is not just Gunzip-only anymore, maybe should it be renamed to unzip-maybe
? :-)
comment created time in 4 days
issue openedmafintosh/gunzip-maybe
https://github.com/mafintosh/gunzip-maybe/blob/6903d9cedc713d10d7978c9bc9e4d7f3539cf249/index.js#L19-L28
It looks like createUnzip() already does detection between Gunzip and Inflate, so there's no need to do it ourselves, reducing code size and number of dependencies.
created time in 4 days
issue commentpiranna/decompress-maybe
Add support for all Node.js supported compression algorithms
It looks that https://nodejs.org/api/zlib.html#class-zlibunzip is not a compression algorithm itself, but a wrapper that auto-select between deflate
and gunzip
.
comment created time in 4 days