Skip to content

Commit

Permalink
Gatsby5.24 (#231)
Browse files Browse the repository at this point in the history
* updated deps

* removed app insights
  • Loading branch information
pelikhan authored Oct 3, 2022
1 parent d97b932 commit b7a338a
Show file tree
Hide file tree
Showing 4 changed files with 483 additions and 567 deletions.
2 changes: 1 addition & 1 deletion jacdac-ts
Submodule jacdac-ts updated 1 files
+1 −1 jacdac-spec
69 changes: 34 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Microsoft",
"dependencies": {
"@axe-core/react": "^4.4.4",
"@axe-core/react": "^4.4.5",
"@blockly/block-dynamic-connection": "^0.1.14",
"@blockly/continuous-toolbox": "^1.0.18",
"@blockly/disable-top-blocks": "^0.1.20",
Expand All @@ -18,26 +18,25 @@
"@jscad/modeling": "^2.10.0",
"@jscad/stl-serializer": "^2.1.12",
"@mdx-js/react": "^2.1.3",
"@microsoft/applicationinsights-web": "^2.8.7",
"@mui/icons-material": "^5.10.3",
"@mui/lab": "^5.0.0-alpha.99",
"@mui/material": "^5.10.5",
"@mui/icons-material": "^5.10.6",
"@mui/lab": "^5.0.0-alpha.102",
"@mui/material": "^5.10.8",
"@octokit/core": "^4.0.5",
"@parcel/transformer-typescript-types": "^2.7.0",
"@react-three/drei": "^9.31.1",
"@react-three/fiber": "^8.7.4",
"@react-three/drei": "^9.32.7",
"@react-three/fiber": "^8.8.8",
"@tensorflow/tfjs": "3.8.0",
"@tidyjs/tidy": "^2.5.1",
"@types/json-schema": "^7.0.11",
"@types/react": "^18.0.20",
"@types/react": "^18.0.21",
"@types/three": "^0.144.0",
"@types/use-sync-external-store": "^0.0.3",
"@types/w3c-web-serial": "^1.0.2",
"@types/w3c-web-usb": "^1.0.6",
"@types/web-bluetooth": "^0.0.15",
"@types/wicg-file-system-access": "^2020.9.5",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"accessible-nprogress": "^2.1.2",
"assert": "^2.0.0",
"blockly": "^6.20210701.0",
Expand All @@ -47,35 +46,35 @@
"console-feed": "^3.4.0",
"d3-array": "^3.2.0",
"dns-packet": "^5.4.0",
"eslint": "^8.23.1",
"eslint": "^8.24.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.31.8",
"gatsby": "^4.23.0",
"gatsby-plugin-catch-links": "^4.23.0",
"gatsby-plugin-image": "^2.23.0",
"gatsby-plugin-manifest": "^4.23.0",
"gatsby-plugin-mdx": "^4.2.0",
"gatsby": "^4.24.1",
"gatsby-plugin-catch-links": "^4.24.0",
"gatsby-plugin-image": "^2.24.0",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby-plugin-mdx": "^4.3.0",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-offline": "^5.23.0",
"gatsby-plugin-offline": "^5.24.0",
"gatsby-plugin-robots-txt": "^1.7.1",
"gatsby-plugin-sharp": "^4.23.0",
"gatsby-plugin-sitemap": "^5.23.0",
"gatsby-plugin-sharp": "^4.24.0",
"gatsby-plugin-sitemap": "^5.24.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.27",
"gatsby-prismjs-dracula": "^0.1.15",
"gatsby-remark-autolink-headers": "^5.23.0",
"gatsby-remark-copy-linked-files": "^5.23.0",
"gatsby-remark-autolink-headers": "^5.24.0",
"gatsby-remark-copy-linked-files": "^5.24.0",
"gatsby-remark-external-links": "0.0.4",
"gatsby-remark-images": "^6.23.0",
"gatsby-remark-images": "^6.24.0",
"gatsby-remark-makecode": "^1.0.24",
"gatsby-remark-static-images": "^1.2.1",
"gatsby-source-filesystem": "^4.23.0",
"gatsby-source-filesystem": "^4.24.0",
"gatsby-theme-material-ui": "^5.3.0",
"gatsby-transformer-csv": "^4.23.0",
"gatsby-transformer-javascript-frontmatter": "^4.23.0",
"gatsby-transformer-json": "^4.23.0",
"gatsby-transformer-csv": "^4.24.0",
"gatsby-transformer-javascript-frontmatter": "^4.24.0",
"gatsby-transformer-json": "^4.24.0",
"gatsby-transformer-plaintext": "^2.0.0",
"gatsby-transformer-remark": "^5.23.0",
"gatsby-transformer-sharp": "^4.23.0",
"gatsby-transformer-remark": "^5.24.0",
"gatsby-transformer-sharp": "^4.24.0",
"gltfjsx": "^5.0.2",
"howler": "^2.2.3",
"is-svg": "^4.3.2",
Expand All @@ -87,12 +86,12 @@
"octokit-plugin-create-pull-request": "pelikhan/octokit-plugin-create-pull-request#forkbinarydist",
"paho-mqtt": "^1.1.0",
"papaparse": "^5.3.2",
"postcss": "^8.4.16",
"postcss": "^8.4.17",
"prettier": "2.7.1",
"prism-react-renderer": "^1.3.5",
"prismjs": "^1.29.0",
"prop-types": "^15.8.1",
"puppeteer": "^17.1.3",
"puppeteer": "^18.0.5",
"qrcode": "^1.5.1",
"react": "^18.2.0",
"react-blockly": "^7.0.1",
Expand All @@ -103,25 +102,25 @@
"react-markdown": "^8.0.3",
"react-minisearch": "^5.0.0",
"react-piano": "^3.1.3",
"react-player": "^2.10.1",
"react-simple-keyboard": "^3.4.208",
"react-player": "^2.11.0",
"react-simple-keyboard": "^3.4.221",
"react-vega": "^7.6.0",
"react-virtualized-auto-sizer": "^1.0.7",
"react-window": "^1.8.7",
"regenerator-runtime": "^0.13.9",
"remark-gfm": "^1",
"sanitize-html": "^2.7.2",
"simple-statistics": "^7.7.6",
"slug": "^8.0.0",
"three": "^0.144.0",
"slug": "^8.2.2",
"three": "^0.145.0",
"trim": "^1.0.1",
"use-debounce": "^7.0.1",
"use-editable": "^2.3.3",
"use-sync-external-store": "^1.2.0",
"util": "^0.12.4",
"vega": "^5.22.1",
"vega-lite": "^5.5.0",
"ws": "^8.8.1",
"ws": "^8.9.0",
"xmlhttprequest-ssl": "^2.0.0"
},
"keywords": [
Expand Down
20 changes: 18 additions & 2 deletions src/components/hooks/useAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React, { Component, ErrorInfo, ReactNode } from "react"
/*
import {
ApplicationInsights,
SeverityLevel,
} from "@microsoft/applicationinsights-web"
*/

export type EventProperties = Record<string, string | number | boolean>
const sha = process.env.GATSBY_GITHUB_SHA

Expand All @@ -22,12 +25,23 @@ function splitProperties(props: EventProperties) {
return { measurements, properties }
}

interface AppInsightsApp {
loadAppInsights(): void;
addTelemetryInitializer(handler: any): void;
trackPageView(msg: any): void;
trackEvent(msg: any): void;
trackException(msg: any): void;
trackTrace(msg: any, props: any): void;
}

const INSTRUMENTATION_KEY = "693860c3-5e90-4a8f-b161-407e7fc7d98d"
const appInsights: any =
const appInsights: AppInsightsApp =
typeof window !== "undefined" &&
INSTRUMENTATION_KEY &&
// ignore dev environment
!/http:\/\/localhost/.test(window.location.href) &&
undefined
/*
new ApplicationInsights({
config: {
instrumentationKey: INSTRUMENTATION_KEY,
Expand All @@ -38,7 +52,7 @@ const appInsights: any =
enableSessionStorageBuffer: false,
autoTrackPageVisitTime: true,
},
})
})*/
if (appInsights) {
appInsights.loadAppInsights()
appInsights.addTelemetryInitializer(envelope => {
Expand Down Expand Up @@ -70,11 +84,13 @@ const trackError: (exception: Error, properties?: EventProperties) => void =
: () => {}

const severities = {
/*
debug: SeverityLevel.Verbose,
warn: SeverityLevel.Warning,
error: SeverityLevel.Error,
info: SeverityLevel.Information,
log: SeverityLevel.Information,
*/
}
const trackTrace: (
message: string,
Expand Down
Loading

0 comments on commit b7a338a

Please sign in to comment.