@quazardous/qdadm 2.14.0 → 2.15.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.
@@ -23,13 +23,11 @@
23
23
  * - `optimizeDeps.exclude` keeps primevue/@primeuix/themes/qdadm out of the
24
24
  * pre-bundle so BOTH pipelines resolve the same raw modules. Excluding
25
25
  * qdadm also keeps HMR sane when the package is consumed via a symlink.
26
- * - `optimizeDeps.include` pre-bundles qdadm's CJS transitives (currently
27
- * `pluralize`), which cannot be served raw as ESM. The list lives HERE —
28
- * consumers should not have to track qdadm's internal CJS deps (skybot
29
- * feedback on #1389). Both the nested (`@quazardous/qdadm > pluralize`,
30
- * npm installs) and plain (`pluralize`, symlinked installs where the
31
- * nested path can't resolve) forms are declared; the unused one is a
32
- * no-op warning at worst.
26
+ * - qdadm has NO CJS transitives (pluralize is vendored as ESM, #1454), so
27
+ * there is nothing to `optimizeDeps.include` — which also means nothing
28
+ * for the optimizer to fail resolving in file:-linked installs where
29
+ * npm (install-links=false) never materializes qdadm's deps at the
30
+ * consumer root.
33
31
  * - When `node_modules/@quazardous/qdadm` is a symlink (file:/workspace
34
32
  * link — qdadm's own dev mode against a testbed app), its realpath is
35
33
  * appended to `server.fs.allow` so qdadm's `?raw` dynamic imports (i18n
@@ -44,9 +42,6 @@ import fs from 'node:fs'
44
42
  import path from 'node:path'
45
43
  import { searchForWorkspaceRoot, type Plugin, type UserConfig } from 'vite'
46
44
 
47
- /** qdadm's CJS transitive deps that must be pre-bundled (internal knowledge). */
48
- const CJS_TRANSITIVES = ['pluralize']
49
-
50
45
  export interface QdadmVitePluginOptions {
51
46
  /**
52
47
  * Extra packages to dedupe on top of the defaults
@@ -84,12 +79,10 @@ export function qdadmVitePlugin(options: QdadmVitePluginOptions = {}): Plugin {
84
79
  // Symlinked install (file:/workspace link)? Allow serving from the
85
80
  // link target, which typically lives outside the consumer's root.
86
81
  const fsAllow: string[] = []
87
- let symlinked = false
88
82
  try {
89
83
  const pkgDir = path.join(root, 'node_modules', '@quazardous', 'qdadm')
90
84
  const real = fs.realpathSync(pkgDir)
91
85
  if (real !== pkgDir) {
92
- symlinked = true
93
86
  fsAllow.push(searchForWorkspaceRoot(root), real)
94
87
  }
95
88
  } catch {
@@ -123,13 +116,6 @@ export function qdadmVitePlugin(options: QdadmVitePluginOptions = {}): Plugin {
123
116
  },
124
117
  optimizeDeps: {
125
118
  exclude: [...widgetExcludes, ...themesExcludes, '@quazardous/qdadm'],
126
- // One form per install mode: the nested path resolves through a
127
- // real node_modules chain (npm installs), the plain form through a
128
- // symlink realpath — declaring the unused one logs a "Failed to
129
- // resolve dependency" warning (skybot testbed, #1389).
130
- include: symlinked
131
- ? [...CJS_TRANSITIVES]
132
- : CJS_TRANSITIVES.map((dep) => `@quazardous/qdadm > ${dep}`),
133
119
  },
134
120
  ...(fsAllow.length > 0 ? { server: { fs: { allow: fsAllow } } } : {}),
135
121
  }
package/src/vite-env.d.ts CHANGED
@@ -32,19 +32,3 @@ declare module '*.sass' {
32
32
  const content: string
33
33
  export default content
34
34
  }
35
-
36
- // `pluralize` ships as plain JS without bundled `.d.ts`. The official
37
- // types live in `@types/pluralize` but pulling them in as a runtime
38
- // dep here is overkill for a single-call usage. Declare the minimum
39
- // surface we use so `strict` mode is happy without DefinitelyTyped.
40
- declare module 'pluralize' {
41
- interface PluralizeFn {
42
- (word: string, count?: number, inclusive?: boolean): string
43
- singular(word: string): string
44
- plural(word: string, count?: number, inclusive?: boolean): string
45
- isPlural(word: string): boolean
46
- isSingular(word: string): boolean
47
- }
48
- const pluralize: PluralizeFn
49
- export default pluralize
50
- }
@@ -1,45 +0,0 @@
1
- /**
2
- * TestManager - Auto-generated EntityManager
3
- *
4
- * Generated by qdadm/gen/generateManagers
5
- * DO NOT EDIT MANUALLY - Changes will be overwritten
6
- *
7
- * Entity: test
8
- * Endpoint: /test
9
- */
10
-
11
- import { EntityManager } from '@quazardous/qdadm'
12
- import { ApiStorage } from '@quazardous/qdadm'
13
-
14
- /**
15
- * Schema definition for test
16
- * @type {import('qdadm/gen').UnifiedEntitySchema}
17
- */
18
- export const testSchema = {
19
- name: "test",
20
- endpoint: "/test",
21
- fields: {}
22
- }
23
-
24
- /**
25
- * Storage options for test
26
- */
27
- const storageOptions = {
28
- endpoint: "/test"
29
- }
30
-
31
- /**
32
- * TestManager instance
33
- *
34
- * Provides CRUD operations for test entity.
35
- *
36
- * @type {EntityManager}
37
- */
38
- export const testManager = new EntityManager({
39
- ...{
40
- name: "test",
41
- idField: "id",
42
- fields: {}
43
- },
44
- storage: new ApiStorage(storageOptions)
45
- })
@@ -1,19 +0,0 @@
1
- /**
2
- * Type declarations for pluralize module
3
- */
4
- declare module 'pluralize' {
5
- function pluralize(word: string, count?: number, inclusive?: boolean): string
6
-
7
- namespace pluralize {
8
- function plural(word: string): string
9
- function singular(word: string): string
10
- function isPlural(word: string): boolean
11
- function isSingular(word: string): boolean
12
- function addPluralRule(rule: string | RegExp, replacement: string): void
13
- function addSingularRule(rule: string | RegExp, replacement: string): void
14
- function addIrregularRule(single: string, plural: string): void
15
- function addUncountableRule(word: string | RegExp): void
16
- }
17
-
18
- export = pluralize
19
- }