@xyo-network/sdk-js 3.6.0-rc.8 → 3.6.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/eslint.config.mjs CHANGED
@@ -12,7 +12,6 @@ export default [
12
12
  {
13
13
  ignores: [
14
14
  '.yarn/**',
15
- 'jest.config.cjs',
16
15
  '**/dist/**',
17
16
  'dist',
18
17
  'build/**',
@@ -28,10 +27,7 @@ export default [
28
27
  rulesConfig,
29
28
  {
30
29
  ...typescriptConfig,
31
- rules: {
32
- ...typescriptConfig.rules,
33
- '@typescript-eslint/consistent-type-imports': ['warn'],
34
- },
30
+ rules: { ...typescriptConfig.rules },
35
31
  },
36
32
  {
37
33
  rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/sdk-js",
3
- "version": "3.6.0-rc.8",
3
+ "version": "3.6.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -42,26 +42,16 @@
42
42
  ],
43
43
  "scripts": {
44
44
  "build": "xy build && xy statics",
45
+ "build-tests": "tsc --noEmit --lib dom,esnext",
45
46
  "build-typedoc-site": "typedoc",
46
47
  "compile": "./scripts/clear-scrollback-buffer.sh && yarn xy compile",
47
- "coverage": "yarn jest --coverage --forceExit",
48
+ "coverage": "vitest --coverage --watch false",
48
49
  "deploy": "xy deploy",
49
50
  "free-3033": "kill -9 $(lsof -t -i :3033)",
50
51
  "free-8080": "kill -9 $(lsof -t -i :8080)",
51
52
  "free-mongo": "kill -9 $(lsof -t -i :55391) && kill -9 $(lsof -t -i :55393)",
52
53
  "lint-pkg": "npmPkgJsonLint .",
53
- "perf": "yarn jest -c jest.config.perf.cjs",
54
- "test": "vitest --watch false",
55
- "test-esm": "FORCE_COLOR=1 && node $(yarn jest --no-cache --forceExit)",
56
- "test:ci": "jest --runInBand --coverage --forceExit --passWithNoTests",
57
- "test:hash-perf": "jest packages/protocol/packages/core/packages/hash/src/spec/PayloadHasher.bigobj.perf.spec.ts -c ./jest.config.no-mongo.ts",
58
- "test:hash-perf-parallel": "jest packages/protocol/packages/core/packages/hash/src/spec/PayloadHasher.bigobj-parallel.perf.spec.ts -c ./jest.config.no-mongo.ts",
59
- "test:module": "jest . --passWithNoTests --forceExit -- --group=module",
60
- "test:no-mongo": "jest ${0} --passWithNoTests --forceExit -c ./jest.config.no-mongo.ts -- --group=-mongo",
61
- "test:no-slow": "jest . --passWithNoTests --forceExit -- --group=-slow",
62
- "test:sentinel": "jest . --passWithNoTests --forceExit -- --group=sentinel",
63
- "test:thumbnail": "jest . --passWithNoTests --forceExit -- --group=thumbnail",
64
- "testx": "jest ${0} --passWithNoTests --forceExit -c ./jest.config.no-mongo.ts -- --group=-mongo"
54
+ "test": "vitest --watch false"
65
55
  },
66
56
  "resolutions": {
67
57
  "axios": "^1",
@@ -70,12 +60,12 @@
70
60
  "quick-lru": "^5"
71
61
  },
72
62
  "dependencies": {
73
- "@xyo-network/core-payload-plugins": "^3.6.0-rc.8",
74
- "@xyo-network/manifest": "^3.6.0-rc.8",
75
- "@xyo-network/modules": "^3.6.0-rc.8",
76
- "@xyo-network/protocol": "^3.6.0-rc.8",
77
- "@xyo-network/sdk-utils": "^3.6.0-rc.8",
78
- "@xyo-network/shared": "^3.6.0-rc.8"
63
+ "@xyo-network/core-payload-plugins": "^3.6.0",
64
+ "@xyo-network/manifest": "^3.6.0",
65
+ "@xyo-network/modules": "^3.6.0",
66
+ "@xyo-network/protocol": "^3.6.0",
67
+ "@xyo-network/sdk-utils": "^3.6.0",
68
+ "@xyo-network/shared": "^3.6.0"
79
69
  },
80
70
  "devDependencies": {
81
71
  "@babel/core": "^7.26.0",
@@ -85,11 +75,12 @@
85
75
  "@types/supertest": "^6.0.2",
86
76
  "@typescript-eslint/eslint-plugin": "^8.18.1",
87
77
  "@typescript-eslint/parser": "^8.18.1",
88
- "@xylabs/eslint-config-flat": "^4.2.4",
89
- "@xylabs/forget": "^4.4.16",
90
- "@xylabs/ts-scripts-yarn3": "^4.2.4",
91
- "@xylabs/tsconfig": "^4.2.4",
92
- "@xylabs/vitest-extended": "^4.4.16",
78
+ "@vitest/coverage-v8": "^2.1.8",
79
+ "@xylabs/eslint-config-flat": "^4.2.6",
80
+ "@xylabs/forget": "^4.4.26",
81
+ "@xylabs/ts-scripts-yarn3": "^4.2.6",
82
+ "@xylabs/tsconfig": "^4.2.6",
83
+ "@xylabs/vitest-extended": "^4.4.26",
93
84
  "dotenv": "^16.4.7",
94
85
  "eslint": "^9.17.0",
95
86
  "eslint-import-resolver-typescript": "^3.7.0",
@@ -111,6 +102,5 @@
111
102
  "publishConfig": {
112
103
  "access": "public"
113
104
  },
114
- "resolutions_comment": "We set the above resolutions to make sure we pull in the latest versions of these packages even if some sub packages request earlier versions",
115
- "stableVersion": "3.5.2"
105
+ "resolutions_comment": "We set the above resolutions to make sure we pull in the latest versions of these packages even if some sub packages request earlier versions"
116
106
  }
package/vitest.config.ts CHANGED
@@ -3,4 +3,16 @@ import { defineConfig } from 'vitest/config'
3
3
 
4
4
  dotenv.config()
5
5
 
6
- export default defineConfig({ test: { environment: 'node' } })
6
+ export default defineConfig({
7
+ test: {
8
+ globals: true,
9
+ environment: 'node',
10
+ coverage: {
11
+ provider: 'v8', // Use V8 native coverage provider
12
+ reporter: ['text', 'html', 'lcov'], // Output formats
13
+ // reportsDirectory: './coverage', // Directory for coverage output
14
+ // include: ['**/src/**/*.ts'], // Include files to track
15
+ // exclude: ['node_modules', '**/src/*.spec.*'], // Exclude unnecessary files
16
+ },
17
+ },
18
+ })
package/jest.config.ts DELETED
@@ -1,31 +0,0 @@
1
- const generateJestConfig = ({ esModules }: { esModules: string[] }) => {
2
- const esModulesList = Array.isArray(esModules) ? esModules.join('|') : esModules
3
- return {
4
- coveragePathIgnorePatterns: ['<rootDir>/(.*)/dist'],
5
- extensionsToTreatAsEsm: ['.ts'],
6
- globalSetup: './jestSetup/globalSetup.ts',
7
- globalTeardown: './jestSetup/globalTeardown.ts',
8
- moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1' },
9
- preset: 'ts-jest',
10
- setupFiles: ['dotenv/config'],
11
- setupFilesAfterEnv: ['jest-sorted', 'jest-extended/all', './jestSetup/setupFiles.ts'],
12
- testEnvironment: 'node',
13
- testRegex: String.raw`(/__tests__/.*|(\.|/)((!perf\.)test|spec))\.tsx?$`,
14
- testTimeout: 200_000,
15
- transform: {
16
- [`(${esModulesList}).+\\.js$`]: 'babel-jest',
17
- '^.+\\.tsx?$': [
18
- 'ts-jest',
19
- {
20
- tsconfig: 'tsconfig.test.json',
21
- useESM: true,
22
- },
23
- ],
24
- },
25
- transformIgnorePatterns: [`./node_modules/(?!${esModulesList})`],
26
- }
27
- }
28
-
29
- const config = generateJestConfig({ esModules: ['is-ip', 'ip-regex', 'lodash-es', 'uuid', 'lodash-es', 'quick-lru'] })
30
-
31
- export default config