profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/Daniel15/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Daniel Lo Nigro Daniel15 @Facebook Palo Alto, CA https://d.sb/ Senior Frontend Developer @facebook. C# / .NET fan. @dotnet-foundation member. Australian 🇦🇺

babel/babel-standalone 804

:video_game: Now located in the Babel repo! Standalone build of Babel for use in non-Node.js environments, including browsers.

babel/babel-standalone-bower 9

Bower build of babel-standalone. See https://github.com/Daniel15/babel-standalone

Daniel15/AjaXplorer-Azure 1

Plugin for AjaXPlorer that allows browsing of Windows Azure Blob Storage

Daniel15/Banshee-StatusUpdater 1

Show your currently playing music in your Telepathy / Empathy status

DanBuild/babel-standalone-TEST 0

Standalone build of Babel for use in non-Node.js environments, including browsers. Similar to the (now deprecated) babel-browser.

Daniel15/0.30000000000000004 0

Floating Point Math Examples

Daniel15/511php 0

A library for accessing 511.org's Transit Trip Planner from PHP

Daniel15/acme-dns 0

Limited DNS server with RESTful HTTP API to handle ACME DNS challenges easily and securely.

Daniel15/acme.sh 0

A pure Unix shell script implementing ACME client protocol

Daniel15/ajax-solr 0

A JavaScript framework for creating user interfaces to Solr.

issue commentgetsentry/sentry-javascript

Allow error boundary to be used with lazy loading

cc @AbhiPrasad This somewhat falls under your "Would you like to see a first class API that exposes this" comment on #4000. If all the logic from the ErrorBoundary component were moved somewhere else, that code could be lazy loaded, and the error boundary itself could queue the reports if Sentry is being lazily loaded.

Daniel15

comment created time in 26 minutes

issue openedgetsentry/sentry-javascript

Allow error boundary to be used with lazy loading

Currently there's no easy way to use the ErrorBoundary if you want to lazy-load the Sentry JavaScript SDK, as it always pulls in the entire SDK. I'd like to use an error boundary in my React apps, while still being able to lazy-load the Sentry JS SDK, at least until its size is reduced.

I wrote my own wrapper, but I had to basically copy-and-paste packages/react/src/errorboundary.tsx and modify it to suit my use case: https://github.com/Daniel15/LazySentry/blob/main/LazySentryErrorBoundary.tsx

What it does is:

  1. If the Sentry SDK hasn't loaded yet, queue it, using an implementation of captureException that queues reported exceptions until Sentry has loaded.
  2. If the Sentry SDK has loaded, use the real ErrorBoundary componentDidCatch code instead of my own.

Unfortunately the componentDidCatch logic isn't public exposed, so I ended up having to do realErrorBoundary.prototype.componentDidCatch.call(this, error, errorInfo) which is messy 🤮

It would be nice if the ErrorBoundary supported something like this natively. I'm not actually sure what the best implementation would be though.

created time in 28 minutes

push eventDaniel15/LazySentry

Daniel Lo Nigro

commit sha cb4e18e9e0e9bb3b7e66d640e02409d36901e20a

Include React component stack in queued reported error

view details

push time in 36 minutes

push eventDaniel15/LazySentry

Daniel Lo Nigro

commit sha b467f40f897a79cd04a6ada38e0279c05335b119

Initial commit

view details

push time in an hour

create barnchDaniel15/LazySentry

branch : main

created branch time in an hour

created repositoryDaniel15/LazySentry

Example code to lazy load Sentry using ES2020 import()

created time in an hour

PR opened callstack/linaria

Remove "hmr" option from Webpack docs

After upgrading Webpack, I was getting this error:

ValidationError: Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'hmr'. These properties are valid:
   object { publicPath?, emit?, esModule?, layer? }

Seems like this option isn't supported any more.

<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Motivation and Test plan are mandatory. -->

Motivation

<!-- If pull request address existing issues, link the issues, thats all.

If issue for this soled problem does not exist, please share your motivation and describe the problem. We may ask you to open issue to discuss the problem first. -->

Summary

<!-- Explain how your implementation works and your thoughts behind the solution. It will help maintainers to review your PR. You can skip it if PR is trivial. -->

Test plan

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output. Write down steps on how maintainers can test your PR. -->

+0 -6

0 comment

1 changed file

pr created time in 3 hours

push eventDaniel15/linaria

Daniel Lo Nigro

commit sha 6c57757f86c0db62f509258ef632a82244f2519a

