@anzusystems/common-admin 1.47.0-beta.dev-1788289119 → 1.47.0-beta.dev-1788764220
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/AFormRemoteAutocomplete-nhJg86M2.mjs +9392 -0
- package/dist/AFormRemoteAutocomplete-nhJg86M2.mjs.map +1 -0
- package/dist/common-admin.css +2 -1
- package/dist/common-admin.d.ts +15 -3
- package/dist/common-admin.js +23476 -23924
- package/dist/common-admin.js.map +1 -1
- package/dist/esm-CUYEQ0A0.mjs +18198 -0
- package/dist/esm-CUYEQ0A0.mjs.map +1 -0
- package/dist/labs.js +3180 -3528
- package/dist/labs.js.map +1 -1
- package/dist/webfontloader-CwEmCwuM.mjs +485 -0
- package/dist/webfontloader-CwEmCwuM.mjs.map +1 -0
- package/package.json +29 -28
- package/src/eslint/oxlint.mjs +30 -0
- package/src/eslint/plugin.mjs +39 -28
- package/dist/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-B-VagmIq.mjs +0 -10084
- package/dist/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-B-VagmIq.mjs.map +0 -1
- package/dist/index-2jGSo7Ju.mjs +0 -22165
- package/dist/index-2jGSo7Ju.mjs.map +0 -1
- package/dist/webfontloader-pyU64lyi.mjs +0 -454
- package/dist/webfontloader-pyU64lyi.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"packageManager": "yarn@4.18.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
|
-
"src/eslint"
|
|
6
|
+
"src/eslint/**"
|
|
7
7
|
],
|
|
8
|
-
"module": "./dist/common-admin.
|
|
8
|
+
"module": "./dist/common-admin.js",
|
|
9
9
|
"types": "./dist/common-admin.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
@@ -18,9 +18,10 @@
|
|
|
18
18
|
"types": "./dist/labs.d.ts"
|
|
19
19
|
},
|
|
20
20
|
"./eslint": "./src/eslint/plugin.mjs",
|
|
21
|
+
"./oxlint": "./src/eslint/oxlint.mjs",
|
|
21
22
|
"./*": "./*"
|
|
22
23
|
},
|
|
23
|
-
"version": "1.47.0-beta.dev-
|
|
24
|
+
"version": "1.47.0-beta.dev-1788764220",
|
|
24
25
|
"license": "Apache-2.0",
|
|
25
26
|
"repository": {
|
|
26
27
|
"type": "git",
|
|
@@ -30,25 +31,25 @@
|
|
|
30
31
|
"prepare": "node -e \"if (process.env.SKIP_PLAYWRIGHT_INSTALL !== 'true') { require('child_process').execSync('playwright install chromium --with-deps', { stdio: 'inherit' }) }\"",
|
|
31
32
|
"docs:dev": "vitepress dev docs",
|
|
32
33
|
"docs:build-only": "vitepress build docs",
|
|
33
|
-
"docs:build": "
|
|
34
|
+
"docs:build": "run-s build docs:build-only",
|
|
34
35
|
"docs:preview": "vitepress preview docs",
|
|
35
36
|
"playground:dev": "vite",
|
|
36
37
|
"playground:build": "vite build",
|
|
37
38
|
"playground:build:nm": "vite build --minify false",
|
|
38
|
-
"build": "vite build --config vite.config.lib.
|
|
39
|
-
"build:dev": "vite build --minify false --sourcemap true --config vite.config.lib.
|
|
40
|
-
"lib:build": "
|
|
41
|
-
"ci": "run-
|
|
39
|
+
"build": "vite build --config vite.config.lib.mts",
|
|
40
|
+
"build:dev": "vite build --minify false --sourcemap true --config vite.config.lib.mts",
|
|
41
|
+
"lib:build": "run-s --print-name lint:tsc build",
|
|
42
|
+
"ci": "run-p --aggregate-output --continue-on-error --print-label --silent lint:tsc format:check lint:oxlint lint:eslint lint:stylelint",
|
|
42
43
|
"lint": "[ \"$*\" = \"--fix\" ] && yarn lint:fix || yarn ci",
|
|
43
44
|
"lint:fix": "run-s --print-name lint:tsc format lint:oxlint:fix lint:eslint:fix lint:stylelint:fix",
|
|
44
45
|
"lint:tsc": "NODE_OPTIONS=--max-old-space-size=4096 vue-tsc --build",
|
|
45
46
|
"lint:tsc:test": "NODE_OPTIONS=--max-old-space-size=4096 vue-tsc --build tsconfig.test.json",
|
|
46
|
-
"lint:eslint": "eslint",
|
|
47
|
-
"lint:eslint:fix": "eslint --fix",
|
|
47
|
+
"lint:eslint": "eslint --cache",
|
|
48
|
+
"lint:eslint:fix": "eslint --fix --cache",
|
|
48
49
|
"lint:oxlint": "oxlint .",
|
|
49
50
|
"lint:oxlint:fix": "oxlint . --fix",
|
|
50
|
-
"lint:stylelint": "stylelint src/**/*.{scss,vue}",
|
|
51
|
-
"lint:stylelint:fix": "stylelint src/**/*.{scss,vue} --fix",
|
|
51
|
+
"lint:stylelint": "stylelint src/**/*.{scss,vue} --cache",
|
|
52
|
+
"lint:stylelint:fix": "stylelint src/**/*.{scss,vue} --fix --cache",
|
|
52
53
|
"format": "oxfmt src/",
|
|
53
54
|
"format:check": "oxfmt src/ --check",
|
|
54
55
|
"test": "vitest",
|
|
@@ -63,16 +64,15 @@
|
|
|
63
64
|
"@microsoft/api-extractor": "^7.59.0",
|
|
64
65
|
"@sentry/vue": "^10.73.0",
|
|
65
66
|
"@shikijs/vitepress-twoslash": "^4.4.3",
|
|
66
|
-
"@stylistic/eslint-plugin": "^5.10.0",
|
|
67
67
|
"@tsconfig/node22": "^22.0.6",
|
|
68
68
|
"@types/node": "^24.13.3",
|
|
69
69
|
"@types/rusha": "^0.8.3",
|
|
70
70
|
"@types/sortablejs": "^1.15.9",
|
|
71
71
|
"@types/webfontloader": "^1.6.38",
|
|
72
72
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
73
|
-
"@vitest/browser": "^
|
|
74
|
-
"@vitest/browser-playwright": "^
|
|
75
|
-
"@vitest/ui": "^
|
|
73
|
+
"@vitest/browser": "^5.0.0",
|
|
74
|
+
"@vitest/browser-playwright": "^5.0.0",
|
|
75
|
+
"@vitest/ui": "^5.0.0",
|
|
76
76
|
"@vue/compiler-dom": "3.5.42",
|
|
77
77
|
"@vue/devtools-api": "^8.2.1",
|
|
78
78
|
"@vue/eslint-config-typescript": "^14.9.0",
|
|
@@ -86,41 +86,42 @@
|
|
|
86
86
|
"axios": "1.20.0",
|
|
87
87
|
"cropperjs": "^1.6.3",
|
|
88
88
|
"dayjs": "1.11.23",
|
|
89
|
-
"eslint": "^10.
|
|
89
|
+
"eslint": "^10.10.0",
|
|
90
|
+
"eslint-config-prettier": "^10.1.8",
|
|
90
91
|
"eslint-plugin-oxlint": "1.81.0",
|
|
91
|
-
"eslint-plugin-vue": "10.
|
|
92
|
+
"eslint-plugin-vue": "10.11.0",
|
|
92
93
|
"eslint-plugin-vuetify": "^2.7.2",
|
|
93
94
|
"npm-run-all2": "^9.0.3",
|
|
94
|
-
"oxfmt": "^0.
|
|
95
|
+
"oxfmt": "^0.66.0",
|
|
95
96
|
"oxlint": "1.81.0",
|
|
96
97
|
"pinia": "4.0.3",
|
|
97
|
-
"playwright": "^1.
|
|
98
|
-
"postcss": "^8.5.
|
|
98
|
+
"playwright": "^1.63.0",
|
|
99
|
+
"postcss": "^8.5.28",
|
|
99
100
|
"postcss-html": "^2.0.0",
|
|
100
101
|
"postcss-prefix-selector": "^2.2.0",
|
|
101
102
|
"rusha": "^0.8.14",
|
|
102
|
-
"sass": "1.
|
|
103
|
+
"sass": "1.104.0",
|
|
103
104
|
"socket.io-client": "4.8.3",
|
|
104
105
|
"sortablejs": "^1.15.7",
|
|
105
|
-
"stylelint": "17.
|
|
106
|
+
"stylelint": "17.15.0",
|
|
106
107
|
"stylelint-config-html": "^2.0.0",
|
|
107
108
|
"stylelint-config-recommended": "^18.0.0",
|
|
108
109
|
"stylelint-config-recommended-vue": "^2.0.0",
|
|
109
110
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
110
|
-
"typescript": "
|
|
111
|
+
"typescript": "~6.0.3",
|
|
111
112
|
"unplugin": "3.3.0",
|
|
112
113
|
"unplugin-dts": "^1.1.0",
|
|
113
114
|
"uuid": "^14.0.2",
|
|
114
|
-
"vite": "
|
|
115
|
+
"vite": "8.2.2",
|
|
115
116
|
"vite-plugin-vuetify": "^2.1.3",
|
|
116
117
|
"vitepress": "1.6.4",
|
|
117
|
-
"vitest": "^
|
|
118
|
+
"vitest": "^5.0.0",
|
|
118
119
|
"vue": "3.5.42",
|
|
119
120
|
"vue-eslint-parser": "^10.4.1",
|
|
120
121
|
"vue-i18n": "11.4.10",
|
|
121
|
-
"vue-router": "5.3.
|
|
122
|
+
"vue-router": "5.3.1",
|
|
122
123
|
"vue-tsc": "3.3.11",
|
|
123
|
-
"vuetify": "4.
|
|
124
|
+
"vuetify": "4.2.0",
|
|
124
125
|
"webfontloader": "^1.6.28"
|
|
125
126
|
},
|
|
126
127
|
"peerDependencies": {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { anzuPlugin } from './plugin.mjs'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Oxlint entry point for the Anzu rules.
|
|
5
|
+
*
|
|
6
|
+
* The rules operate on the standard ESTree AST, so oxlint runs them through its
|
|
7
|
+
* JS plugin bridge with output identical to ESLint - including .vue <script>
|
|
8
|
+
* blocks, scope analysis and autofix.
|
|
9
|
+
*
|
|
10
|
+
* Usage in .oxlintrc.json:
|
|
11
|
+
*
|
|
12
|
+
* {
|
|
13
|
+
* "jsPlugins": ["@anzusystems/common-admin/oxlint"],
|
|
14
|
+
* "rules": {
|
|
15
|
+
* "anzu/no-ts-extension": "error",
|
|
16
|
+
* "anzu/no-fatal-error-axios-check": "error",
|
|
17
|
+
* "anzu/url-params-match-template": "error",
|
|
18
|
+
* "anzu/no-deprecated-imports": ["error", { "rules": [...] }]
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* When these are enabled here, turn them off in eslint.config.mjs - oxlint's
|
|
23
|
+
* `buildFromOxlintConfigFile` does not know about third-party rule names.
|
|
24
|
+
*
|
|
25
|
+
* NOTE: oxlint JS plugins are alpha and not subject to semver.
|
|
26
|
+
*/
|
|
27
|
+
export default {
|
|
28
|
+
meta: { name: 'anzu' },
|
|
29
|
+
rules: anzuPlugin.rules,
|
|
30
|
+
}
|
package/src/eslint/plugin.mjs
CHANGED
|
@@ -203,41 +203,52 @@ const anzuPlugin = {
|
|
|
203
203
|
return rule.path
|
|
204
204
|
})
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
206
|
+
// Index rules by the module specifier they match, so one import is
|
|
207
|
+
// resolved by a single Map lookup instead of scanning every rule.
|
|
208
|
+
const rulesBySource = new Map()
|
|
209
|
+
for (const rule of deprecationRules) {
|
|
210
|
+
const matchPath = rule.path || rule.module
|
|
211
|
+
if (!matchPath) continue
|
|
212
|
+
const entry = { matchPath, imports: new Set(rule.imports) }
|
|
213
|
+
const existing = rulesBySource.get(matchPath)
|
|
214
|
+
if (existing) existing.push(entry)
|
|
215
|
+
else rulesBySource.set(matchPath, [entry])
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Skipping depends only on the file name, so resolve it once per file
|
|
219
|
+
// instead of once per import declaration.
|
|
220
|
+
let fileSkipped = null
|
|
221
|
+
const isFileSkipped = () => {
|
|
222
|
+
if (fileSkipped !== null) return fileSkipped
|
|
223
|
+
const normalizedFilename = context.filename.replace(/\\/g, '/')
|
|
224
|
+
fileSkipped =
|
|
225
|
+
skipFiles.some((skip) => normalizedFilename.endsWith(skip)) ||
|
|
226
|
+
ruleFilePaths.some(
|
|
227
|
+
(rulePath) =>
|
|
228
|
+
normalizedFilename.endsWith(rulePath + '.ts') ||
|
|
229
|
+
normalizedFilename.endsWith(rulePath + '.js') ||
|
|
230
|
+
normalizedFilename.endsWith(rulePath + '.vue') ||
|
|
231
|
+
normalizedFilename.endsWith(rulePath),
|
|
223
232
|
)
|
|
224
|
-
|
|
233
|
+
return fileSkipped
|
|
234
|
+
}
|
|
225
235
|
|
|
236
|
+
return {
|
|
237
|
+
ImportDeclaration(node) {
|
|
226
238
|
const source = node.source.value
|
|
227
239
|
if (typeof source !== 'string') return
|
|
228
240
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
const deprecatedImports = node.specifiers
|
|
234
|
-
.filter((spec) => spec.type === 'ImportSpecifier')
|
|
235
|
-
.filter((spec) => rule.imports.includes(spec.imported.name))
|
|
241
|
+
const entries = rulesBySource.get(source)
|
|
242
|
+
if (!entries) return
|
|
243
|
+
if (isFileSkipped()) return
|
|
236
244
|
|
|
237
|
-
|
|
245
|
+
for (const { matchPath, imports } of entries) {
|
|
246
|
+
for (const spec of node.specifiers) {
|
|
247
|
+
if (spec.type !== 'ImportSpecifier') continue
|
|
248
|
+
if (!imports.has(spec.imported.name)) continue
|
|
238
249
|
context.report({
|
|
239
|
-
node:
|
|
240
|
-
message: `'${
|
|
250
|
+
node: spec,
|
|
251
|
+
message: `'${spec.imported.name}' from '${matchPath}' is deprecated`,
|
|
241
252
|
})
|
|
242
253
|
}
|
|
243
254
|
}
|