@xyo-network/plugins 2.97.1 → 2.98.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/babel.config.json +2 -1
- package/eslint.config.flat.mjs +99 -0
- package/jest.config.ts +1 -1
- package/jestSetup/globalSetup.ts +4 -2
- package/jestSetup/globalTeardown.ts +4 -1
- package/package.json +23 -20
package/babel.config.json
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// eslint.config.mjs
|
|
2
|
+
|
|
3
|
+
import { typescriptConfig, importConfig, unicornConfig, prettierConfig, rulesConfig, workspacesConfig } from '@xylabs/eslint-config-flat'
|
|
4
|
+
import tsParser from '@typescript-eslint/parser'
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
{
|
|
8
|
+
ignores: ['.yarn', '.yarn/**', '**/dist/**', 'dist/**', 'build/**', 'node_modules/**'],
|
|
9
|
+
},
|
|
10
|
+
workspacesConfig,
|
|
11
|
+
typescriptConfig,
|
|
12
|
+
unicornConfig,
|
|
13
|
+
prettierConfig,
|
|
14
|
+
rulesConfig,
|
|
15
|
+
{
|
|
16
|
+
...importConfig,
|
|
17
|
+
rules: {
|
|
18
|
+
...importConfig.rules,
|
|
19
|
+
'import/no-deprecated': ['off'],
|
|
20
|
+
'import/no-internal-modules': ['off'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
rules: {
|
|
25
|
+
'no-unused-disable-directive': ['off'],
|
|
26
|
+
complexity: ['error', 18],
|
|
27
|
+
'max-depth': ['error', 6],
|
|
28
|
+
'max-lines': [
|
|
29
|
+
'error',
|
|
30
|
+
{
|
|
31
|
+
max: 512,
|
|
32
|
+
skipBlankLines: true,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
'max-nested-callbacks': ['error', 6],
|
|
36
|
+
'max-statements': ['error', 32],
|
|
37
|
+
'no-restricted-imports': [
|
|
38
|
+
'warn',
|
|
39
|
+
{
|
|
40
|
+
paths: [
|
|
41
|
+
'lodash',
|
|
42
|
+
'react-player',
|
|
43
|
+
'filepond',
|
|
44
|
+
'aos',
|
|
45
|
+
'react-icons',
|
|
46
|
+
'.',
|
|
47
|
+
'..',
|
|
48
|
+
'../..',
|
|
49
|
+
'../../..',
|
|
50
|
+
'../../../..',
|
|
51
|
+
'../../../../..',
|
|
52
|
+
'../../../../../..',
|
|
53
|
+
'../../../../../../..',
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
//'no-secrets/no-secrets': ['off'],
|
|
58
|
+
'no-tabs': ['error'],
|
|
59
|
+
'no-unused-vars': 'off',
|
|
60
|
+
'no-useless-escape': 'off',
|
|
61
|
+
quotes: [2, 'single', 'avoid-escape'],
|
|
62
|
+
'require-await': 'error',
|
|
63
|
+
semi: ['warn', 'never'],
|
|
64
|
+
'no-restricted-imports': [
|
|
65
|
+
'warn',
|
|
66
|
+
{
|
|
67
|
+
paths: [
|
|
68
|
+
'@types/node',
|
|
69
|
+
'@xyo-network/archivist',
|
|
70
|
+
'@xyo-network/bridge',
|
|
71
|
+
'@xyo-network/core',
|
|
72
|
+
'@xyo-network/diviner',
|
|
73
|
+
'@xyo-network/module',
|
|
74
|
+
'@xyo-network/modules',
|
|
75
|
+
'@xyo-network/node',
|
|
76
|
+
'@xyo-network/sdk',
|
|
77
|
+
'@xyo-network/plugins',
|
|
78
|
+
'@xyo-network/protocol',
|
|
79
|
+
'@xyo-network/sentinel',
|
|
80
|
+
'@xyo-network/witness',
|
|
81
|
+
'@xyo-network/core-payload-plugins',
|
|
82
|
+
'react-player',
|
|
83
|
+
'filepond',
|
|
84
|
+
'aos',
|
|
85
|
+
'react-icons',
|
|
86
|
+
'.',
|
|
87
|
+
'..',
|
|
88
|
+
'../..',
|
|
89
|
+
'../../..',
|
|
90
|
+
'../../../..',
|
|
91
|
+
'../../../../..',
|
|
92
|
+
'../../../../../..',
|
|
93
|
+
'../../../../../../..',
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
]
|
package/jest.config.ts
CHANGED
|
@@ -10,7 +10,7 @@ const generateJestConfig = ({ esModules }: { esModules: string[] }) => {
|
|
|
10
10
|
preset: 'ts-jest/presets/default-esm',
|
|
11
11
|
setupFiles: ['dotenv/config'],
|
|
12
12
|
setupFilesAfterEnv: ['jest-sorted', 'jest-extended/all', './jestSetup/setupFiles.ts'],
|
|
13
|
-
testRegex:
|
|
13
|
+
testRegex: String.raw`(/__tests__/.*|(\.|/)((!perf\.)test|spec))\.tsx?$`,
|
|
14
14
|
testTimeout: 200_000,
|
|
15
15
|
transform: {
|
|
16
16
|
[`(${esModulesList}).+\\.js$`]: 'babel-jest',
|
package/jestSetup/globalSetup.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-var */
|
|
2
1
|
import { config } from 'dotenv'
|
|
3
2
|
config()
|
|
4
3
|
import { Config } from 'jest'
|
|
@@ -6,6 +5,7 @@ import { SuperTest, Test } from 'supertest'
|
|
|
6
5
|
|
|
7
6
|
// Augment global scope with shared variables (must be var)
|
|
8
7
|
declare global {
|
|
8
|
+
// eslint-disable-next-line no-var
|
|
9
9
|
var req: SuperTest<Test>
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -13,4 +13,6 @@ declare global {
|
|
|
13
13
|
* Jest global setup method runs before any tests are run
|
|
14
14
|
* https://jestjs.io/docs/configuration#globalsetup-string
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
const setup = async (_globalConfig: Config, _projectConfig: Config) => {}
|
|
17
|
+
// eslint-disable-next-line id-denylist
|
|
18
|
+
module.exports = setup
|
|
@@ -6,4 +6,7 @@ import { Config } from 'jest'
|
|
|
6
6
|
* Jest global teardown method runs after all tests are run
|
|
7
7
|
* https://jestjs.io/docs/configuration#globalteardown-string
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
const teardown = async (_globalConfig: Config, _projectConfig: Config) => {}
|
|
11
|
+
// eslint-disable-next-line id-denylist
|
|
12
|
+
module.exports = teardown
|
package/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"packages/**/*"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xyo-network/payload-plugins": "
|
|
17
|
-
"@xyo-network/payloadset-plugins": "
|
|
16
|
+
"@xyo-network/payload-plugins": "^2.98.1",
|
|
17
|
+
"@xyo-network/payloadset-plugins": "^2.98.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@babel/core": "^7.24.7",
|
|
@@ -22,22 +22,23 @@
|
|
|
22
22
|
"@babel/preset-typescript": "^7.24.7",
|
|
23
23
|
"@types/jest": "^29.5.12",
|
|
24
24
|
"@types/supertest": "^6.0.2",
|
|
25
|
-
"@xylabs/eslint-config": "^3.11.
|
|
26
|
-
"@xylabs/
|
|
27
|
-
"@xylabs/
|
|
28
|
-
"@xylabs/
|
|
29
|
-
"@xylabs/tsconfig
|
|
30
|
-
"@
|
|
31
|
-
"@xyo-network/
|
|
32
|
-
"@xyo-network/
|
|
33
|
-
"@xyo-network/
|
|
34
|
-
"@xyo-network/
|
|
35
|
-
"@xyo-network/manifest
|
|
36
|
-
"@xyo-network/
|
|
37
|
-
"@xyo-network/
|
|
25
|
+
"@xylabs/eslint-config": "^3.11.12",
|
|
26
|
+
"@xylabs/eslint-config-flat": "^3.11.12",
|
|
27
|
+
"@xylabs/forget": "^3.5.2",
|
|
28
|
+
"@xylabs/ts-scripts-yarn3": "^3.11.12",
|
|
29
|
+
"@xylabs/tsconfig": "^3.11.12",
|
|
30
|
+
"@xylabs/tsconfig-dom-jest": "^3.11.12",
|
|
31
|
+
"@xyo-network/account": "^2.108.0",
|
|
32
|
+
"@xyo-network/archivist-memory": "^2.108.0",
|
|
33
|
+
"@xyo-network/boundwitness-builder": "^2.108.0",
|
|
34
|
+
"@xyo-network/hash": "^2.108.0",
|
|
35
|
+
"@xyo-network/manifest": "^2.108.0",
|
|
36
|
+
"@xyo-network/manifest-wrapper": "^2.108.0",
|
|
37
|
+
"@xyo-network/node-memory": "^2.108.0",
|
|
38
|
+
"@xyo-network/payload-builder": "^2.108.0",
|
|
38
39
|
"babel-jest": "^29.7.0",
|
|
39
40
|
"dotenv": "^16.4.5",
|
|
40
|
-
"eslint": "^
|
|
41
|
+
"eslint": "^9.6.0",
|
|
41
42
|
"ethers": "^6.13.1",
|
|
42
43
|
"jest": "^29.7.0",
|
|
43
44
|
"jest-docblock": "^29.7.0",
|
|
@@ -51,16 +52,18 @@
|
|
|
51
52
|
"supertest": "^7.0.0",
|
|
52
53
|
"ts-jest": "^29.1.5",
|
|
53
54
|
"ts-node": "^10.9.2",
|
|
54
|
-
"typedoc": "^0.
|
|
55
|
-
"typescript": "^5.5.
|
|
55
|
+
"typedoc": "^0.26.3",
|
|
56
|
+
"typescript": "^5.5.3"
|
|
56
57
|
},
|
|
57
58
|
"resolutions": {
|
|
58
59
|
"axios": "^1",
|
|
59
60
|
"bn.js": "^5",
|
|
60
|
-
"
|
|
61
|
+
"eslint": "^8",
|
|
62
|
+
"ethers": "^6",
|
|
61
63
|
"mapbox-gl": "^2",
|
|
62
64
|
"quick-lru": "^5"
|
|
63
65
|
},
|
|
66
|
+
"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",
|
|
64
67
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
65
68
|
"exports": {
|
|
66
69
|
".": {
|
|
@@ -110,7 +113,7 @@
|
|
|
110
113
|
"build-typedoc-site": "typedoc"
|
|
111
114
|
},
|
|
112
115
|
"sideEffects": false,
|
|
113
|
-
"version": "2.
|
|
116
|
+
"version": "2.98.1",
|
|
114
117
|
"packageManager": "yarn@4.3.1",
|
|
115
118
|
"volta": {
|
|
116
119
|
"node": "22.3.0",
|