@gravito/cosmos 4.0.0 → 4.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravito/cosmos",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Internationalization orbit for Gravito framework",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -32,7 +32,8 @@
32
32
  "test:ci": "bun test --timeout=10000 --coverage --coverage-reporter=lcov --coverage-dir coverage && COVERAGE_THRESHOLD=65 bun run --bun scripts/check-coverage.ts",
33
33
  "typecheck": "bun tsc -p tsconfig.json --noEmit --skipLibCheck",
34
34
  "test:unit": "bun test tests/ --timeout=10000",
35
- "test:integration": "test $(find tests -name '*.integration.test.ts' 2>/dev/null | wc -l) -gt 0 && find tests -name '*.integration.test.ts' -print0 | xargs -0 bun test --timeout=10000 || echo 'No integration tests found'"
35
+ "test:integration": "test $(find tests -name '*.integration.test.ts' 2>/dev/null | wc -l) -gt 0 && find tests -name '*.integration.test.ts' -print0 | xargs -0 bun test --timeout=10000 || echo 'No integration tests found'",
36
+ "publint": "publint"
36
37
  },
37
38
  "keywords": [
38
39
  "gravito",
@@ -1,4 +1,4 @@
1
- import { SystemException, type ExceptionOptions } from '@gravito/core'
1
+ import { type ExceptionOptions, SystemException } from '@gravito/core'
2
2
  import type { CosmosErrorCode } from './codes'
3
3
 
4
4
  /**
@@ -8,13 +8,10 @@ import type { CosmosErrorCode } from './codes'
8
8
  * @public
9
9
  */
10
10
  export class CosmosError extends SystemException {
11
- constructor(
12
- status: number,
13
- code: CosmosErrorCode,
14
- options: ExceptionOptions = {}
15
- ) {
11
+ override name = 'CosmosError'
12
+
13
+ constructor(status: number, code: CosmosErrorCode, options: ExceptionOptions = {}) {
16
14
  super(status, code, options)
17
- this.name = 'CosmosError'
18
15
  Object.setPrototypeOf(this, new.target.prototype)
19
16
  }
20
17
  }