Remove "hmr" option from Webpack docs After upgrading Webpack, I was getting this error: ``` ValidationError: Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. - options has an unknown property 'hmr'. These properties are valid: object { publicPath?, emit?, esModule?, layer? } ``` Seems like this option isn't supported any more.

view details

push time in 3 hours

issue commentgetsentry/sentry-javascript

Package size is massive

What about lazy loading Sentry: docs.sentry.io/platforms/javascript/install/lazy-load-sentry for people who are concerned about size of sentry.

@dmathewwws Unfortunately the built-in lazy loading is kinda broken for on-premise Sentry installs... I'm working around it by using Webpack's import() support and copying some ideas from the regular lazy loader (queue Sentry and window.onerror calls and replay them once the library is loaded): https://github.com/getsentry/sentry/issues/22715#issuecomment-926385843

@timuric which competitor did you choose?

newrelic

@timuric What's the total size of the New Relic JS SDK?

1999

comment created time in 2 days

issue commentgetsentry/sentry

Sentry JS lazily-loadable loader doesn't work

I was able to get this working by setting the following in sentry/sentry.conf.py

JS_SDK_LOADER_DEFAULT_SDK_URL = "https://browser.sentry-cdn.com/%s/bundle.tracing.min.js"

The downside of this approach is that the SDK is loading from a third-party CDN, which is not ideal in some cases (eg. slower load time due to having to resolve one extra hostname, you can't customize the code at all, etc).

Until this is fixed, I'm going to try lazy loading via Webpack's lazy loading support. I've got this so far:

// LazySentryImport.ts

import {Integrations} from '@sentry/tracing';
const {BrowserTracing} = Integrations;

export {
  init,
  ErrorBoundary,
  addBreadcrumb,
  captureMessage,
  captureException,
  captureEvent,
  configureScope,
  withScope,
} from '@sentry/react';
export {BrowserTracing};
// LazySentry.ts

type SentryImportType = typeof import('./LazySentryImports');

const isDev = window.location.hostname.includes('.localdev.');

let queue: Array<(sentry: SentryImportType) => void> = [];
let errorQueue: Array<Parameters<OnErrorEventHandlerNonNull>> = [];
let rejectionQueue: Array<PromiseRejectionEvent> = [];

// Before Sentry has loaded, these functions will push calls into a queue
// After Sentry has loaded, these will be replaced with the real functions
export let addBreadcrumb: SentryImportType['addBreadcrumb'] = (...args) => {
  queue.push(x => x.addBreadcrumb(...args));
};
export let captureMessage: SentryImportType['captureMessage'] = (...args) => {
  queue.push(x => x.captureMessage(...args));
  return '';
};
export let captureException: SentryImportType['captureException'] = (
  ...args
) => {
  queue.push(x => x.captureException(...args));
  return '';
};
export let captureEvent: SentryImportType['captureEvent'] = (...args) => {
  queue.push(x => x.captureEvent(...args));
  return '';
};
export let configureScope: SentryImportType['configureScope'] = (...args) =>
  queue.push(x => x.configureScope(...args));
export let withScope: SentryImportType['withScope'] = (...args) =>
  queue.push(x => x.withScope(...args));

export function initLazy() {
  const oldOnError = window.onerror;
  const oldOnUnhandledRejection = window.onunhandledrejection;
  window.onerror = (...args) => errorQueue.push(args);
  window.onunhandledrejection = (e: PromiseRejectionEvent) =>
    rejectionQueue.push(e);

  import('./LazySentryImports').then(Sentry => {
    window.onerror = oldOnError;
    window.onunhandledrejection = oldOnUnhandledRejection;
    Sentry.init({
      dsn: 'https://xxxxxxxxxx/3',
      debug: isDev,
      environment: isDev ? 'development' : 'production',
      integrations: [new Sentry.BrowserTracing()],
      tracesSampleRate: 1.0,
    });

    // Override the placeholder functions with the real ones
    addBreadcrumb = Sentry.addBreadcrumb;
    captureMessage = Sentry.captureMessage;
    captureException = Sentry.captureException;
    captureEvent = Sentry.captureEvent;
    configureScope = Sentry.configureScope;
    withScope = Sentry.withScope;
    // TODO: React ErrorBoundary

    // Replay queued calls and errors through Sentry's handlers
    queue.forEach(call => call(Sentry));
    errorQueue.forEach(x => window.onerror?.(...x));
    rejectionQueue.forEach(e => window.onunhandledrejection?.(e));
  });
}

Then just use the LazySentry module in your app. Basically the same as the Sentry lazy loader but with more modern JS and lazy loading your own built JS file rather than using the CDN.

No guarantees on the above code and I still need to finish testing it, but on an initial test it seems to work.

fabis94

comment created time in 2 days

issue commentgetsentry/sentry-javascript

Feature request: Include React component stack in errors caught by error boundary

@AbhiPrasad Actually, I think this would be useful:

Would you like to see a first class API that exposes this?

for example if someone wants to lazy-load the Sentry code. If I did that, I'd want to buffer any errors that occur in an ErrorBoundary while the page is loading, and send them to Sentry once the library loads.

Daniel15

comment created time in 2 days

issue closedyarnpkg/website

yarn-version #106 failed

Build 'yarn-version' is failing!

Last 50 lines of build output:

Started by remote host 209.141.56.29 with note: Automated release of Yarn 1.22.5
Running as SYSTEM
Building on master in workspace /var/lib/jenkins/workspace/yarn-version
No credentials specified
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git@github.com:yarnpkg/website.git # timeout=10
Fetching upstream changes from git@github.com:yarnpkg/website.git
 > git --version # timeout=10
 > git fetch --tags --progress -- git@github.com:yarnpkg/website.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision ac18a1eff17051a1dcb830ba209f7405e3b52af1 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f ac18a1eff17051a1dcb830ba209f7405e3b52af1 # timeout=10
 > git branch -a -v --no-abbrev # timeout=10
 > git branch -D master # timeout=10
 > git checkout -b master ac18a1eff17051a1dcb830ba209f7405e3b52af1 # timeout=10
Commit message: "Automated upgrade to Yarn 1.22.5"
 > git rev-list --no-walk cac13e5f45158f22bbe323363a7797b280772f4e # timeout=10
[yarn-version] $ /bin/sh -xe /tmp/jenkins7224645174123735569.sh
+ ./scripts/set-version.sh
+ '[' -z 1.22.5 -o -z false ']'
++ dirname ./scripts/set-version.sh
+ configFile=./scripts/../_config.yml
+ '[' false = true ']'
+ sed -i -e 's/latest_version:.\+/latest_version: 1.22.5/' ./scripts/../_config.yml
++ grep -oP 'latest_rc_version: \K([0-9\.]+)' ./scripts/../_config.yml
+ latestRCVersion=1.22.0
+ dpkg --compare-versions 1.22.0 le 1.22.5
+ '[' 1 -ne 0 ']'
+ sed -i -e 's/show_rc:.\+/show_rc: false/' ./scripts/../_config.yml
+ git commit -m Automated upgrade to Yarn 1.22.5 _config.yml
On branch master
nothing to commit, working tree clean
Build step 'Execute shell' marked build as failure
No credentials specified
Pushing HEAD to branch master at repo origin
 > git --version # timeout=10
 > git push git@github.com:yarnpkg/website.git HEAD:master # timeout=10

Changes since last successful build:

  • [Daniel15's Build Bot] ac18a1eff17051a1dcb830ba209f7405e3b52af1 - Automated upgrade to Yarn 1.22.5

View full output

cc @Daniel15

closed time in 2 days

DanBuild

issue commentWilfred/difftastic

C# support?

Thanks!

Daniel15

comment created time in 3 days

issue commentgetsentry/sentry-javascript

Feature request: Include React component stack in errors caught by error boundary

@AbhiPrasad Maybe this note in the docs could mention that one of the errors won't have the component stack? It says the error will be rethrown but doesn't mention that the rethrown error will be missing the component stack

image

Daniel15

comment created time in 3 days

issue closedgetsentry/sentry-javascript

Feature request: Include React component stack in errors caught by error boundary

Errors caught in a React ErrorBoundary include the component stack (info.componentStack in componentDidCatch), which gives you the stack of components that were being rendered at the time the error occurred. Often, this is more useful than the regular JS stack trace, as the JS stack trace is sometimes entirely within React's internals.

However, it looks like the component stack is not currently logged to Sentry. Please consider including it, as some competing systems already include this data 😃

Docs: https://reactjs.org/docs/react-component.html#componentdidcatch

closed time in 3 days

Daniel15

issue commentgetsentry/sentry-javascript

Feature request: Include React component stack in errors caught by error boundary

If you use Sentry's React Error Boundary, this information is already logged

@AbhiPrasad Ohh, I see it now! I was confused because in dev, the error is logged twice since React rethrows it. I expected this, but what I didn't expect was that the component stack was only attached to one of the error reports, not both of them. I was just looking at the wrong one!

Thanks :)

Daniel15

comment created time in 3 days

issue openedgetsentry/sentry-javascript

Feature request: Include React component stack in errors caught by error boundary

Errors caught in a React ErrorBoundary include the component stack (info.componentStack in componentDidCatch), which gives you the stack of components that were being rendered at the time the error occurred. Often, this is more useful than the regular JS stack trace, as the JS stack trace is sometimes entirely within React's internals.

However, it looks like the component stack is not currently logged to Sentry. Please consider including it :)

