From 8b3ca09753ff90aa9622f9e9f3bf4095c68ccf19 Mon Sep 17 00:00:00 2001 From: Razvan Stoenescu Date: Fri, 13 Dec 2024 13:24:07 +0200 Subject: [PATCH] fix(create-quasar): ui kit error when creating project folder #17701 --- create-quasar/package.json | 2 +- create-quasar/templates/ui-kit/.eslintrc.cjs | 1 - create-quasar/templates/ui-kit/index.js | 11 ----------- .../quasar-v2/ae-install/app-extension/src/install.js | 2 +- .../quasar-v2/ae-prompts/app-extension/src/prompts.js | 2 +- .../ae-uninstall/app-extension/src/uninstall.js | 2 +- .../ui-kit/quasar-v2/ae/app-extension/_package.json | 2 +- .../ui-kit/quasar-v2/ae/app-extension/src/index.js | 2 +- 8 files changed, 6 insertions(+), 18 deletions(-) diff --git a/create-quasar/package.json b/create-quasar/package.json index 082f7dee135..e5fb86ec058 100644 --- a/create-quasar/package.json +++ b/create-quasar/package.json @@ -1,6 +1,6 @@ { "name": "create-quasar", - "version": "1.11.5", + "version": "1.11.6", "description": "Scaffolds Quasar Apps, AppExtensions or UI kits", "type": "module", "author": { diff --git a/create-quasar/templates/ui-kit/.eslintrc.cjs b/create-quasar/templates/ui-kit/.eslintrc.cjs index 16fb1c21c92..c37d34e6d34 100644 --- a/create-quasar/templates/ui-kit/.eslintrc.cjs +++ b/create-quasar/templates/ui-kit/.eslintrc.cjs @@ -11,7 +11,6 @@ module.exports = { 'packageDescription', 'aeDescription', - 'aeCodeFormat', 'umdExportName', 'componentName', diff --git a/create-quasar/templates/ui-kit/index.js b/create-quasar/templates/ui-kit/index.js index f8e1eedeb25..656bc373303 100644 --- a/create-quasar/templates/ui-kit/index.js +++ b/create-quasar/templates/ui-kit/index.js @@ -96,17 +96,6 @@ export async function script ({ scope, utils }) { value: 'uninstall' } ] - }, - - { - type: (_, { quasarVersion, features }) => (quasarVersion === 'v2' && features.ae ? 'select' : null), - name: 'aeCodeFormat', - message: 'Pick the App Extension format:', - initial: 0, - choices: [ - { title: 'ESM (q/app-vite >= 1.5, q/app-webpack >= 3.10)', value: 'esm', description: 'recommended' }, - { title: 'CommonJS', value: 'commonjs' } - ] } ]) diff --git a/create-quasar/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js b/create-quasar/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js index 350d45fbd51..ba01bebfee1 100644 --- a/create-quasar/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js +++ b/create-quasar/templates/ui-kit/quasar-v2/ae-install/app-extension/src/install.js @@ -4,7 +4,7 @@ * Docs: https://quasar.dev/app-extensions/development-guide/install-api */ -<%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) { +export default function (api) { // Quasar compatibility check; you may need // hard dependencies, as in a minimum version of the "quasar" // package or a minimum version of "@quasar/app-*" CLI diff --git a/create-quasar/templates/ui-kit/quasar-v2/ae-prompts/app-extension/src/prompts.js b/create-quasar/templates/ui-kit/quasar-v2/ae-prompts/app-extension/src/prompts.js index bb1c9837122..17197d7a1d8 100644 --- a/create-quasar/templates/ui-kit/quasar-v2/ae-prompts/app-extension/src/prompts.js +++ b/create-quasar/templates/ui-kit/quasar-v2/ae-prompts/app-extension/src/prompts.js @@ -39,6 +39,6 @@ */ -<%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) { +export default function (api) { return [] } diff --git a/create-quasar/templates/ui-kit/quasar-v2/ae-uninstall/app-extension/src/uninstall.js b/create-quasar/templates/ui-kit/quasar-v2/ae-uninstall/app-extension/src/uninstall.js index 146ccce8d06..1f4521287d4 100644 --- a/create-quasar/templates/ui-kit/quasar-v2/ae-uninstall/app-extension/src/uninstall.js +++ b/create-quasar/templates/ui-kit/quasar-v2/ae-uninstall/app-extension/src/uninstall.js @@ -4,6 +4,6 @@ * Docs: https://quasar.dev/app-extensions/development-guide/uninstall-api */ -<%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) { +export default function (api) { // } diff --git a/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/_package.json b/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/_package.json index 3a90ec7fbcb..823e7e428de 100644 --- a/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/_package.json +++ b/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/_package.json @@ -4,7 +4,7 @@ "description": "<%= aeDescription %>", "author": "<%= author %>", "license": "<%= license %>", - "type": "<%= aeCodeFormat === 'esm' ? 'module' : 'commonjs' %>", + "type": "module", "dependencies": { "quasar-ui-<%= name %>": "latest" }, diff --git a/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js b/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js index 4e86f455920..b1ac5495630 100644 --- a/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js +++ b/create-quasar/templates/ui-kit/quasar-v2/ae/app-extension/src/index.js @@ -22,7 +22,7 @@ function extendConf (conf, api) { conf.css.push('~quasar-ui-<%= name %>/src/index.sass') } -<%= aeCodeFormat === 'esm' ? 'export default' : 'module.exports =' %> function (api) { +export default function (api) { // Quasar compatibility check; you may need // hard dependencies, as in a minimum version of the "quasar" // package or a minimum version of "@quasar/app-*" CLI