@sentry/ember 8.54.0 → 9.0.0-alpha.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2024 Functional Software, Inc. dba Sentry
3
+ Copyright (c) 2020 Functional Software, Inc. dba Sentry
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
@@ -18,7 +18,7 @@ import {
18
18
  getClient,
19
19
  startInactiveSpan,
20
20
  } from '@sentry/browser';
21
- import { GLOBAL_OBJ, browserPerformanceTimeOrigin, timestampInSeconds } from '@sentry/core';
21
+ import { GLOBAL_OBJ, addIntegration, browserPerformanceTimeOrigin, timestampInSeconds } from '@sentry/core';
22
22
  import type { Span } from '@sentry/core';
23
23
  import type { ExtendedBackburner } from '@sentry/ember/runloop';
24
24
  import type { EmberRouterMain, EmberSentryConfig, GlobalConfig, OwnConfig } from '../types';
@@ -85,7 +85,7 @@ function getTransitionInformation(
85
85
  }
86
86
 
87
87
  function getLocationURL(location: EmberRouterMain['location']): string {
88
- if (!location || !location.getURL || !location.formatURL) {
88
+ if (!location?.getURL || !location?.formatURL) {
89
89
  return '';
90
90
  }
91
91
  const url = location.formatURL(location.getURL());
@@ -366,8 +366,9 @@ function _instrumentInitialLoad(config: EmberSentryConfig): void {
366
366
  return;
367
367
  }
368
368
 
369
+ const origin = browserPerformanceTimeOrigin();
369
370
  // Split performance check in two so clearMarks still happens even if timeOrigin isn't available.
370
- if (!HAS_PERFORMANCE_TIMING || browserPerformanceTimeOrigin === undefined) {
371
+ if (!HAS_PERFORMANCE_TIMING || origin === undefined) {
371
372
  return;
372
373
  }
373
374
  const measureName = '@sentry/ember:initial-load';
@@ -383,7 +384,7 @@ function _instrumentInitialLoad(config: EmberSentryConfig): void {
383
384
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
384
385
  const measure = measures[0]!;
385
386
 
386
- const startTime = (measure.startTime + browserPerformanceTimeOrigin) / 1000;
387
+ const startTime = (measure.startTime + origin) / 1000;
387
388
  const endTime = startTime + measure.duration / 1000;
388
389
 
389
390
  startInactiveSpan({
@@ -410,7 +411,7 @@ function _hasPerformanceSupport(): { HAS_PERFORMANCE: boolean; HAS_PERFORMANCE_T
410
411
  measure?: Performance['measure'];
411
412
  getEntriesByName?: Performance['getEntriesByName'];
412
413
  };
413
- const HAS_PERFORMANCE = Boolean(_performance && _performance.clearMarks && _performance.clearMeasures);
414
+ const HAS_PERFORMANCE = Boolean(_performance?.clearMarks && _performance.clearMeasures);
414
415
  const HAS_PERFORMANCE_TIMING = Boolean(
415
416
  _performance.measure && _performance.getEntriesByName && browserPerformanceTimeOrigin !== undefined,
416
417
  );
@@ -439,12 +440,8 @@ export async function instrumentForPerformance(appInstance: ApplicationInstance)
439
440
  });
440
441
 
441
442
  const client = getClient<BrowserClient>();
442
-
443
443
  const isAlreadyInitialized = macroCondition(isTesting()) ? !!client?.getIntegrationByName('BrowserTracing') : false;
444
-
445
- if (client && client.addIntegration) {
446
- client.addIntegration(browserTracing);
447
- }
444
+ addIntegration(browserTracing);
448
445
 
449
446
  // We _always_ call this, as it triggers the page load & navigation spans
450
447
  _instrumentNavigation(appInstance, config, startBrowserTracingPageLoadSpan, startBrowserTracingNavigationSpan);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/ember",
3
- "version": "8.54.0",
3
+ "version": "9.0.0-alpha.1",
4
4
  "description": "Official Sentry SDK for Ember.js",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember",
@@ -32,13 +32,21 @@
32
32
  "dependencies": {
33
33
  "@babel/core": "^7.24.4",
34
34
  "@embroider/macros": "^1.16.0",
35
- "@sentry/browser": "8.54.0",
36
- "@sentry/core": "8.54.0",
35
+ "@sentry/browser": "9.0.0-alpha.1",
36
+ "@sentry/core": "9.0.0-alpha.1",
37
37
  "ember-auto-import": "^2.7.2",
38
38
  "ember-cli-babel": "^8.2.0",
39
39
  "ember-cli-htmlbars": "^6.1.1",
40
40
  "ember-cli-typescript": "^5.3.0"
41
41
  },
42
+ "peerDependencies": {
43
+ "ember-cli": ">=4"
44
+ },
45
+ "peerDependenciesMeta": {
46
+ "ember-cli": {
47
+ "optional": true
48
+ }
49
+ },
42
50
  "devDependencies": {
43
51
  "@ember/optional-features": "~1.3.0",
44
52
  "@ember/test-helpers": "4.0.4",
@@ -72,7 +80,7 @@
72
80
  "webpack": "~5.95.0"
73
81
  },
74
82
  "engines": {
75
- "node": ">=14.18"
83
+ "node": ">=18"
76
84
  },
77
85
  "ember": {
78
86
  "edition": "octane"
package/tsconfig.json CHANGED
@@ -7,7 +7,6 @@
7
7
  "moduleResolution": "node",
8
8
  "allowSyntheticDefaultImports": true,
9
9
  "alwaysStrict": true,
10
- "noImplicitUseStrict": false,
11
10
  "strictNullChecks": true,
12
11
  "strictPropertyInitialization": true,
13
12
  "noEmitOnError": false,
@@ -1,3 +1,3 @@
1
- if (window.performance && window.performance.mark) {
1
+ if (window.performance?.mark) {
2
2
  window.performance.mark('@sentry/ember:initial-load-end');
3
3
  }
@@ -1,3 +1,3 @@
1
- if (window.performance && window.performance.mark) {
1
+ if (window.performance?.mark) {
2
2
  window.performance.mark('@sentry/ember:initial-load-start');
3
3
  }