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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdf",
3
- "version": "7.1.0",
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 --minify --dts",
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.47.1",
41
- "@typescript-eslint/parser": "^5.47.1",
42
- "@vitest/ui": "0.26.2",
43
- "eslint": "^8.30.0",
44
- "eslint-plugin-jest": "^27.1.7",
45
- "jsdom": "^20.0.3",
46
- "prettier": "^2.8.1",
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.3",
54
- "vitest": "^0.26.2"
62
+ "vite": "^4.0.4",
63
+ "vitest": "^0.27.1"
55
64
  },
56
65
  "dependencies": {
57
- "t-state": "^7.1.0"
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
@@ -1,3 +0,0 @@
1
- docs
2
- resources
3
- dist
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
@@ -1,6 +0,0 @@
1
- {
2
- "printWidth": 80,
3
- "semi": true,
4
- "singleQuote": true,
5
- "trailingComma": "all"
6
- }
@@ -1,3 +0,0 @@
1
- {
2
- "typescript.tsdk": "node_modules\\typescript\\lib",
3
- }
@@ -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
- }
@@ -1,6 +0,0 @@
1
- if [[ `git status --porcelain` ]]; then
2
- echo "Commit you changes before publish"
3
- exit 1
4
- else
5
- exit 0
6
- fi
package/src/main.ts DELETED
@@ -1 +0,0 @@
1
- console.log('comming soon');
@@ -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
@@ -1,5 +0,0 @@
1
- import { expect, test } from 'vitest';
2
-
3
- test('test', () => {
4
- expect(1).toBe(1);
5
- });
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
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "noEmit": false,
6
- "declaration": true
7
- },
8
- "include": ["src/*"]
9
- }
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
- });
package/vitest.config.ts DELETED
@@ -1,9 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- include: ['test/*.test.{ts,tsx}'],
6
- testTimeout: 2_000,
7
- setupFiles: 'test/setup/setup.ts',
8
- },
9
- });