Skip to content

Instantly share code, notes, and snippets.

View bcoe's full-sized avatar
💭
hackin'

Benjamin E. Coe bcoe

💭
hackin'
View GitHub Profile
@bcoe
bcoe / test-output.tap
Created May 29, 2020 23:32
test-output.tap
TAP version 13
1..169
ok 1 parallel/test-fs-access
---
duration_ms: 0.87
...
ok 2 parallel/test-fs-append-file
---
duration_ms: 0.86
...
@bcoe
bcoe / node.xml
Created March 31, 2020 04:21
node.xml
<?xml version="1.0"?>
<testsuites>
<testsuite tests="2833" skipped="34" failures="1" errors="0" name="Default">
<testcase name="#1 parallel/test-accessor-properties"/>
<testcase name="#2 parallel/test-arm-math-illegal-instruction"/>
<testcase name="#3 parallel/test-assert"/>
<testcase name="#4 parallel/test-assert-async"/>
<testcase name="#5 parallel/test-assert-builtins-not-read-from-filesystem"/>
<testcase name="#6 parallel/test-assert-checktag"/>
<testcase name="#7 parallel/test-assert-deep"/>
@bcoe
bcoe / SourceMap.js
Created September 29, 2019 20:42
SourceMap.js
// This file is a modified version of:
// https://cs.chromium.org/chromium/src/v8/tools/SourceMap.js?rcl=dd10454c1d
// from the V8 codebase. Logic specific to WebInspector is removed and linting
// is made to match the Node.js style guide.
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
@bcoe
bcoe / example.md
Created September 27, 2019 23:51
example.md

if:

  let threw = true;
  try {
    module.load(filename);
    threw = false;
  } catch (err) {
    rekeySourceMap(Module._cache[filename], err);
 throw err;
@bcoe
bcoe / source-map-example.md
Last active September 12, 2019 21:27
Source Map Support in Node.js

Programatic Access of Source Maps

To begin collecting source-maps, node must be run with --enable-source-maps (or with NODE_V8_COVERAGE set).

At which point, the new built-in module source_map can be used to interact with the source-map cache:

// tooling has one interface into the source-map cache, URIs, any type of module that we
// wish to attach source-maps to (ESM, CJS, evals, data-urls) needs to have a methodlogy
// for setting a URI; Two different source-maps cannot be stored at the same URI.
@bcoe
bcoe / optional-chaining-productions.md
Last active November 18, 2019 04:52
optional-chaining-productions.md

Statement List

  • UpdateExpression[Yield, Await]

      • OptionalExpression[Yield, Await]
        • MemberExpression[Yield, Await] (member-expression.js)
          • PrimaryExpression[?Yield, ?Await]
            • this
            • IdentifierReference[?Yield, ?Await]
              • Identifier
    • Literal
@bcoe
bcoe / commits.graphql
Created May 28, 2019 01:28
commits.graphql
query lastCommits($cursor: String, $owner: String!, $repo: String!, $perPage: Int, $maxFilesChanged: Int) {
repository(owner: $owner, name: $repo) {
defaultBranchRef {
target {
... on Commit {
history(first: $perPage, after: $cursor) {
edges{
node {
... on Commit {
message
ProductName: Mac OS X
ProductVersion: 10.13.4
BuildVersion: 17E199
@bcoe
bcoe / fail-on-threshold.patch
Created January 23, 2019 23:53
fail-on-threshold.patch
diff --git a/Makefile b/Makefile
index 9fcf7e08701..852697c53fd 100644
--- a/Makefile
+++ b/Makefile
@@ -215,7 +215,7 @@ coverage-build: all
coverage-build-js:
mkdir -p node_modules
if [ ! -d node_modules/c8 ]; then \
- $(NODE) ./deps/npm install c8@next --no-save --no-package-lock;\
+ $(NODE) ./deps/npm install c8 --no-save --no-package-lock;\
@bcoe
bcoe / monthly.md
Last active July 4, 2018 00:36
Devtools Community Triage - July 3rd 2018

Devtools Community Monthly Triage

  • Who: Contributors and community members interested in shaping the yargs, lerna, conventional-changelog, and nyc projects.
  • What: Our monthly planning meeting for the Devtools Community umbrella of projects.
  • When: Tuesday, July 3, 4:30PM.
  • Where: https://zoom.us/, download the Zoom chat application, a meeting room will be shared in slack.

Agenda

yargs: