@docsector/docsector-reader 0.2.3 → 0.2.5

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/bin/docsector.js CHANGED
@@ -23,7 +23,7 @@ const packageRoot = resolve(__dirname, '..')
23
23
  const args = process.argv.slice(2)
24
24
  const command = args[0]
25
25
 
26
- const VERSION = '0.2.0'
26
+ const VERSION = '0.2.3'
27
27
 
28
28
  const HELP = `
29
29
  Docsector Reader v${VERSION}
@@ -71,7 +71,13 @@ function getTemplatePackageJson (name) {
71
71
  serve: 'docsector serve'
72
72
  },
73
73
  dependencies: {
74
- '@docsector/docsector-reader': '^0.2.0'
74
+ '@docsector/docsector-reader': '^0.2.3',
75
+ '@quasar/extras': '^1.16.12',
76
+ 'quasar': '^2.16.6',
77
+ 'vue': '^3.5.13',
78
+ 'vue-i18n': '^9.0.0',
79
+ 'vue-router': '^4.0.0',
80
+ 'vuex': '^4.0.1'
75
81
  }
76
82
  }, null, 2)
77
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docsector/docsector-reader",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "A documentation rendering engine built with Vue 3, Quasar v2 and Vite. Transform Markdown into beautiful, navigable documentation sites.",
5
5
  "productName": "Docsector Reader",
6
6
  "author": "Rodrigo de Araujo Vieira",
@@ -62,24 +62,32 @@
62
62
  "test": "echo \"No test specified\" && exit 0"
63
63
  },
64
64
  "dependencies": {
65
+ "@quasar/app-vite": "^2.1.0",
65
66
  "@quasar/cli": "^2.5.0",
66
- "@quasar/extras": "^1.16.12",
67
+ "autoprefixer": "^10.4.2",
67
68
  "axios": "^1.7.7",
68
69
  "core-js": "^3.6.5",
69
- "q-colorize-mixin": "^2.0.0-alpha.5",
70
- "quasar": "^2.16.6",
71
- "vue": "^3.5.13",
72
- "vue-i18n": "^9.0.0",
73
- "vue-router": "^4.0.0",
74
- "vuex": "^4.0.1",
75
70
  "hjson": "^3.2.2",
76
71
  "markdown-it": "^13.0.1",
77
72
  "markdown-it-attrs": "^4.1.6",
78
73
  "prismjs": "^1.27.0",
79
- "@quasar/app-vite": "^2.1.0",
80
- "autoprefixer": "^10.4.2"
74
+ "q-colorize-mixin": "^2.0.0-alpha.5"
75
+ },
76
+ "peerDependencies": {
77
+ "@quasar/extras": "^1.16.12",
78
+ "quasar": "^2.16.6",
79
+ "vue": "^3.5.13",
80
+ "vue-i18n": "^9.0.0",
81
+ "vue-router": "^4.0.0",
82
+ "vuex": "^4.0.1"
81
83
  },
82
84
  "devDependencies": {
85
+ "@quasar/extras": "^1.16.12",
86
+ "quasar": "^2.16.6",
87
+ "vue": "^3.5.13",
88
+ "vue-i18n": "^9.0.0",
89
+ "vue-router": "^4.0.0",
90
+ "vuex": "^4.0.1",
83
91
  "eslint": "^8.57.0",
84
92
  "eslint-config-prettier": "^8.1.0",
85
93
  "eslint-plugin-import": "^2.19.1",
@@ -152,6 +152,30 @@ export function createQuasarConfig (options = {}) {
152
152
  viteConf.resolve = viteConf.resolve || {}
153
153
  viteConf.resolve.alias = viteConf.resolve.alias || {}
154
154
 
155
+ // Deduplicate Vue ecosystem packages to prevent dual-instance issues.
156
+ // When the package is installed from NPM, Vue, vue-router, vuex, etc.
157
+ // can end up duplicated (one copy in consumer's node_modules, another
158
+ // nested inside the package). This causes useRoute(), useStore(), etc.
159
+ // to return undefined because they inject from a different Vue instance.
160
+ viteConf.resolve.dedupe = [
161
+ ...(viteConf.resolve.dedupe || []),
162
+ 'vue', 'vue-router', 'vuex', 'vue-i18n', 'quasar', '@quasar/extras'
163
+ ]
164
+
165
+ // Force Vite to pre-bundle Vue ecosystem packages.
166
+ // Vite's dep scanner only discovers bare imports from source files,
167
+ // not from .vue files inside node_modules. Without this, vue-router,
168
+ // vuex and vue-i18n are served as raw ESM modules while the router
169
+ // entry (which IS pre-bundled) gets its OWN copy of these libraries
170
+ // baked into its chunk — creating two separate JS module instances
171
+ // with different Symbols. This breaks inject/provide: useRoute(),
172
+ // useStore(), useI18n() all return undefined.
173
+ viteConf.optimizeDeps = viteConf.optimizeDeps || {}
174
+ viteConf.optimizeDeps.include = [
175
+ ...(viteConf.optimizeDeps.include || []),
176
+ 'vue', 'vue-router', 'vuex', 'vue-i18n'
177
+ ]
178
+
155
179
  if (!isStandalone) {
156
180
  // --- Consumer project mode ---
157
181
  // Allow Vite to serve files from the package root (needed for symlinked/npm-linked packages)