Docs: https://reactjs.org/docs/react-component.html#componentdidcatch

created time in 4 days

issue openedWilfred/difftastic

C# support?

I noticed that C# isn't on the list of supported languages. Could you please add C# support to this tool? Thanks!

created time in 4 days

issue commentreactjs/React.NET

ReactScriptLoadException: Error while loading "~/js/Sample.jsx": SyntaxError: Cannot use import statement outside a module at Sample.jsx:12:1 -> import React from 'react';

Modules (import statements) don't work if you use 'vanilla' JS by itself. They only work with a bundler like Webpack.

cataclysm1987

comment created time in 5 days

pull request commentdotnet/aspnetcore

Revert Enforce WebSockets Transport for Blazor

Have you considered using Server-Sent Events (SSE) as a fallback with a higher priority than long polling? Like long polling, it's plain HTTP so it gets through most proxies. Unlike long polling, it's a properly defined protocol with a spec.

TanayParikh

comment created time in 7 days

issue openedyuliskov/SmartTubeNext

App selects auto-generated subtitles over manual ones

If I have subtitles turned on, and a video has both manually-created and auto-generated English subtitles, the app seems to default to the auto-generated subtitles. I'd like it to only use the auto-generated subtitles if there's no human-created subtitles. Is it possible to configure the app that way?

