@absolutejs/absolute 0.12.5 → 0.13.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
@@ -1,234 +1,234 @@
1
- // eslint.config.mjs
2
- import { dirname } from 'path';
3
- import { fileURLToPath } from 'url';
4
- import pluginJs from '@eslint/js';
5
- import stylisticTs from '@stylistic/eslint-plugin-ts';
6
- import tsParser from '@typescript-eslint/parser';
7
- import { defineConfig } from 'eslint/config';
8
- import absolutePlugin from 'eslint-plugin-absolute';
9
- import importPlugin from 'eslint-plugin-import';
10
- import promisePlugin from 'eslint-plugin-promise';
11
- import securityPlugin from 'eslint-plugin-security';
12
- import globals from 'globals';
13
- import tseslint from 'typescript-eslint';
14
-
15
- const __dirname = dirname(fileURLToPath(import.meta.url));
16
-
17
- export default defineConfig([
18
- {
19
- ignores: [
20
- 'dist/**',
21
- '**/compiled/**',
22
- '**/*/htmx.*.min.js',
23
- 'example/build/**',
24
- 'tailwind.config.ts',
25
- 'postcss.config.ts',
26
- 'example/react/indexes/*'
27
- ]
28
- },
29
-
30
- pluginJs.configs.recommended,
31
-
32
- ...tseslint.configs.recommended,
33
-
34
- {
35
- files: ['**/*.{ts,tsx}'],
36
- languageOptions: {
37
- globals: {
38
- // TODO: These should only be applied to the src/core/build.ts file.
39
- BuildMessage: 'readonly',
40
- ResolveMessage: 'readonly'
41
- },
42
- parser: tsParser,
43
- parserOptions: {
44
- createDefaultProgram: true,
45
- project: './tsconfig.json',
46
- tsconfigRootDir: __dirname
47
- }
48
- },
49
- plugins: { '@stylistic/ts': stylisticTs },
50
- rules: {
51
- '@stylistic/ts/padding-line-between-statements': [
52
- 'error',
53
- { blankLine: 'always', next: 'return', prev: '*' }
54
- ],
55
-
56
- '@typescript-eslint/no-unnecessary-type-assertion': 'error'
57
- }
58
- },
59
- {
60
- files: ['**/*.{js,mjs,cjs,json,ts,tsx,jsx}'],
61
- ignores: ['node_modules/**'],
62
- languageOptions: {
63
- globals: {
64
- ...globals.browser
65
- }
66
- },
67
- plugins: {
68
- absolute: absolutePlugin,
69
- import: importPlugin,
70
- promise: promisePlugin,
71
- security: securityPlugin
72
- },
73
- rules: {
74
- 'absolute/explicit-object-types': 'error',
75
- 'absolute/localize-react-props': 'error',
76
- 'absolute/max-depth-extended': ['error', 1],
77
- 'absolute/max-jsxnesting': ['error', 5],
78
- 'absolute/min-var-length': [
79
- 'error',
80
- { allowedVars: ['_', 'id', 'db', 'OK'], minLength: 3 }
81
- ],
82
- 'absolute/no-explicit-return-type': 'error',
83
- 'absolute/no-useless-function': 'error',
84
- 'absolute/sort-exports': [
85
- 'error',
86
- {
87
- caseSensitive: true,
88
- natural: true,
89
- order: 'asc',
90
- variablesBeforeFunctions: true
91
- }
92
- ],
93
- 'absolute/sort-keys-fixable': [
94
- 'error',
95
- {
96
- caseSensitive: true,
97
- natural: true,
98
- order: 'asc',
99
- variablesBeforeFunctions: true
100
- }
101
- ],
102
- 'arrow-body-style': ['error', 'as-needed'],
103
- 'consistent-return': 'error',
104
- eqeqeq: 'error',
105
- 'func-style': [
106
- 'error',
107
- 'expression',
108
- { allowArrowFunctions: true }
109
- ],
110
- 'import/no-cycle': 'error',
111
- 'import/no-default-export': 'error',
112
- 'import/no-relative-packages': 'error',
113
- 'import/no-unused-modules': ['error', { missingExports: true }],
114
- 'import/order': ['error', { alphabetize: { order: 'asc' } }],
115
- 'no-await-in-loop': 'error',
116
- 'no-debugger': 'error',
117
- 'no-duplicate-case': 'error',
118
- 'no-duplicate-imports': 'error',
119
- 'no-else-return': 'error',
120
- 'no-empty-function': 'error',
121
- 'no-empty-pattern': 'error',
122
- 'no-empty-static-block': 'error',
123
- 'no-fallthrough': 'error',
124
- 'no-floating-decimal': 'error',
125
- 'no-global-assign': 'error',
126
- 'no-implicit-coercion': 'error',
127
- 'no-implicit-globals': 'error',
128
- 'no-loop-func': 'error',
129
- 'no-magic-numbers': [
130
- 'warn',
131
- { detectObjects: false, enforceConst: true, ignore: [0, 1, 2] }
132
- ],
133
- 'no-misleading-character-class': 'error',
134
- 'no-nested-ternary': 'error',
135
- 'no-new-native-nonconstructor': 'error',
136
- 'no-new-wrappers': 'error',
137
- 'no-param-reassign': 'error',
138
- 'no-restricted-imports': [
139
- 'error',
140
- {
141
- paths: [
142
- {
143
- importNames: ['default'],
144
- message:
145
- 'Import only named React exports for tree-shaking.',
146
- name: 'react'
147
- },
148
- {
149
- importNames: ['default'],
150
- message: 'Import only the required Bun exports.',
151
- name: 'bun'
152
- }
153
- ]
154
- }
155
- ],
156
- 'no-return-await': 'error',
157
- 'no-shadow': 'error',
158
- 'no-undef': 'error',
159
- 'no-unneeded-ternary': 'error',
160
- 'no-unreachable': 'error',
161
- 'no-useless-assignment': 'error',
162
- 'no-useless-concat': 'error',
163
- 'no-useless-return': 'error',
164
- 'no-var': 'error',
165
- 'prefer-arrow-callback': 'error',
166
- 'prefer-const': 'error',
167
- 'prefer-destructuring': [
168
- 'error',
169
- { array: true, object: true },
170
- { enforceForRenamedProperties: false }
171
- ],
172
- 'prefer-template': 'error',
173
- 'promise/always-return': 'warn',
174
- 'promise/avoid-new': 'warn',
175
- 'promise/catch-or-return': 'error',
176
- 'promise/no-callback-in-promise': 'warn',
177
- 'promise/no-nesting': 'warn',
178
- 'promise/no-promise-in-callback': 'warn',
179
- 'promise/no-return-wrap': 'error',
180
- 'promise/param-names': 'error'
181
- }
182
- },
183
- {
184
- //TODO: Add official eslint support for Svelte.
185
- files: ['**/*.svelte.ts'],
186
- languageOptions: {
187
- globals: {
188
- $derived: 'readonly',
189
- $effect: 'readonly',
190
- $props: 'readonly',
191
- $state: 'readonly'
192
- }
193
- }
194
- },
195
- {
196
- files: ['eslint.config.mjs', 'src/constants.ts'],
197
- rules: {
198
- 'no-magic-numbers': 'off'
199
- }
200
- },
201
- {
202
- files: ['eslint.config.mjs'],
203
- rules: {
204
- 'import/no-default-export': 'off'
205
- }
206
- },
207
- {
208
- files: [
209
- 'src/utils/index.ts',
210
- 'src/plugins/index.ts',
211
- 'src/core/index.ts',
212
- 'src/index.ts',
213
- 'example/html/scripts/*',
214
- 'tsconfig.json',
215
- 'tsconfig.build.json',
216
- 'package.json',
217
- '.prettierrc.json'
218
- ],
219
- rules: {
220
- 'import/no-unused-modules': 'off'
221
- }
222
- },
223
- {
224
- files: [
225
- 'tsconfig.json',
226
- 'tsconfig.build.json',
227
- 'package.json',
228
- '.prettierrc.json'
229
- ],
230
- rules: {
231
- '@typescript-eslint/no-unused-expressions': 'off'
232
- }
233
- }
234
- ]);
1
+ // eslint.config.mjs
2
+ import { dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ import pluginJs from '@eslint/js';
5
+ import stylisticTs from '@stylistic/eslint-plugin-ts';
6
+ import tsParser from '@typescript-eslint/parser';
7
+ import { defineConfig } from 'eslint/config';
8
+ import absolutePlugin from 'eslint-plugin-absolute';
9
+ import importPlugin from 'eslint-plugin-import';
10
+ import promisePlugin from 'eslint-plugin-promise';
11
+ import securityPlugin from 'eslint-plugin-security';
12
+ import globals from 'globals';
13
+ import tseslint from 'typescript-eslint';
14
+
15
+ const __dirname = dirname(fileURLToPath(import.meta.url));
16
+
17
+ export default defineConfig([
18
+ {
19
+ ignores: [
20
+ 'dist/**',
21
+ '**/compiled/**',
22
+ '**/*/htmx.*.min.js',
23
+ 'example/build/**',
24
+ 'tailwind.config.ts',
25
+ 'postcss.config.ts',
26
+ 'example/react/indexes/*'
27
+ ]
28
+ },
29
+
30
+ pluginJs.configs.recommended,
31
+
32
+ ...tseslint.configs.recommended,
33
+
34
+ {
35
+ files: ['**/*.{ts,tsx}'],
36
+ languageOptions: {
37
+ globals: {
38
+ // TODO: These should only be applied to the src/core/build.ts file.
39
+ BuildMessage: 'readonly',
40
+ ResolveMessage: 'readonly'
41
+ },
42
+ parser: tsParser,
43
+ parserOptions: {
44
+ createDefaultProgram: true,
45
+ project: './tsconfig.json',
46
+ tsconfigRootDir: __dirname
47
+ }
48
+ },
49
+ plugins: { '@stylistic/ts': stylisticTs },
50
+ rules: {
51
+ '@stylistic/ts/padding-line-between-statements': [
52
+ 'error',
53
+ { blankLine: 'always', next: 'return', prev: '*' }
54
+ ],
55
+
56
+ '@typescript-eslint/no-unnecessary-type-assertion': 'error'
57
+ }
58
+ },
59
+ {
60
+ files: ['**/*.{js,mjs,cjs,json,ts,tsx,jsx}'],
61
+ ignores: ['node_modules/**'],
62
+ languageOptions: {
63
+ globals: {
64
+ ...globals.browser
65
+ }
66
+ },
67
+ plugins: {
68
+ absolute: absolutePlugin,
69
+ import: importPlugin,
70
+ promise: promisePlugin,
71
+ security: securityPlugin
72
+ },
73
+ rules: {
74
+ 'absolute/explicit-object-types': 'error',
75
+ 'absolute/localize-react-props': 'error',
76
+ 'absolute/max-depth-extended': ['error', 1],
77
+ 'absolute/max-jsxnesting': ['error', 5],
78
+ 'absolute/min-var-length': [
79
+ 'error',
80
+ { allowedVars: ['_', 'id', 'db', 'OK'], minLength: 3 }
81
+ ],
82
+ 'absolute/no-explicit-return-type': 'error',
83
+ 'absolute/no-useless-function': 'error',
84
+ 'absolute/sort-exports': [
85
+ 'error',
86
+ {
87
+ caseSensitive: true,
88
+ natural: true,
89
+ order: 'asc',
90
+ variablesBeforeFunctions: true
91
+ }
92
+ ],
93
+ 'absolute/sort-keys-fixable': [
94
+ 'error',
95
+ {
96
+ caseSensitive: true,
97
+ natural: true,
98
+ order: 'asc',
99
+ variablesBeforeFunctions: true
100
+ }
101
+ ],
102
+ 'arrow-body-style': ['error', 'as-needed'],
103
+ 'consistent-return': 'error',
104
+ eqeqeq: 'error',
105
+ 'func-style': [
106
+ 'error',
107
+ 'expression',
108
+ { allowArrowFunctions: true }
109
+ ],
110
+ 'import/no-cycle': 'error',
111
+ 'import/no-default-export': 'error',
112
+ 'import/no-relative-packages': 'error',
113
+ 'import/no-unused-modules': ['error', { missingExports: true }],
114
+ 'import/order': ['error', { alphabetize: { order: 'asc' } }],
115
+ 'no-await-in-loop': 'error',
116
+ 'no-debugger': 'error',
117
+ 'no-duplicate-case': 'error',
118
+ 'no-duplicate-imports': 'error',
119
+ 'no-else-return': 'error',
120
+ 'no-empty-function': 'error',
121
+ 'no-empty-pattern': 'error',
122
+ 'no-empty-static-block': 'error',
123
+ 'no-fallthrough': 'error',
124
+ 'no-floating-decimal': 'error',
125
+ 'no-global-assign': 'error',
126
+ 'no-implicit-coercion': 'error',
127
+ 'no-implicit-globals': 'error',
128
+ 'no-loop-func': 'error',
129
+ 'no-magic-numbers': [
130
+ 'warn',
131
+ { detectObjects: false, enforceConst: true, ignore: [0, 1, 2] }
132
+ ],
133
+ 'no-misleading-character-class': 'error',
134
+ 'no-nested-ternary': 'error',
135
+ 'no-new-native-nonconstructor': 'error',
136
+ 'no-new-wrappers': 'error',
137
+ 'no-param-reassign': 'error',
138
+ 'no-restricted-imports': [
139
+ 'error',
140
+ {
141
+ paths: [
142
+ {
143
+ importNames: ['default'],
144
+ message:
145
+ 'Import only named React exports for tree-shaking.',
146
+ name: 'react'
147
+ },
148
+ {
149
+ importNames: ['default'],
150
+ message: 'Import only the required Bun exports.',
151
+ name: 'bun'
152
+ }
153
+ ]
154
+ }
155
+ ],
156
+ 'no-return-await': 'error',
157
+ 'no-shadow': 'error',
158
+ 'no-undef': 'error',
159
+ 'no-unneeded-ternary': 'error',
160
+ 'no-unreachable': 'error',
161
+ 'no-useless-assignment': 'error',
162
+ 'no-useless-concat': 'error',
163
+ 'no-useless-return': 'error',
164
+ 'no-var': 'error',
165
+ 'prefer-arrow-callback': 'error',
166
+ 'prefer-const': 'error',
167
+ 'prefer-destructuring': [
168
+ 'error',
169
+ { array: true, object: true },
170
+ { enforceForRenamedProperties: false }
171
+ ],
172
+ 'prefer-template': 'error',
173
+ 'promise/always-return': 'warn',
174
+ 'promise/avoid-new': 'warn',
175
+ 'promise/catch-or-return': 'error',
176
+ 'promise/no-callback-in-promise': 'warn',
177
+ 'promise/no-nesting': 'warn',
178
+ 'promise/no-promise-in-callback': 'warn',
179
+ 'promise/no-return-wrap': 'error',
180
+ 'promise/param-names': 'error'
181
+ }
182
+ },
183
+ {
184
+ //TODO: Add official eslint support for Svelte.
185
+ files: ['**/*.svelte.ts'],
186
+ languageOptions: {
187
+ globals: {
188
+ $derived: 'readonly',
189
+ $effect: 'readonly',
190
+ $props: 'readonly',
191
+ $state: 'readonly'
192
+ }
193
+ }
194
+ },
195
+ {
196
+ files: ['eslint.config.mjs', 'src/constants.ts'],
197
+ rules: {
198
+ 'no-magic-numbers': 'off'
199
+ }
200
+ },
201
+ {
202
+ files: ['eslint.config.mjs'],
203
+ rules: {
204
+ 'import/no-default-export': 'off'
205
+ }
206
+ },
207
+ {
208
+ files: [
209
+ 'src/utils/index.ts',
210
+ 'src/plugins/index.ts',
211
+ 'src/core/index.ts',
212
+ 'src/index.ts',
213
+ 'example/html/scripts/*',
214
+ 'tsconfig.json',
215
+ 'tsconfig.build.json',
216
+ 'package.json',
217
+ '.prettierrc.json'
218
+ ],
219
+ rules: {
220
+ 'import/no-unused-modules': 'off'
221
+ }
222
+ },
223
+ {
224
+ files: [
225
+ 'tsconfig.json',
226
+ 'tsconfig.build.json',
227
+ 'package.json',
228
+ '.prettierrc.json'
229
+ ],
230
+ rules: {
231
+ '@typescript-eslint/no-unused-expressions': 'off'
232
+ }
233
+ }
234
+ ]);
package/package.json CHANGED
@@ -24,24 +24,24 @@
24
24
  "tailwindcss": "4.1.7",
25
25
  "typescript": "5.8.3",
26
26
  "typescript-eslint": "8.32.0",
27
- "vue": "3.5.17"
27
+ "vue": "3.5.27"
28
28
  },
