@xylabs/sdk-js 4.3.3 → 4.3.5

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
@@ -1,15 +1,13 @@
1
- // eslint.config.mjs
2
-
3
- import { typescriptConfig,
1
+ import {
2
+ typescriptConfig,
4
3
  unicornConfig,
5
4
  workspacesConfig,
6
5
  rulesConfig,
7
- importConfig } from '@xylabs/eslint-config-flat'
6
+ importConfig,
7
+ } from '@xylabs/eslint-config-flat'
8
8
 
9
9
  export default [
10
- {
11
- ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**', 'public', '.storybook', 'storybook-static', 'eslint.config.mjs'],
12
- },
10
+ { ignores: ['.yarn', 'packages/*/dist/**', 'dist', 'build', '**/build/**', 'node_modules/**', 'public', 'storybook-static'] },
13
11
  unicornConfig,
14
12
  workspacesConfig,
15
13
  rulesConfig,
@@ -18,7 +16,7 @@ export default [
18
16
  ...typescriptConfig,
19
17
  rules: {
20
18
  ...typescriptConfig.rules,
21
- '@typescript-eslint/consistent-type-imports': ['warn']
19
+ '@typescript-eslint/consistent-type-imports': ['warn'],
22
20
  },
23
21
  },
24
22
  {
package/knip.config.ts ADDED
@@ -0,0 +1,46 @@
1
+ import type { KnipConfig } from 'knip'
2
+
3
+ const config: KnipConfig = {
4
+ ignoreDependencies: ['@xylabs/ts-scripts-yarn3'],
5
+ ignore: ['xy.config.ts'],
6
+ entry: ['src/index.ts'],
7
+ workspaces: {
8
+ '.': {
9
+ entry: ['src/index.ts'],
10
+ ignore: ['xy.config.ts'],
11
+ },
12
+ 'packages/buffer': {
13
+ ignoreDependencies: ['buffer'],
14
+ ignore: ['xy.config.ts'],
15
+ entry: ['src/index.ts', 'src/node/index.ts', 'src/browser/index.ts'],
16
+ },
17
+ 'packages/*': {
18
+ entry: ['src/index.ts', 'src/node/index.ts', 'src/browser/index.ts', 'src/neutral/index.ts'],
19
+ ignore: ['xy.config.ts'],
20
+ },
21
+ 'packages/threads': {
22
+ entry: [
23
+ 'src/index.ts',
24
+ 'src/master/implementation.browser.ts',
25
+ 'src/master/implementation.node.ts',
26
+ 'index.mjs',
27
+ 'observable.{mjs,js}',
28
+ 'register.{mjs,js}',
29
+ 'worker.{mjs,js}',
30
+ 'src/master/register.ts',
31
+ 'src/worker/bundle-entry.ts',
32
+ 'test-tooling/**/*.{ts,js}',
33
+ 'test/**/*.{ts,js}',
34
+ ],
35
+ ignore: ['xy.config.ts'],
36
+ },
37
+ },
38
+ typescript: {
39
+ config: [
40
+ 'tsconfig.json',
41
+ 'packages/**/*/tsconfig.json',
42
+ ],
43
+ },
44
+ }
45
+
46
+ export default config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/sdk-js",
3
- "version": "4.3.3",
3
+ "version": "4.3.5",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -40,57 +40,54 @@
40
40
  "scripts": {
41
41
  "build-typedoc-site": "xy gen-docs @xylabs/sdk-js"
42
42
  },
43
+ "resolutions": {
44
+ "eslint": "9.14.0"
45
+ },
43
46
  "dependencies": {
44
- "@xylabs/api": "^4.3.3",
45
- "@xylabs/array": "^4.3.3",
46
- "@xylabs/assert": "^4.3.3",
47
- "@xylabs/axios": "^4.3.3",
48
- "@xylabs/crypto": "^4.3.3",
49
- "@xylabs/decimal-precision": "^4.3.3",
50
- "@xylabs/delay": "^4.3.3",
51
- "@xylabs/error": "^4.3.3",
52
- "@xylabs/eth-address": "^4.3.3",
53
- "@xylabs/exists": "^4.3.3",
54
- "@xylabs/forget": "^4.3.3",
55
- "@xylabs/function-name": "^4.3.3",
56
- "@xylabs/hex": "^4.3.3",
57
- "@xylabs/log": "^4.3.3",
58
- "@xylabs/logger": "^4.3.3",
59
- "@xylabs/object": "^4.3.3",
60
- "@xylabs/platform": "^4.3.3",
61
- "@xylabs/profile": "^4.3.3",
62
- "@xylabs/promise": "^4.3.3",
63
- "@xylabs/retry": "^4.3.3",
64
- "@xylabs/set": "^4.3.3",
65
- "@xylabs/static-implements": "^4.3.3",
66
- "@xylabs/timer": "^4.3.3",
67
- "@xylabs/url": "^4.3.3"
47
+ "@xylabs/api": "^4.3.5",
48
+ "@xylabs/array": "^4.3.5",
49
+ "@xylabs/assert": "^4.3.5",
50
+ "@xylabs/axios": "^4.3.5",
51
+ "@xylabs/crypto": "^4.3.5",
52
+ "@xylabs/decimal-precision": "^4.3.5",
53
+ "@xylabs/delay": "^4.3.5",
54
+ "@xylabs/error": "^4.3.5",
55
+ "@xylabs/eth-address": "^4.3.5",
56
+ "@xylabs/exists": "^4.3.5",
57
+ "@xylabs/forget": "^4.3.5",
58
+ "@xylabs/function-name": "^4.3.5",
59
+ "@xylabs/hex": "^4.3.5",
60
+ "@xylabs/log": "^4.3.5",
61
+ "@xylabs/logger": "^4.3.5",
62
+ "@xylabs/object": "^4.3.5",
63
+ "@xylabs/platform": "^4.3.5",
64
+ "@xylabs/profile": "^4.3.5",
65
+ "@xylabs/promise": "^4.3.5",
66
+ "@xylabs/retry": "^4.3.5",
67
+ "@xylabs/set": "^4.3.5",
68
+ "@xylabs/static-implements": "^4.3.5",
69
+ "@xylabs/timer": "^4.3.5",
70
+ "@xylabs/url": "^4.3.5"
68
71
  },
69
72
  "devDependencies": {
70
- "@stylistic/eslint-plugin": "^2.9.0",
71
- "@types/jest": "^29.5.14",
72
- "@types/supertest": "^6.0.2",
73
- "@typescript-eslint/eslint-plugin": "^8.11.0",
74
- "@typescript-eslint/parser": "^8.11.0",
75
- "@xylabs/config": "^4.2.3",
76
- "@xylabs/eslint-config-flat": "^4.2.3",
77
- "@xylabs/ts-scripts-yarn3": "^4.2.3",
78
- "@xylabs/tsconfig": "^4.2.3",
79
- "@xylabs/tsconfig-jest": "^4.1.0",
73
+ "@types/node": "^22.9.0",
74
+ "@typescript-eslint/eslint-plugin": "^8.14.0",
75
+ "@typescript-eslint/parser": "^8.14.0",
76
+ "@xylabs/config": "^4.2.4",
77
+ "@xylabs/eslint-config-flat": "^4.2.4",
78
+ "@xylabs/ts-scripts-yarn3": "^4.2.4",
79
+ "@xylabs/tsconfig": "^4.2.4",
80
80
  "dotenv": "^16.4.5",
81
- "eslint": "^9.13.0",
81
+ "eslint": "^9.15.0",
82
82
  "eslint-import-resolver-typescript": "^3.6.3",
83
- "eslint-plugin-import": "^2.31.0",
84
- "jest": "^29.7.0",
85
- "jest-environment-jsdom": "^29.7.0",
86
- "jest-extended": "^4.0.2",
87
- "jest-sorted": "^1.0.15",
83
+ "knip": "^5.37.0",
88
84
  "reflect-metadata": "^0.2.2",
89
- "supertest": "^7.0.0",
90
- "tslib": "^2.8.0",
91
- "typedoc": "^0.26.10",
85
+ "ts-node": "^10.9.2",
86
+ "tslib": "^2.8.1",
87
+ "typedoc": "^0.26.11",
92
88
  "typescript": "^5.6.3",
93
- "vitest": "^2.1.3"
89
+ "vite": "^5.4.11",
90
+ "vitest": "^2.1.5"
94
91
  },
95
92
  "packageManager": "yarn@4.5.1",
96
93
  "engines": {
package/vitest.config.ts CHANGED
@@ -3,10 +3,4 @@ import { defineConfig } from 'vitest/config'
3
3
 
4
4
  dotenv.config()
5
5
 
6
- export default defineConfig({
7
- test: {
8
- globals: true,
9
- include: ['**/*.{spec,spec}.?(c|m)[jt]s?(x)'],
10
- setupFiles: ['./vitest.startup.ts'],
11
- },
12
- })
6
+ export default defineConfig({ test: { globals: true, watch: false } })
package/babel.config.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "presets": [
3
- ["@babel/preset-env", { "modules": false, "targets": { "node": "current" } }],
4
- "@babel/preset-typescript"
5
- ]
6
- }
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
@@ -1,17 +0,0 @@
1
- import { config } from 'dotenv'
2
- config()
3
- import type { Config } from 'jest'
4
- import type { SuperTest, Test } from 'supertest'
5
-
6
- // Augment global scope with shared variables (must be var)
7
- declare global {
8
- var req: SuperTest<Test>
9
- }
10
-
11
- /**
12
- * Jest global setup method runs before any tests are run
13
- * https://jestjs.io/docs/configuration#globalsetup-string
14
- */
15
- const setup = async (_globalConfig: Config, _projectConfig: Config) => {}
16
-
17
- module.exports = setup
@@ -1,12 +0,0 @@
1
- import { config } from 'dotenv'
2
- config()
3
- import type { Config } from 'jest'
4
-
5
- /**
6
- * Jest global teardown method runs after all tests are run
7
- * https://jestjs.io/docs/configuration#globalteardown-string
8
- */
9
-
10
- const teardown = async (_globalConfig: Config, _projectConfig: Config) => {}
11
-
12
- module.exports = teardown
@@ -1,10 +0,0 @@
1
- import { ForgetPromise } from '@xylabs/forget'
2
-
3
- beforeAll(() => {
4
- // Can be async, before each test file
5
- })
6
-
7
- afterAll(async () => {
8
- // Can be async, after each test file
9
- await ForgetPromise.awaitInactive()
10
- })
package/vitest.startup.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as matchers from 'jest-extended'
2
- import { expect, vi } from 'vitest'
3
-
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
- (globalThis as any).jest = vi // replace jest with vi
6
-
7
- // Extend Vitest's expect with jest-extended matchers
8
- expect.extend(matchers)