@akinon/next 1.39.0 → 1.40.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.40.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b5d5c5c: ZERO-2683: Add conditional initialization for Sentry based on type
8
+ - 05b1fe1: ZERO-2674: Update getMenu query to accept depth and parent parameters
9
+
3
10
  ## 1.39.0
4
11
 
5
12
  ### Minor Changes
@@ -31,6 +31,11 @@ export interface AutocompleteResponse {
31
31
  }>;
32
32
  }
33
33
 
34
+ export interface GetMenuParams {
35
+ depth: number;
36
+ parent?: string;
37
+ }
38
+
34
39
  export interface GetLanguageResponse {
35
40
  active_language: string;
36
41
  default_language: string;
@@ -80,9 +85,9 @@ export const miscApi = api.injectEndpoints({
80
85
  url: buildClientRequestUrl(widgets.getWidget(slug))
81
86
  })
82
87
  }),
83
- getMenu: builder.query<MenuItemType[], number>({
84
- query: (depth) => ({
85
- url: buildClientRequestUrl(misc.menus(depth))
88
+ getMenu: builder.query<MenuItemType[], GetMenuParams>({
89
+ query: ({ depth, parent }) => ({
90
+ url: buildClientRequestUrl(misc.menus(depth, parent))
86
91
  }),
87
92
  transformResponse: (response: { menu: MenuItemType[] }) => {
88
93
  return response.menu;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.39.0",
4
+ "version": "1.40.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "@typescript-eslint/eslint-plugin": "6.7.4",
35
35
  "@typescript-eslint/parser": "6.7.4",
36
36
  "eslint": "^8.14.0",
37
- "@akinon/eslint-plugin-projectzero": "1.39.0",
37
+ "@akinon/eslint-plugin-projectzero": "1.40.0",
38
38
  "eslint-config-prettier": "8.5.0"
39
39
  }
40
40
  }
package/sentry/index.ts CHANGED
@@ -11,17 +11,19 @@ export const initSentry = (
11
11
 
12
12
  // TODO: Remove Zero Project DSN
13
13
 
14
- Sentry.init({
15
- dsn:
16
- SENTRY_DSN ||
17
- 'https://d8558ef8997543deacf376c7d8d7cf4b@o64293.ingest.sentry.io/4504338423742464',
18
- initialScope: {
19
- tags: {
20
- APP_TYPE: 'ProjectZeroNext',
21
- TYPE: type
22
- }
23
- },
24
- tracesSampleRate: 1.0,
25
- integrations: []
26
- });
14
+ if (type === 'Server' || type === 'Edge') {
15
+ Sentry.init({
16
+ dsn:
17
+ SENTRY_DSN ||
18
+ 'https://d8558ef8997543deacf376c7d8d7cf4b@o64293.ingest.sentry.io/4504338423742464',
19
+ initialScope: {
20
+ tags: {
21
+ APP_TYPE: 'ProjectZeroNext',
22
+ TYPE: type
23
+ }
24
+ },
25
+ tracesSampleRate: 1.0,
26
+ integrations: []
27
+ });
28
+ }
27
29
  };