29
29
  "license": "CC BY-NC 4.0",
30
30
  "main": "./dist/index.js",
31
31
  "name": "@absolutejs/absolute",
32
32
  "peerDependencies": {
33
33
  "elysia": "^1.3.0",
34
- "react": "^18.0.0 || ^19.1.0",
35
- "react-dom": "^18.0.0 || ^19.1.0",
34
+ "react": "^19.1.0",
35
+ "react-dom": "^19.1.0",
36
36
  "svelte": "^5.35.2",
37
- "vue": "^3.5.17"
37
+ "vue": "^3.5.27"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",
41
41
  "url": "https://github.com/absolutejs/absolutejs.git"
42
42
  },
43
43
  "scripts": {
44
- "build": "rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external react --external react-dom --external vue --external @vue/compiler-sfc --external svelte --external elysia --external typescript --external @angular/compiler-cli --external @angular/core --external @angular/common --external @angular/platform-browser --external @angular/platform-server --external @angular/ssr --external zone.js && tsc --emitDeclarationOnly --project tsconfig.build.json",
44
+ "build": "rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external react --external react-dom --external vue --external @vue/compiler-sfc --external svelte --external elysia && tsc --emitDeclarationOnly --project tsconfig.build.json",
45
45
  "db:push": "drizzle-kit push",
46
46
  "db:studio": "drizzle-kit studio",
47
47
  "dev": "bun run --watch example/server.ts",
@@ -52,5 +52,5 @@
52
52
  "typecheck": "bun run tsc --noEmit"
53
53
  },
