@naturalcycles/backend-lib 4.14.1 → 4.15.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/cfg/tsconfig.json CHANGED
@@ -6,7 +6,7 @@
6
6
  {
7
7
  "compilerOptions": {
8
8
  // Target/module
9
- "target": "es2021",
9
+ "target": "es2022",
10
10
  "lib": ["esnext"], // add "dom" if needed
11
11
  "module": "commonjs",
12
12
  "moduleResolution": "node",
@@ -24,6 +24,10 @@
24
24
  "noImplicitOverride": true,
25
25
  "noUncheckedIndexedAccess": true,
26
26
  "noPropertyAccessFromIndexSignature": true,
27
+ // Otherwise since es2022 it defaults to true
28
+ // and starts to produce different/unexpected behavior
29
+ // https://angular.schule/blog/2022-11-use-define-for-class-fields
30
+ "useDefineForClassFields": false,
27
31
 
28
32
  // Enabled should be faster, but will catch less errors
29
33
  // "skipLibCheck": true,
@@ -6,7 +6,7 @@ const js_lib_1 = require("@naturalcycles/js-lib");
6
6
  const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors");
7
7
  const yaml = require("js-yaml");
8
8
  const APP_YAML_DEFAULT = () => ({
9
- runtime: 'nodejs16',
9
+ runtime: 'nodejs18',
10
10
  service: 'default',
11
11
  inbound_services: ['warmup'],
12
12
  instance_class: 'F1',
@@ -81,7 +81,6 @@ class SentrySharedService {
81
81
  // It's a Breadcrumb, not a console.log, because console.log are NOT automatically attached as Breadcrumbs in cron-job environments (outside of Express)
82
82
  this.sentry().addBreadcrumb({
83
83
  message: (0, nodejs_lib_1.inspectAny)(err, {
84
- includeErrorData: true,
85
84
  colors: false,
86
85
  }),
87
86
  // data: (err as AppError).data, // included in message
@@ -112,7 +111,6 @@ class SentrySharedService {
112
111
  error: (...args) => {
113
112
  const message = args
114
113
  .map(arg => (0, nodejs_lib_1.inspectAny)(arg, {
115
- includeErrorData: true,
116
114
  colors: false,
117
115
  }))
118
116
  .join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "4.14.1",
3
+ "version": "4.15.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install && patch-package",
6
6
  "serve": "APP_ENV=dev nodemon",
@@ -78,7 +78,7 @@
78
78
  "url": "https://github.com/NaturalCycles/backend-lib"
79
79
  },
80
80
  "engines": {
81
- "node": ">=16.15.0"
81
+ "node": ">=18.12.0"
82
82
  },
83
83
  "type": "commonjs",
84
84
  "description": "Standard library for making Express.js / AppEngine based backend services",
@@ -6,7 +6,7 @@ import { BackendCfg } from './backend.cfg.util'
6
6
  import { AppYaml, DeployInfo } from './deploy.model'
7
7
 
8
8
  const APP_YAML_DEFAULT = (): AppYaml => ({
9
- runtime: 'nodejs16',
9
+ runtime: 'nodejs18',
10
10
  service: 'default',
11
11
  inbound_services: ['warmup'],
12
12
  instance_class: 'F1',
@@ -93,7 +93,6 @@ export class SentrySharedService {
93
93
  // It's a Breadcrumb, not a console.log, because console.log are NOT automatically attached as Breadcrumbs in cron-job environments (outside of Express)
94
94
  this.sentry().addBreadcrumb({
95
95
  message: inspectAny(err, {
96
- includeErrorData: true,
97
96
  colors: false,
98
97
  }),
99
98
  // data: (err as AppError).data, // included in message
@@ -129,7 +128,6 @@ export class SentrySharedService {
129
128
  const message = args
130
129
  .map(arg =>
131
130
  inspectAny(arg, {
132
- includeErrorData: true,
133
131
  colors: false,
134
132
  }),
135
133
  )