created time in 8 days

pull request commentDaniel15/fdk-dotnet

updated the target to be ASP Net 5.0

Thanks! I'll push the update soon.

jlowe000

comment created time in 11 days

push eventDaniel15/fdk-dotnet

Jason Lowe

commit sha 4da9000e4fbf65f80777c003d9dfb4a123e36e8e

updated the target to be ASP Net 5.0

view details

push time in 11 days

PR merged Daniel15/fdk-dotnet

updated the target to be ASP Net 5.0

Hi Daniel,

I've recently tried using the docker image was referenced in the fnproject.io documentation for the dotnet. Unfortunately, I came across the fact that the referenced docker images in the Dockerfile were no longer available.

I've updated the reference to be 5.0 which is the current version and used that as the target executable runtime. I've tested with the default fn init and executes successfully with both fnproject.io and Oracle Functions.

Thanks, Jason.

+4 -4

0 comment

2 changed files

jlowe000

pr closed time in 11 days

issue commentbugsnag/bugsnag-dotnet

No request data in the report

I do deserialize it to a dictionary in the code above, but only if it's form data. Other formats like JSON are just sent raw, but support could be added.

The other thing to watch out for is if the POST body is very large (eg. for file uploads) in my case the site only sends POST requests as form data, so it's fine.

KKSzymanowski

comment created time in 12 days

issue openedexceptionless/Exceptionless

Docker production config?

The page at https://exceptionless.com/docs/self-hosting/docker/ says that all the Docker examples are "non-production" setups. How do I run Exceptionless via Docker in production?

created time in 13 days

startedElmahCore/ElmahCore

started time in 13 days

issue commentbugsnag/bugsnag-js

Browser bundle is quite large

I'm considering lazily loading Bugsnag to avoid the very large hit to bundle size. It means that I'll miss any errors that occur before Bugsnag is loaded, but at least it won't be on my app's critical path any more. The only issue is that I'm using React and I'm not sure what React will do if I swap out the error boundary when Bugsnag has loaded... It's likely that it'll remount the entire tree. I might need to create my own custom error boundary that only logs to Bugsnag once the library has loaded.

If you don't see a way to reduce bundle size, perhaps you could consider adding an 'official' lazy load feature? Run some basic init code that just attaches to the onerror event and queues up any unhandled errors, then when the app is idle (eg. using requestIdleCallback) load the heavyweight Bugsnag code? Similar to how Google Analytics works - Their bootstrap code asynchronosly loads the actual library, and creates an array to hold any events that are logged before the library has finished loading.

A lot of the Bugsnag code doesn't run unless there's a particular kind of error,

In that case, can you lazy load that code only when the particular kind of error is caught?

jescalan

comment created time in 13 days