tsdf 7.1.0 → 8.0.0-beta.10
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/dist/main.cjs +1846 -0
- package/dist/main.d.ts +291 -0
- package/dist/main.js +1811 -0
- package/package.json +26 -14
- package/.eslintignore +0 -3
- package/.eslintrc.cjs +0 -56
- package/.gitattributes +0 -22
- package/.prettierrc +0 -6
- package/.vscode/settings.json +0 -3
- package/.vscode/tasks.json +0 -25
- package/scripts/check-if-is-sync.sh +0 -6
- package/src/main.ts +0 -1
- package/test/setup/setup.ts +0 -15
- package/test/test.test.ts +0 -5
- package/tsconfig.json +0 -24
- package/tsconfig.prod.json +0 -9
- package/tsup.config.ts +0 -12
- package/vitest.config.ts +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdf",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-beta.10",
|
|
4
4
|
"description": "A data fetching solution based on t-state",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lucas Santos",
|
|
@@ -15,46 +15,58 @@
|
|
|
15
15
|
"require": "./dist/main.cjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
18
21
|
"sideEffects": false,
|
|
19
22
|
"engines": {
|
|
20
23
|
"node": ">=16.0.0"
|
|
21
24
|
},
|
|
22
25
|
"scripts": {
|
|
23
|
-
"test": "vitest --ui",
|
|
26
|
+
"test": "vitest --ui --mode development",
|
|
24
27
|
"lint": "pnpm tsc && pnpm eslint && pnpm format",
|
|
25
|
-
"eslint": "eslint --ext .jsx,.js,.ts,.tsx src/",
|
|
28
|
+
"eslint": "CI=true eslint --color --ext .jsx,.js,.ts,.tsx src/ test/",
|
|
26
29
|
"format": "prettier --write src/**/*.ts",
|
|
27
30
|
"tsc": "tsc -p tsconfig.prod.json",
|
|
31
|
+
"tsc:watch": "tsc -p tsconfig.prod.json --watch",
|
|
28
32
|
"test:run": "vitest run",
|
|
29
33
|
"build": "pnpm test:run && pnpm lint && pnpm build:no-test",
|
|
30
|
-
"build:no-test": "tsup --
|
|
34
|
+
"build:no-test": "tsup --dts",
|
|
31
35
|
"npm-publish": "./scripts/check-if-is-sync.sh && pnpm build && npm publish"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
38
|
+
"@lucasols/eslint-plugin-extended-lint": "^0.1.1",
|
|
34
39
|
"@testing-library/jest-dom": "^5.16.5",
|
|
35
40
|
"@testing-library/react": "^13.4.0",
|
|
36
41
|
"@types/node": "^18.11.18",
|
|
37
42
|
"@types/react": "^18.0.26",
|
|
38
43
|
"@types/react-dom": "^18.0.10",
|
|
39
44
|
"@types/testing-library__jest-dom": "^5.14.5",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
41
|
-
"@typescript-eslint/parser": "^5.
|
|
42
|
-
"@vitest/ui": "0.
|
|
43
|
-
"eslint": "^8.
|
|
44
|
-
"eslint-plugin-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^5.48.1",
|
|
46
|
+
"@typescript-eslint/parser": "^5.48.1",
|
|
47
|
+
"@vitest/ui": "0.27.1",
|
|
48
|
+
"eslint": "^8.31.0",
|
|
49
|
+
"eslint-plugin-local-rules": "^1.3.2",
|
|
50
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
51
|
+
"eslint-plugin-vitest": "^0.0.29",
|
|
52
|
+
"happy-dom": "^8.1.4",
|
|
53
|
+
"jsdom": "^21.0.0",
|
|
54
|
+
"prettier": "^2.8.2",
|
|
55
|
+
"pretty-format": "^29.3.1",
|
|
47
56
|
"react": "^18.2.0",
|
|
48
57
|
"react-dom": "^18.2.0",
|
|
49
58
|
"tiny-glob": "^0.2.9",
|
|
50
59
|
"tsm": "^2.3.0",
|
|
51
60
|
"tsup": "^6.5.0",
|
|
52
61
|
"typescript": "^4.9.4",
|
|
53
|
-
"vite": "^4.0.
|
|
54
|
-
"vitest": "^0.
|
|
62
|
+
"vite": "^4.0.4",
|
|
63
|
+
"vitest": "^0.27.1"
|
|
55
64
|
},
|
|
56
65
|
"dependencies": {
|
|
57
|
-
"
|
|
66
|
+
"immer": "^9.0.17",
|
|
67
|
+
"klona": "^2.0.6",
|
|
68
|
+
"mitt": "^3.0.0",
|
|
69
|
+
"t-state": "^7.5.1"
|
|
58
70
|
},
|
|
59
71
|
"peerDependencies": {
|
|
60
72
|
"react": "^18.0.0",
|
package/.eslintignore
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const OFF = 0;
|
|
2
|
-
const WARN = 1;
|
|
3
|
-
const ERROR = 2;
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
parser: '@typescript-eslint/parser',
|
|
7
|
-
parserOptions: {
|
|
8
|
-
project: './tsconfig.json',
|
|
9
|
-
createDefaultProgram: true,
|
|
10
|
-
ecmaVersion: 8,
|
|
11
|
-
ecmaFeatures: {
|
|
12
|
-
jsx: true,
|
|
13
|
-
},
|
|
14
|
-
useJSXTextNode: true,
|
|
15
|
-
sourceType: 'module',
|
|
16
|
-
},
|
|
17
|
-
env: {
|
|
18
|
-
browser: true,
|
|
19
|
-
},
|
|
20
|
-
plugins: ['@typescript-eslint'],
|
|
21
|
-
|
|
22
|
-
rules: {
|
|
23
|
-
'no-warning-comments': [WARN, { terms: ['FIX:'] }],
|
|
24
|
-
'no-constant-binary-expression': ERROR,
|
|
25
|
-
'object-shorthand': ERROR,
|
|
26
|
-
'no-useless-rename': ERROR,
|
|
27
|
-
'no-param-reassign': ERROR,
|
|
28
|
-
|
|
29
|
-
'no-prototype-builtins': OFF,
|
|
30
|
-
|
|
31
|
-
/* typescript */
|
|
32
|
-
'@typescript-eslint/no-explicit-any': OFF,
|
|
33
|
-
'@typescript-eslint/naming-convention': [
|
|
34
|
-
'error',
|
|
35
|
-
{
|
|
36
|
-
selector: 'typeLike',
|
|
37
|
-
format: ['PascalCase'],
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
'@typescript-eslint/no-throw-literal': ERROR,
|
|
41
|
-
'@typescript-eslint/no-unused-expressions': ERROR,
|
|
42
|
-
'@typescript-eslint/no-unused-vars': [ERROR, { argsIgnorePattern: '^_' }],
|
|
43
|
-
'@typescript-eslint/no-shadow': [ERROR, { ignoreOnInitialization: true }],
|
|
44
|
-
'@typescript-eslint/no-non-null-assertion': OFF,
|
|
45
|
-
|
|
46
|
-
/* jest */
|
|
47
|
-
'jest/expect-expect': [ERROR, { assertFunctionNames: ['expect*'] }],
|
|
48
|
-
'jest/no-deprecated-functions': OFF,
|
|
49
|
-
},
|
|
50
|
-
extends: [
|
|
51
|
-
'eslint:recommended',
|
|
52
|
-
'plugin:@typescript-eslint/recommended',
|
|
53
|
-
'plugin:jest/recommended',
|
|
54
|
-
'plugin:jest/style',
|
|
55
|
-
],
|
|
56
|
-
};
|
package/.gitattributes
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text eol=lf
|
|
3
|
-
|
|
4
|
-
# Custom for Visual Studio
|
|
5
|
-
*.cs diff=csharp
|
|
6
|
-
|
|
7
|
-
# Standard to msysgit
|
|
8
|
-
*.doc diff=astextplain
|
|
9
|
-
*.DOC diff=astextplain
|
|
10
|
-
*.docx diff=astextplain
|
|
11
|
-
*.DOCX diff=astextplain
|
|
12
|
-
*.dot diff=astextplain
|
|
13
|
-
*.DOT diff=astextplain
|
|
14
|
-
*.pdf diff=astextplain
|
|
15
|
-
*.PDF diff=astextplain
|
|
16
|
-
*.rtf diff=astextplain
|
|
17
|
-
*.RTF diff=astextplain
|
|
18
|
-
|
|
19
|
-
# Denote all files that are truly binary and should not be modified.
|
|
20
|
-
*.png binary
|
|
21
|
-
*.jpg binary
|
|
22
|
-
*.ico binary
|
package/.prettierrc
DELETED
package/.vscode/settings.json
DELETED
package/.vscode/tasks.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
-
// for the documentation about the tasks.json format
|
|
4
|
-
"version": "2.0.0",
|
|
5
|
-
"tasks": [
|
|
6
|
-
{
|
|
7
|
-
"type": "npm",
|
|
8
|
-
"script": "npm-publish",
|
|
9
|
-
"label": "publish package",
|
|
10
|
-
"problemMatcher": [],
|
|
11
|
-
"presentation": {
|
|
12
|
-
"clear": true
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "npm",
|
|
17
|
-
"script": "test",
|
|
18
|
-
"label": "run tests",
|
|
19
|
-
"problemMatcher": [],
|
|
20
|
-
"presentation": {
|
|
21
|
-
"clear": true
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
}
|
package/src/main.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log('comming soon');
|
package/test/setup/setup.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
-
import { expect } from 'vitest';
|
|
3
|
-
import matchers, {
|
|
4
|
-
TestingLibraryMatchers,
|
|
5
|
-
} from '@testing-library/jest-dom/matchers';
|
|
6
|
-
|
|
7
|
-
declare global {
|
|
8
|
-
namespace Vi {
|
|
9
|
-
interface JestAssertion<T = any>
|
|
10
|
-
extends jest.Matchers<void, T>,
|
|
11
|
-
TestingLibraryMatchers<T, void> {}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
expect.extend(matchers);
|
package/test/test.test.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compileOnSave": false,
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"module": "CommonJS",
|
|
7
|
-
"jsx": "react-jsx",
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"types": [
|
|
10
|
-
"node"
|
|
11
|
-
],
|
|
12
|
-
"noEmit": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"strictNullChecks": true,
|
|
15
|
-
"noImplicitReturns": true,
|
|
16
|
-
"noImplicitAny": true,
|
|
17
|
-
"alwaysStrict": true,
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUncheckedIndexedAccess": true,
|
|
20
|
-
"forceConsistentCasingInFileNames": true,
|
|
21
|
-
"keyofStringsOnly": true,
|
|
22
|
-
"strictPropertyInitialization": true
|
|
23
|
-
}
|
|
24
|
-
}
|
package/tsconfig.prod.json
DELETED
package/tsup.config.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup';
|
|
2
|
-
import glob from 'tiny-glob'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
entry: await glob('./src/**/!(*.d|*.spec).ts'),
|
|
7
|
-
clean: true,
|
|
8
|
-
format: ['cjs', 'esm'],
|
|
9
|
-
esbuildOptions(options) {
|
|
10
|
-
options.mangleProps = /[^_]_$/;
|
|
11
|
-
},
|
|
12
|
-
});
|