studiokit-scaffolding-js 4.3.16 → 4.3.19-next.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const Route: import("react").FC<import("react-router").RouteProps>;
1
+ import { Route as NormalRoute } from 'react-router';
2
+ declare const Route: typeof NormalRoute;
3
3
  export default Route;
@@ -1,6 +1,6 @@
1
1
  export declare enum TIER {
2
2
  LOCAL = "local",
3
- DEV = "dev",
4
- PROD = "prod"
3
+ DEV = "development",
4
+ PROD = "production"
5
5
  }
6
6
  export default TIER;
@@ -4,7 +4,7 @@ exports.TIER = void 0;
4
4
  var TIER;
5
5
  (function (TIER) {
6
6
  TIER["LOCAL"] = "local";
7
- TIER["DEV"] = "dev";
8
- TIER["PROD"] = "prod";
7
+ TIER["DEV"] = "development";
8
+ TIER["PROD"] = "production";
9
9
  })(TIER = exports.TIER || (exports.TIER = {}));
10
10
  exports.default = TIER;
package/lib/startup.js CHANGED
@@ -25,6 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.startup = void 0;
26
26
  var applicationinsights_web_1 = require("@microsoft/applicationinsights-web");
27
27
  var Sentry = __importStar(require("@sentry/react"));
28
+ var tracing_1 = require("@sentry/tracing");
28
29
  var history_1 = require("history");
29
30
  var react_ga_1 = __importDefault(require("react-ga"));
30
31
  var configuration_1 = require("./constants/configuration");
@@ -75,12 +76,22 @@ var startup = function (appConfig, endpointMappings) {
75
76
  Sentry.init({
76
77
  dsn: appConfig.SENTRY_DSN,
77
78
  release: appConfig.VERSION,
79
+ environment: appConfig.TIER,
78
80
  debug: appConfig.NODE_ENV !== 'production',
81
+ // limit depth of data attached to breadcrumbs and contexts
79
82
  normalizeDepth: 15,
80
83
  beforeBreadcrumb: function (breadcrumb, hint) {
81
84
  // do not track console logs when running in development mode (locally)
82
85
  return breadcrumb.category === 'console' && appConfig.NODE_ENV !== 'production' ? null : breadcrumb;
83
- }
86
+ },
87
+ // enable performance tracing
88
+ integrations: [
89
+ new tracing_1.Integrations.BrowserTracing({
90
+ routingInstrumentation: Sentry.reactRouterV5Instrumentation(history)
91
+ })
92
+ ],
93
+ // set a uniform sample rate
94
+ tracesSampleRate: appConfig.SENTRY_TRACES_SAMPLE_RATE
84
95
  });
85
96
  }
86
97
  // Unhandled Errors
@@ -22,6 +22,7 @@ export interface AppConfiguration {
22
22
  };
23
23
  GOOGLE_ANALYTICS_TRACKING_ID?: string;
24
24
  SENTRY_DSN?: string;
25
+ SENTRY_TRACES_SAMPLE_RATE?: number;
25
26
  APP_INSIGHTS_KEY?: string;
26
27
  CLIENT_ID: string;
27
28
  CLIENT_SECRET: string;
package/lib/utils/date.js CHANGED
@@ -336,7 +336,7 @@ exports.getFormattedNumberedTimeWithoutZoneOrMeridian = getFormattedNumberedTime
336
336
  function getFullFormattedTimeZone(timeZoneId, showEasternZoneId, nowUtc) {
337
337
  if (timeZoneId === void 0) { timeZoneId = timezone_1.guessTimeZoneId(); }
338
338
  if (showEasternZoneId === void 0) { showEasternZoneId = false; }
339
- if (nowUtc === void 0) { nowUtc = new Date().toISOString(); }
339
+ if (nowUtc === void 0) { nowUtc = exports.getServerNowUtc().toISOString(); }
340
340
  var zone = moment_timezone_1.default.tz.zone(timeZoneId);
341
341
  if (!zone)
342
342
  return '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiokit-scaffolding-js",
3
- "version": "4.3.16",
3
+ "version": "4.3.19-next.1.1",
4
4
  "description": "Common scaffolding for Studio apps at Purdue",
5
5
  "repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
6
6
  "license": "MIT",
@@ -24,7 +24,8 @@
24
24
  "lint:styles": "stylelint \"src/**/*.css\"",
25
25
  "prepublishOnly": "yarn build",
26
26
  "test": "jest",
27
- "test:ci": "cross-env CI=true yarn test"
27
+ "test:ci": "cross-env CI=true yarn test",
28
+ "test:ci-junit": "cross-env CI=true npm run test -- --reporters='default' --reporters='jest-junit'"
28
29
  },
29
30
  "husky": {
30
31
  "hooks": {
@@ -80,7 +81,7 @@
80
81
  ]
81
82
  },
82
83
  "resolutions": {
83
- "@sentry/browser": "^6.0.2",
84
+ "@sentry/browser": "^6.14.1",
84
85
  "@types/react": "^17.0.0",
85
86
  "@types/react-router": "^5.1.11",
86
87
  "kind-of": "^6.0.3",
@@ -94,7 +95,8 @@
94
95
  "@material-ui/icons": "^4.11.2",
95
96
  "@microsoft/applicationinsights-web": "^2.5.11",
96
97
  "@redux-saga/types": "^1.1.0",
97
- "@sentry/react": "^6.0.2",
98
+ "@sentry/react": "^6.14.1",
99
+ "@sentry/tracing": "^6.14.1",
98
100
  "@types/history": "^4.7.8",
99
101
  "@types/lodash": "^4.14.168",
100
102
  "@types/pluralize": "^0.0.29",
@@ -171,6 +173,7 @@
171
173
  "identity-obj-proxy": "^3.0.0",
172
174
  "jest": "^26.6.0",
173
175
  "jest-each": "^26.6.0",
176
+ "jest-junit": "^12.0.0",
174
177
  "lint-staged": "^10.5.3",
175
178
  "mockdate": "^3.0.2",
176
179
  "npm-run-all": "^4.1.5",