54
54
  "types": "./dist/index.d.ts",
55
- "version": "0.12.5"
55
+ "version": "0.13.0"
56
56
  }
@@ -1,20 +1,20 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true,
4
- "declaration": true,
5
- "esModuleInterop": true,
6
- "forceConsistentCasingInFileNames": true,
7
- "jsx": "react-jsx",
8
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
9
- "module": "ESNext",
10
- "moduleResolution": "bundler",
11
- "noImplicitAny": true,
12
- "noUncheckedIndexedAccess": true,
13
- "outDir": "dist",
14
- "skipLibCheck": true,
15
- "strict": true,
16
- "target": "ESNext"
17
- },
18
- "exclude": ["node_modules"],
19
- "include": ["src/**/*"]
20
- }
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "declaration": true,
5
+ "esModuleInterop": true,
6
+ "forceConsistentCasingInFileNames": true,
7
+ "jsx": "react-jsx",
8
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
9
+ "module": "ESNext",
10
+ "moduleResolution": "bundler",
11
+ "noImplicitAny": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "outDir": "dist",
14
+ "skipLibCheck": true,
15
+ "strict": true,
16
+ "target": "ESNext"
17
+ },
18
+ "exclude": ["node_modules"],
19
+ "include": ["src/**/*"]
20
+ }